aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/onboard/clamp.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/steps/onboard/clamp.py')
-rw-r--r--src/onaptests/steps/onboard/clamp.py31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/onaptests/steps/onboard/clamp.py b/src/onaptests/steps/onboard/clamp.py
index 1fc8ae0..afbd7cb 100644
--- a/src/onaptests/steps/onboard/clamp.py
+++ b/src/onaptests/steps/onboard/clamp.py
@@ -84,18 +84,19 @@ class OnboardClampStep(YamlTemplateBaseStep):
service.create()
self._logger.info(" Service %s created", service)
- service.add_resource(vf)
-
- # we add the artifact to the first VNF
- self._logger.info("Try to add blueprint to %s", vf.name)
- payload_file = open(settings.CONFIGURATION_PATH + 'tca-microservice.yaml', 'rb')
- data = payload_file.read()
- self._logger.info("DCAE INVENTORY BLUEPRINT file retrieved")
- service.add_artifact_to_vf(vnf_name=vf.name,
- artifact_type="DCAE_INVENTORY_BLUEPRINT",
- artifact_name="tca-microservice.yaml",
- artifact=data)
- payload_file.close()
- service.checkin()
- service.onboard()
- self._logger.info("DCAE INVENTORY BLUEPRINT ADDED")
+ if not service.distributed:
+ service.add_resource(vf)
+
+ # we add the artifact to the first VNF
+ self._logger.info("Try to add blueprint to %s", vf.name)
+ payload_file = open(settings.CONFIGURATION_PATH + 'tca-microservice.yaml', 'rb')
+ data = payload_file.read()
+ self._logger.info("DCAE INVENTORY BLUEPRINT file retrieved")
+ service.add_artifact_to_vf(vnf_name=vf.name,
+ artifact_type="DCAE_INVENTORY_BLUEPRINT",
+ artifact_name="tca-microservice.yaml",
+ artifact=data)
+ payload_file.close()
+ service.checkin()
+ service.onboard()
+ self._logger.info("DCAE INVENTORY BLUEPRINT ADDED")