Browse Source

Object definitions of multi version API support

This patch includes only object definitions used by multi version
API support. There is no logic in this patch.

The logic part of multi version API support is provided with a
following patch.

Because the definition of the object had much number of the files,
the patch of logic part is separated to make code review easy.

Implementation notes:
Objects are defined as is according to ETSI NFV-SOL specifications.
This means attributes of objects are not converted to snake case
but camel case as is because the conversion is meaningless
obviously.
Naming convention of class is as follows:
* for a object represents a type with the definition in a section
  of the specication, as is and may be followed by V2 (or V1) to
  distinguish it from another version in the future.
  ex. 'SOL003 5.5.2.2 Type: VnfInstance' => VnfInstanceV2
* for a object representing an inlined struct, 'class name which
  the member belongs to' + '_' + 'member name which changed the
  first letter to the capital letter'.
  ex. the object representing instantiatedVnfInfo in VnfInstance
  => VnfInstanceV2_InstantiatedVnfInfo.
Note that 'nullable=True' means cardinality may be zero in this
object definitions while it means null is OK in the persistent
object originally.

Implements: blueprint multi-version-api
Implements: blueprint support-nfv-solv3-start-and-terminate-vnf
Implements: blueprint support-nfv-solv3-query-vnf-instances
Implements: blueprint support-nfv-solv3-query-operation-occurrences
Implemetes: blueprint support-nfv-solv3-subscriptions
Change-Id: I93711971906132b8dcf794864d22e2c1b326bc3a
changes/92/803692/11
Itsuro Oda 10 months ago
parent
commit
49ab5f9a15
  1. 33
      tacker/sol_refactored/objects/common/cp_protocol_data.py
  2. 32
      tacker/sol_refactored/objects/common/ext_link_port_data.py
  3. 40
      tacker/sol_refactored/objects/common/ext_managed_virtual_link_data.py
  4. 37
      tacker/sol_refactored/objects/common/ext_virtual_link_data.py
  5. 111
      tacker/sol_refactored/objects/common/fields.py
  6. 67
      tacker/sol_refactored/objects/common/ip_over_ethernet_address_data.py
  7. 30
      tacker/sol_refactored/objects/common/link.py
  8. 30
      tacker/sol_refactored/objects/common/notification_link.py
  9. 34
      tacker/sol_refactored/objects/common/problem_details.py
  10. 33
      tacker/sol_refactored/objects/common/resource_handle.py
  11. 72
      tacker/sol_refactored/objects/common/subscription_authentication.py
  12. 34
      tacker/sol_refactored/objects/common/vim_connection_info.py
  13. 33
      tacker/sol_refactored/objects/common/vnf_ext_cp_config.py
  14. 32
      tacker/sol_refactored/objects/common/vnf_ext_cp_data.py
  15. 80
      tacker/sol_refactored/objects/common/vnf_instance_subscription_filter.py
  16. 37
      tacker/sol_refactored/objects/v1/constraint_resource_ref.py
  17. 43
      tacker/sol_refactored/objects/v1/fields.py
  18. 85
      tacker/sol_refactored/objects/v1/grant.py
  19. 38
      tacker/sol_refactored/objects/v1/grant_info.py
  20. 64
      tacker/sol_refactored/objects/v1/grant_request.py
  21. 51
      tacker/sol_refactored/objects/v1/placement_constraint.py
  22. 46
      tacker/sol_refactored/objects/v1/resource_definition.py
  23. 35
      tacker/sol_refactored/objects/v1/snapshot_resource_definition.py
  24. 37
      tacker/sol_refactored/objects/v1/vim_compute_resource_flavour.py
  25. 35
      tacker/sol_refactored/objects/v1/vim_constraint.py
  26. 35
      tacker/sol_refactored/objects/v1/vim_snapshot_resource.py
  27. 36
      tacker/sol_refactored/objects/v1/vim_software_image.py
  28. 33
      tacker/sol_refactored/objects/v1/zone_group_info.py
  29. 36
      tacker/sol_refactored/objects/v1/zone_info.py
  30. 41
      tacker/sol_refactored/objects/v2/affected_ext_link_port.py
  31. 49
      tacker/sol_refactored/objects/v2/affected_virtual_link.py
  32. 46
      tacker/sol_refactored/objects/v2/affected_virtual_storage.py
  33. 49
      tacker/sol_refactored/objects/v2/affected_vnfc.py
  34. 30
      tacker/sol_refactored/objects/v2/cancel_mode.py
  35. 40
      tacker/sol_refactored/objects/v2/change_current_vnf_pkg_request.py
  36. 35
      tacker/sol_refactored/objects/v2/change_ext_vnf_connectivity_request.py
  37. 40
      tacker/sol_refactored/objects/v2/change_vnf_flavour_request.py
  38. 34
      tacker/sol_refactored/objects/v2/cp_protocol_info.py
  39. 31
      tacker/sol_refactored/objects/v2/create_vnf_pkg_info_request.py
  40. 33
      tacker/sol_refactored/objects/v2/create_vnf_request.py
  41. 32
      tacker/sol_refactored/objects/v2/create_vnf_snapshot_info_request.py
  42. 35
      tacker/sol_refactored/objects/v2/create_vnf_snapshot_request.py
  43. 33
      tacker/sol_refactored/objects/v2/ext_link_port_info.py
  44. 39
      tacker/sol_refactored/objects/v2/ext_managed_virtual_link_info.py
  45. 36
      tacker/sol_refactored/objects/v2/ext_virtual_link_info.py
  46. 73
      tacker/sol_refactored/objects/v2/external_artifacts_access_config.py
  47. 175
      tacker/sol_refactored/objects/v2/fields.py
  48. 34
      tacker/sol_refactored/objects/v2/heal_vnf_request.py
  49. 41
      tacker/sol_refactored/objects/v2/instantiate_vnf_request.py
  50. 66
      tacker/sol_refactored/objects/v2/ip_over_ethernet_address_info.py
  51. 35
      tacker/sol_refactored/objects/v2/lccn_links.py
  52. 55
      tacker/sol_refactored/objects/v2/lccn_subscription.py
  53. 38
      tacker/sol_refactored/objects/v2/lccn_subscription_request.py
  54. 45
      tacker/sol_refactored/objects/v2/lifecycle_change_notifications_filter.py
  55. 39
      tacker/sol_refactored/objects/v2/modifications_triggered_by_vnf_pkg_change.py
  56. 34
      tacker/sol_refactored/objects/v2/monitoring_parameter.py
  57. 36
      tacker/sol_refactored/objects/v2/operate_vnf_request.py
  58. 33
      tacker/sol_refactored/objects/v2/pkgm_links.py
  59. 91
      tacker/sol_refactored/objects/v2/pkgm_notification_filter.py
  60. 35
      tacker/sol_refactored/objects/v2/pkgm_subscription_request.py
  61. 35
      tacker/sol_refactored/objects/v2/revert_to_vnf_snapshot_request.py
  62. 32
      tacker/sol_refactored/objects/v2/scale_info.py
  63. 34
      tacker/sol_refactored/objects/v2/scale_vnf_request.py
  64. 32
      tacker/sol_refactored/objects/v2/scale_vnf_to_level_request.py
  65. 33
      tacker/sol_refactored/objects/v2/terminate_vnf_request.py
  66. 58
      tacker/sol_refactored/objects/v2/upload_vnf_package_from_uri_request.py
  67. 38
      tacker/sol_refactored/objects/v2/virtual_storage_resource_info.py
  68. 39
      tacker/sol_refactored/objects/v2/vnf_ext_cp_info.py
  69. 36
      tacker/sol_refactored/objects/v2/vnf_identifier_creation_notification.py
  70. 36
      tacker/sol_refactored/objects/v2/vnf_identifier_deletion_notification.py
  71. 44
      tacker/sol_refactored/objects/v2/vnf_info_modification_request.py
  72. 45
      tacker/sol_refactored/objects/v2/vnf_info_modifications.py
  73. 109
      tacker/sol_refactored/objects/v2/vnf_instance.py
  74. 136
      tacker/sol_refactored/objects/v2/vnf_lcm_op_occ.py
  75. 61
      tacker/sol_refactored/objects/v2/vnf_lcm_operation_occurrence_notification.py
  76. 32
      tacker/sol_refactored/objects/v2/vnf_link_port_data.py
  77. 36
      tacker/sol_refactored/objects/v2/vnf_link_port_info.py
  78. 43
      tacker/sol_refactored/objects/v2/vnf_package_artifact_info.py
  79. 41
      tacker/sol_refactored/objects/v2/vnf_package_change_notification.py
  80. 39
      tacker/sol_refactored/objects/v2/vnf_package_onboarding_notification.py
  81. 70
      tacker/sol_refactored/objects/v2/vnf_package_software_image_info.py
  82. 74
      tacker/sol_refactored/objects/v2/vnf_pkg_info.py
  83. 34
      tacker/sol_refactored/objects/v2/vnf_pkg_info_modifications.py
  84. 54
      tacker/sol_refactored/objects/v2/vnf_snapshot.py
  85. 47
      tacker/sol_refactored/objects/v2/vnf_snapshot_info.py
  86. 33
      tacker/sol_refactored/objects/v2/vnf_snapshot_info_modification_request.py
  87. 33
      tacker/sol_refactored/objects/v2/vnf_snapshot_info_modifications.py
  88. 32
      tacker/sol_refactored/objects/v2/vnf_state_snapshot_info.py
  89. 40
      tacker/sol_refactored/objects/v2/vnf_virtual_link_resource_info.py
  90. 35
      tacker/sol_refactored/objects/v2/vnfc_info.py
  91. 32
      tacker/sol_refactored/objects/v2/vnfc_info_modifications.py
  92. 59
      tacker/sol_refactored/objects/v2/vnfc_resource_info.py
  93. 52
      tacker/sol_refactored/objects/v2/vnfc_snapshot_info.py

