Skip to content
Snippets Groups Projects
Commit b51dc46b authored by tranoris's avatar tranoris
Browse files

fix for #13

parent 9ec252d5
No related branches found
No related tags found
1 merge request!12Merging 2024Q2_RC into main, creating 2024Q2 Release
...@@ -94,16 +94,20 @@ public class CROrchestrationCheckDeploymentService implements JavaDelegate { ...@@ -94,16 +94,20 @@ public class CROrchestrationCheckDeploymentService implements JavaDelegate {
rlist.add(res); rlist.add(res);
} }
@Valid
ServiceStateType nextState = aService.findNextStateBasedOnSupportingResources(rlist); ServiceStateType currentState = aService.getState();
supd.setState( nextState );
Note n = new Note();
n.setText("Service Status Changed to: " + nextState);
n.setAuthor(compname);
n.setDate(OffsetDateTime.now(ZoneOffset.UTC).toString());
supd.addNoteItem(n);
aService = serviceOrderManager.updateService( aService.getId(), supd, propagateToSO ); ServiceStateType nextState = aService.findNextStateBasedOnSupportingResources(rlist);
if (!currentState.equals(nextState)) {
supd.setState( nextState );
Note n = new Note();
n.setText("Service Status Changed to: " + nextState);
n.setAuthor(compname);
n.setDate(OffsetDateTime.now(ZoneOffset.UTC).toString());
supd.addNoteItem(n);
aService = serviceOrderManager.updateService( aService.getId(), supd, propagateToSO );
}
if ( aService!= null ) { if ( aService!= null ) {
if ( aService.getState().equals(ServiceStateType.ACTIVE) if ( aService.getState().equals(ServiceStateType.ACTIVE)
......
...@@ -68,6 +68,7 @@ public class CRTerminateTask implements JavaDelegate { ...@@ -68,6 +68,7 @@ public class CRTerminateTask implements JavaDelegate {
map.put("clusterMasterURL",getServiceCharacteristic(aService, "clusterMasterURL") ); map.put("clusterMasterURL",getServiceCharacteristic(aService, "clusterMasterURL") );
map.put("org.etsi.osl.serviceId", aService.getId() ); map.put("org.etsi.osl.serviceId", aService.getId() );
map.put("org.etsi.osl.serviceOrderId", aService.getServiceOrder().stream().findFirst().get().getId() ); map.put("org.etsi.osl.serviceOrderId", aService.getServiceOrder().stream().findFirst().get().getId() );
map.put("org.etsi.osl.prefixName",getServiceCharacteristic(aService, "org.etsi.osl.prefixName") );
map.put("org.etsi.osl.namespace", aService.getServiceOrder().stream().findFirst().get().getId() ); map.put("org.etsi.osl.namespace", aService.getServiceOrder().stream().findFirst().get().getId() );
map.put("org.etsi.osl.statusCheckFieldName", getServiceCharacteristic(aService, "_CR_CHECK_FIELD") ); map.put("org.etsi.osl.statusCheckFieldName", getServiceCharacteristic(aService, "_CR_CHECK_FIELD") );
map.put("org.etsi.osl.statusCheckValueStandby", getServiceCharacteristic(aService, "_CR_CHECKVAL_STANDBY") ); map.put("org.etsi.osl.statusCheckValueStandby", getServiceCharacteristic(aService, "_CR_CHECKVAL_STANDBY") );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment