DaanHoogland commented on code in PR #12144:
URL: https://github.com/apache/cloudstack/pull/12144#discussion_r3956871018
##########
engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql:
##########
Review Comment:
pretty sure the changes in this file need to go in a 23 -> 24 file. Not sure
if it is created yet?
##########
server/src/test/java/com/cloud/vpc/MockConfigurationManagerImpl.java:
##########
@@ -168,6 +172,24 @@ public List<Long> getServiceOfferingZones(Long
serviceOfferingId) {
return null;
}
+ @Override
+ public ServiceOfferingCategory
createServiceOfferingCategory(CreateServiceOfferingCategoryCmd cmd) {
+ // TODO Auto-generated method stub
+ return null;
+ }
Review Comment:
nice trick, I did not encounter this yet, but good to know. I think you
should apply @Hanarion .
##########
engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql:
##########
@@ -19,6 +19,22 @@
-- Schema upgrade from 4.22.1.0 to 4.23.0.0
--;
+CREATE TABLE IF NOT EXISTS `cloud`.`service_offering_category` (
+ `id` bigint unsigned NOT NULL auto_increment,
+ `name` varchar(255) NOT NULL,
+ `uuid` varchar(40),
+ `sort_key` int NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ CONSTRAINT `uc_service_offering_category__uuid` UNIQUE (`uuid`),
+ CONSTRAINT `uc_service_offering_category__name` UNIQUE (`name`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+
+INSERT IGNORE INTO `cloud`.`service_offering_category` (id, name, uuid) VALUES
(1, 'Default', UUID());
+
+CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.service_offering', 'category_id',
'bigint unsigned NOT NULL DEFAULT 1');
+CALL `cloud`.`IDEMPOTENT_DROP_FOREIGN_KEY`('cloud.service_offering',
'fk_service_offering__category_id');
+ALTER TABLE `cloud`.`service_offering` ADD CONSTRAINT
`fk_service_offering__category_id` FOREIGN KEY (`category_id`) REFERENCES
`cloud`.`service_offering_category` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
Review Comment:
@Hanarion , does this one make sense to apply?
##########
api/src/main/java/org/apache/cloudstack/api/ApiConstants.java:
##########
@@ -550,6 +550,7 @@ public class ApiConstants {
public static final String SENT_BYTES = "sentbytes";
public static final String SERIAL = "serial";
public static final String SERVICE_IP = "serviceip";
+ public static final String SERVICE_OFFERING_CATEGORY_ID = "categoryid";
Review Comment:
seems valid
##########
api/src/main/java/org/apache/cloudstack/api/ApiConstants.java:
##########
@@ -550,6 +550,7 @@ public class ApiConstants {
public static final String SENT_BYTES = "sentbytes";
public static final String SERIAL = "serial";
public static final String SERVICE_IP = "serviceip";
+ public static final String SERVICE_OFFERING_CATEGORY_ID = "categoryid";
Review Comment:
seems valid
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]