33
tacker/sol_refactored/objects/common/cp_protocol_data.py

@ -0,0 +1,33 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 4.4.1.10b
@base.TackerObjectRegistry.register
class CpProtocolData(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'layerProtocol': fields.EnumField(
valid_values=['IP_OVER_ETHERNET'], nullable=False),
'ipOverEthernet': fields.ObjectField(
'IpOverEthernetAddressData', nullable=True),
}

32
tacker/sol_refactored/objects/common/ext_link_port_data.py

@ -0,0 +1,32 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 4.4.1.14
@base.TackerObjectRegistry.register
class ExtLinkPortData(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'id': fields.StringField(nullable=False),
'resourceHandle': fields.ObjectField(
'ResourceHandle', nullable=False),
}

40
tacker/sol_refactored/objects/common/ext_managed_virtual_link_data.py

@ -0,0 +1,40 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 4.4.1.12
@base.TackerObjectRegistry.register
class ExtManagedVirtualLinkData(base.TackerObject,
base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'id': fields.StringField(nullable=False),
'vnfVirtualLinkDescId': fields.StringField(nullable=False),
'vimConnectionId': fields.StringField(nullable=True),
'resourceProviderId': fields.StringField(nullable=True),
'resourceId': fields.StringField(nullable=False),
# NOTE: this should be corrected in a future SOL release.
'vnfLinkPort': fields.ListOfObjectsField(
'VnfLinkPortDataV2', nullable=True),
'extManagedMultisiteVirtualLinkId': fields.StringField(
nullable=True),
}

