mirror of https://github.com/apache/cloudstack.git
Fixing categoryId being inconsistent following refactoring of names, breaking functionnality
This commit is contained in:
parent
77f821f65b
commit
2cdf59a87e
|
|
@ -529,8 +529,8 @@ 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 = "serviceofferingcategoryid";
|
||||
public static final String SERVICE_OFFERING_CATEGORY_NAME = "serviceofferingcategoryname";
|
||||
public static final String SERVICE_OFFERING_CATEGORY_ID = "categoryid";
|
||||
public static final String SERVICE_OFFERING_CATEGORY_NAME = "categoryname";
|
||||
public static final String SERVICE_OFFERING_ID = "serviceofferingid";
|
||||
public static final String SERVICE_OFFERING_NAME = "serviceofferingname";
|
||||
public static final String SESSIONKEY = "sessionkey";
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
|||
required = false,
|
||||
description = "the ID of the service offering category to associate with this offering",
|
||||
since = "4.23")
|
||||
private Long serviceOfferingCategoryId;
|
||||
private Long categoryId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////// Accessors ///////////////////////
|
||||
|
|
@ -570,8 +570,8 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
|||
return Boolean.TRUE.equals(gpuDisplay);
|
||||
}
|
||||
|
||||
public Long getServiceOfferingCategoryId() {
|
||||
return serviceOfferingCategoryId;
|
||||
public Long getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -3470,7 +3470,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
|||
}
|
||||
|
||||
// validate optional category id
|
||||
final Long serviceOfferingCategoryId = cmd.getServiceOfferingCategoryId();
|
||||
final Long serviceOfferingCategoryId = cmd.getCategoryId();
|
||||
if (serviceOfferingCategoryId != null && _serviceOfferingCategoryDao.findById(serviceOfferingCategoryId) == null) {
|
||||
throw new InvalidParameterValueException("Please specify a valid service offering category id");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export default {
|
|||
filters: ['active', 'inactive'],
|
||||
columns: ['name', 'displaytext', 'state', 'cpunumber', 'cpuspeed', 'memory', 'gpu', 'category', 'domain', 'zone', 'order'],
|
||||
details: () => {
|
||||
var fields = ['name', 'id', 'displaytext', 'offerha', 'provisioningtype', 'storagetype', 'iscustomized', 'iscustomizediops', 'limitcpuuse', 'cpunumber', 'cpuspeed', 'memory', 'hosttags', 'tags', 'storageaccessgroups', 'storagetags', 'domain', 'zone', 'created', 'dynamicscalingenabled', 'diskofferingstrictness', 'encryptroot', 'purgeresources', 'leaseduration', 'gpucardid', 'gpucardname', 'vgpuprofileid', 'vgpuprofilename', 'gpucount', 'gpudisplay', 'leaseexpiryaction', 'externaldetails', 'categoryid', 'category']
|
||||
var fields = ['name', 'id', 'displaytext', 'offerha', 'provisioningtype', 'storagetype', 'iscustomized', 'iscustomizediops', 'limitcpuuse', 'cpunumber', 'cpuspeed', 'memory', 'hosttags', 'tags', 'storageaccessgroups', 'storagetags', 'domain', 'zone', 'created', 'dynamicscalingenabled', 'diskofferingstrictness', 'encryptroot', 'purgeresources', 'leaseduration', 'gpucardid', 'gpucardname', 'vgpuprofileid', 'vgpuprofilename', 'gpucount', 'gpudisplay', 'leaseexpiryaction', 'externaldetails', 'category']
|
||||
if (store.getters.apis.createServiceOffering &&
|
||||
store.getters.apis.createServiceOffering.params.filter(x => x.name === 'storagepolicy').length > 0) {
|
||||
fields.splice(6, 0, 'vspherestoragepolicy')
|
||||
|
|
|
|||
|
|
@ -2308,9 +2308,9 @@ export default {
|
|||
pageSize: 10
|
||||
}
|
||||
if (categoryId && categoryId !== '-1') {
|
||||
params.serviceofferingcategoryid = categoryId
|
||||
params.categoryid = categoryId
|
||||
} else {
|
||||
params.serviceofferingcategoryid = null
|
||||
params.categoryid = null
|
||||
}
|
||||
this.handleSearchFilter('serviceOfferings', params)
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue