self.create_files(structure["files"], output, package_type)
return "Created"
- def validate(self, base_directory, recursive=True):
+ def validate(self, base_directory, recursive=True, old_format=False):
"""
**Validate OSM Descriptors given a path**
desc_type = "-"
try:
desc_type, descriptor_data = validation_im.yaml_validation(self, descriptor_data)
+ if not old_format:
+ if ( desc_type=="vnfd" or desc_type=="nsd" ):
+ print("OSM descriptor '{}' written in an unsupported format. Please update to ETSI SOL006 format".format(desc_path))
+ print("Package validation skipped. It can still be done with 'osm package-validate --old'")
+ print("Package build can still be done with 'osm package-build --skip-validation'")
+ raise Exception("Not SOL006 format")
validation_im.pyangbind_validation(self, desc_type, descriptor_data)
table.append({"type": desc_type, "path": desc_path, "valid": "OK", "error": "-"})
except Exception as e:
:returns: cloud-init content
"""
+ self._logger.debug("")
return "---\n#cloud-config"
def create_files(self, files, file_content, package_type):