37
tacker/sol_refactored/objects/common/ext_virtual_link_data.py

@ -0,0 +1,37 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 4.4.1.11
@base.TackerObjectRegistry.register
class ExtVirtualLinkData(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'id': fields.StringField(nullable=False),
'vimConnectionId': fields.StringField(nullable=True),
'resourceProviderId': fields.StringField(nullable=True),
'resourceId': fields.StringField(nullable=False),
'extCps': fields.ListOfObjectsField(
'VnfExtCpData', nullable=False),
'extLinkPorts': fields.ListOfObjectsField(
'ExtLinkPortData', nullable=True),
}

111
tacker/sol_refactored/objects/common/fields.py

@ -0,0 +1,111 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import uuid
from oslo_serialization import jsonutils
from oslo_versionedobjects import fields as ovoo_fields
AutoTypedField = ovoo_fields.AutoTypedField
BaseEnumField = ovoo_fields.BaseEnumField
BooleanField = ovoo_fields.BooleanField
DateTimeField = ovoo_fields.DateTimeField
DictOfStringsField = ovoo_fields.DictOfStringsField
Enum = ovoo_fields.Enum
EnumField = ovoo_fields.EnumField
Field = ovoo_fields.Field
FieldType = ovoo_fields.FieldType
IntegerField = ovoo_fields.IntegerField
IPAddressField = ovoo_fields.IPAddressField
List = ovoo_fields.List
ListOfEnumField = ovoo_fields.ListOfEnumField
ListOfObjectsField = ovoo_fields.ListOfObjectsField
ListOfStringsField = ovoo_fields.ListOfStringsField
MACAddressField = ovoo_fields.MACAddressField
NonNegativeIntegerField = ovoo_fields.NonNegativeIntegerField
ObjectField = ovoo_fields.ObjectField
StringField = ovoo_fields.StringField
class BaseTackerEnum(Enum):
def __init__(self):
super(BaseTackerEnum, self).__init__(valid_values=self.__class__.ALL)
class DictOfObjectsField(AutoTypedField):
def __init__(self, objtype, subclasses=False, **kwargs):
self.AUTO_TYPE = ovoo_fields.Dict(
ovoo_fields.Object(objtype, subclasses))
self.objname = objtype
super(DictOfObjectsField, self).__init__(**kwargs)
class Jsonable(ovoo_fields.FieldType):
def coerce(self, obj, attr, value):
jsonutils.dumps(value)
return value
# NFV-SOL 013
# - v3.4.1 7.1.5
class KeyValuePairsField(AutoTypedField):
AUTO_TYPE = ovoo_fields.Dict(Jsonable(), nullable=True)
class ListOfIPAddressesField(AutoTypedField):
AUTO_TYPE = ovoo_fields.List(ovoo_fields.IPAddress())
class UUID(ovoo_fields.UUID):
def coerce(self, obj, attr, value):
uuid.UUID(value)
return str(value)
class UUIDField(AutoTypedField):
AUTO_TYPE = UUID()
class ListOfUUIDField(AutoTypedField):
AUTO_TYPE = ovoo_fields.List(UUID())
class Version(ovoo_fields.StringField):
pass
class VersionField(AutoTypedField):
AUTO_TYPE = Version()
class ListOfVersionsField(AutoTypedField):
AUTO_TYPE = ovoo_fields.List(Version())
class Uri(ovoo_fields.String):
pass
class UriField(AutoTypedField):
AUTO_TYPE = Uri()
class Checksum(ovoo_fields.String):
pass
class ChecksumField(AutoTypedField):
AUTO_TYPE = Checksum()

