use of com.cloud.agent.resource.virtualnetwork.ConfigItem in project cloudstack by apache.
the class BumpUpPriorityConfigItem method generateConfig.
@Override
public List<ConfigItem> generateConfig(final NetworkElementCommand cmd) {
final LinkedList<ConfigItem> cfg = new LinkedList<>();
cfg.add(new ScriptConfigItem(VRScripts.RVR_BUMPUP_PRI, null));
return cfg;
}
use of com.cloud.agent.resource.virtualnetwork.ConfigItem in project cosmic by MissionCriticalCloud.
the class AbstractConfigItemFacade method generateConfigItems.
protected List<ConfigItem> generateConfigItems(final Object configuration) {
final List<ConfigItem> cfg = new LinkedList<>();
final String remoteFilename = appendUuidToJsonFiles(destinationFile);
s_logger.debug("Transformed filename " + destinationFile + " to " + remoteFilename);
final String jsonConfigCommand = gson.toJson(configuration);
s_logger.debug("Contents of jsonConfigCommand " + remoteFilename + " is: " + jsonConfigCommand);
final ConfigItem configFile = new FileConfigItem(VRScripts.CONFIG_PERSIST_LOCATION, remoteFilename, jsonConfigCommand);
cfg.add(configFile);
final ConfigItem updateCommand = new ScriptConfigItem(VRScripts.UPDATE_CONFIG, remoteFilename);
cfg.add(updateCommand);
return cfg;
}
use of com.cloud.agent.resource.virtualnetwork.ConfigItem in project cloudstack by apache.
the class SetMonitorServiceConfigItem method generateConfig.
@Override
public List<ConfigItem> generateConfig(final NetworkElementCommand cmd) {
final SetMonitorServiceCommand command = (SetMonitorServiceCommand) cmd;
final MonitorService monitorService = new MonitorService(command.getConfiguration(), cmd.getAccessDetail(SetMonitorServiceCommand.ROUTER_MONITORING_ENABLED), cmd.getAccessDetail(SetMonitorServiceCommand.ROUTER_HEALTH_CHECKS_ENABLED));
setupHealthChecksRelatedInfo(monitorService, command);
monitorService.setDeleteFromProcessedCache(command.shouldDeleteFromProcessedCache());
List<ConfigItem> configItems = generateConfigItems(monitorService);
if (configItems != null && command.shouldReconfigureAfterUpdate()) {
configItems.add(new ScriptConfigItem(VRScripts.CONFIGURE, "monitor_service.json"));
}
return configItems;
}
use of com.cloud.agent.resource.virtualnetwork.ConfigItem in project cloudstack by apache.
the class AbstractConfigItemFacade method generateConfigItems.
protected List<ConfigItem> generateConfigItems(final ConfigBase configuration) {
final List<ConfigItem> cfg = new LinkedList<>();
final String remoteFilename = appendUuidToJsonFiles(destinationFile);
if (s_logger.isDebugEnabled()) {
s_logger.debug("Transformed filename: " + destinationFile + " to: " + remoteFilename);
}
final ConfigItem configFile = new FileConfigItem(VRScripts.CONFIG_PERSIST_LOCATION, remoteFilename, gson.toJson(configuration));
cfg.add(configFile);
// By default keep files in processed cache on VR
final String args = configuration.shouldDeleteFromProcessedCache() ? remoteFilename + " false" : remoteFilename;
final ConfigItem updateCommand = new ScriptConfigItem(VRScripts.UPDATE_CONFIG, args);
cfg.add(updateCommand);
return cfg;
}
Aggregations