+ # Try to get the updated descriptor from the api endpoint so that we have
+ # the updated descriptor file in the exported archive and the name of the archive
+ # tar matches the name in the yaml descriptor file. Proceed with the current
+ # file if there's an error
+ #
+ json_desc_msg = src_serializer.to_json_string(desc_msg)
+ desc_name, desc_version = desc_msg.name, desc_msg.version
+ try:
+ d = collections.defaultdict(dict)
+ sub_dict = self.onboarder.get_updated_descriptor(desc_msg)
+ root_key, sub_key = "{0}:{0}-catalog".format(desc_type), "{0}:{0}".format(desc_type)
+ # root the dict under "vnfd:vnfd-catalog"
+ d[root_key] = sub_dict
+
+ json_desc_msg = json.dumps(d)
+ desc_name, desc_version = sub_dict[sub_key]['name'], sub_dict[sub_key]['version']
+
+ except Exception as e:
+ msg = "Exception {} raised - {}".format(e.__class__.__name__, str(e))
+ self.log.debug(msg)
+
+ # exported filename based on the updated descriptor name
+ self.filename = "{}_{}".format(desc_name, desc_version)
+