67
tacker/sol_refactored/objects/common/ip_over_ethernet_address_data.py

@ -0,0 +1,67 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 4.4.1.10c
@base.TackerObjectRegistry.register
class IpOverEthernetAddressData(base.TackerObject,
base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'macAddress': fields.MACAddressField(nullable=True),
'segmentationId': fields.StringField(nullable=True),
'ipAddresses': fields.ListOfObjectsField(
'IpOverEthernetAddressData_IpAddresses',
nullable=True),
}
@base.TackerObjectRegistry.register
class IpOverEthernetAddressData_IpAddresses(
base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'type': fields.EnumField(
valid_values=['IPV4', 'IPV6'], nullable=False),
'fixedAddresses': fields.ListOfIPAddressesField(nullable=True),
'numDynamicAddresses': fields.IntegerField(nullable=True),
'addressRange': fields.ObjectField(
'IpOverEthernetAddressData_IpAddresses_AddressRange',
nullable=True),
'subnetId': fields.StringField(nullable=True),
}
@base.TackerObjectRegistry.register
class IpOverEthernetAddressData_IpAddresses_AddressRange(
base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'minAddress': fields.IPAddressField(nullable=False),
'maxAddress': fields.IPAddressField(nullable=False),
}

30
tacker/sol_refactored/objects/common/link.py

@ -0,0 +1,30 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 013
# - v3.4.1 7.1.3
@base.TackerObjectRegistry.register
class Link(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'href': fields.UriField(nullable=False),
}

30
tacker/sol_refactored/objects/common/notification_link.py

@ -0,0 +1,30 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 013
# - v3.4.1 7.1.4
@base.TackerObjectRegistry.register
class NotificationLink(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'href': fields.UriField(nullable=False),
}

34
tacker/sol_refactored/objects/common/problem_details.py

@ -0,0 +1,34 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 013
# - v3.4.1 6.3
@base.TackerObjectRegistry.register
class ProblemDetails(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'type': fields.UriField(nullable=True),
'title': fields.StringField(nullable=True),
'status': fields.IntegerField(nullable=False),
'detail': fields.StringField(nullable=False),
'instance': fields.UriField(nullable=True),
}

33
tacker/sol_refactored/objects/common/resource_handle.py

