tacker.api.views.vnf_packages module

class tacker.api.views.vnf_packages.ViewBuilder

Bases: BaseViewBuilder

COMPLEX_ATTRIBUTES = ['checksum', 'userDefinedData', 'softwareImages', 'softwareImages/userMetadata', 'softwareImages/checksum', 'additionalArtifacts', 'additionalArtifacts/metadata', 'additionalArtifacts/checksum']
FLATTEN_ATTRIBUTES = {'additionalArtifacts/artifactPath': ('artifact_path', 'string', 'VnfPackageArtifactInfo'), 'additionalArtifacts/checksum/algorithm': ('algorithm', 'string', 'VnfPackageArtifactInfo'), 'additionalArtifacts/checksum/hash': ('hash', 'string', 'VnfPackageArtifactInfo'), 'additionalArtifacts/metadata': ('_metadata', 'dict', 'VnfPackageArtifactInfo'), 'checksum/algorithm': ('algorithm', 'string', 'VnfPackage'), 'checksum/hash': ('hash', 'string', 'VnfPackage'), 'id': ('id', 'uuid', 'VnfPackage'), 'onboardingState': ('onboarding_state', 'enum', 'VnfPackage', ('CREATED', 'UPLOADING', 'PROCESSING', 'ONBOARDED')), 'operationalState': ('operational_state', 'enum', 'VnfPackage', ('ENABLED', 'DISABLED')), 'softwareImages/checksum/algorithm': ('algorithm', 'string', 'VnfSoftwareImage'), 'softwareImages/checksum/hash': ('hash', 'string', 'VnfSoftwareImage'), 'softwareImages/containerFormat': ('container_format', 'string', 'VnfSoftwareImage'), 'softwareImages/createdAt': ('created_at', 'datetime', 'VnfSoftwareImage'), 'softwareImages/diskFormat': ('disk_format', 'string', 'VnfSoftwareImage'), 'softwareImages/id': ('software_image_id', 'uuid', 'VnfSoftwareImage'), 'softwareImages/imagePath': ('image_path', 'string', 'VnfSoftwareImage'), 'softwareImages/minDisk': ('min_disk', 'number', 'VnfSoftwareImage'), 'softwareImages/minRam': ('min_ram', 'number', 'VnfSoftwareImage'), 'softwareImages/name': ('name', 'string', 'VnfSoftwareImage'), 'softwareImages/provider': ('provider', 'string', 'VnfSoftwareImage'), 'softwareImages/size': ('size', 'number', 'VnfSoftwareImage'), 'softwareImages/userMetadata/*': ('metadata', 'key_value_pair', {'key_column': 'key', 'model': 'VnfSoftwareImageMetadata', 'value_column': 'value'}), 'softwareImages/version': ('version', 'string', 'VnfSoftwareImage'), 'usageState': ('usage_state', 'enum', 'VnfPackage', ('IN_USE', 'NOT_IN_USE')), 'userDefinedData/*': ('user_data', 'key_value_pair', {'key_column': 'key', 'model': 'VnfPackageUserData', 'value_column': 'value'}), 'vnfProductName': ('vnfd.vnf_product_name', 'string', 'VnfPackageVnfd'), 'vnfProvider': ('vnfd.vnf_provider', 'string', 'VnfPackageVnfd'), 'vnfSoftwareVersion': ('vnfd.vnf_software_version', 'string', 'VnfPackageVnfd'), 'vnfdId': ('vnfd.vnfd_id', 'uuid', 'VnfPackageVnfd'), 'vnfdVersion': ('vnfd.vnfd_version', 'string', 'VnfPackageVnfd')}
FLATTEN_COMPLEX_ATTRIBUTES = ['userDefinedData/*', 'checksum/algorithm', 'checksum/hash', 'softwareImages/id', 'softwareImages/imagePath', 'softwareImages/diskFormat', 'softwareImages/userMetadata/*', 'softwareImages/size', 'softwareImages/createdAt', 'softwareImages/name', 'softwareImages/minDisk', 'softwareImages/version', 'softwareImages/provider', 'softwareImages/minRam', 'softwareImages/containerFormat', 'softwareImages/checksum/hash', 'softwareImages/checksum/algorithm', 'additionalArtifacts/artifactPath', 'additionalArtifacts/metadata', 'additionalArtifacts/checksum/hash', 'additionalArtifacts/checksum/algorithm']
create(vnf_package)
index(vnf_packages, all_fields=True, exclude_fields=None, fields=None, exclude_default=False)
patch(vnf_package, new_vnf_package)
show(vnf_package)