- primitive_id = await self.n2vc.ExecutePrimitive(
- vca_deployed["model"],
- vca_deployed["application"],
- "get-ssh-public-key",
- None,
- )
- vca_deployed["step"] = db_nsr_update[database_entry + "step"] = "get-ssh-public-key"
- vca_deployed["primitive_id"] = db_nsr_update[database_entry + "primitive_id"] =\
- primitive_id
- db_nsr_update[database_entry + "operational-status"] =\
- vca_deployed["operational-status"]
+ try:
+ primitive_id = await self.n2vc.ExecutePrimitive(
+ vca_deployed["model"],
+ vca_deployed["application"],
+ "get-ssh-public-key",
+ None,
+ )
+ vca_deployed["step"] = db_nsr_update[database_entry + "step"] = "get-ssh-public-key"
+ vca_deployed["primitive_id"] = db_nsr_update[database_entry + "primitive_id"] =\
+ primitive_id
+ db_nsr_update[database_entry + "operational-status"] =\
+ vca_deployed["operational-status"]
+ except PrimitiveDoesNotExist:
+ ssh_public_key = None
+ vca_deployed["step"] = db_nsr_update[database_entry + "step"] =\
+ "ssh-public-key-obtained"
+ vca_deployed["ssh-public-key"] = db_nsr_update[database_entry + "ssh-public-key"] =\
+ ssh_public_key
+ step = "charm ssh-public-key for member_vnf_index={} vdu_id={} not needed".format(
+ vca_deployed["member-vnf-index"], vca_deployed["vdu_id"])
+ self.logger.debug(logging_text + step)
+