@ -0,0 +1,33 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 4.4.1.7
@base.TackerObjectRegistry.register
class ResourceHandle(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'vimConnectionId': fields.StringField(nullable=True),
'resourceProviderId': fields.StringField(nullable=True),
'resourceId': fields.StringField(nullable=False),
'vimLevelResourceType': fields.StringField(nullable=True),
}

72
tacker/sol_refactored/objects/common/subscription_authentication.py

@ -0,0 +1,72 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 013
# - v3.4.1 Table 8.3.4-1
@base.TackerObjectRegistry.register
class SubscriptionAuthentication(base.TackerObject,
base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'authType': fields.ListOfEnumField(
valid_values=[
'BASIC',
'OAUTH2_CLIENT_CREDENTIALS',
'TLS_CERT',
],
nullable=False),
'paramsBasic': fields.ObjectField(
'SubscriptionAuthentication_ParamsBasic', nullable=True),
'paramsOauth2ClientCredentials': fields.ObjectField(
'SubscriptionAuthentication_ParamsOauth2', nullable=True),
}
@base.TackerObjectRegistry.register
class SubscriptionAuthentication_ParamsBasic(base.TackerObject,
base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'userName': fields.StringField(nullable=True),
'password': fields.StringField(nullable=True),
}
# NOTE: It should be
# SubscriptionAuthentication_ParamsOauth2ClientCredentials
# according to a principle, but shortened it as it is too long.
@base.TackerObjectRegistry.register
class SubscriptionAuthentication_ParamsOauth2(
base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'clientId': fields.StringField(nullable=True),
'clientPassword': fields.StringField(nullable=True),
'tokenEndpoint': fields.UriField(nullable=True),
}

34
tacker/sol_refactored/objects/common/vim_connection_info.py

@ -0,0 +1,34 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 4.4.1.6
@base.TackerObjectRegistry.register
class VimConnectionInfo(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'vimId': fields.StringField(nullable=True),
'vimType': fields.StringField(nullable=False),
'interfaceInfo': fields.KeyValuePairsField(nullable=True),
'accessInfo': fields.KeyValuePairsField(nullable=True),
'extra': fields.KeyValuePairsField(nullable=True),
}

33
tacker/sol_refactored/objects/common/vnf_ext_cp_config.py

@ -0,0 +1,33 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 4.4.1.10a
@base.TackerObjectRegistry.register
class VnfExtCpConfig(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'parentCpConfigId': fields.StringField(nullable=True),
'linkPortId': fields.StringField(nullable=True),
'cpProtocolData': fields.ListOfObjectsField(
'CpProtocolData', nullable=True),
}

32
tacker/sol_refactored/objects/common/vnf_ext_cp_data.py

@ -0,0 +1,32 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 4.4.1.10
@base.TackerObjectRegistry.register
class VnfExtCpData(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'cpdId': fields.StringField(nullable=False),
'cpConfig': fields.DictOfObjectsField(
'VnfExtCpConfig', nullable=False),
}

80
tacker/sol_refactored/objects/common/vnf_instance_subscription_filter.py

@ -0,0 +1,80 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 4.4.1.5
@base.TackerObjectRegistry.register
class VnfInstanceSubscriptionFilter(base.TackerObject,
base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'vnfdIds': fields.ListOfStringsField(nullable=True),
'vnfProductsFromProviders': fields.ListOfObjectsField(
'_VnfProductsFromProviders', nullable=True),
'vnfInstanceIds': fields.ListOfStringsField(nullable=True),
'vnfInstanceNames': fields.ListOfStringsField(nullable=True),
}
# NOTE: For the following names of internal classes, there should be
# 'VnfInstanceSubscriptionFilter' in the top according to a principle,
# but omits it as it is too long.
@base.TackerObjectRegistry.register
class _VnfProductsFromProviders(
base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'vnfProvider': fields.StringField(nullable=False),
'vnfProducts': fields.ListOfObjectsField(
'_VnfProductsFromProviders_VnfProducts', nullable=True),
}
@base.TackerObjectRegistry.register
class _VnfProductsFromProviders_VnfProducts(
base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'vnfProductName': fields.StringField(nullable=False),
'versions': fields.ListOfObjectsField(
'_VnfProductsFromProviders_VnfProducts_Versions', nullable=True),
}
@base.TackerObjectRegistry.register
class _VnfProductsFromProviders_VnfProducts_Versions(
base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'vnfSoftwareVersion': fields.VersionField(nullable=False),
'vnfdVersions': fields.ListOfVersionsField(nullable=True),
}

