From e94f538c676ce95f4e3218167374f23d63bc5621 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Wed, 20 Dec 2023 14:38:49 +0200 Subject: [PATCH 1/8] changes to support parent child characteristics --- .../etsi/osl/osom/lcm/LcmBaseExecutor.java | 148 +++++++++++++++++- ...CROrchestrationCheckDeploymentService.java | 6 +- .../management/CreateReservedService.java | 4 +- ...FVOrchestrationCheckDeploymentService.java | 10 +- .../osom/management/ServiceOrderManager.java | 6 +- .../serviceactions/ServiceActionCheck.java | 4 +- 6 files changed, 162 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/etsi/osl/osom/lcm/LcmBaseExecutor.java b/src/main/java/org/etsi/osl/osom/lcm/LcmBaseExecutor.java index 585b5d0..c7e3bc8 100644 --- a/src/main/java/org/etsi/osl/osom/lcm/LcmBaseExecutor.java +++ b/src/main/java/org/etsi/osl/osom/lcm/LcmBaseExecutor.java @@ -1,7 +1,10 @@ package org.etsi.osl.osom.lcm; import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Optional; import java.util.function.Consumer; @@ -27,6 +30,8 @@ import org.etsi.osl.tmf.lcm.model.LCMRuleSpecification; import org.etsi.osl.tmf.prm669.model.RelatedParty; import org.etsi.osl.tmf.scm633.model.ServiceSpecRelationship; import org.etsi.osl.tmf.sim638.model.Service; +import org.etsi.osl.tmf.sim638.model.ServiceCreate; +import org.etsi.osl.tmf.sim638.model.ServiceUpdate; import org.etsi.osl.tmf.so641.model.ServiceOrder; import org.etsi.osl.tmf.so641.model.ServiceOrderCreate; import org.etsi.osl.tmf.so641.model.ServiceOrderItemRelationship; @@ -788,10 +793,151 @@ public abstract class LcmBaseExecutor { return ""; } + + + + /** + * Set the value to a characteristics of a referenced service + * @param serviceName the name of the service reference + * @param characteristics map with name.value + * @param value + */ + public void setServiceRefCharacteristicsValues(String serviceName, HashMap charvals) { + + //logger.debug( String.format( "setServiceRefPropValue %s %s %s ", serviceName, characteristicName, value ) ); + logger.debug( String.format( "setServiceRefCharacteristicsValues for %s ", serviceName ) ); + + Service ctxService = this.vars.getService(); + + if (ctxService == null) { + ServiceCreate scre = this.vars.getServiceToCreate(); + if (scre != null) { + for (String charname : charvals.keySet()) { + setCharacteristicOfCurrentService( serviceName + "::" + charname, charvals.get(charname) ); + } + } + return; + } + + @NotNull @Valid ServiceRef refSrvice = null; + + for (ServiceRef sr : ctxService.getSupportingService()) { + if ( sr.getName().equals(serviceName) ) { + refSrvice = sr; + break; + } + } + + + if (refSrvice == null) { + return; + } + + if (this.vars.getServiceOrderManager() != null) { + Service aService = this.vars.getServiceOrderManager().retrieveService(refSrvice.getId()); + if (aService != null) { + + ServiceUpdate supd = new ServiceUpdate(); + Note n = new Note(); + n.setAuthor("LCMRULE " + this.lcmspec.getName()); + n.setDate(OffsetDateTime.now(ZoneOffset.UTC).toString()); + String note = ""; + for (String charname : charvals.keySet()) { + setCharacteristicOfCurrentService( serviceName + "::" + charname, charvals.get(charname) ); + + Characteristic servicecrspecLast = aService.getServiceCharacteristicByName(charname); + if (servicecrspecLast != null) { + servicecrspecLast.getValue().setValue( charvals.get(charname) ); + supd.addServiceCharacteristicItem(servicecrspecLast); + note += charname + "=" + charvals.get(charname)+ ", "; + } + } + + + n.setText( String.format( "New characterisictic values for ServiceRef %s: %s" , serviceName, note )); + supd.addNoteItem(n); + this.vars.getServiceOrderManager().updateService(aService.getId(), supd, true); + + } + + } + + } + +// /** +// * Set the value to a characteristic of a referenced service +// * @param serviceName the name of the service reference +// * @param characteristicName +// * @param value +// */ +// public void setServiceRefPropValue( String serviceName, String characteristicName, String value ) { +// logger.debug( String.format( "setServiceRefPropValue %s %s %s ", serviceName, characteristicName, value ) ); +// Service ctxService = this.vars.getService(); +// +// +// if (ctxService == null) { +// ServiceCreate scre = this.vars.getServiceToCreate(); +// if (scre != null) { +// setCharacteristicOfCurrentService( serviceName + "::" + characteristicName, value); +// } +// return; +// } +// +// +// +// +// +// +// @NotNull @Valid ServiceRef refSrvice = null; +// +// for (ServiceRef sr : ctxService.getSupportingService()) { +// if ( sr.getName().equals(serviceName) ) { +// refSrvice = sr; +// break; +// } +// } +// +// +// setCharacteristicOfCurrentService( serviceName + "::" + characteristicName, value); +// +// if (refSrvice == null) { +// return; +// } +// +// if (this.vars.getServiceOrderManager() != null) { +// Service aService = this.vars.getServiceOrderManager().retrieveService(refSrvice.getId()); +// if (aService != null) { +// +// ServiceUpdate supd = new ServiceUpdate(); +// +// Characteristic servicecrspecLast = +// aService.getServiceCharacteristicByName(characteristicName); +// if (servicecrspecLast != null) { +// servicecrspecLast.getValue().setValue(value); +// supd.addServiceCharacteristicItem(servicecrspecLast); +// Note n = new Note(); +// n.setAuthor("LCMRULE " + this.lcmspec.getName()); +// n.setDate(OffsetDateTime.now(ZoneOffset.UTC).toString()); +// n.setText("Set new value (" + value + ") to ref Service (" + serviceName +// + ") Characteristic: " + characteristicName); +// supd.addNoteItem(n); +// this.vars.getServiceOrderManager().updateService(aService.getId(), supd, true); +// +// +// } +// +// } +// +// } +// +// } - //createServiceRefIf("Bundle B", getServiceRefPropValue("BundleA", "state", "").equals("active")==true); + + + + //createServiceRefIf("Bundle B", getServiceRefPropValue("BundleA", "state", "").equals("active")==true); public boolean createServiceRefIf(String serviceName, boolean b) { logger.debug( String.format("createServiceRefwhen serviceName=%s = %s", serviceName, b ) ); diff --git a/src/main/java/org/etsi/osl/osom/management/CROrchestrationCheckDeploymentService.java b/src/main/java/org/etsi/osl/osom/management/CROrchestrationCheckDeploymentService.java index d13ff59..221c861 100644 --- a/src/main/java/org/etsi/osl/osom/management/CROrchestrationCheckDeploymentService.java +++ b/src/main/java/org/etsi/osl/osom/management/CROrchestrationCheckDeploymentService.java @@ -67,7 +67,7 @@ public class CROrchestrationCheckDeploymentService implements JavaDelegate { ServiceUpdate supd = new ServiceUpdate(); - boolean propagateToSO = false; + boolean triggerServiceActionQueue = false; //retrieve the related supporting resource by id and check its status //ResourceRef supresourceRef = aService.getSupportingResource().stream().findFirst().get();//we assume for now we have only one related resource @@ -84,7 +84,7 @@ public class CROrchestrationCheckDeploymentService implements JavaDelegate { if ( res == null ) { supd.setState( ServiceStateType.TERMINATED); execution.setVariable("serviceDeploymentFinished", Boolean.TRUE); - Service serviceResult = serviceOrderManager.updateService( aService.getId(), supd, propagateToSO ); + Service serviceResult = serviceOrderManager.updateService( aService.getId(), supd, triggerServiceActionQueue ); return; } @@ -145,7 +145,7 @@ public class CROrchestrationCheckDeploymentService implements JavaDelegate { supd.setState( ServiceStateType.INACTIVE ); } - Service serviceResult = serviceOrderManager.updateService( aService.getId(), supd, propagateToSO ); + Service serviceResult = serviceOrderManager.updateService( aService.getId(), supd, triggerServiceActionQueue ); if ( serviceResult!= null ) { if ( serviceResult.getState().equals(ServiceStateType.ACTIVE) diff --git a/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java b/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java index 9feeb41..f6a8955 100644 --- a/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java +++ b/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java @@ -160,8 +160,6 @@ public class CreateReservedService implements JavaDelegate { if ( partnerOrg != null ) { createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.AUTOMATICALLY_MANAGED, partnerOrg, parentService); - - } else if (specrel.getType().equals("ResourceFacingServiceSpecification")) { createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.AUTOMATICALLY_MANAGED, null, parentService); @@ -329,7 +327,7 @@ public class CreateReservedService implements JavaDelegate { } } } - + //also add parent service as relationship to parent ServiceRelationship srelationship = new ServiceRelationship(); diff --git a/src/main/java/org/etsi/osl/osom/management/NFVOrchestrationCheckDeploymentService.java b/src/main/java/org/etsi/osl/osom/management/NFVOrchestrationCheckDeploymentService.java index e81aab1..0214589 100644 --- a/src/main/java/org/etsi/osl/osom/management/NFVOrchestrationCheckDeploymentService.java +++ b/src/main/java/org/etsi/osl/osom/management/NFVOrchestrationCheckDeploymentService.java @@ -87,7 +87,7 @@ public class NFVOrchestrationCheckDeploymentService implements JavaDelegate { ServiceUpdate supd = new ServiceUpdate(); boolean aVNFINDEXREFadded = false; - boolean propagateToSO = false; + boolean triggerServiceActionQueue = false; if ( aService.getServiceCharacteristic() != null ) { for (Characteristic c : aService.getServiceCharacteristic()) { @@ -103,17 +103,17 @@ public class NFVOrchestrationCheckDeploymentService implements JavaDelegate { c.setValue( new Any( dd.getInstanceId() + "" )); } else if ( c.getName().equals("NSR")) { c.setValue( new Any( dd.getNsr() + "" )); - propagateToSO = true; + triggerServiceActionQueue = true; } else if ( c.getName().equals("NSLCM")) { c.setValue( new Any( dd.getNs_nslcm_details() + "" )); - propagateToSO = true; + triggerServiceActionQueue = true; } if ( dd.getDeploymentDescriptorVxFInstanceInfo() !=null ) { for ( DeploymentDescriptorVxFInstanceInfo vnfinfo : dd.getDeploymentDescriptorVxFInstanceInfo() ) { if ( c.getName().equals( "VNFINDEXREF_INFO_" + vnfinfo.getMemberVnfIndexRef() )) { c.setValue( new Any( vnfinfo.getVxfInstanceInfo() + "" )); aVNFINDEXREFadded = true; - propagateToSO = true; + triggerServiceActionQueue = true; } } @@ -153,7 +153,7 @@ public class NFVOrchestrationCheckDeploymentService implements JavaDelegate { supd.setState( ServiceStateType.TERMINATED ); } - Service serviceResult = serviceOrderManager.updateService( aService.getId(), supd, propagateToSO ); + Service serviceResult = serviceOrderManager.updateService( aService.getId(), supd, triggerServiceActionQueue ); if ( serviceResult!= null ) { if ( serviceResult.getState().equals(ServiceStateType.ACTIVE) diff --git a/src/main/java/org/etsi/osl/osom/management/ServiceOrderManager.java b/src/main/java/org/etsi/osl/osom/management/ServiceOrderManager.java index 86fb199..6290743 100644 --- a/src/main/java/org/etsi/osl/osom/management/ServiceOrderManager.java +++ b/src/main/java/org/etsi/osl/osom/management/ServiceOrderManager.java @@ -448,16 +448,16 @@ public class ServiceOrderManager { /** * @param serviceId * @param s - * @param propagateToSO is a cryptic thing. However it is used as follows: if FALSE, to just update the service status in catalog without further taking any action. + * @param triggerServiceActionQueue is a cryptic thing. However it is used as follows: if FALSE, to just update the service status in catalog without further taking any action. * if TRUE then the ServiceUpdate will trigger a ServiceActionQueue to further process the update. So this is needed to avoid these kinds of deadlocks * @return */ - public org.etsi.osl.tmf.sim638.model.Service updateService(String serviceId, ServiceUpdate s, boolean propagateToSO) { + public org.etsi.osl.tmf.sim638.model.Service updateService(String serviceId, ServiceUpdate s, boolean triggerServiceActionQueue) { logger.info("will update Service : " + serviceId ); try { Map map = new HashMap<>(); map.put("serviceid", serviceId ); - map.put("propagateToSO", propagateToSO ); + map.put("triggerServiceActionQueue", triggerServiceActionQueue ); Object response = template.requestBodyAndHeaders( CATALOG_UPD_SERVICE, toJsonString(s), map); diff --git a/src/main/java/org/etsi/osl/osom/serviceactions/ServiceActionCheck.java b/src/main/java/org/etsi/osl/osom/serviceactions/ServiceActionCheck.java index c375e37..00269a8 100644 --- a/src/main/java/org/etsi/osl/osom/serviceactions/ServiceActionCheck.java +++ b/src/main/java/org/etsi/osl/osom/serviceactions/ServiceActionCheck.java @@ -79,7 +79,9 @@ public class ServiceActionCheck implements JavaDelegate { execution.setVariable("saction", "HandleActiveStateChanged"); } else if ( item.getAction().equals( ServiceActionQueueAction.EVALUATE_STATE_CHANGE_TOINACTIVE ) ) { execution.setVariable("saction", "HandleInactiveStateChanged"); - } else if ( item.getAction().equals( ServiceActionQueueAction.EVALUATE_CHARACTERISTIC_CHANGED ) || item.getAction().equals( ServiceActionQueueAction.EVALUATE_CHARACTERISTIC_CHANGED_MANODAY2 ) ) { + } else if ( item.getAction().equals( ServiceActionQueueAction.EVALUATE_CHARACTERISTIC_CHANGED ) + || item.getAction().equals( ServiceActionQueueAction.EVALUATE_CHILD_CHARACTERISTIC_CHANGED ) + || item.getAction().equals( ServiceActionQueueAction.EVALUATE_CHARACTERISTIC_CHANGED_MANODAY2 ) ) { execution.setVariable("saction", "HandleEvaluateService");// default -- GitLab From 23ffc7a5e720ff49289509ccbefe0f01dfe3c263 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Wed, 20 Dec 2023 14:39:01 +0200 Subject: [PATCH 2/8] added banner --- src/main/resources/banner.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/main/resources/banner.txt diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt new file mode 100644 index 0000000..74229cd --- /dev/null +++ b/src/main/resources/banner.txt @@ -0,0 +1,11 @@ + ___ ____ _ _ + / _ \ _ __ ___ _ __ / ___|| (_) ___ ___ + | | | | '_ \ / _ \ '_ \\___ \| | |/ __/ _ \ + | |_| | |_) | __/ | | |___) | | | (_| __/ + \___/| .__/ \___|_| |_|____/|_|_|\___\___| + |_| + __ __________________ + / / __ __ / __/_ __/ __/ _/ + / _ \/ // / / _/ / / _\ \_/ / + /_.__/\_, / /___/ /_/ /___/___/ + /___/ \ No newline at end of file -- GitLab From da9f49aa8f6ef925e242e41b1f67f0eaecd18ea8 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Fri, 19 Jan 2024 16:06:52 +0200 Subject: [PATCH 3/8] sort update --- .../osom/management/CROrchestrationCheckDeploymentService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/etsi/osl/osom/management/CROrchestrationCheckDeploymentService.java b/src/main/java/org/etsi/osl/osom/management/CROrchestrationCheckDeploymentService.java index 6c4f15e..5bbc4d5 100644 --- a/src/main/java/org/etsi/osl/osom/management/CROrchestrationCheckDeploymentService.java +++ b/src/main/java/org/etsi/osl/osom/management/CROrchestrationCheckDeploymentService.java @@ -97,6 +97,7 @@ public class CROrchestrationCheckDeploymentService implements JavaDelegate { @Valid ServiceStateType currentState = aService.getState(); + ServiceStateType nextState = aService.findNextStateBasedOnSupportingResources(rlist); if (!currentState.equals(nextState)) { -- GitLab From d56cb81ac3bb34a98ac351a207b53b8e87b1b435 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Fri, 19 Jan 2024 17:38:16 +0200 Subject: [PATCH 4/8] update --- .../osom/management/CROrchestrationCheckDeploymentService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/etsi/osl/osom/management/CROrchestrationCheckDeploymentService.java b/src/main/java/org/etsi/osl/osom/management/CROrchestrationCheckDeploymentService.java index 5bbc4d5..8d036fe 100644 --- a/src/main/java/org/etsi/osl/osom/management/CROrchestrationCheckDeploymentService.java +++ b/src/main/java/org/etsi/osl/osom/management/CROrchestrationCheckDeploymentService.java @@ -95,8 +95,7 @@ public class CROrchestrationCheckDeploymentService implements JavaDelegate { } @Valid - ServiceStateType currentState = aService.getState(); - + ServiceStateType currentState = aService.getState(); ServiceStateType nextState = aService.findNextStateBasedOnSupportingResources(rlist); -- GitLab From 12582fb87006db24ac94a191a38c2db1fcf68a82 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Tue, 6 Feb 2024 00:16:46 +0200 Subject: [PATCH 5/8] Fix for createServiceRefIf with characteristics --- .../osom/lcm/LCMRulesExecutorVariables.java | 5 +- .../etsi/osl/osom/lcm/LcmBaseExecutor.java | 5 +- .../management/CreateReservedService.java | 64 +++++++++++---- .../management/ProcessCreateServiceRules.java | 77 +++++++++++++------ 4 files changed, 107 insertions(+), 44 deletions(-) diff --git a/src/main/java/org/etsi/osl/osom/lcm/LCMRulesExecutorVariables.java b/src/main/java/org/etsi/osl/osom/lcm/LCMRulesExecutorVariables.java index 198e5b3..312490c 100644 --- a/src/main/java/org/etsi/osl/osom/lcm/LCMRulesExecutorVariables.java +++ b/src/main/java/org/etsi/osl/osom/lcm/LCMRulesExecutorVariables.java @@ -28,7 +28,7 @@ public class LCMRulesExecutorVariables { private Service service; private List compileDiagnosticErrors; private ServiceOrderManager serviceOrderManager; - private Map outParams; + private Map > outParams; /** * @param spec @@ -50,6 +50,7 @@ public class LCMRulesExecutorVariables { this.service = serviceInstance; this.serviceOrderManager = aServiceOrderManager; this.compileDiagnosticErrors = new ArrayList<>(); - this.outParams = new HashMap(); + + this.outParams = new HashMap<>(); } } diff --git a/src/main/java/org/etsi/osl/osom/lcm/LcmBaseExecutor.java b/src/main/java/org/etsi/osl/osom/lcm/LcmBaseExecutor.java index c7e3bc8..c851b5d 100644 --- a/src/main/java/org/etsi/osl/osom/lcm/LcmBaseExecutor.java +++ b/src/main/java/org/etsi/osl/osom/lcm/LcmBaseExecutor.java @@ -938,7 +938,7 @@ public abstract class LcmBaseExecutor { //createServiceRefIf("Bundle B", getServiceRefPropValue("BundleA", "state", "").equals("active")==true); - public boolean createServiceRefIf(String serviceName, boolean b) { + public boolean createServiceRefIf(String serviceName, boolean b, HashMap charvals) { logger.debug( String.format("createServiceRefwhen serviceName=%s = %s", serviceName, b ) ); @@ -952,7 +952,8 @@ public abstract class LcmBaseExecutor { if (serviceIDToCheckDependcy != null) { - this.vars.getOutParams().put( serviceIDToCheckDependcy, Boolean.toString(b) ); + charvals.put("_CREATESERVICEREF_", Boolean.toString(b)); + this.vars.getOutParams().put( serviceIDToCheckDependcy, charvals ); } return false; diff --git a/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java b/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java index f6a8955..5e6270d 100644 --- a/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java +++ b/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java @@ -3,7 +3,9 @@ package org.etsi.osl.osom.management; import java.time.OffsetDateTime; import java.time.ZoneOffset; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.etsi.osl.osom.lcm.LCMRulesController; @@ -96,9 +98,16 @@ public class CreateReservedService implements JavaDelegate { logger.debug("Retrieved Service ID:" + spec.getId()); logger.debug("Retrieved Service Name:" + spec.getName()); + //this map contains as key the id of the serviceSpecs to be created + //and as value a Map of initial characteristics and their values + Map> tobeCreatedInitialCharValues = new HashMap<>(); + + if ( execution.getVariable("serviceSpecsToCreateInitialCharValues") != null ) { + tobeCreatedInitialCharValues = (Map>) execution.getVariable("serviceSpecsToCreateInitialCharValues"); + } //this is a main underlying service for the requested service (restriction) - Service createdUnderlService = addServicesToVariables( spec, sor, soi, parentService ); + Service createdUnderlService = addServicesToVariables( spec, sor, soi, parentService, tobeCreatedInitialCharValues ); soi.getService().setState( ServiceStateType.RESERVED ); soi.setState(ServiceOrderStateType.INPROGRESS); @@ -145,11 +154,12 @@ public class CreateReservedService implements JavaDelegate { * @param servicesHandledByNFVOAutomated * @param servicesLocallyAutomated * @param parentService + * @param tobeCreatedInitialCharValues * @return */ private Service addServicesToVariables(ServiceSpecification specrel, ServiceOrder sor, ServiceOrderItem soi, - Service parentService) { + Service parentService, Map> tobeCreatedInitialCharValues) { logger.debug("\tService spec name :" + specrel.getName()); logger.debug("\tService spec type :" + specrel.getType()); @@ -159,23 +169,23 @@ public class CreateReservedService implements JavaDelegate { if ( partnerOrg != null ) { - createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.AUTOMATICALLY_MANAGED, partnerOrg, parentService); + createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.AUTOMATICALLY_MANAGED, partnerOrg, parentService, tobeCreatedInitialCharValues); } else if (specrel.getType().equals("ResourceFacingServiceSpecification")) { - createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.AUTOMATICALLY_MANAGED, null, parentService); + createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.AUTOMATICALLY_MANAGED, null, parentService, tobeCreatedInitialCharValues); } else if ( specrel.getType().equals("CustomerFacingServiceSpecification") && (specrel.isIsBundle()!=null) && specrel.isIsBundle() ) { - createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.AUTOMATICALLY_MANAGED, null, parentService); + createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.AUTOMATICALLY_MANAGED, null, parentService, tobeCreatedInitialCharValues); } else if ( specrel.getType().equals("CustomerFacingServiceSpecification") && (specrel.findSpecCharacteristicByName("OSAUTOMATED") != null ) ) { - createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.AUTOMATICALLY_MANAGED, null, parentService); + createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.AUTOMATICALLY_MANAGED, null, parentService, tobeCreatedInitialCharValues); } else if ( specrel.getType().equals("CustomerFacingServiceSpecification") && (specrel.findSpecCharacteristicByName("testSpecRef") != null ) ) { - createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.AUTOMATICALLY_MANAGED, null, parentService); + createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.AUTOMATICALLY_MANAGED, null, parentService, tobeCreatedInitialCharValues); } else { - createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.MANUALLY_BY_SERVICE_PROVIDER, null, parentService); + createdServ = createServiceByServiceSpec(sor, soi, specrel, EServiceStartMode.MANUALLY_BY_SERVICE_PROVIDER, null, parentService, tobeCreatedInitialCharValues); } //add now the serviceRef @@ -226,16 +236,20 @@ public class CreateReservedService implements JavaDelegate { } - + /** * @param sor - * @param soi + * @param soi * @param spec - * @return + * @param startMode + * @param partnerOrg + * @param parentService + * @param tobeCreatedInitialCharValues + * @return */ private Service createServiceByServiceSpec(ServiceOrder sor, ServiceOrderItem soi, ServiceSpecification spec, EServiceStartMode startMode, - RelatedParty partnerOrg, Service parentService) { + RelatedParty partnerOrg, Service parentService, Map> tobeCreatedInitialCharValues) { ServiceCreate serviceToCreate = new ServiceCreate(); String servicename = spec.getName(); @@ -282,15 +296,33 @@ public class CreateReservedService implements JavaDelegate { } } + //this map contains as key the id of the serviceSpecs to be created + //and as value a Map of initial characteristics and their values + Map initCharValues = tobeCreatedInitialCharValues.get( spec.getId() ); + //we need to be careful here with the bundle and the related Service Specs, to properly propagate the rules inside //first copy into the newly created service any characteristic values from the order for (ServiceSpecCharacteristic c : spec.getServiceSpecCharacteristic()) { boolean characteristicFound = false; + + //pass any initial value. This has high priority + if ( initCharValues != null ) { + if ( initCharValues.get( c.getName() ) != null ) { + Characteristic orderCharacteristic = new Characteristic() + .value( new Any( initCharValues.get( c.getName() ), initCharValues.get( c.getName() ))) ; + serviceToCreate.addServiceCharacteristicItem( helperCreateCharacteristicItem(c, orderCharacteristic ) ); + characteristicFound = true; + break; + + } + } + + for (Characteristic orderCharacteristic : soi.getService().getServiceCharacteristic()) { String specCharacteristicToSearch = spec.getName() + "::" +c.getName(); if ( orderCharacteristic.getName().equals( specCharacteristicToSearch )) { //copy only characteristics that are related from the order - serviceToCreate.addServiceCharacteristicItem( addServiceCharacteristicItem(c, orderCharacteristic) ); + serviceToCreate.addServiceCharacteristicItem( helperCreateCharacteristicItem(c, orderCharacteristic) ); characteristicFound = true; break; } @@ -301,7 +333,7 @@ public class CreateReservedService implements JavaDelegate { String specCharacteristicToSearch = c.getName(); if ( orderCharacteristic.getName().equals( specCharacteristicToSearch )) { //copy only characteristics that are related from the order - serviceToCreate.addServiceCharacteristicItem( addServiceCharacteristicItem(c, orderCharacteristic) ); + serviceToCreate.addServiceCharacteristicItem( helperCreateCharacteristicItem(c, orderCharacteristic) ); characteristicFound = true; break; } @@ -309,6 +341,8 @@ public class CreateReservedService implements JavaDelegate { } + + } if ( serviceToCreate.getServiceCharacteristic() == null ) { @@ -383,7 +417,7 @@ public class CreateReservedService implements JavaDelegate { return null; } - private Characteristic addServiceCharacteristicItem(ServiceSpecCharacteristic c, Characteristic orderCharacteristic) { + private Characteristic helperCreateCharacteristicItem(ServiceSpecCharacteristic c, Characteristic orderCharacteristic) { Characteristic serviceCharacteristicItem = new Characteristic(); serviceCharacteristicItem.setName( c.getName() ); serviceCharacteristicItem.setValueType( c.getValueType() ); diff --git a/src/main/java/org/etsi/osl/osom/management/ProcessCreateServiceRules.java b/src/main/java/org/etsi/osl/osom/management/ProcessCreateServiceRules.java index 872cf39..f5be292 100644 --- a/src/main/java/org/etsi/osl/osom/management/ProcessCreateServiceRules.java +++ b/src/main/java/org/etsi/osl/osom/management/ProcessCreateServiceRules.java @@ -48,6 +48,9 @@ public class ProcessCreateServiceRules implements JavaDelegate { execution.setVariable("allSupportingServicesCreated", allSupportingServicesCreated ); //by default + + + Service contextService = null; String contextServiceId = (String) execution.getVariable("contextServiceId"); if ( contextServiceId != null ) { @@ -69,29 +72,18 @@ public class ProcessCreateServiceRules implements JavaDelegate { * first find all referenced ServiceSpecs of a ServiceSpec to be created */ boolean foundCreatedButNOTACTIVEServices = false; - Map tobeCreated = new HashMap<>(); + + //this map contains as key the id of the serviceSpecs to be created + //and as value a Map of initial characteristics and their values + Map> tobeCreated = new HashMap<>(); + for (ServiceSpecRelationship specRels : spec.getServiceSpecRelationship()) { logger.debug("\tService specRelsId:" + specRels.getId()); - tobeCreated.put(specRels.getId(), true); + tobeCreated.put(specRels.getId(), null); } - for ( ServiceRef serviceRef: contextService.getSupportingService() ) { - - Service theServiceReferenced = serviceOrderManager.retrieveService( serviceRef.getId() ); - - if ( tobeCreated.get(theServiceReferenced.getServiceSpecificationRef().getId() ) != null ) { - tobeCreated.put( theServiceReferenced.getServiceSpecificationRef().getId(), false); - } - - if ( theServiceReferenced != null ) { - if ( theServiceReferenced.getState().equals( ServiceStateType.RESERVED) ) { - foundCreatedButNOTACTIVEServices = true; - } - } - - } /** @@ -123,20 +115,45 @@ public class ProcessCreateServiceRules implements JavaDelegate { for (String serviceId : vars.getOutParams().keySet()) { if ( vars.getOutParams().get(serviceId) !=null) { - if ( vars.getOutParams().get(serviceId).equals( "true") ) { - tobeCreated.put( serviceId, true && tobeCreated.get(serviceId) ); - } else { - tobeCreated.put( serviceId, false); - allSupportingServicesCreated = false; - } + + + if ( vars.getOutParams().get(serviceId) != null && vars.getOutParams().get(serviceId).get("_CREATESERVICEREF_") !=null) { + + if ( vars.getOutParams().get(serviceId).get("_CREATESERVICEREF_").equals( "true") ) { + vars.getOutParams().get(serviceId).remove( "_CREATESERVICEREF_" ); + HashMap myChars = new HashMap< String , String >( vars.getOutParams().get(serviceId) ); + tobeCreated.put( serviceId, myChars ); + } else { + tobeCreated.remove( serviceId); + allSupportingServicesCreated = false; + } + } + } } + + + //now compare those to be created, with those already created + for ( ServiceRef serviceRef: contextService.getSupportingService() ) { + Service theServiceReferenced = serviceOrderManager.retrieveService( serviceRef.getId() ); + if ( tobeCreated.containsKey(theServiceReferenced.getServiceSpecificationRef().getId() ) ) { + tobeCreated.remove( theServiceReferenced.getServiceSpecificationRef().getId()); + } + + if ( theServiceReferenced != null ) { + if ( theServiceReferenced.getState().equals( ServiceStateType.RESERVED) ) { + foundCreatedButNOTACTIVEServices = true; + } + } + + } + serviceOrderManager.updateService( contextService.getId() , supd, false); //update context service List servicesToCreate = new ArrayList<>(); for (String specid : tobeCreated.keySet()) { - if ( tobeCreated.get(specid) ) { + if ( tobeCreated.get(specid) !=null ) { servicesToCreate.add(specid); allSupportingServicesCreated = false; } @@ -161,11 +178,21 @@ public class ProcessCreateServiceRules implements JavaDelegate { } + if ( contextService.getState().equals( ServiceStateType.INACTIVE ) || contextService.getState().equals( ServiceStateType.TERMINATED ) ) { + allSupportingServicesCreatedAndActive = true; + allSupportingServicesCreated = true; + // this will help us to avoid a deadlock if a failure occurs + } + execution.setVariable("allSupportingServicesCreated", allSupportingServicesCreated ); execution.setVariable("allSupportingServicesCreatedAndActive", allSupportingServicesCreatedAndActive && allSupportingServicesCreated ); //by default execution.setVariable("parentServiceId", contextServiceId); - execution.setVariable("serviceSpecsToCreate", servicesToCreate); + execution.setVariable("serviceSpecsToCreate", servicesToCreate); + execution.setVariable("serviceSpecsToCreateInitialCharValues", tobeCreated); + + + } -- GitLab From 1516920ff9bcd29623a1e90c91cb25bacfd94a13 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Thu, 8 Feb 2024 14:52:47 +0200 Subject: [PATCH 6/8] fix for null --- .../org/etsi/osl/osom/management/ProcessCreateServiceRules.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/etsi/osl/osom/management/ProcessCreateServiceRules.java b/src/main/java/org/etsi/osl/osom/management/ProcessCreateServiceRules.java index f5be292..8aa8166 100644 --- a/src/main/java/org/etsi/osl/osom/management/ProcessCreateServiceRules.java +++ b/src/main/java/org/etsi/osl/osom/management/ProcessCreateServiceRules.java @@ -153,7 +153,7 @@ public class ProcessCreateServiceRules implements JavaDelegate { List servicesToCreate = new ArrayList<>(); for (String specid : tobeCreated.keySet()) { - if ( tobeCreated.get(specid) !=null ) { + if ( tobeCreated.containsKey(specid) ) { servicesToCreate.add(specid); allSupportingServicesCreated = false; } -- GitLab From 4d535fa0e6c1e52f4a78fbcb9f68a5f000dadec4 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Tue, 13 Feb 2024 18:01:34 +0200 Subject: [PATCH 7/8] remove erroneous break --- .../java/org/etsi/osl/osom/management/CreateReservedService.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java b/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java index 5e6270d..82516b5 100644 --- a/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java +++ b/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java @@ -313,7 +313,6 @@ public class CreateReservedService implements JavaDelegate { .value( new Any( initCharValues.get( c.getName() ), initCharValues.get( c.getName() ))) ; serviceToCreate.addServiceCharacteristicItem( helperCreateCharacteristicItem(c, orderCharacteristic ) ); characteristicFound = true; - break; } } -- GitLab From db2ac7a4ee750f5c109af24e460581d85b1b186c Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Wed, 14 Feb 2024 23:22:34 +0200 Subject: [PATCH 8/8] create test case for CREATION rule --- .../etsi/osl/osom/lcm/LCMRulesExecutor.java | 4 +- .../etsi/osl/osom/lcm/LcmBaseExecutor.java | 6 +- .../management/CreateReservedService.java | 1 + .../osl/osom/ProcessOrderIntegrationTest.java | 10 +- src/test/java/org/etsi/osl/osom/SCMocked.java | 32 +++++-- .../LcmCirrosRule1Test_CREATION.json | 31 ++++++ .../LcmRuleListSpecTest_CREATION.json | 9 ++ src/test/resources/cirros_2vnf_ns_RFS.json | 94 +++++++++++++++++++ 8 files changed, 171 insertions(+), 16 deletions(-) create mode 100644 src/test/resources/LcmCirrosRule1Test_CREATION.json create mode 100644 src/test/resources/LcmRuleListSpecTest_CREATION.json diff --git a/src/main/java/org/etsi/osl/osom/lcm/LCMRulesExecutor.java b/src/main/java/org/etsi/osl/osom/lcm/LCMRulesExecutor.java index c9a4786..a157c1d 100644 --- a/src/main/java/org/etsi/osl/osom/lcm/LCMRulesExecutor.java +++ b/src/main/java/org/etsi/osl/osom/lcm/LCMRulesExecutor.java @@ -165,7 +165,7 @@ public class LCMRulesExecutor { ApplicationHome home = new ApplicationHome(LCMRulesExecutor.class); File classesJar = home.getSource(); - if ( classesJar.exists() ) { + if ( classesJar != null && classesJar.exists() ) { optionList.addAll(Arrays.asList("-classpath", classesJar.getAbsoluteFile().toString().replace("-exec", "") )); } logger.debug("classesJar = "+ classesJar); @@ -213,7 +213,7 @@ public class LCMRulesExecutor { URL[] classpath = new URL[] { temp.toUri().toURL() }; - if ( classesJar.exists() ) { + if ( classesJar != null && classesJar.exists() ) { classpath = new URL[] { temp.toUri().toURL(), classesJar.toURI().toURL() }; } logger.debug("classpath = "+ classpath.toString()); diff --git a/src/main/java/org/etsi/osl/osom/lcm/LcmBaseExecutor.java b/src/main/java/org/etsi/osl/osom/lcm/LcmBaseExecutor.java index c851b5d..7e7025a 100644 --- a/src/main/java/org/etsi/osl/osom/lcm/LcmBaseExecutor.java +++ b/src/main/java/org/etsi/osl/osom/lcm/LcmBaseExecutor.java @@ -396,8 +396,10 @@ public abstract class LcmBaseExecutor { System.out.println("============================================================================= \n"); - System.out.println("The value length is apayload= \n" + apayload.length()); - System.out.println("The value is apayload= \n" + apayload); + System.out.println("The value is apayload= \n" + apayload); + if (apayload!=null) { + System.out.println("The value length is apayload= \n" + apayload.length()); + } System.out.println("============================================================================= \n"); if (baseurl != null) { diff --git a/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java b/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java index 82516b5..d545ff9 100644 --- a/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java +++ b/src/main/java/org/etsi/osl/osom/management/CreateReservedService.java @@ -313,6 +313,7 @@ public class CreateReservedService implements JavaDelegate { .value( new Any( initCharValues.get( c.getName() ), initCharValues.get( c.getName() ))) ; serviceToCreate.addServiceCharacteristicItem( helperCreateCharacteristicItem(c, orderCharacteristic ) ); characteristicFound = true; + continue; } } diff --git a/src/test/java/org/etsi/osl/osom/ProcessOrderIntegrationTest.java b/src/test/java/org/etsi/osl/osom/ProcessOrderIntegrationTest.java index 2ded0b1..7ef1c9d 100644 --- a/src/test/java/org/etsi/osl/osom/ProcessOrderIntegrationTest.java +++ b/src/test/java/org/etsi/osl/osom/ProcessOrderIntegrationTest.java @@ -181,7 +181,7 @@ public class ProcessOrderIntegrationTest { assertThat(spec).isInstanceOf(ServiceSpecification.class); assertThat(spec.getServiceSpecCharacteristic().size() ).isEqualTo(11); - assertThat(specCirros.getServiceSpecCharacteristic().size() ).isEqualTo(10); + assertThat(specCirros.getServiceSpecCharacteristic().size() ).isEqualTo(12); assertThat(sorder.getOrderItem().stream().findFirst().get().getService().getServiceCharacteristic().size() ).isEqualTo(2); assertThat(repositoryService.createProcessDefinitionQuery().count()).isEqualTo(15); @@ -224,15 +224,17 @@ public class ProcessOrderIntegrationTest { assertThat( aservice ).isNotNull(); assertThat( aservice.getServiceCharacteristic().size() ).isEqualTo(11); assertThat( aserviceCirros ).isNotNull(); - assertThat( aserviceCirros.getServiceCharacteristic().size() ).isEqualTo(10); + assertThat( aserviceCirros.getServiceCharacteristic().size() ).isEqualTo(12); assertThat( aservice.getServiceCharacteristicByName("Quality Class").getValue().getValue() ).isEqualTo( "1" ); assertThat( aservice.getServiceCharacteristicByName("cirros_2vnf_ns::OSM_CONFIG").getValue().getValue() ).contains( "eeeeeeee-8219-4580-9697-bf4a8f0a08f9" ); assertThat( aservice.getServiceCharacteristicByName("cirros_2vnf_ns::SSHKEY").getValue().getValue() ).isEqualTo( "MCKEYTESTINORDERExampleConcatSSHKEY_EnhancedByRule" ); //check that the cirros_2vnf_ns::SSHKEY value from the service order has been passed properly to the related RFS service assertThat( aserviceCirros.getServiceCharacteristicByName("OSM_CONFIG").getValue().getValue() ).contains( "eeeeeeee-8219-4580-9697-bf4a8f0a08f9" ); - assertThat( aserviceCirros.getServiceCharacteristicByName("SSHKEY").getValue().getValue() ).isEqualTo( "MCKEYTESTINORDERExampleConcatSSHKEY_EnhancedByRule" ); - + assertThat( aserviceCirros.getServiceCharacteristicByName("SSHKEY").getValue().getValue() ).isEqualTo( "MCKEYTESTINORDERExampleConcatSSHKEY_EnhancedByRule" ); + assertThat( aserviceCirros.getServiceCharacteristicByName("AProgrammaticChar").getValue().getValue() ).isEqualTo( "AProgrammaticNSDIDValue" ); + assertThat( aserviceCirros.getServiceCharacteristicByName("Another ProgrammaticChar").getValue().getValue() ).isEqualTo( "AnotherValue" ); + //we will further check LCM rules! diff --git a/src/test/java/org/etsi/osl/osom/SCMocked.java b/src/test/java/org/etsi/osl/osom/SCMocked.java index d048d88..f4b391d 100644 --- a/src/test/java/org/etsi/osl/osom/SCMocked.java +++ b/src/test/java/org/etsi/osl/osom/SCMocked.java @@ -222,7 +222,12 @@ public class SCMocked { InputStream in = new FileInputStream( sspec ); sspectext = IOUtils.toString(in, "UTF-8"); return sspectext; - } + } else if ( id.equals("89e027b5-24a9-4db7-b422-a963c9feeb7a") ) { + File sspec = new File( "src/test/resources/LcmCirrosRule1Test_CREATION.json" ); + InputStream in = new FileInputStream( sspec ); + sspectext = IOUtils.toString(in, "UTF-8"); + return sspectext; + } @@ -241,13 +246,24 @@ public class SCMocked { String sspectext = null; - if ( specid.equals("f2b74f90-4140-4895-80d1-ef243398117b") ) { - File sspec = new File( "src/test/resources/LcmRuleListSpecTest.json" ); - InputStream in = new FileInputStream( sspec ); - sspectext = IOUtils.toString(in, "UTF-8"); - return sspectext; - - } + if ( phaseName.equals("PRE_PROVISION") ) { + if ( specid.equals("f2b74f90-4140-4895-80d1-ef243398117b") ) { + File sspec = new File( "src/test/resources/LcmRuleListSpecTest.json" ); + InputStream in = new FileInputStream( sspec ); + sspectext = IOUtils.toString(in, "UTF-8"); + return sspectext; + + } + } else if ( phaseName.equals("CREATION") ) { + if ( specid.equals("f2b74f90-4140-4895-80d1-ef243398117b") ) { + File sspec = new File( "src/test/resources/LcmRuleListSpecTest_CREATION.json" ); + InputStream in = new FileInputStream( sspec ); + sspectext = IOUtils.toString(in, "UTF-8"); + return sspectext; + + + } + } return "[]"; diff --git a/src/test/resources/LcmCirrosRule1Test_CREATION.json b/src/test/resources/LcmCirrosRule1Test_CREATION.json new file mode 100644 index 0000000..591a7fd --- /dev/null +++ b/src/test/resources/LcmCirrosRule1Test_CREATION.json @@ -0,0 +1,31 @@ +{ + "uuid": "40f027b5-24a9-4db7-b422-a963c9feeb7a", + "lastUpdate": null, + "@baseType": "BaseRootEntity", + "@schemaLocation": null, + "@type": "BaseEntity", + "href": null, + "name": "OSM config depending on class", + "description": "LCM Rule for specification Cirros Test OSM config depending on class", + "lifecycleStatus": "In study", + "version": null, + "validFor": null, + "id": "40f027b5-24a9-4db7-b422-a963c9feeb7a", + "lcmrulephase": "CREATION", + "content": "EQQuality Class2cirros_2vnf_ns::OSM_CONFIG0b6853fc-8219-4580-9697-bf4a8f0a08f9c224eb48-419e-4097-8a1d-11ec1bba087fEQQuality Class1cirros_2vnf_ns::OSM_CONFIGeeeeeeee-8219-4580-9697-bf4a8f0a08f9eeeeeeee-419e-4097-8a1d-11ec1bba087fcirros_2vnf_ns::OSM_CONFIGcccccccc-8219-4580-9697-bf4a8f0a08f9cccccccc-419e-4097-8a1d-11ec1bba087f", + "code": "{\r\n java.util.HashMap charvals = new java.util.HashMap<>();\r\n charvals.put(\"AProgrammaticChar\",\"AProgrammaticNSDIDValue\");\r\n charvals.put(\"Another ProgrammaticChar\",\"AnotherValue\");\r\n createServiceRefIf(\"cirros_2vnf_ns\", !(getCharValFromStringType(\"cirros_2vnf_ns::PackagingFormat\").equals(\"\")==true), charvals);\r\n }", + + "serviceSpecs": [ + { + "@baseType": "BaseEntity", + "@schemaLocation": null, + "@type": null, + "href": null, + "name": "Cirros Test", + "version": null, + "targetServiceSchema": null, + "@referredType": null, + "id": "f2b74f90-4140-4895-80d1-ef243398117b" + } + ] +} \ No newline at end of file diff --git a/src/test/resources/LcmRuleListSpecTest_CREATION.json b/src/test/resources/LcmRuleListSpecTest_CREATION.json new file mode 100644 index 0000000..70d831f --- /dev/null +++ b/src/test/resources/LcmRuleListSpecTest_CREATION.json @@ -0,0 +1,9 @@ +[ + { + "uuid": "89e027b5-24a9-4db7-b422-a963c9feeb7a", + "id": "89e027b5-24a9-4db7-b422-a963c9feeb7a", + "name": "OSM config depending on class", + "description": "LCM Rule for specification Cirros Test OSM config depending on class", + "lcmrulephase": "CREATION" + } +] \ No newline at end of file diff --git a/src/test/resources/cirros_2vnf_ns_RFS.json b/src/test/resources/cirros_2vnf_ns_RFS.json index 9e6b49f..1a4aea6 100644 --- a/src/test/resources/cirros_2vnf_ns_RFS.json +++ b/src/test/resources/cirros_2vnf_ns_RFS.json @@ -499,6 +499,100 @@ }, "@valueSchemaLocation": null, "id": "5c50dbe4-42f9-4d12-bed9-987c75b592d6" + }, + { + "uuid": "3a50dbe4-42f9-4d12-bed9-987c75b592d6", + "@baseType": "BaseRootEntity", + "@schemaLocation": null, + "@type": "org.etsi.osl.tmf.scm633.model.ServiceSpecCharacteristic", + "href": null, + "name": "AProgrammaticChar", + "configurable": false, + "description": "AProgrammaticChar dscription", + "extensible": null, + "isUnique": null, + "maxCardinality": 1, + "minCardinality": 1, + "regex": null, + "valueType": "TEXT", + "serviceSpecCharRelationship": [], + "serviceSpecCharacteristicValue": [ + { + "uuid": "54e00574-6d22-4f48-8bd4-17884f895c13", + "@baseType": "BaseEntity", + "@schemaLocation": null, + "@type": null, + "href": null, + "isDefault": true, + "rangeInterval": null, + "regex": null, + "unitOfMeasure": "N/A", + "valueFrom": null, + "valueTo": null, + "valueType": null, + "validFor": { + "endDateTime": "2040-09-06T23:48:24+03:00", + "startDateTime": "2020-09-06T23:48:24+03:00" + }, + "value": { + "value": "xzzx", + "alias": "AliASAProgrammaticChar" + } + } + ], + "validFor": { + "endDateTime": "2040-09-06T23:48:24+03:00", + "startDateTime": "2020-09-06T23:48:24+03:00" + }, + "@valueSchemaLocation": null, + "id": "5c50dbe4-42f9-4d12-bed9-987c75b592d6" + }, + { + "uuid": "3a22dbe4-42f9-4d12-bed9-987c75b592d6", + "@baseType": "BaseRootEntity", + "@schemaLocation": null, + "@type": "org.etsi.osl.tmf.scm633.model.ServiceSpecCharacteristic", + "href": null, + "name": "Another ProgrammaticChar", + "configurable": false, + "description": "Another AProgrammaticChar dscription", + "extensible": null, + "isUnique": null, + "maxCardinality": 1, + "minCardinality": 1, + "regex": null, + "valueType": "TEXT", + "serviceSpecCharRelationship": [], + "serviceSpecCharacteristicValue": [ + { + "uuid": "54e00522-6d22-4f48-8bd4-17884f895c13", + "@baseType": "BaseEntity", + "@schemaLocation": null, + "@type": null, + "href": null, + "isDefault": true, + "rangeInterval": null, + "regex": null, + "unitOfMeasure": "N/A", + "valueFrom": null, + "valueTo": null, + "valueType": null, + "validFor": { + "endDateTime": "2040-09-06T23:48:24+03:00", + "startDateTime": "2020-09-06T23:48:24+03:00" + }, + "value": { + "value": "aawwaa", + "alias": "AliASAProgrammaticChar" + } + } + ], + "validFor": { + "endDateTime": "2040-09-06T23:48:24+03:00", + "startDateTime": "2020-09-06T23:48:24+03:00" + }, + "@valueSchemaLocation": null, + "id": "5c50dbe4-42f9-4d12-bed9-987c75b592d6" } ], "serviceSpecRelationship": [], -- GitLab