tacker.objects.vnf_package module

class tacker.objects.vnf_package.VnfPackage(context=None, **kwargs)

Bases: TackerObject, TackerPersistentObject, VersionedObjectDictCompat

ALL_ATTRIBUTES = {'additionalArtifacts': {'artifactPath': ('artifact_path', 'string', 'VnfPackageArtifactInfo'), 'checksum': {'algorithm': ('algorithm', 'string', 'VnfPackageArtifactInfo'), 'hash': ('hash', 'string', 'VnfPackageArtifactInfo')}, 'metadata': ('_metadata', 'dict', 'VnfPackageArtifactInfo')}, 'checksum': {'algorithm': ('algorithm', 'string', 'VnfPackage'), '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'), 'hash': ('hash', 'string', 'VnfSoftwareImage')}, 'containerFormat': ('container_format', 'string', 'VnfSoftwareImage'), 'createdAt': ('created_at', 'datetime', 'VnfSoftwareImage'), 'diskFormat': ('disk_format', 'string', 'VnfSoftwareImage'), 'id': ('software_image_id', 'uuid', 'VnfSoftwareImage'), 'imagePath': ('image_path', 'string', 'VnfSoftwareImage'), 'minDisk': ('min_disk', 'number', 'VnfSoftwareImage'), 'minRam': ('min_ram', 'number', 'VnfSoftwareImage'), 'name': ('name', 'string', 'VnfSoftwareImage'), 'provider': ('provider', 'string', 'VnfSoftwareImage'), 'size': ('size', 'number', 'VnfSoftwareImage'), 'userMetadata/*': ('metadata', 'key_value_pair', {'key_column': 'key', 'model': 'VnfSoftwareImageMetadata', 'value_column': 'value'}), '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')}
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')}
VERSION = '1.1'
property algorithm
create()
property created_at
property deleted
property deleted_at
destroy(context)
property downloading
fields = {'algorithm': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'deleted': Integer(default=0,nullable=True), 'deleted_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'downloading': Integer(default=0,nullable=False), 'hash': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'id': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'location_glance_store': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'onboarding_state': PackageOnboardingStateType(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False,valid_values=('CREATED', 'UPLOADING', 'PROCESSING', 'ONBOARDED')), 'operational_state': PackageOperationalStateType(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False,valid_values=('ENABLED', 'DISABLED')), 'size': Integer(default=0,nullable=False), 'tenant_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'usage_state': PackageUsageStateType(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False,valid_values=('IN_USE', 'NOT_IN_USE')), 'user_data': Dict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'vnf_artifacts': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'vnf_deployment_flavours': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'vnfd': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}
classmethod get_by_id(context, id, expected_attrs=None)
classmethod get_by_id_with_lock(context, id)
property hash
property id
is_package_in_use(context)
property location_glance_store
obj_load_attr(attrname)

Load an additional attribute from the real object.

This should load self.$attrname and cache any data that might be useful for future load operations.

obj_make_compatible(primitive, target_version)

Make an object representation compatible with a target version.

This is responsible for taking the primitive representation of an object and making it suitable for the given target_version. This may mean converting the format of object attributes, removing attributes that have been added since the target version, etc. In general:

  • If a new version of an object adds a field, this routine should remove it for older versions.

  • If a new version changed or restricted the format of a field, this should convert it back to something a client knowing only of the older version will tolerate.

  • If an object that this object depends on is bumped, then this object should also take a version bump. Then, this routine should backlevel the dependent object (by calling its obj_make_compatible()) if the requested version of this object is older than the version where the new dependent object was added.

Parameters:
  • primitive – The result of obj_to_primitive()

  • target_version – The version string requested by the recipient of the object

Raises:

oslo_versionedobjects.exception.UnsupportedObjectError if conversion is not possible for some reason

property onboarding_state
property operational_state
save()

Save the changed fields back to the store.

This is optional for subclasses, but is presented here in the base class for consistency among those that do.

simple_attributes = ['id', 'onboardingState', 'operationalState', 'usageState']
simple_instantiated_attributes = ['vnfProvider', 'vnfProductName', 'vnfdId', 'vnfSoftwareVersion', 'vnfdVersion']
property size
property tenant_id
to_dict(include_fields=None)
property updated_at
property usage_state
property user_data
property vnf_artifacts
property vnf_deployment_flavours
property vnfd
class tacker.objects.vnf_package.VnfPackagesList(*args, **kwargs)

Bases: ObjectListBase, TackerObject

VERSION = '1.0'
fields = {'objects': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}
classmethod get_all(context, expected_attrs=None)
classmethod get_by_filters(context, read_deleted=None, filters=None)
classmethod get_by_marker_filter(context, limit, marker_obj, filters=None, read_deleted=None)
property objects