37
tacker/sol_refactored/objects/v1/constraint_resource_ref.py

@ -0,0 +1,37 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v2.6.1 9.5.3.8 (API version: 1.3.0)
# - v2.7.1 9.5.3.8 (API version: 1.3.0)
# - v2.8.1 9.5.3.8 (API version: 1.3.0)
# - v3.3.1 9.5.3.8 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class ConstraintResourceRefV1(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'idType': fields.EnumField(
valid_values=['RES_MGMT', 'GRANT'], nullable=False),
'resourceId': fields.StringField(nullable=False),
'vimConnectionId': fields.StringField(nullable=True),
'resourceProviderId': fields.StringField(nullable=True),
}

43
tacker/sol_refactored/objects/v1/fields.py

@ -0,0 +1,43 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v2.6.1 9.5.4.3 (API version: 1.3.0)
# - v2.7.1 9.5.4.3 (API version: 1.3.0)
# - v2.8.1 9.5.4.3 (API version: 1.3.0)
# - v3.3.1 9.5.4.3 (API version: 1.4.0)
class GrantedLcmOperationType(fields.BaseTackerEnum):
INSTANTIATE = 'INSTANTIATE'
SCALE = 'SCALE'
SCALE_TO_LEVEL = 'SCALE_TO_LEVEL'
CHANGE_FLAVOUR = 'CHANGE_FLAVOUR'
TERMINATE = 'TERMINATE'
HEAL = 'HEAL'
OPERATE = 'OPERATE'
CHANGE_EXT_CONN = 'CHANGE_EXT_CONN'
CHANGE_VNFPKG = 'CHANGE_VNFPKG' # since 1.4.0
CREATE_SNAPSHOT = 'CREATE_SNAPSHOT' # since 1.4.0
REVERT_TO_SNAPSHOT = 'REVERT_TO_SNAPSHOT' # since 1.4.0
ALL = (INSTANTIATE, SCALE, SCALE_TO_LEVEL, CHANGE_FLAVOUR,
TERMINATE, HEAL, OPERATE, CHANGE_EXT_CONN, CHANGE_VNFPKG,
CREATE_SNAPSHOT, REVERT_TO_SNAPSHOT)
class GrantedLcmOperationTypeField(fields.BaseEnumField):
AUTO_TYPE = GrantedLcmOperationType()

85
tacker/sol_refactored/objects/v1/grant.py

@ -0,0 +1,85 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 9.5.2.3 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class GrantV1(base.TackerPersistentObject,
base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'id': fields.StringField(nullable=False),
'vnfInstanceId': fields.StringField(nullable=False),
'vnfLcmOpOccId': fields.StringField(nullable=False),
'vimConnectionInfo': fields.DictOfObjectsField(
'VimConnectionInfo', nullable=True),
'zones': fields.ListOfObjectsField(
'ZoneInfoV1', nullable=True),
'zoneGroups': fields.ListOfObjectsField(
'ZoneGroupInfoV1', nullable=True),
'addResources': fields.ListOfObjectsField(
'GrantInfoV1', nullable=True),
'tempResources': fields.ListOfObjectsField(
'GrantInfoV1', nullable=True),
'removeResources': fields.ListOfObjectsField(
'GrantInfoV1', nullable=True),
'updateResources': fields.ListOfObjectsField(
'GrantInfoV1', nullable=True),
'vimAssets': fields.ObjectField(
'GrantV1_VimAssets', nullable=True),
'extVirtualLinks': fields.ListOfObjectsField(
'ExtVirtualLinkData', nullable=True),
'extManagedVirtualLinks': fields.ListOfObjectsField(
'ExtManagedVirtualLinkData', nullable=True),
'additionalParams': fields.KeyValuePairsField(nullable=True),
'_links': fields.ObjectField('GrantV1_Links', nullable=False),
}
@base.TackerObjectRegistry.register
class GrantV1_VimAssets(base.TackerObject,
base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'computeResourceFlavours': fields.ListOfObjectsField(
'VimComputeResourceFlavour', nullable=True),
'softwareImages': fields.ListOfObjectsField(
'VimSoftwareImageV1', nullable=True),
'snapshotResources': fields.ListOfObjectsField(
'VimSnapshotResourceV1', nullable=True),
}
@base.TackerObjectRegistry.register
class GrantV1_Links(base.TackerObject):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'self': fields.ObjectField('Link', nullable=False),
'vnfLcmOpOcc': fields.ObjectField('Link', nullable=False),
'vnfInstance': fields.ObjectField('Link', nullable=False),
}

