use of com.cloud.configuration.Configuration in project CloudStack-archive by CloudStack-extras.
the class UpdateCfgCmd method execute.
@Override
public void execute() {
Configuration cfg = _configService.updateConfiguration(this);
if (cfg != null) {
ConfigurationResponse response = _responseGenerator.createConfigurationResponse(cfg);
response.setResponseName(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update config");
}
}
use of com.cloud.configuration.Configuration in project CloudStack-archive by CloudStack-extras.
the class ListCfgsByCmd method execute.
@Override
public void execute() {
List<? extends Configuration> result = _mgr.searchForConfigurations(this);
ListResponse<ConfigurationResponse> response = new ListResponse<ConfigurationResponse>();
List<ConfigurationResponse> configResponses = new ArrayList<ConfigurationResponse>();
for (Configuration cfg : result) {
ConfigurationResponse cfgResponse = _responseGenerator.createConfigurationResponse(cfg);
cfgResponse.setObjectName("configuration");
configResponses.add(cfgResponse);
}
response.setResponses(configResponses);
response.setResponseName(getCommandName());
this.setResponseObject(response);
}
Aggregations