use of org.alien4cloud.alm.deployment.configuration.model.OrchestratorDeploymentProperties in project alien4cloud by alien4cloud.
the class OrchestratorPropertiesService method onLocationChanged.
@EventListener
public void onLocationChanged(OnMatchedLocationChangedEvent locationChangedEvent) {
// Remove the values of the orchestrator specific properties.
OrchestratorDeploymentProperties properties = deploymentConfigurationDao.findById(OrchestratorDeploymentProperties.class, AbstractDeploymentConfig.generateId(locationChangedEvent.getEnvironment().getTopologyVersion(), locationChangedEvent.getEnvironment().getId()));
if (properties == null || !locationChangedEvent.getOrchestratorId().equals(properties.getOrchestratorId())) {
// Either no orchestrator properties set until now or orchestrator has changed, so reset properties
properties = new OrchestratorDeploymentProperties(locationChangedEvent.getEnvironment().getTopologyVersion(), locationChangedEvent.getEnvironment().getId(), locationChangedEvent.getOrchestratorId());
deploymentConfigurationDao.save(properties);
}
}
Aggregations