38
tacker/sol_refactored/objects/v1/grant_info.py

@ -0,0 +1,38 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v2.6.1 9.5.3.3 (API version: 1.3.0)
# - v2.7.1 9.5.3.3 (API version: 1.3.0)
# - v2.8.1 9.5.3.3 (API version: 1.3.0)
# - v3.3.1 9.5.3.3 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class GrantInfoV1(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'resourceDefinitionId': fields.StringField(nullable=False),
'reservationId': fields.StringField(nullable=True),
'vimConnectionId': fields.StringField(nullable=True),
'resourceProviderId': fields.StringField(nullable=True),
'zoneId': fields.StringField(nullable=True),
'resourceGroupId': fields.StringField(nullable=True),
}

64
tacker/sol_refactored/objects/v1/grant_request.py

@ -0,0 +1,64 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
from tacker.sol_refactored.objects.v1 import fields as v1fields
# NFV-SOL 003
# - v3.3.1 9.5.2.2 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class GrantRequestV1(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'vnfInstanceId': fields.StringField(nullable=False),
'vnfLcmOpOccId': fields.StringField(nullable=False),
'vnfdId': fields.StringField(nullable=False),
'dstVnfdId': fields.StringField(nullable=True),
'flavourId': fields.StringField(nullable=True),
'operation': v1fields.GrantedLcmOperationTypeField(nullable=False),
'isAutomaticInvocation': fields.BooleanField(nullable=False),
'instantiationLevelId': fields.StringField(nullable=True),
'addResources': fields.ListOfObjectsField(
'ResourceDefinitionV1', nullable=True),
'tempResources': fields.ListOfObjectsField(
'ResourceDefinitionV1', nullable=True),
'removeResources': fields.ListOfObjectsField(
'ResourceDefinitionV1', nullable=True),
'updateResources': fields.ListOfObjectsField(
'ResourceDefinitionV1', nullable=True),
'placementConstraints': fields.ListOfObjectsField(
'PlacementConstraintV1', nullable=True),
'vimConstraints': fields.ListOfObjectsField(
'VimConstraintV1', nullable=True),
'additionalParams': fields.KeyValuePairsField(nullable=True),
'_links': fields.ObjectField('GrantRequestV1_Links', nullable=False),
}
@base.TackerObjectRegistry.register
class GrantRequestV1_Links(base.TackerObject):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'vnfLcmOpOcc': fields.ObjectField('Link', nullable=False),
'vnfInstance': fields.ObjectField('Link', nullable=False),
}

51
tacker/sol_refactored/objects/v1/placement_constraint.py

@ -0,0 +1,51 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v2.6.1 9.5.3.6 (API version: 1.3.0)
# - v2.7.1 9.5.3.6 (API version: 1.3.0)
# - v2.8.1 9.5.3.6 (API version: 1.3.0)
# - v3.3.1 9.5.3.6 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class PlacementConstraintV1(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'affinityOrAntiAffinity': fields.EnumField(
valid_values=[
'AFFINITY',
'ANTI_AFFINITY',
],
nullable=False
),
'scope': fields.EnumField(
valid_values=[
'NFVI_POP',
'ZONE',
'ZONE_GROUP',
'NFVI_NODE',
],
nullable=False,
),
'resource': fields.ListOfObjectsField(
'ConstraintResourceRefV1', nullable=False),
'fallbackBestEffort': fields.BooleanField(nullable=True),
}

46
tacker/sol_refactored/objects/v1/resource_definition.py

@ -0,0 +1,46 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 9.5.3.2 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class ResourceDefinitionV1(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'id': fields.StringField(nullable=False),
'type': fields.EnumField(
valid_values=[
'COMPUTE',
'VL',
'STORAGE',
'LINKPORT',
],
nullable=False,
),
'vduId': fields.StringField(nullable=True),
'vnfdId': fields.StringField(nullable=True),
'resourceTemplateId': fields.StringField(nullable=False),
'resource': fields.ObjectField(
'ResourceHandle', nullable=True),
'snapshotResDef': fields.ObjectField(
'SnapshotResourceDefinition', nullable=True),
}

35
tacker/sol_refactored/objects/v1/snapshot_resource_definition.py

