diff --git a/tacker/sol_refactored/objects/common/cp_protocol_data.py b/tacker/sol_refactored/objects/common/cp_protocol_data.py new file mode 100644 index 000000000..5617f4a15 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/ext_link_port_data.py b/tacker/sol_refactored/objects/common/ext_link_port_data.py new file mode 100644 index 000000000..4fe31c69e --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/ext_managed_virtual_link_data.py b/tacker/sol_refactored/objects/common/ext_managed_virtual_link_data.py new file mode 100644 index 000000000..21006b7b1 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/ext_virtual_link_data.py b/tacker/sol_refactored/objects/common/ext_virtual_link_data.py new file mode 100644 index 000000000..7b3d2f10b --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/fields.py b/tacker/sol_refactored/objects/common/fields.py new file mode 100644 index 000000000..f98fe7e60 --- /dev/null +++ b/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() diff --git a/tacker/sol_refactored/objects/common/ip_over_ethernet_address_data.py b/tacker/sol_refactored/objects/common/ip_over_ethernet_address_data.py new file mode 100644 index 000000000..567a5ca6e --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/link.py b/tacker/sol_refactored/objects/common/link.py new file mode 100644 index 000000000..9240ade95 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/notification_link.py b/tacker/sol_refactored/objects/common/notification_link.py new file mode 100644 index 000000000..621517a63 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/problem_details.py b/tacker/sol_refactored/objects/common/problem_details.py new file mode 100644 index 000000000..223d38f35 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/resource_handle.py b/tacker/sol_refactored/objects/common/resource_handle.py new file mode 100644 index 000000000..9e94f7a63 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/subscription_authentication.py b/tacker/sol_refactored/objects/common/subscription_authentication.py new file mode 100644 index 000000000..aad049c56 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/vim_connection_info.py b/tacker/sol_refactored/objects/common/vim_connection_info.py new file mode 100644 index 000000000..b548f6660 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/vnf_ext_cp_config.py b/tacker/sol_refactored/objects/common/vnf_ext_cp_config.py new file mode 100644 index 000000000..48329e232 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/vnf_ext_cp_data.py b/tacker/sol_refactored/objects/common/vnf_ext_cp_data.py new file mode 100644 index 000000000..698957340 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/common/vnf_instance_subscription_filter.py b/tacker/sol_refactored/objects/common/vnf_instance_subscription_filter.py new file mode 100644 index 000000000..e1d197fc6 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/constraint_resource_ref.py b/tacker/sol_refactored/objects/v1/constraint_resource_ref.py new file mode 100644 index 000000000..0c727a13e --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/fields.py b/tacker/sol_refactored/objects/v1/fields.py new file mode 100644 index 000000000..1ce34e42f --- /dev/null +++ b/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() diff --git a/tacker/sol_refactored/objects/v1/grant.py b/tacker/sol_refactored/objects/v1/grant.py new file mode 100644 index 000000000..40364d65f --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/grant_info.py b/tacker/sol_refactored/objects/v1/grant_info.py new file mode 100644 index 000000000..df6fcea77 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/grant_request.py b/tacker/sol_refactored/objects/v1/grant_request.py new file mode 100644 index 000000000..0d4ff00a3 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/placement_constraint.py b/tacker/sol_refactored/objects/v1/placement_constraint.py new file mode 100644 index 000000000..1fc3f520f --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/resource_definition.py b/tacker/sol_refactored/objects/v1/resource_definition.py new file mode 100644 index 000000000..b5d418469 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/snapshot_resource_definition.py b/tacker/sol_refactored/objects/v1/snapshot_resource_definition.py new file mode 100644 index 000000000..b3da54e4c --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/vim_compute_resource_flavour.py b/tacker/sol_refactored/objects/v1/vim_compute_resource_flavour.py new file mode 100644 index 000000000..0ad9babff --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/vim_constraint.py b/tacker/sol_refactored/objects/v1/vim_constraint.py new file mode 100644 index 000000000..70075fc84 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/vim_snapshot_resource.py b/tacker/sol_refactored/objects/v1/vim_snapshot_resource.py new file mode 100644 index 000000000..4864922a9 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/vim_software_image.py b/tacker/sol_refactored/objects/v1/vim_software_image.py new file mode 100644 index 000000000..48c377dc9 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/zone_group_info.py b/tacker/sol_refactored/objects/v1/zone_group_info.py new file mode 100644 index 000000000..63b3f3704 --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v1/zone_info.py b/tacker/sol_refactored/objects/v1/zone_info.py new file mode 100644 index 000000000..409eb9b8e --- /dev/null +++ b/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), + } diff --git a/tacker/sol_refactored/objects/v2/affected_ext_link_port.py b/tacker/sol_refactored/objects/v2/affected_ext_link_port.py new file mode 100644 index 000000000..ec794f2c1 --- /dev/null +++ b/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=[ + 'ADDED', + 'REMOVED', + ], + nullable=False, + ), + 'extCpInstanceId': fields.StringField(nullable=False), + 'resourceHandle': fields.ObjectField( + 'ResourceHandle', nullable=False), + 'resourceDefinitionId': fields.StringField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/affected_virtual_link.py b/tacker/sol_refactored/objects/v2/affected_virtual_link.py new file mode 100644 index 000000000..bd9606400 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/affected_virtual_link.py @@ -0,0 +1,49 @@ +# 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.14 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class AffectedVirtualLinkV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vnfVirtualLinkDescId': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=True), + 'changeType': fields.EnumField( + valid_values=[ + 'ADDED', + 'REMOVED', + 'MODIFIED', + 'TEMPORARY', + 'LINK_PORT_ADDED', + 'LINK_PORT_REMOVED', + ], + nullable=False, + ), + 'networkResource': fields.ObjectField( + 'ResourceHandle', nullable=False), + 'vnfLinkPortIds': fields.ListOfStringsField(nullable=True), + 'resourceDefinitionId': fields.StringField(nullable=True), + 'zoneId': fields.StringField(nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/affected_virtual_storage.py b/tacker/sol_refactored/objects/v2/affected_virtual_storage.py new file mode 100644 index 000000000..bbbc9035f --- /dev/null +++ b/tacker/sol_refactored/objects/v2/affected_virtual_storage.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 5.5.3.15 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class AffectedVirtualStorageV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'virtualStorageDescId': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=True), + 'changeType': fields.EnumField( + valid_values=[ + 'ADDED', + 'REMOVED', + 'MODIFIED', + 'TEMPORARY', + ], + nullable=False, + ), + 'storageResource': fields.ObjectField( + 'ResourceHandle', nullable=False), + 'resourceDefinitionId': fields.StringField(nullable=True), + 'zoneId': fields.StringField(nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/affected_vnfc.py b/tacker/sol_refactored/objects/v2/affected_vnfc.py new file mode 100644 index 000000000..b5a1c41e2 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/affected_vnfc.py @@ -0,0 +1,49 @@ +# 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.13 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class AffectedVnfcV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vduId': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=True), + 'changeType': fields.EnumField( + valid_values=[ + 'ADDED', + 'REMOVED', + 'MODIFIED', + 'TEMPORARY', + ], + nullable=False, + ), + 'computeResource': fields.ObjectField( + 'ResourceHandle', nullable=False), + 'resourceDefinitionId': fields.StringField(nullable=True), + 'zoneId': fields.StringField(nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + 'affectedVnfcCpIds': fields.ListOfStringsField(nullable=True), + 'addedStorageResourceIds': fields.ListOfStringsField(nullable=True), + 'removedStorageResourceIds': fields.ListOfStringsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/cancel_mode.py b/tacker/sol_refactored/objects/v2/cancel_mode.py new file mode 100644 index 000000000..b97cfbbf5 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/cancel_mode.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.v2 import fields as v2fields + + +# NFV-SOL 003 +# - v3.3.1 5.5.2.14 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class CancelModeV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'cancelMode': v2fields.CancelModeTypeField(nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/change_current_vnf_pkg_request.py b/tacker/sol_refactored/objects/v2/change_current_vnf_pkg_request.py new file mode 100644 index 000000000..fa48aa384 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/change_current_vnf_pkg_request.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 5.5.2.11a (API version: 2.0.0) +@base.TackerObjectRegistry.register +class ChangeCurrentVnfPkgRequest(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfdId': fields.StringField(nullable=False), + 'extVirtualLinks': fields.ListOfObjectsField( + 'ExtVirtualLinkData', nullable=True), + 'extManagedVirtualLinks': fields.ListOfObjectsField( + 'ExtManagedVirtualLinkData', nullable=True), + 'vimConnectionInfo': fields.DictOfObjectsField( + 'VimConnectionInfo', nullable=True), + 'additionalParams': fields.KeyValuePairsField(nullable=True), + 'extensions': fields.KeyValuePairsField(nullable=True), + 'vnfConfigurableProperties': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/change_ext_vnf_connectivity_request.py b/tacker/sol_refactored/objects/v2/change_ext_vnf_connectivity_request.py new file mode 100644 index 000000000..c301e2517 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/change_ext_vnf_connectivity_request.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 5.5.2.11 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class ChangeExtVnfConnectivityRequestV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'extVirtualLinks': fields.ListOfObjectsField( + 'ExtVirtualLinkData', nullable=False), + 'vimConnectionInfo': fields.DictOfObjectsField( + 'VimConnectionInfo', nullable=True), + 'additionalParams': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/change_vnf_flavour_request.py b/tacker/sol_refactored/objects/v2/change_vnf_flavour_request.py new file mode 100644 index 000000000..857d7801a --- /dev/null +++ b/tacker/sol_refactored/objects/v2/change_vnf_flavour_request.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 5.5.2.7 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class ChangeVnfFlavourRequest(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'newFlavourId': fields.StringField(nullable=False), + 'instantiationLevelId': fields.StringField(nullable=True), + 'extVirtualLinks': fields.ListOfObjectsField( + 'ExtVirtualLinkData', nullable=True), + 'extManagedVirtualLinks': fields.ListOfObjectsField( + 'ExtManagedVirtualLinkData', nullable=True), + 'vimConnectionInfo': fields.DictOfObjectsField( + 'VimConnectionInfo', nullable=True), + 'additionalParams': fields.KeyValuePairsField(nullable=True), + 'extensions': fields.KeyValuePairsField(nullable=True), + 'vnfConfigurableProperties': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/cp_protocol_info.py b/tacker/sol_refactored/objects/v2/cp_protocol_info.py new file mode 100644 index 000000000..36d85cfc1 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/cp_protocol_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 5.5.3.9b (API version: 2.0.0) +@base.TackerObjectRegistry.register +class CpProtocolInfoV2(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( + 'IpOverEthernetAddressInfoV2', nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/create_vnf_pkg_info_request.py b/tacker/sol_refactored/objects/v2/create_vnf_pkg_info_request.py new file mode 100644 index 000000000..01d25af7d --- /dev/null +++ b/tacker/sol_refactored/objects/v2/create_vnf_pkg_info_request.py @@ -0,0 +1,31 @@ +# 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 005 +# - v3.3.1 9.5.2.2 (API version: 2.1.0) +@base.TackerObjectRegistry.register +class CreateVnfPkgInfoRequestV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'userDefinedData': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/create_vnf_request.py b/tacker/sol_refactored/objects/v2/create_vnf_request.py new file mode 100644 index 000000000..e0114cc24 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/create_vnf_request.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 5.5.2.3 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class CreateVnfRequestV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfdId': fields.StringField(nullable=False), + 'vnfInstanceName': fields.StringField(nullable=True), + 'vnfInstanceDescription': fields.StringField(nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/create_vnf_snapshot_info_request.py b/tacker/sol_refactored/objects/v2/create_vnf_snapshot_info_request.py new file mode 100644 index 000000000..9aa3b4de4 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/create_vnf_snapshot_info_request.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 5.5.2.20 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class CreateVnfSnapshotInfoRequestV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfSnapshotPkgId': fields.StringField(nullable=True), + 'vnfSnapshot': fields.ObjectField('VnfSnapshotV2', nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/create_vnf_snapshot_request.py b/tacker/sol_refactored/objects/v2/create_vnf_snapshot_request.py new file mode 100644 index 000000000..4eafe8ccc --- /dev/null +++ b/tacker/sol_refactored/objects/v2/create_vnf_snapshot_request.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 5.5.2.21 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class CreateVnfSnapshotRequestV2( + base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfSnapshotInfoId': fields.StringField(nullable=False), + 'additionalParams': fields.KeyValuePairsField(nullable=True), + 'userDefinedData': fields.KeyValuePairsField(nullable=True), + # NOTE: vnfcInstanceId is defined in NFV-SOL 002 v3.3.1 5.5.2.21 + 'vnfcInstanceId': fields.StringField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/ext_link_port_info.py b/tacker/sol_refactored/objects/v2/ext_link_port_info.py new file mode 100644 index 000000000..491a550ad --- /dev/null +++ b/tacker/sol_refactored/objects/v2/ext_link_port_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 +# - v3.3.1 5.5.3.9 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class ExtLinkPortInfoV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'resourceHandle': fields.ObjectField( + 'ResourceHandle', nullable=False), + 'cpInstanceId': fields.StringField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/ext_managed_virtual_link_info.py b/tacker/sol_refactored/objects/v2/ext_managed_virtual_link_info.py new file mode 100644 index 000000000..36ea5422f --- /dev/null +++ b/tacker/sol_refactored/objects/v2/ext_managed_virtual_link_info.py @@ -0,0 +1,39 @@ +# 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.3 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class ExtManagedVirtualLinkInfoV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vnfVirtualLinkDescId': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=True), + 'networkResource': fields.ObjectField( + 'ResourceHandle', nullable=False), + 'vnfLinkPorts': fields.ListOfObjectsField( + 'VnfLinkPortInfoV2', nullable=True), + 'extManagedMultisiteVirtualLinkId': fields.StringField( + nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/ext_virtual_link_info.py b/tacker/sol_refactored/objects/v2/ext_virtual_link_info.py new file mode 100644 index 000000000..cca525c60 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/ext_virtual_link_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 +# - v3.3.1 5.5.3.2 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class ExtVirtualLinkInfoV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'resourceHandle': fields.ObjectField( + 'ResourceHandle', nullable=False), + 'extLinkPorts': fields.ListOfObjectsField( + 'ExtLinkPortInfoV2', nullable=True), + 'currentVnfExtCpData': fields.ListOfObjectsField( + 'VnfExtCpData', nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/external_artifacts_access_config.py b/tacker/sol_refactored/objects/v2/external_artifacts_access_config.py new file mode 100644 index 000000000..207cc9e05 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/external_artifacts_access_config.py @@ -0,0 +1,73 @@ +# 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 005 +# - v3.3.1 9.5.2.10 (API version: 2.1.0) +@base.TackerObjectRegistry.register +class ExternalArtifactsAccessConfigV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'artifact': fields.ListOfObjectsField( + 'ExternalArtifactsAccessConfigV2_Artifact', nullable=True), + } + + +@base.TackerObjectRegistry.register +class ExternalArtifactsAccessConfigV2_Artifact( + base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'artifactUri': fields.UriField(nullable=False), + 'overrideUri': fields.UriField(nullable=True), + 'authType': fields.EnumField( + valid_values=[ + 'BASIC', + 'OAUTH2_CLIENT_CREDENTIALS', + ], + nullable=True, + ), + 'userName': fields.StringField(nullable=True), + 'password': fields.StringField(nullable=True), + 'paramsOauth2ClientCredentials': fields.ObjectField( + 'ExternalArtifactsAccessConfigV2_Artifact_' + 'ParamsOauth2ClientCredentials', + nullable=True, + ), + } + + +@base.TackerObjectRegistry.register +class ExternalArtifactsAccessConfigV2_Artifact_ParamsOauth2ClientCredentials( + base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'clientId': fields.StringField(nullable=False), + 'clientPassword': fields.StringField(nullable=False), + 'tokenEndpoint': fields.UriField(nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/fields.py b/tacker/sol_refactored/objects/v2/fields.py new file mode 100644 index 000000000..741943dcc --- /dev/null +++ b/tacker/sol_refactored/objects/v2/fields.py @@ -0,0 +1,175 @@ +# 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 005 +# - v2.7.1 9.5.4.3 (API version: 2.0.0) +# - v2.8.1 9.5.4.3 (API version: 2.1.0) +# - v3.3.1 9.5.4.3 (API version: 2.1.0) +class PackageOnboardingStateType(fields.BaseTackerEnum): + CREATED = 'CREATED' + UPLOADING = 'UPLOADING' + PROCESSING = 'PROCESSING' + ONBOARDED = 'ONBOARDED' + ERROR = 'ERROR' + + ALL = (CREATED, UPLOADING, PROCESSING, ONBOARDED, ERROR) + + +class PackageOnboardingStateTypeField(fields.BaseEnumField): + AUTO_TYPE = PackageOnboardingStateType() + + +# NFV-SOL 005 +# - v2.7.1 9.5.4.4 (API version: 2.0.0) +# - v2.8.1 9.5.4.4 (API version: 2.1.0) +# - v3.3.1 9.5.4.4 (API version: 2.1.0) +class PackageOperationalStateType(fields.BaseTackerEnum): + ENABLED = 'ENABLED' + DISABLED = 'DISABLED' + + ALL = (ENABLED, DISABLED) + + +class PackageOperationalStateTypeField(fields.BaseEnumField): + AUTO_TYPE = PackageOperationalStateType() + + +# NFV-SOL 005 +# - v2.7.1 9.5.4.5 (API version: 2.0.0) +# - v2.8.1 9.5.4.5 (API version: 2.1.0) +# - v3.3.1 9.5.4.5 (API version: 2.1.0) +class PackageUsageStateType(fields.BaseTackerEnum): + IN_USE = 'IN_USE' + NOT_IN_USE = 'NOT_IN_USE' + + ALL = (IN_USE, NOT_IN_USE) + + +class PackageUsageStateTypeField(fields.BaseEnumField): + AUTO_TYPE = PackageUsageStateType() + + +# NFV-SOL 005 +# - v2.7.1 9.5.4.6 (API version: 2.0.0) +# - v2.8.1 9.5.4.6 (API version: 2.1.0) +# - v3.3.1 9.5.4.6 (API version: 2.1.0) +class PackageChangeType(fields.BaseTackerEnum): + OP_STATE_CHANGE = 'OP_STATE_CHANGE' + PKG_DELETE = 'PKG_DELETE' + + ALL = (OP_STATE_CHANGE, PKG_DELETE) + + +class PackageChangeTypeField(fields.BaseEnumField): + AUTO_TYPE = PackageChangeType() + + +# NFV-SOL 003 +# - v3.3.1 5.5.4.3 (API version: 2.0.0) +class VnfOperationalStateType(fields.BaseTackerEnum): + STARTED = 'STARTED' + STOPPED = 'STOPPED' + + ALL = (STARTED, STOPPED) + + +class VnfOperationalStateTypeField(fields.BaseEnumField): + AUTO_TYPE = VnfOperationalStateType() + + +# NFV-SOL 003 +# - v3.3.1 5.5.4.4 (API version: 2.0.0) +class StopType(fields.BaseTackerEnum): + FORCEFUL = 'FORCEFUL' + GRACEFUL = 'GRACEFUL' + + ALL = (FORCEFUL, GRACEFUL) + + +class StopTypeField(fields.BaseEnumField): + AUTO_TYPE = StopType() + + +# NFV-SOL 003 +# - v3.3.1 5.5.4.5 (API version: 2.0.0) +class LcmOperationStateType(fields.BaseTackerEnum): + STARTING = 'STARTING' + PROCESSING = 'PROCESSING' + COMPLETED = 'COMPLETED' + FAILED_TEMP = 'FAILED_TEMP' + FAILED = 'FAILED' + ROLLING_BACK = 'ROLLING_BACK' + ROLLED_BACK = 'ROLLED_BACK' + + ALL = (STARTING, PROCESSING, COMPLETED, FAILED_TEMP, FAILED, + ROLLING_BACK, ROLLED_BACK) + + +class LcmOperationStateTypeField(fields.BaseEnumField): + AUTO_TYPE = LcmOperationStateType() + + +# NFV-SOL 003 +# - v3.3.1 5.5.4.6 (API version: 2.0.0) +class CancelModeType(fields.BaseTackerEnum): + GRACEFUL = 'GRACEFUL' + FORCEFUL = 'FORCEFUL' + + ALL = (GRACEFUL, FORCEFUL) + + +class CancelModeTypeField(fields.BaseEnumField): + AUTO_TYPE = CancelModeType() + + +# NFV-SOL 003 +# - v3.3.1 5.5.4.7 (API version: 2.0.0) +class LcmOperationType(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' + MODIFY_INFO = 'MODIFY_INFO' + CREATE_SNAPSHOT = 'CREATE_SNAPSHOT' + REVERT_TO_SNAPSHOT = 'REVERT_TO_SNAPSHOT' + CHANGE_VNFPKG = 'CHANGE_VNFPKG' + + ALL = (INSTANTIATE, SCALE, SCALE_TO_LEVEL, CHANGE_FLAVOUR, + TERMINATE, HEAL, OPERATE, CHANGE_EXT_CONN, MODIFY_INFO, + CREATE_SNAPSHOT, REVERT_TO_SNAPSHOT, CHANGE_VNFPKG) + + +class LcmOperationTypeField(fields.BaseEnumField): + AUTO_TYPE = LcmOperationType() + + +# NFV-SOL 003 +# - v3.3.1 5.5.4.8 (API version: 2.0.0) +class LcmOpOccNotificationVerbosityType(fields.BaseTackerEnum): + FULL = 'FULL' + SHORT = 'SHORT' + + ALL = (FULL, SHORT) + + +class LcmOpOccNotificationVerbosityTypeField(fields.BaseEnumField): + AUTO_TYPE = LcmOpOccNotificationVerbosityType() diff --git a/tacker/sol_refactored/objects/v2/heal_vnf_request.py b/tacker/sol_refactored/objects/v2/heal_vnf_request.py new file mode 100644 index 000000000..d2da33d69 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/heal_vnf_request.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 5.5.2.9 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class HealVnfRequestV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'cause': fields.StringField(nullable=True), + 'additionalParams': fields.KeyValuePairsField(nullable=True), + # NOTE: following fields are defined in NFV-SOL 002 v3.3.1 5.5.2.9 + 'vnfcInstanceId': fields.ListOfStringsField(nullable=True), + 'healScript': fields.StringField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/instantiate_vnf_request.py b/tacker/sol_refactored/objects/v2/instantiate_vnf_request.py new file mode 100644 index 000000000..6f508e084 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/instantiate_vnf_request.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.2.4 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class InstantiateVnfRequestV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'flavourId': fields.StringField(nullable=False), + 'instantiationLevelId': fields.StringField(nullable=True), + 'extVirtualLinks': fields.ListOfObjectsField( + 'ExtVirtualLinkData', nullable=True), + 'extManagedVirtualLinks': fields.ListOfObjectsField( + 'ExtManagedVirtualLinkData', nullable=True), + 'vimConnectionInfo': fields.DictOfObjectsField( + 'VimConnectionInfo', nullable=True), + 'localizationLanguage': fields.StringField(nullable=True), + 'additionalParams': fields.KeyValuePairsField(nullable=True), + 'extensions': fields.KeyValuePairsField(nullable=True), + 'vnfConfigurableProperties': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/ip_over_ethernet_address_info.py b/tacker/sol_refactored/objects/v2/ip_over_ethernet_address_info.py new file mode 100644 index 000000000..5d972cf29 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/ip_over_ethernet_address_info.py @@ -0,0 +1,66 @@ +# 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.10 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class IpOverEthernetAddressInfoV2(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( + 'IpOverEthernetAddressInfoV2_IpAddresses', nullable=True), + } + + +@base.TackerObjectRegistry.register +class IpOverEthernetAddressInfoV2_IpAddresses( + base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'type': fields.EnumField( + valid_values=['IPV4', 'IPV6'], nullable=False), + 'addresses': fields.ListOfIPAddressesField(nullable=True), + 'isDynamic': fields.BooleanField(nullable=True), + 'addressRange': fields.ObjectField( + 'IpOverEthernetAddressInfoV2_IpAddresses_AddressRange', + nullable=True), + 'subnetId': fields.StringField(nullable=True), + } + + +@base.TackerObjectRegistry.register +class IpOverEthernetAddressInfoV2_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), + } diff --git a/tacker/sol_refactored/objects/v2/lccn_links.py b/tacker/sol_refactored/objects/v2/lccn_links.py new file mode 100644 index 000000000..22381c577 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/lccn_links.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 5.5.3.16 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class LccnLinksV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfInstance': fields.ObjectField( + 'NotificationLink', nullable=False), + 'subscription': fields.ObjectField( + 'NotificationLink', nullable=False), + 'vnfLcmOpOcc': fields.ObjectField( + 'NotificationLink', nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/lccn_subscription.py b/tacker/sol_refactored/objects/v2/lccn_subscription.py new file mode 100644 index 000000000..2a2a9ea12 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/lccn_subscription.py @@ -0,0 +1,55 @@ +# 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.v2 import fields as v2fields + + +# NFV-SOL 003 +# - v3.3.1 5.5.2.16 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class LccnSubscriptionV2(base.TackerPersistentObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'filter': fields.ObjectField( + 'LifecycleChangeNotificationsFilterV2', nullable=True), + 'callbackUri': fields.UriField(nullable=False), + # NOTE: 'authentication' attribute is not included in the + # original 'LccnSubscription' data type definition. + # It is necessary to keep this to be used at sending + # notifications. Note that it is dropped at GET subscription. + 'authentication': fields.ObjectField( + 'SubscriptionAuthentication', nullable=True), + 'verbosity': v2fields.LcmOpOccNotificationVerbosityTypeField( + nullable=False), + '_links': fields.ObjectField( + 'LccnSubscriptionV2_Links', nullable=False), + } + + +@base.TackerObjectRegistry.register +class LccnSubscriptionV2_Links(base.TackerObject, base.TackerObjectDictCompat): + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'self': fields.ObjectField('Link', nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/lccn_subscription_request.py b/tacker/sol_refactored/objects/v2/lccn_subscription_request.py new file mode 100644 index 000000000..095d89463 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/lccn_subscription_request.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 +from tacker.sol_refactored.objects.v2 import fields as v2fields + + +# NFV-SOL 003 +# - v3.3.1 5.5.2.15 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class LccnSubscriptionRequestV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'filter': fields.ObjectField( + 'LifecycleChangeNotificationsFilterV2', nullable=True), + 'callbackUri': fields.UriField(nullable=False), + 'authentication': fields.ObjectField( + 'SubscriptionAuthentication', nullable=True), + 'verbosity': v2fields.LcmOpOccNotificationVerbosityTypeField( + nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/lifecycle_change_notifications_filter.py b/tacker/sol_refactored/objects/v2/lifecycle_change_notifications_filter.py new file mode 100644 index 000000000..c2867f24f --- /dev/null +++ b/tacker/sol_refactored/objects/v2/lifecycle_change_notifications_filter.py @@ -0,0 +1,45 @@ +# 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.v2 import fields as v2fields + + +# NFV-SOL 003 +# - v3.3.1 5.5.3.12 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class LifecycleChangeNotificationsFilterV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfInstanceSubscriptionFilter': fields.ObjectField( + 'VnfInstanceSubscriptionFilter', nullable=True), + 'notificationTypes': fields.ListOfEnumField( + valid_values=[ + 'VnfLcmOperationOccurrenceNotification', + 'VnfIdentifierCreationNotification', + 'VnfIdentifierDeletionNotification', + ], + nullable=True, + ), + 'operationTypes': fields.Field(fields.List( + v2fields.LcmOperationTypeField(), nullable=True)), + 'operationStatus': fields.Field(fields.List( + v2fields.LcmOperationStateTypeField(), nullable=True)), + } diff --git a/tacker/sol_refactored/objects/v2/modifications_triggered_by_vnf_pkg_change.py b/tacker/sol_refactored/objects/v2/modifications_triggered_by_vnf_pkg_change.py new file mode 100644 index 000000000..86c767aea --- /dev/null +++ b/tacker/sol_refactored/objects/v2/modifications_triggered_by_vnf_pkg_change.py @@ -0,0 +1,39 @@ +# 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.21 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class ModificationsTriggeredByVnfPkgChangeV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfConfigurableProperties': fields.KeyValuePairsField( + nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + 'extensions': fields.KeyValuePairsField(nullable=True), + 'vnfdId': fields.StringField(nullable=True), + 'vnfProvider': fields.StringField(nullable=True), + 'vnfProductName': fields.StringField(nullable=True), + 'vnfSoftwareVersion': fields.VersionField(nullable=True), + 'vnfdVersion': fields.VersionField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/monitoring_parameter.py b/tacker/sol_refactored/objects/v2/monitoring_parameter.py new file mode 100644 index 000000000..01cdcb38d --- /dev/null +++ b/tacker/sol_refactored/objects/v2/monitoring_parameter.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 5.5.3.11 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class MonitoringParameterV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=True), + 'name': fields.StringField(nullable=True), + 'performanceMetric': fields.StringField(nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/operate_vnf_request.py b/tacker/sol_refactored/objects/v2/operate_vnf_request.py new file mode 100644 index 000000000..73761bef5 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/operate_vnf_request.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 +from tacker.sol_refactored.objects.v2 import fields as v2fields + + +# NFV-SOL 003 +# - v3.3.1 5.5.2.10 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class OperateVnfRequestV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'changeStateTo': v2fields.VnfOperationalStateTypeField(nullable=False), + 'stopType': v2fields.StopTypeField(nullable=True), + 'gracefulStopTimeout': fields.IntegerField(nullable=True), + 'additionalParams': fields.KeyValuePairsField(nullable=True), + # NOTE: vnfcInstanceId is defined in NFV-SOL 002 v3.3.1 5.5.2.10 + 'vnfcInstanceId': fields.ListOfStringsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/pkgm_links.py b/tacker/sol_refactored/objects/v2/pkgm_links.py new file mode 100644 index 000000000..feb57c17e --- /dev/null +++ b/tacker/sol_refactored/objects/v2/pkgm_links.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 005 +# - v3.3.1 9.5.3.5 (API version: 2.1.0) +@base.TackerObjectRegistry.register +class PkgmLinksV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfPackage': fields.ObjectField( + 'NotificationLink', nullable=False), + 'subscription': fields.ObjectField( + 'NotificationLink', nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/pkgm_notification_filter.py b/tacker/sol_refactored/objects/v2/pkgm_notification_filter.py new file mode 100644 index 000000000..950a63469 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/pkgm_notification_filter.py @@ -0,0 +1,91 @@ +# 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.v2 import fields as v2fields + + +# NFV-SOL 005 +# - v3.3.1 9.5.3.4 (API version: 2.1.0) +@base.TackerObjectRegistry.register +class PkgmNotificationFilterV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'notificationTypes': fields.ListOfEnumField( + valid_values=[ + 'VnfPackageOnboardingNotification', + 'VnfPackageChangeNotification', + ], + nullable=True, + ), + 'vnfProductsFromProviders': fields.ListOfObjectsField( + 'PkgmNotificationFilterV2_VnfProductsFromProviders', + nullable=True), + 'vnfdId': fields.ListOfStringsField(nullable=True), + 'vnfPkgId': fields.ListOfStringsField(nullable=True), + 'operationalState': fields.Field(fields.List( + v2fields.PackageOperationalStateType), nullable=True), + 'usageState': fields.Field(fields.List( + v2fields.PackageUsageStateType), nullable=True), + 'vnfmInfo': fields.ListOfStringsField(nullable=True), + } + + +@base.TackerObjectRegistry.register +class PkgmNotificationFilterV2_VnfProductsFromProviders( + base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfProvider': fields.StringField(nullable=False), + 'vnfProducts': fields.ListOfObjectsField( + 'PkgmNotificationFilterV2_VnfProductsFromProviders_VnfProducts', + nullable=True), + } + + +@base.TackerObjectRegistry.register +class PkgmNotificationFilterV2_VnfProductsFromProviders_VnfProducts( + base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfProductName': fields.StringField(nullable=False), + 'vnfVersions': fields.ListOfObjectsField( + 'PkgmNotificationFilterV2_VnfProductsFromProviders_' + 'VnfProducts_Versions', + nullable=True), + } + + +@base.TackerObjectRegistry.register +class PkgmNotificationFilterV2_VnfProductsFromProviders_VnfProducts_Versions( + base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfSoftwareVersion': fields.VersionField(nullable=False), + 'vnfdVersion': fields.VersionField(nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/pkgm_subscription_request.py b/tacker/sol_refactored/objects/v2/pkgm_subscription_request.py new file mode 100644 index 000000000..dd93847ed --- /dev/null +++ b/tacker/sol_refactored/objects/v2/pkgm_subscription_request.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 005 +# - v3.3.1 9.5.2.6 (API version: 2.1.0) +@base.TackerObjectRegistry.register +class PkgmSubscriptionRequestV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'filter': fields.ObjectField( + 'PkgmNotificationsFilterV2', nullable=True), + 'callbackUri': fields.UriField(nullable=False), + 'authentication': fields.ObjectField( + 'SubscriptionAuthentication', nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/revert_to_vnf_snapshot_request.py b/tacker/sol_refactored/objects/v2/revert_to_vnf_snapshot_request.py new file mode 100644 index 000000000..569e76ecf --- /dev/null +++ b/tacker/sol_refactored/objects/v2/revert_to_vnf_snapshot_request.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 5.5.2.26 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class RevertToVnfSnapshotRequestV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfSnapshotInfoId': fields.StringField(nullable=False), + 'additionalParams': fields.KeyValuePairsField(nullable=True), + # NOTE: following fields are defined in NFV-SOL 002 v3.3.1 5.5.2.24 + 'vnfcInstanceId': fields.StringField(nullable=True), + 'vnfcSnapshotInfoId': fields.StringField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/scale_info.py b/tacker/sol_refactored/objects/v2/scale_info.py new file mode 100644 index 000000000..4f32fe1dd --- /dev/null +++ b/tacker/sol_refactored/objects/v2/scale_info.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 5.5.3.4 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class ScaleInfoV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'aspectId': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=True), + 'scaleLevel': fields.IntegerField(nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/scale_vnf_request.py b/tacker/sol_refactored/objects/v2/scale_vnf_request.py new file mode 100644 index 000000000..f639c68c7 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/scale_vnf_request.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 5.5.2.5 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class ScaleVnfRequest(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'type': fields.EnumField(valid_values=['SCALE_OUT', 'SCALE_IN'], + nullable=False), + 'aspectId': fields.StringField(nullable=False), + 'numberOfSteps': fields.IntegerField(nullable=True), + 'additionalParams': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/scale_vnf_to_level_request.py b/tacker/sol_refactored/objects/v2/scale_vnf_to_level_request.py new file mode 100644 index 000000000..5b8dc1b99 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/scale_vnf_to_level_request.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 5.5.2.6 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class ScaleVnfToLevelRequest(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'instantiationLevelId': fields.StringField(nullable=True), + 'scaleInfo': fields.ListOfObjectsField('ScaleInfo', nullable=True), + 'additionalParams': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/terminate_vnf_request.py b/tacker/sol_refactored/objects/v2/terminate_vnf_request.py new file mode 100644 index 000000000..9f7ea9c42 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/terminate_vnf_request.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 5.5.2.8 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class TerminateVnfRequest(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'terminationType': fields.EnumField( + valid_values=['FORCEFUL', 'GRACEFUL'], nullable=False), + 'gracefulTerminationTimeout': fields.IntegerField(nullable=True), + 'additionalParams': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/upload_vnf_package_from_uri_request.py b/tacker/sol_refactored/objects/v2/upload_vnf_package_from_uri_request.py new file mode 100644 index 000000000..11f8342fd --- /dev/null +++ b/tacker/sol_refactored/objects/v2/upload_vnf_package_from_uri_request.py @@ -0,0 +1,58 @@ +# 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 005 +# - v3.3.1 9.5.2.4 (API version: 2.1.0) +@base.TackerObjectRegistry.register +class UploadVnfPackageFromUriRequestV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'addressInformation': fields.UriField(nullable=False), + 'authType': fields.EnumField( + valid_values=[ + 'BASIC', + 'OAUTH2_CLIENT_CREDENTIALS', + ], + nullable=True, + ), + 'userName': fields.StringField(nullable=True), + 'password': fields.StringField(nullable=True), + 'paramsOauth2ClientCredentials': fields.ObjectField( + 'UploadVnfPackageFromUriRequestV2_ParamsOauth2ClientCredentials', + nullable=True, + ), + } + + +@base.TackerObjectRegistry.register +class UploadVnfPackageFromUriRequestV2_ParamsOauth2ClientCredentials( + base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'clientId': fields.StringField(nullable=False), + 'clientPassword': fields.StringField(nullable=False), + 'tokenEndpoint': fields.UriField(nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/virtual_storage_resource_info.py b/tacker/sol_refactored/objects/v2/virtual_storage_resource_info.py new file mode 100644 index 000000000..b382f3615 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/virtual_storage_resource_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 +# - v3.3.1 5.5.3.7 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VirtualStorageResourceInfoV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'virtualStorageDescId': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=True), + 'storageResource': fields.ObjectField( + 'ResourceHandle', nullable=False), + 'zoneId': fields.StringField(nullable=True), + 'reservationId': fields.StringField(nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_ext_cp_info.py b/tacker/sol_refactored/objects/v2/vnf_ext_cp_info.py new file mode 100644 index 000000000..6548d4093 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_ext_cp_info.py @@ -0,0 +1,39 @@ +# 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.17 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfExtCpInfoV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'cpdId': fields.StringField(nullable=False), + 'cpConfigId': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=True), + 'cpProtocolInfo': fields.ListOfObjectsField( + 'CpProtocolInfoV2', nullable=False), + 'extLinkPortId': fields.StringField(nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + 'associatedVnfcCpId': fields.StringField(nullable=True), + 'associatedVnfVirtualLinkId': fields.StringField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_identifier_creation_notification.py b/tacker/sol_refactored/objects/v2/vnf_identifier_creation_notification.py new file mode 100644 index 000000000..364fae4f2 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_identifier_creation_notification.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 +# - v3.3.1 5.5.2.18 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfIdentifierCreationNotificationV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'notificationType': fields.StringField(nullable=False), + 'subscriptionId': fields.StringField(nullable=False), + 'timeStamp': fields.DateTimeField(nullable=False), + 'vnfInstanceId': fields.StringField(nullable=False), + '_links': fields.ObjectField('LccnLinksV2', nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_identifier_deletion_notification.py b/tacker/sol_refactored/objects/v2/vnf_identifier_deletion_notification.py new file mode 100644 index 000000000..ada6a1010 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_identifier_deletion_notification.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 +# - v3.3.1 5.5.2.19 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfIdentifierDeletionNotificationV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'notificationType': fields.StringField(nullable=False), + 'subscriptionId': fields.StringField(nullable=False), + 'timeStamp': fields.DateTimeField(nullable=False), + 'vnfInstanceId': fields.StringField(nullable=False), + '_links': fields.ObjectField('LccnLinksV2', nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_info_modification_request.py b/tacker/sol_refactored/objects/v2/vnf_info_modification_request.py new file mode 100644 index 000000000..ba505b552 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_info_modification_request.py @@ -0,0 +1,44 @@ +# 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.2.12 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfInfoModificationRequestV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfInstanceName': fields.StringField(nullable=True), + 'vnfInstanceDescription': fields.StringField(nullable=True), + # NOTE: 'nullable=True' is use to indicate the field can be omitted + # (in overall object definitions). vnfdId can't be null if it is + # specified. It is checked in the code. + 'vnfdId': fields.StringField(nullable=True), + 'vnfConfigurableProperties': fields.KeyValuePairsField(nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + 'extensions': fields.KeyValuePairsField(nullable=True), + 'vimConnectionInfo': fields.DictOfObjectsField( + 'VimConnectionInfo', nullable=True), + # NOTE: vnfcInfoModifications is defined in NFV-SOL 002 v3.3.1 5.5.2.12 + 'vnfcInfoModifications': fields.ListOfObjectsField( + 'VnfcInfoModificationsV2', nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_info_modifications.py b/tacker/sol_refactored/objects/v2/vnf_info_modifications.py new file mode 100644 index 000000000..9f895795a --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_info_modifications.py @@ -0,0 +1,45 @@ +# 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.2.12a (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfInfoModificationsV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfInstanceName': fields.StringField(nullable=True), + 'vnfInstanceDescription': fields.StringField(nullable=True), + 'vnfConfigurableProperties': fields.KeyValuePairsField(nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + 'extensions': fields.KeyValuePairsField(nullable=True), + 'vimConnectionInfo': fields.DictOfObjectsField( + 'VimConnectionInfo', nullable=True), + 'vnfdId': fields.StringField(nullable=True), + 'vnfProvider': fields.StringField(nullable=True), + 'vnfProductName': fields.StringField(nullable=True), + 'vnfSoftwareVersion': fields.VersionField(nullable=True), + 'vnfdVersion': fields.VersionField(nullable=True), + # NOTE: vnfcInfoModifications is defined in + # NFV-SOL 002 v3.3.1 5.5.2.12a + 'vnfcInfoModifications': fields.ListOfObjectsField( + 'VnfcInfoModificationsV2', nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_instance.py b/tacker/sol_refactored/objects/v2/vnf_instance.py new file mode 100644 index 000000000..3cf6a7e31 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_instance.py @@ -0,0 +1,109 @@ +# 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.v2 import fields as v2fields + + +# NFV-SOL 003 +# - v3.3.1 5.5.2.2 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfInstanceV2(base.TackerPersistentObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vnfInstanceName': fields.StringField(nullable=True), + 'vnfInstanceDescription': fields.StringField(nullable=True), + 'vnfdId': fields.StringField(nullable=False), + 'vnfProvider': fields.StringField(nullable=False), + 'vnfProductName': fields.StringField(nullable=False), + 'vnfSoftwareVersion': fields.VersionField(nullable=False), + 'vnfdVersion': fields.VersionField(nullable=False), + 'vnfConfigurableProperties': fields.KeyValuePairsField(nullable=True), + 'vimConnectionInfo': fields.DictOfObjectsField( + 'VimConnectionInfo', nullable=True), + 'instantiationState': fields.EnumField( + valid_values=[ + 'NOT_INSTANTIATED', + 'INSTANTIATED', + ], + nullable=False), + 'instantiatedVnfInfo': fields.ObjectField( + 'VnfInstanceV2_InstantiatedVnfInfo', nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + 'extensions': fields.KeyValuePairsField(nullable=True), + '_links': fields.ObjectField('VnfInstanceV2_Links', nullable=False), + } + + +@base.TackerObjectRegistry.register +class VnfInstanceV2_InstantiatedVnfInfo(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'flavourId': fields.StringField(nullable=False), + 'vnfState': v2fields.VnfOperationalStateTypeField(nullable=False), + 'scaleStatus': fields.ListOfObjectsField( + 'ScaleInfoV2', nullable=True), + 'maxScaleLevels': fields.ListOfObjectsField( + 'ScaleInfoV2', nullable=True), + 'extCpInfo': fields.ListOfObjectsField( + 'VnfExtCpInfoV2', nullable=False), + 'extVirtualLinkInfo': fields.ListOfObjectsField( + 'ExtVirtualLinkInfoV2', nullable=True), + 'extManagedVirtualLinkInfo': fields.ListOfObjectsField( + 'ExtManagedVirtualLinkInfoV2', nullable=True), + 'monitoringParameters': fields.ListOfObjectsField( + 'MonitoringParameterV2', nullable=True), + 'localizationLanguage': fields.StringField(nullable=True), + 'vnfcResourceInfo': fields.ListOfObjectsField( + 'VnfcResourceInfoV2', nullable=True), + 'vnfVirtualLinkResourceInfo': fields.ListOfObjectsField( + 'VnfVirtualLinkResourceInfoV2', nullable=True), + 'virtualStorageResourceInfo': fields.ListOfObjectsField( + 'VirtualStorageResourceInfoV2', nullable=True), + # NOTE: vnfcInfo exists in SOL002 only. + 'vnfcInfo': fields.ListOfObjectsField('VnfcInfoV2', nullable=True), + } + + +@base.TackerObjectRegistry.register +class VnfInstanceV2_Links(base.TackerObject): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'self': fields.ObjectField('Link', nullable=False), + 'indicators': fields.ObjectField('Link', nullable=True), + 'instantiate': fields.ObjectField('Link', nullable=True), + 'terminate': fields.ObjectField('Link', nullable=True), + 'scale': fields.ObjectField('Link', nullable=True), + 'scaleToLevel': fields.ObjectField('Link', nullable=True), + 'changeFlavour': fields.ObjectField('Link', nullable=True), + 'heal': fields.ObjectField('Link', nullable=True), + 'operate': fields.ObjectField('Link', nullable=True), + 'changeExtConn': fields.ObjectField('Link', nullable=True), + 'createSnapshot': fields.ObjectField('Link', nullable=True), + 'revertToSnapshot': fields.ObjectField('Link', nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_lcm_op_occ.py b/tacker/sol_refactored/objects/v2/vnf_lcm_op_occ.py new file mode 100644 index 000000000..e7f56ec12 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_lcm_op_occ.py @@ -0,0 +1,136 @@ +# 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._i18n import _ +from tacker.sol_refactored import objects +from tacker.sol_refactored.objects import base +from tacker.sol_refactored.objects import fields +from tacker.sol_refactored.objects.v2 import fields as v2fields + + +class OperationParam(fields.FieldType): + @staticmethod + def coerce(obj, attr, value): + if not hasattr(obj, 'operation'): + raise ValueError(_("'operation' must have been coerced " + "before 'operationParams'")) + if obj.operation == v2fields.LcmOperationType.INSTANTIATE: + cls = objects.InstantiateVnfRequestV2 + elif obj.operation == v2fields.LcmOperationType.SCALE: + cls = objects.ScaleVnfRequest + elif obj.operation == v2fields.LcmOperationType.SCALE_TO_LEVEL: + cls = objects.ScaleVnfToLevelRequest + elif obj.operation == v2fields.LcmOperationType.CHANGE_FLAVOUR: + cls = objects.ChangeVnfFlavourRequest + elif obj.operation == v2fields.LcmOperationType.OPERATE: + cls = objects.OperateVnfRequest + elif obj.operation == v2fields.LcmOperationType.HEAL: + cls = objects.HealVnfRequest + elif obj.operation == v2fields.LcmOperationType.CHANGE_EXT_CONN: + cls = objects.ChangeExtVnfConnectivityRequest + elif obj.operation == v2fields.LcmOperationType.TERMINATE: + cls = objects.TerminateVnfRequest + elif obj.operation == v2fields.LcmOperationType.MODIFY_INFO: + cls = objects.VnfInfoModificationRequest + elif obj.operation == v2fields.LcmOperationType.CREATE_SNAPSHOT: + cls = objects.CreateVnfSnapshotRequest + elif obj.operation == v2fields.LcmOperationType.REVERT_TO_SNAPSHOT: + cls = objects.RevertToVnfSnapshotRequest + elif obj.operation == v2fields.LcmOperationType.CHANGE_VNFPKG: + cls = objects.ChangeCurrentVnfPkgRequest + else: + raise ValueError(_("Unexpected 'operation' found.")) + + return cls.from_dict(value) + + def to_primitive(self, obj, attr, value): + return value.to_dict() + + +class OperationParamsField(fields.AutoTypedField): + AUTO_TYPE = OperationParam() + + +# NFV-SOL 003 +# - v3.3.1 5.5.2.13 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfLcmOpOccV2(base.TackerPersistentObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'operationState': v2fields.LcmOperationStateTypeField(nullable=False), + 'stateEnteredTime': fields.DateTimeField(nullable=False), + 'startTime': fields.DateTimeField(nullable=False), + 'vnfInstanceId': fields.StringField(nullable=False), + 'grantId': fields.StringField(nullable=True), + 'operation': v2fields.LcmOperationTypeField(nullable=False), + 'isAutomaticInvocation': fields.BooleanField(nullable=False), + 'operationParams': OperationParamsField(nullable=True), + 'isCancelPending': fields.BooleanField(nullable=False), + 'cancelMode': v2fields.CancelModeTypeField(nullable=True), + 'error': fields.ObjectField( + 'ProblemDetails', nullable=True), + 'resourceChanges': fields.ObjectField( + 'VnfLcmOpOccV2_ResourceChanges', nullable=True), + 'changedInfo': fields.ObjectField( + 'VnfInfoModificationsV2', nullable=True), + 'changedExtConnectivity': fields.ListOfObjectsField( + 'ExtVirtualLinkInfoV2', nullable=True), + 'modificationsTriggeredByVnfPkgChange': fields.ObjectField( + 'ModificationsTriggeredByVnfPkgChangeV2', nullable=True), + 'vnfSnapshotInfoId': fields.StringField(nullable=True), + '_links': fields.ObjectField('VnfLcmOpOccV2_Links', nullable=False), + } + + +@base.TackerObjectRegistry.register +class VnfLcmOpOccV2_ResourceChanges(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'affectedVnfcs': fields.ListOfObjectsField( + 'AffectedVnfcV2', nullable=True), + 'affectedVirtualLinks': fields.ListOfObjectsField( + 'AffectedVirtualLinkV2', nullable=True), + 'affectedExtLinkPorts': fields.ListOfObjectsField( + 'AffectedExtLinkPortV2', nullable=True), + 'affectedVirtualStorages': fields.ListOfObjectsField( + 'AffectedVirtualStorageV2', nullable=True) + } + + +@base.TackerObjectRegistry.register +class VnfLcmOpOccV2_Links(base.TackerObject): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'self': fields.ObjectField('Link', nullable=False), + 'vnfInstance': fields.ObjectField('Link', nullable=False), + 'grant': fields.ObjectField('Link', nullable=True), + 'cancel': fields.ObjectField('Link', nullable=True), + 'retry': fields.ObjectField('Link', nullable=True), + 'rollback': fields.ObjectField('Link', nullable=True), + 'fail': fields.ObjectField('Link', nullable=True), + 'vnfSnapshot': fields.ObjectField('Link', nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_lcm_operation_occurrence_notification.py b/tacker/sol_refactored/objects/v2/vnf_lcm_operation_occurrence_notification.py new file mode 100644 index 000000000..48534e963 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_lcm_operation_occurrence_notification.py @@ -0,0 +1,61 @@ +# 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.v2 import fields as v2fields + + +# NFV-SOL 003 +# - v3.3.1 5.5.2.17 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfLcmOperationOccurrenceNotificationV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'notificationType': fields.StringField(nullable=False), + 'subscriptionId': fields.StringField(nullable=False), + 'timeStamp': fields.DateTimeField(nullable=False), + 'notificationStatus': fields.EnumField( + valid_values=['START', 'RESULT'], nullable=False), + 'operationState': v2fields.LcmOperationStateTypeField( + nullable=False), + 'vnfInstanceId': fields.StringField(nullable=False), + 'operation': v2fields.LcmOperationTypeField(nullable=False), + 'isAutomaticInvocation': fields.BooleanField(nullable=False), + 'verbosity': v2fields.LcmOpOccNotificationVerbosityTypeField( + nullable=True), + 'vnfLcmOpOccId': fields.StringField(nullable=False), + 'affectedVnfcs': fields.ListOfObjectsField( + 'AffectedVnfcV2', nullable=True), + 'affectedVirtualLinks': fields.ListOfObjectsField( + 'AffectedVirtualLinkV2', nullable=True), + 'affectedExtLinkPorts': fields.ListOfObjectsField( + 'AffectedExtLinkPortV2', nullable=True), + 'affectedVirtualStorages': fields.ListOfObjectsField( + 'AffectedVirtualStorageV2', nullable=True), + 'changedInfo': fields.ObjectField( + 'VnfInfoModificationsV2', nullable=True), + 'changedExtConnectivity': fields.ListOfObjectsField( + 'ExtVirtualLinkInfoV2', nullable=True), + 'modificationsTriggeredByVnfPkgChange': fields.ObjectField( + 'ModificationsTriggeredByVnfPkgChangeV2', nullable=True), + 'error': fields.ObjectField('ProblemDetails', nullable=True), + '_links': fields.ObjectField('LccnLinksV2', nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_link_port_data.py b/tacker/sol_refactored/objects/v2/vnf_link_port_data.py new file mode 100644 index 000000000..fbc27bb49 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_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 5.5.3.18 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfLinkPortDataV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfLinkPortId': fields.StringField(nullable=False), + 'resourceHandle': fields.ObjectField( + 'ResourceHandle', nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_link_port_info.py b/tacker/sol_refactored/objects/v2/vnf_link_port_info.py new file mode 100644 index 000000000..b9525311e --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_link_port_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 +# - v3.3.1 5.5.3.8 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfLinkPortInfoV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'resourceHandle': fields.ObjectField( + 'ResourceHandle', nullable=False), + 'cpInstanceId': fields.StringField(nullable=True), + 'cpInstanceType': fields.EnumField( + valid_values=['VNFC_CP', 'EXT_CP'], nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_package_artifact_info.py b/tacker/sol_refactored/objects/v2/vnf_package_artifact_info.py new file mode 100644 index 000000000..5f8391eb0 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_package_artifact_info.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 base +from tacker.sol_refactored.objects import fields + + +# NFV-SOL 005 +# - v3.3.1 9.5.3.3 (API version: 2.1.0) +@base.TackerObjectRegistry.register +class VnfPackageArtifactInfoV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'artifactPath': fields.StringField(nullable=True), + 'artifactURI': fields.UriField(nullable=True), + 'checksum': fields.ChecksumField(nullable=False), + 'isEncrypted': fields.BooleanField(nullable=False), + 'nonManoArtifactSetId': fields.StringField(nullable=True), + 'artifactClassification': fields.EnumField( + valid_values=[ + 'HISTORY', + 'TESTING', + 'LICENSE', + ], + nullable=True, + ), + 'metadata': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_package_change_notification.py b/tacker/sol_refactored/objects/v2/vnf_package_change_notification.py new file mode 100644 index 000000000..54c2598c8 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_package_change_notification.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 +from tacker.sol_refactored.objects.v2 import fields as v2fields + + +# NFV-SOL 005 +# - v3.3.1 9.5.2.9 (API version: 2.1.0) +@base.TackerObjectRegistry.register +class VnfPackageChangeNotificationV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'notificationType': fields.StringField(nullable=False), + 'subscriptionId': fields.StringField(nullable=False), + 'timeStamp': fields.DateTimeField(nullable=False), + 'vnfPkgId': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=False), + 'changeType': v2fields.PackageChangeTypeField(nullable=False), + 'operationalState': v2fields.PackageOperationalStateTypeField( + nullable=True), + 'links': fields.ObjectField('PkgmLinksV2', nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_package_onboarding_notification.py b/tacker/sol_refactored/objects/v2/vnf_package_onboarding_notification.py new file mode 100644 index 000000000..ca9590fe6 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_package_onboarding_notification.py @@ -0,0 +1,39 @@ +# 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 005 +# - v3.3.1 9.5.2.8 (API version: 2.1.0) +@base.TackerObjectRegistry.register +class VnfPackageOnboardingNotificationV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'notificationType': fields.StringField(nullable=False), + 'subscriptionId': fields.StringField(nullable=False), + 'timeStamp': fields.DateTimeField(nullable=False), + 'vnfPkgId': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=False), + 'vnfmInfo': fields.ListOfStringsField(nullable=False), + '_links': fields.ObjectField( + 'PkgmLinksV2', nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_package_software_image_info.py b/tacker/sol_refactored/objects/v2/vnf_package_software_image_info.py new file mode 100644 index 000000000..d50a58c2b --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_package_software_image_info.py @@ -0,0 +1,70 @@ +# 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 005 +# - v3.3.1 9.5.3.2 (API version: 2.1.0) +@base.TackerObjectRegistry.register +class VnfPackageSoftwareImageInfoV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'name': fields.StringField(nullable=False), + 'provider': fields.StringField(nullable=False), + 'version': fields.VersionField(nullable=False), + 'checksum': fields.ChecksumField(nullable=False), + 'isEncrypted': fields.BooleanField(nullable=False), + 'containerFormat': fields.EnumField( + valid_values=[ + 'AKI', + 'AMI', + 'ARI', + 'BARE', + 'DOCKER', + 'OVA', + 'OVF', + ], + nullable=False, + ), + 'diskFormat': fields.EnumField( + valid_values=[ + 'AKI', + 'AMI', + 'ARI', + 'ISO', + 'QCOW2', + 'RAW', + 'VDI', + 'VHD', + 'VHDX', + 'VMDK', + ], + nullable=False, + ), + 'createdAt': fields.DateTimeField(nullable=False), + 'minDisk': fields.NonNegativeIntegerField(nullable=False), + 'minRam': fields.NonNegativeIntegerField(nullable=False), + 'size': fields.NonNegativeIntegerField(nullable=False), + 'userMetadata': fields.KeyValuePairsField(nullable=True), + 'imagePath': fields.StringField(nullable=True), + 'imageUri': fields.UriField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_pkg_info.py b/tacker/sol_refactored/objects/v2/vnf_pkg_info.py new file mode 100644 index 000000000..ea891aef4 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_pkg_info.py @@ -0,0 +1,74 @@ +# 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.v2 import fields as v2fields + + +# NFV-SOL 005 +# - v3.3.1 9.5.2.5 (API version: 2.1.0) +@base.TackerObjectRegistry.register +class VnfPkgInfoV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=True), + 'vnfProvider': fields.StringField(nullable=True), + 'vnfProductName': fields.StringField(nullable=True), + 'vnfSoftwareVersion': fields.VersionField(nullable=True), + 'vnfdVersion': fields.VersionField(nullable=True), + 'compatibleSpecificationVersions': fields.ListOfVersionsField( + nullable=True), + 'checksum': fields.ChecksumField(nullable=True), + 'packageSecurityOption': fields.EnumField( + valid_values=[ + 'OPTION_1', + 'OPTION_2', + ], + nullable=False, + ), + 'signingCertificate': fields.StringField(nullable=True), + 'softwareImages': fields.ListOfObjectsField( + 'VnfPackageSoftwareImageInfoV2', nullable=True), + 'additionalArtifacts': fields.ListOfObjectsField( + 'VnfPackageArtifactInfoV2', nullable=True), + 'onboardingState': v2fields.PackageOnboardingStateTypeField( + nullable=False), + 'operationalState': v2fields.PackageOperationalStateTypeField( + nullable=False), + 'usageState': v2fields.PackageUsageStateTypeField(nullable=False), + 'vnfmInfo': fields.ListOfStringsField(nullable=False), + 'userDefinedData': fields.KeyValuePairsField(nullable=True), + 'onboardingFailureDetails': fields.ObjectField( + 'ProblemDetails', nullable=True), + '_links': fields.ObjectField('VnfPkgInfoV2_Links', nullable=False), + } + + +@base.TackerObjectRegistry.register +class VnfPkgInfoV2_Links(base.TackerObject): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'self': fields.ObjectField('Link', nullable=False), + 'vnfd': fields.ObjectField('Link', nullable=False), + 'packageContent': fields.ObjectField('Link', nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_pkg_info_modifications.py b/tacker/sol_refactored/objects/v2/vnf_pkg_info_modifications.py new file mode 100644 index 000000000..39ed05573 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_pkg_info_modifications.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 +from tacker.sol_refactored.objects.v2 import fields as v2fields + + +# NFV-SOL 005 +# - v3.3.1 9.5.2.3 (API version: 2.1.0) +@base.TackerObjectRegistry.register +class VnfPkgInfoModificationsV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'operationalState': v2fields.PackageOperationalStateTypeField( + nullable=True), + 'userDefinedData': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_snapshot.py b/tacker/sol_refactored/objects/v2/vnf_snapshot.py new file mode 100644 index 000000000..38b11702e --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_snapshot.py @@ -0,0 +1,54 @@ +# 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.2.23 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfSnapshotV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vnfInstanceId': fields.StringField(nullable=False), + 'creationStartedAt': fields.DateTimeField(nullable=False), + 'creationFinishedAt': fields.DateTimeField(nullable=True), + 'vnfdId': fields.StringField(nullable=False), + 'vnfInstance': fields.ObjectField( + 'VnfInstanceV2', nullable=False), + 'vnfcSnapshots': fields.ListOfObjectsField( + 'VnfcSnapshotInfoV2', nullable=False), + 'vnfStateSnapshotInfo': fields.ObjectField( + 'VnfStateSnapshotInfoV2', nullable=True), + 'userDefinedData': fields.KeyValuePairsField(nullable=True), + '_links': fields.ObjectField('VnfSnapshotV2_Links', nullable=False), + } + + +@base.TackerObjectRegistry.register +class VnfSnapshotV2_Links(base.TackerObject): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'self': fields.ObjectField('Link', nullable=False), + 'vnfStateSnapshot': fields.ObjectField('Link', nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_snapshot_info.py b/tacker/sol_refactored/objects/v2/vnf_snapshot_info.py new file mode 100644 index 000000000..e1b978180 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_snapshot_info.py @@ -0,0 +1,47 @@ +# 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.2.22 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfSnapshotInfoV2(base.TackerPersistentObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vnfSnapshotPkgId': fields.StringField(nullable=True), + 'vnfSnapshot': fields.ObjectField('VnfSnapshotV2', nullable=True), + '_links': fields.ObjectField( + 'VnfSnapshotInfoV2_Links', nullable=False), + } + + +@base.TackerObjectRegistry.register +class VnfSnapshotInfoV2_Links(base.TackerObject): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'self': fields.ObjectField('Link', nullable=False), + 'takenFrom': fields.ObjectField('Link', nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_snapshot_info_modification_request.py b/tacker/sol_refactored/objects/v2/vnf_snapshot_info_modification_request.py new file mode 100644 index 000000000..68ceb2bee --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_snapshot_info_modification_request.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 5.5.2.24 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfSnapshotInfoModificationRequestV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfSnapshotPkgId': fields.StringField(nullable=True), + 'vnfSnapshot': fields.ObjectField( + 'VnfSnapshotV2', nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_snapshot_info_modifications.py b/tacker/sol_refactored/objects/v2/vnf_snapshot_info_modifications.py new file mode 100644 index 000000000..c4c9d0aeb --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_snapshot_info_modifications.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 5.5.2.25 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfSnapshotInfoModificationsV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'vnfSnapshotPkgId': fields.StringField(nullable=True), + 'vnfSnapshot': fields.ObjectField( + 'VnfSnapshotV2', nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_state_snapshot_info.py b/tacker/sol_refactored/objects/v2/vnf_state_snapshot_info.py new file mode 100644 index 000000000..e12e28da1 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_state_snapshot_info.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 5.5.3.20 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfStateSnapshotInfoV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'checksum': fields.ChecksumField(nullable=False), + 'isEncrypted': fields.BooleanField(nullable=False), + 'metadata': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnf_virtual_link_resource_info.py b/tacker/sol_refactored/objects/v2/vnf_virtual_link_resource_info.py new file mode 100644 index 000000000..56d096b2b --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnf_virtual_link_resource_info.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 5.5.3.6 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfVirtualLinkResourceInfoV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vnfVirtualLinkDescId': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=True), + 'networkResource': fields.ObjectField( + 'ResourceHandle', nullable=False), + 'zoneId': fields.StringField(nullable=True), + 'reservationId': fields.StringField(nullable=True), + 'vnfLinkPorts': fields.ListOfObjectsField( + 'VnfLinkPortInfoV2', nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnfc_info.py b/tacker/sol_refactored/objects/v2/vnfc_info.py new file mode 100644 index 000000000..4c19d29b7 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnfc_info.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 002 +# - v3.3.1 5.5.3.23 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfcInfoV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vduId': fields.StringField(nullable=False), + 'vnfcResourceInfoId': fields.StringField(nullable=True), + 'vnfcState': fields.EnumField( + valid_values=['STARTED', 'STOPPED'], nullable=False), + 'vnfcConfigurableProperties': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnfc_info_modifications.py b/tacker/sol_refactored/objects/v2/vnfc_info_modifications.py new file mode 100644 index 000000000..3d9279a72 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnfc_info_modifications.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 002 +# - v3.3.1 5.5.3.24 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfcInfoModificationsV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vnfcConfigurableProperties': + fields.KeyValuePairsField(nullable=False), + } diff --git a/tacker/sol_refactored/objects/v2/vnfc_resource_info.py b/tacker/sol_refactored/objects/v2/vnfc_resource_info.py new file mode 100644 index 000000000..e8d4b9d26 --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnfc_resource_info.py @@ -0,0 +1,59 @@ +# 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.5 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfcResourceInfoV2(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vduId': fields.StringField(nullable=False), + 'vnfdId': fields.StringField(nullable=True), + 'computeResource': fields.ObjectField( + 'ResourceHandle', nullable=False), + 'zoneId': fields.StringField(nullable=True), + 'storageResourceIds': fields.ListOfStringsField(nullable=True), + 'reservationId': fields.StringField(nullable=True), + 'vnfcCpInfo': fields.ListOfObjectsField( + 'VnfcResourceInfoV2_VnfcCpInfo', nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + } + + +@base.TackerObjectRegistry.register +class VnfcResourceInfoV2_VnfcCpInfo(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'cpdId': fields.StringField(nullable=False), + 'vnfExtCpId': fields.StringField(nullable=True), + 'cpProtocolInfo': fields.ListOfObjectsField( + 'CpProtocolInfoV2', nullable=True), + 'vnfLinkPortId': fields.StringField(nullable=True), + 'metadata': fields.KeyValuePairsField(nullable=True), + } diff --git a/tacker/sol_refactored/objects/v2/vnfc_snapshot_info.py b/tacker/sol_refactored/objects/v2/vnfc_snapshot_info.py new file mode 100644 index 000000000..3d495eaac --- /dev/null +++ b/tacker/sol_refactored/objects/v2/vnfc_snapshot_info.py @@ -0,0 +1,52 @@ +# 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.19 (API version: 2.0.0) +@base.TackerObjectRegistry.register +class VnfcSnapshotInfoV2(base.TackerObject, base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'id': fields.StringField(nullable=False), + 'vnfcInstanceId': fields.StringField(nullable=False), + 'creationStartedAt': fields.DateTimeField(nullable=False), + 'creationFinishedAt': fields.DateTimeField(nullable=True), + 'vnfcResourceInfoId': fields.StringField(nullable=False), + 'computeSnapshotResource': fields.ObjectField( + 'ResourceHandle', nullable=True), + 'storageSnapshotResources': fields.ListOfObjectsField( + 'VnfcSnapshotInfoV2_StorageSnapshotResources', nullable=True), + 'userDefinedData': fields.KeyValuePairsField(nullable=True), + } + + +class VnfcSnapshotInfoV2_StorageSnapshotResources(base.TackerObject, + base.TackerObjectDictCompat): + + # Version 1.0: Initial version + VERSION = '1.0' + + fields = { + 'storageResourceId': fields.StringField(nullable=False), + 'storageSnapshotResource': fields.ObjectField( + 'ResourceHandle', nullable=True), + }