@ -0,0 +1,35 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 9.5.3.11 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class SnapshotResourceDefinitionV1(base.TackerObject,
base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'vnfSnapshotId': fields.StringField(nullable=False),
'vnfcSnapshotId': fields.StringField(nullable=True),
'storageSnapshotId': fields.StringField(nullable=True),
'snapshotResource': fields.ObjectField(
'ResourceHandle', nullable=True),
}

37
tacker/sol_refactored/objects/v1/vim_compute_resource_flavour.py

@ -0,0 +1,37 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v2.6.1 9.5.3.9 (API version: 1.3.0)
# - v2.7.1 9.5.3.9 (API version: 1.3.0)
# - v2.8.1 9.5.3.9 (API version: 1.3.0)
# - v3.3.1 9.5.3.9 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class VimComputeResourceFlavourV1(base.TackerObject,
base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'vimConnectionId': fields.StringField(nullable=True),
'resourceProviderId': fields.StringField(nullable=True),
'vnfdVirtualComputeDescId': fields.StringField(nullable=False),
'vimFlavourId': fields.StringField(nullable=False),
}

35
tacker/sol_refactored/objects/v1/vim_constraint.py

@ -0,0 +1,35 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v2.6,1 9.5.3.7 (API version: 1.3.0)
# - v2.7,1 9.5.3.7 (API version: 1.3.0)
# - v2.8,1 9.5.3.7 (API version: 1.3.0)
# - v3.3.1 9.5.3.7 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class VimConstraintV1(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'sameResourceGroup': fields.BooleanField(nullable=True),
'resource': fields.ListOfObjectsField(
'ConstraintResourceRefV1', nullable=False),
}

35
tacker/sol_refactored/objects/v1/vim_snapshot_resource.py

@ -0,0 +1,35 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 9.5.3.12 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class VimSnapshotResourceV1(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'vimConnectionId': fields.StringField(nullable=True),
'resourceProviderId': fields.StringField(nullable=True),
'vnfSnapshotId': fields.StringField(nullable=False),
'vnfcSnapshotId': fields.StringField(nullable=False),
'storageSnapshotId': fields.StringField(nullable=True),
'vimSnapshotResourceId': fields.StringField(nullable=False),
}

36
tacker/sol_refactored/objects/v1/vim_software_image.py

@ -0,0 +1,36 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v2.6.1 9.5.3.10 (API version: 1.3.0)
# - v2.7.1 9.5.3.10 (API version: 1.3.0)
# - v2.8.1 9.5.3.10 (API version: 1.3.0)
# - v3.3.1 9.5.3.10 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class VimSoftwareImageV1(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'vimConnectionId': fields.StringField(nullable=True),
'resourceProviderId': fields.StringField(nullable=True),
'vnfdSoftwareImageId': fields.StringField(nullable=False),
'vimSoftwareImageId': fields.StringField(nullable=False),
}

33
tacker/sol_refactored/objects/v1/zone_group_info.py

@ -0,0 +1,33 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v2.6.1 9.5.3.5 (API version: 1.3.0)
# - v2.7.1 9.5.3.5 (API version: 1.3.0)
# - v2.8.1 9.5.3.5 (API version: 1.3.0)
# - v3.3.1 9.5.3.5 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class ZoneGroupInfoV1(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'zoneId': fields.ListOfStringsField(nullable=False),
}

36
tacker/sol_refactored/objects/v1/zone_info.py

@ -0,0 +1,36 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v2.6.1 9.5.3.4 (API version: 1.3.0)
# - v2.7.1 9.5.3.4 (API version: 1.3.0)
# - v2.8.1 9.5.3.4 (API version: 1.3.0)
# - v3.3.1 9.5.3.4 (API version: 1.4.0)
@base.TackerObjectRegistry.register
class ZoneInfoV1(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'id': fields.StringField(nullable=False),
'zoneId': fields.StringField(nullable=False),
'vimConnectionId': fields.StringField(nullable=True),
'resourceProviderId': fields.StringField(nullable=True),
}

41
tacker/sol_refactored/objects/v2/affected_ext_link_port.py

@ -0,0 +1,41 @@
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields
# NFV-SOL 003
# - v3.3.1 5.5.3.14a (API version: 2.0.0)
@base.TackerObjectRegistry.register
class AffectedExtLinkPortV2(base.TackerObject, base.TackerObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
fields = {
'id': fields.StringField(nullable=False),
'changeType': fields.EnumField(
valid_values=[