Object definitions of multi version API support
This patch includes only object definitions used by multi version API support. There is no logic in this patch. The logic part of multi version API support is provided with a following patch. Because the definition of the object had much number of the files, the patch of logic part is separated to make code review easy. Implementation notes: Objects are defined as is according to ETSI NFV-SOL specifications. This means attributes of objects are not converted to snake case but camel case as is because the conversion is meaningless obviously. Naming convention of class is as follows: * for a object represents a type with the definition in a section of the specication, as is and may be followed by V2 (or V1) to distinguish it from another version in the future. ex. 'SOL003 5.5.2.2 Type: VnfInstance' => VnfInstanceV2 * for a object representing an inlined struct, 'class name which the member belongs to' + '_' + 'member name which changed the first letter to the capital letter'. ex. the object representing instantiatedVnfInfo in VnfInstance => VnfInstanceV2_InstantiatedVnfInfo. Note that 'nullable=True' means cardinality may be zero in this object definitions while it means null is OK in the persistent object originally. Implements: blueprint multi-version-api Implements: blueprint support-nfv-solv3-start-and-terminate-vnf Implements: blueprint support-nfv-solv3-query-vnf-instances Implements: blueprint support-nfv-solv3-query-operation-occurrences Implemetes: blueprint support-nfv-solv3-subscriptions Change-Id: I93711971906132b8dcf794864d22e2c1b326bc3a
This commit is contained in:
parent
5534b15fdc
commit
49ab5f9a15
33
tacker/sol_refactored/objects/common/cp_protocol_data.py
Normal file
33
tacker/sol_refactored/objects/common/cp_protocol_data.py
Normal file
@ -0,0 +1,33 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v3.3.1 4.4.1.10b
|
||||
@base.TackerObjectRegistry.register
|
||||
class CpProtocolData(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'layerProtocol': fields.EnumField(
|
||||
valid_values=['IP_OVER_ETHERNET'], nullable=False),
|
||||
'ipOverEthernet': fields.ObjectField(
|
||||
'IpOverEthernetAddressData', nullable=True),
|
||||
}
|
32
tacker/sol_refactored/objects/common/ext_link_port_data.py
Normal file
32
tacker/sol_refactored/objects/common/ext_link_port_data.py
Normal file
@ -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),
|
||||
}
|
@ -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),
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v3.3.1 4.4.1.11
|
||||
@base.TackerObjectRegistry.register
|
||||
class ExtVirtualLinkData(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'id': fields.StringField(nullable=False),
|
||||
'vimConnectionId': fields.StringField(nullable=True),
|
||||
'resourceProviderId': fields.StringField(nullable=True),
|
||||
'resourceId': fields.StringField(nullable=False),
|
||||
'extCps': fields.ListOfObjectsField(
|
||||
'VnfExtCpData', nullable=False),
|
||||
'extLinkPorts': fields.ListOfObjectsField(
|
||||
'ExtLinkPortData', nullable=True),
|
||||
}
|
111
tacker/sol_refactored/objects/common/fields.py
Normal file
111
tacker/sol_refactored/objects/common/fields.py
Normal file
@ -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()
|
@ -0,0 +1,67 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v3.3.1 4.4.1.10c
|
||||
@base.TackerObjectRegistry.register
|
||||
class IpOverEthernetAddressData(base.TackerObject,
|
||||
base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'macAddress': fields.MACAddressField(nullable=True),
|
||||
'segmentationId': fields.StringField(nullable=True),
|
||||
'ipAddresses': fields.ListOfObjectsField(
|
||||
'IpOverEthernetAddressData_IpAddresses',
|
||||
nullable=True),
|
||||
}
|
||||
|
||||
|
||||
@base.TackerObjectRegistry.register
|
||||
class IpOverEthernetAddressData_IpAddresses(
|
||||
base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'type': fields.EnumField(
|
||||
valid_values=['IPV4', 'IPV6'], nullable=False),
|
||||
'fixedAddresses': fields.ListOfIPAddressesField(nullable=True),
|
||||
'numDynamicAddresses': fields.IntegerField(nullable=True),
|
||||
'addressRange': fields.ObjectField(
|
||||
'IpOverEthernetAddressData_IpAddresses_AddressRange',
|
||||
nullable=True),
|
||||
'subnetId': fields.StringField(nullable=True),
|
||||
}
|
||||
|
||||
|
||||
@base.TackerObjectRegistry.register
|
||||
class IpOverEthernetAddressData_IpAddresses_AddressRange(
|
||||
base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'minAddress': fields.IPAddressField(nullable=False),
|
||||
'maxAddress': fields.IPAddressField(nullable=False),
|
||||
}
|
30
tacker/sol_refactored/objects/common/link.py
Normal file
30
tacker/sol_refactored/objects/common/link.py
Normal file
@ -0,0 +1,30 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 013
|
||||
# - v3.4.1 7.1.3
|
||||
@base.TackerObjectRegistry.register
|
||||
class Link(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'href': fields.UriField(nullable=False),
|
||||
}
|
30
tacker/sol_refactored/objects/common/notification_link.py
Normal file
30
tacker/sol_refactored/objects/common/notification_link.py
Normal file
@ -0,0 +1,30 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 013
|
||||
# - v3.4.1 7.1.4
|
||||
@base.TackerObjectRegistry.register
|
||||
class NotificationLink(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'href': fields.UriField(nullable=False),
|
||||
}
|
34
tacker/sol_refactored/objects/common/problem_details.py
Normal file
34
tacker/sol_refactored/objects/common/problem_details.py
Normal file
@ -0,0 +1,34 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 013
|
||||
# - v3.4.1 6.3
|
||||
@base.TackerObjectRegistry.register
|
||||
class ProblemDetails(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'type': fields.UriField(nullable=True),
|
||||
'title': fields.StringField(nullable=True),
|
||||
'status': fields.IntegerField(nullable=False),
|
||||
'detail': fields.StringField(nullable=False),
|
||||
'instance': fields.UriField(nullable=True),
|
||||
}
|
33
tacker/sol_refactored/objects/common/resource_handle.py
Normal file
33
tacker/sol_refactored/objects/common/resource_handle.py
Normal file
@ -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),
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 013
|
||||
# - v3.4.1 Table 8.3.4-1
|
||||
@base.TackerObjectRegistry.register
|
||||
class SubscriptionAuthentication(base.TackerObject,
|
||||
base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'authType': fields.ListOfEnumField(
|
||||
valid_values=[
|
||||
'BASIC',
|
||||
'OAUTH2_CLIENT_CREDENTIALS',
|
||||
'TLS_CERT',
|
||||
],
|
||||
nullable=False),
|
||||
'paramsBasic': fields.ObjectField(
|
||||
'SubscriptionAuthentication_ParamsBasic', nullable=True),
|
||||
'paramsOauth2ClientCredentials': fields.ObjectField(
|
||||
'SubscriptionAuthentication_ParamsOauth2', nullable=True),
|
||||
}
|
||||
|
||||
|
||||
@base.TackerObjectRegistry.register
|
||||
class SubscriptionAuthentication_ParamsBasic(base.TackerObject,
|
||||
base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'userName': fields.StringField(nullable=True),
|
||||
'password': fields.StringField(nullable=True),
|
||||
}
|
||||
|
||||
|
||||
# NOTE: It should be
|
||||
# SubscriptionAuthentication_ParamsOauth2ClientCredentials
|
||||
# according to a principle, but shortened it as it is too long.
|
||||
|
||||
@base.TackerObjectRegistry.register
|
||||
class SubscriptionAuthentication_ParamsOauth2(
|
||||
base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'clientId': fields.StringField(nullable=True),
|
||||
'clientPassword': fields.StringField(nullable=True),
|
||||
'tokenEndpoint': fields.UriField(nullable=True),
|
||||
}
|
34
tacker/sol_refactored/objects/common/vim_connection_info.py
Normal file
34
tacker/sol_refactored/objects/common/vim_connection_info.py
Normal file
@ -0,0 +1,34 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v3.3.1 4.4.1.6
|
||||
@base.TackerObjectRegistry.register
|
||||
class VimConnectionInfo(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'vimId': fields.StringField(nullable=True),
|
||||
'vimType': fields.StringField(nullable=False),
|
||||
'interfaceInfo': fields.KeyValuePairsField(nullable=True),
|
||||
'accessInfo': fields.KeyValuePairsField(nullable=True),
|
||||
'extra': fields.KeyValuePairsField(nullable=True),
|
||||
}
|
33
tacker/sol_refactored/objects/common/vnf_ext_cp_config.py
Normal file
33
tacker/sol_refactored/objects/common/vnf_ext_cp_config.py
Normal file
@ -0,0 +1,33 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v3.3.1 4.4.1.10a
|
||||
@base.TackerObjectRegistry.register
|
||||
class VnfExtCpConfig(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'parentCpConfigId': fields.StringField(nullable=True),
|
||||
'linkPortId': fields.StringField(nullable=True),
|
||||
'cpProtocolData': fields.ListOfObjectsField(
|
||||
'CpProtocolData', nullable=True),
|
||||
}
|
32
tacker/sol_refactored/objects/common/vnf_ext_cp_data.py
Normal file
32
tacker/sol_refactored/objects/common/vnf_ext_cp_data.py
Normal file
@ -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),
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v3.3.1 4.4.1.5
|
||||
@base.TackerObjectRegistry.register
|
||||
class VnfInstanceSubscriptionFilter(base.TackerObject,
|
||||
base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'vnfdIds': fields.ListOfStringsField(nullable=True),
|
||||
'vnfProductsFromProviders': fields.ListOfObjectsField(
|
||||
'_VnfProductsFromProviders', nullable=True),
|
||||
'vnfInstanceIds': fields.ListOfStringsField(nullable=True),
|
||||
'vnfInstanceNames': fields.ListOfStringsField(nullable=True),
|
||||
}
|
||||
|
||||
|
||||
# NOTE: For the following names of internal classes, there should be
|
||||
# 'VnfInstanceSubscriptionFilter' in the top according to a principle,
|
||||
# but omits it as it is too long.
|
||||
|
||||
@base.TackerObjectRegistry.register
|
||||
class _VnfProductsFromProviders(
|
||||
base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'vnfProvider': fields.StringField(nullable=False),
|
||||
'vnfProducts': fields.ListOfObjectsField(
|
||||
'_VnfProductsFromProviders_VnfProducts', nullable=True),
|
||||
}
|
||||
|
||||
|
||||
@base.TackerObjectRegistry.register
|
||||
class _VnfProductsFromProviders_VnfProducts(
|
||||
base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'vnfProductName': fields.StringField(nullable=False),
|
||||
'versions': fields.ListOfObjectsField(
|
||||
'_VnfProductsFromProviders_VnfProducts_Versions', nullable=True),
|
||||
}
|
||||
|
||||
|
||||
@base.TackerObjectRegistry.register
|
||||
class _VnfProductsFromProviders_VnfProducts_Versions(
|
||||
base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'vnfSoftwareVersion': fields.VersionField(nullable=False),
|
||||
'vnfdVersions': fields.ListOfVersionsField(nullable=True),
|
||||
}
|
37
tacker/sol_refactored/objects/v1/constraint_resource_ref.py
Normal file
37
tacker/sol_refactored/objects/v1/constraint_resource_ref.py
Normal file
@ -0,0 +1,37 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v2.6.1 9.5.3.8 (API version: 1.3.0)
|
||||
# - v2.7.1 9.5.3.8 (API version: 1.3.0)
|
||||
# - v2.8.1 9.5.3.8 (API version: 1.3.0)
|
||||
# - v3.3.1 9.5.3.8 (API version: 1.4.0)
|
||||
@base.TackerObjectRegistry.register
|
||||
class ConstraintResourceRefV1(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'idType': fields.EnumField(
|
||||
valid_values=['RES_MGMT', 'GRANT'], nullable=False),
|
||||
'resourceId': fields.StringField(nullable=False),
|
||||
'vimConnectionId': fields.StringField(nullable=True),
|
||||
'resourceProviderId': fields.StringField(nullable=True),
|
||||
}
|
43
tacker/sol_refactored/objects/v1/fields.py
Normal file
43
tacker/sol_refactored/objects/v1/fields.py
Normal file
@ -0,0 +1,43 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v2.6.1 9.5.4.3 (API version: 1.3.0)
|
||||
# - v2.7.1 9.5.4.3 (API version: 1.3.0)
|
||||
# - v2.8.1 9.5.4.3 (API version: 1.3.0)
|
||||
# - v3.3.1 9.5.4.3 (API version: 1.4.0)
|
||||
class GrantedLcmOperationType(fields.BaseTackerEnum):
|
||||
INSTANTIATE = 'INSTANTIATE'
|
||||
SCALE = 'SCALE'
|
||||
SCALE_TO_LEVEL = 'SCALE_TO_LEVEL'
|
||||
CHANGE_FLAVOUR = 'CHANGE_FLAVOUR'
|
||||
TERMINATE = 'TERMINATE'
|
||||
HEAL = 'HEAL'
|
||||
OPERATE = 'OPERATE'
|
||||
CHANGE_EXT_CONN = 'CHANGE_EXT_CONN'
|
||||
CHANGE_VNFPKG = 'CHANGE_VNFPKG' # since 1.4.0
|
||||
CREATE_SNAPSHOT = 'CREATE_SNAPSHOT' # since 1.4.0
|
||||
REVERT_TO_SNAPSHOT = 'REVERT_TO_SNAPSHOT' # since 1.4.0
|
||||
|
||||
ALL = (INSTANTIATE, SCALE, SCALE_TO_LEVEL, CHANGE_FLAVOUR,
|
||||
TERMINATE, HEAL, OPERATE, CHANGE_EXT_CONN, CHANGE_VNFPKG,
|
||||
CREATE_SNAPSHOT, REVERT_TO_SNAPSHOT)
|
||||
|
||||
|
||||
class GrantedLcmOperationTypeField(fields.BaseEnumField):
|
||||
AUTO_TYPE = GrantedLcmOperationType()
|
85
tacker/sol_refactored/objects/v1/grant.py
Normal file
85
tacker/sol_refactored/objects/v1/grant.py
Normal file
@ -0,0 +1,85 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v3.3.1 9.5.2.3 (API version: 1.4.0)
|
||||
@base.TackerObjectRegistry.register
|
||||
class GrantV1(base.TackerPersistentObject,
|
||||
base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'id': fields.StringField(nullable=False),
|
||||
'vnfInstanceId': fields.StringField(nullable=False),
|
||||
'vnfLcmOpOccId': fields.StringField(nullable=False),
|
||||
'vimConnectionInfo': fields.DictOfObjectsField(
|
||||
'VimConnectionInfo', nullable=True),
|
||||
'zones': fields.ListOfObjectsField(
|
||||
'ZoneInfoV1', nullable=True),
|
||||
'zoneGroups': fields.ListOfObjectsField(
|
||||
'ZoneGroupInfoV1', nullable=True),
|
||||
'addResources': fields.ListOfObjectsField(
|
||||
'GrantInfoV1', nullable=True),
|
||||
'tempResources': fields.ListOfObjectsField(
|
||||
'GrantInfoV1', nullable=True),
|
||||
'removeResources': fields.ListOfObjectsField(
|
||||
'GrantInfoV1', nullable=True),
|
||||
'updateResources': fields.ListOfObjectsField(
|
||||
'GrantInfoV1', nullable=True),
|
||||
'vimAssets': fields.ObjectField(
|
||||
'GrantV1_VimAssets', nullable=True),
|
||||
'extVirtualLinks': fields.ListOfObjectsField(
|
||||
'ExtVirtualLinkData', nullable=True),
|
||||
'extManagedVirtualLinks': fields.ListOfObjectsField(
|
||||
'ExtManagedVirtualLinkData', nullable=True),
|
||||
'additionalParams': fields.KeyValuePairsField(nullable=True),
|
||||
'_links': fields.ObjectField('GrantV1_Links', nullable=False),
|
||||
}
|
||||
|
||||
|
||||
@base.TackerObjectRegistry.register
|
||||
class GrantV1_VimAssets(base.TackerObject,
|
||||
base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'computeResourceFlavours': fields.ListOfObjectsField(
|
||||
'VimComputeResourceFlavour', nullable=True),
|
||||
'softwareImages': fields.ListOfObjectsField(
|
||||
'VimSoftwareImageV1', nullable=True),
|
||||
'snapshotResources': fields.ListOfObjectsField(
|
||||
'VimSnapshotResourceV1', nullable=True),
|
||||
}
|
||||
|
||||
|
||||
@base.TackerObjectRegistry.register
|
||||
class GrantV1_Links(base.TackerObject):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'self': fields.ObjectField('Link', nullable=False),
|
||||
'vnfLcmOpOcc': fields.ObjectField('Link', nullable=False),
|
||||
'vnfInstance': fields.ObjectField('Link', nullable=False),
|
||||
}
|
38
tacker/sol_refactored/objects/v1/grant_info.py
Normal file
38
tacker/sol_refactored/objects/v1/grant_info.py
Normal file
@ -0,0 +1,38 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v2.6.1 9.5.3.3 (API version: 1.3.0)
|
||||
# - v2.7.1 9.5.3.3 (API version: 1.3.0)
|
||||
# - v2.8.1 9.5.3.3 (API version: 1.3.0)
|
||||
# - v3.3.1 9.5.3.3 (API version: 1.4.0)
|
||||
@base.TackerObjectRegistry.register
|
||||
class GrantInfoV1(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'resourceDefinitionId': fields.StringField(nullable=False),
|
||||
'reservationId': fields.StringField(nullable=True),
|
||||
'vimConnectionId': fields.StringField(nullable=True),
|
||||
'resourceProviderId': fields.StringField(nullable=True),
|
||||
'zoneId': fields.StringField(nullable=True),
|
||||
'resourceGroupId': fields.StringField(nullable=True),
|
||||
}
|
64
tacker/sol_refactored/objects/v1/grant_request.py
Normal file
64
tacker/sol_refactored/objects/v1/grant_request.py
Normal file
@ -0,0 +1,64 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
from tacker.sol_refactored.objects.v1 import fields as v1fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v3.3.1 9.5.2.2 (API version: 1.4.0)
|
||||
@base.TackerObjectRegistry.register
|
||||
class GrantRequestV1(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'vnfInstanceId': fields.StringField(nullable=False),
|
||||
'vnfLcmOpOccId': fields.StringField(nullable=False),
|
||||
'vnfdId': fields.StringField(nullable=False),
|
||||
'dstVnfdId': fields.StringField(nullable=True),
|
||||
'flavourId': fields.StringField(nullable=True),
|
||||
'operation': v1fields.GrantedLcmOperationTypeField(nullable=False),
|
||||
'isAutomaticInvocation': fields.BooleanField(nullable=False),
|
||||
'instantiationLevelId': fields.StringField(nullable=True),
|
||||
'addResources': fields.ListOfObjectsField(
|
||||
'ResourceDefinitionV1', nullable=True),
|
||||
'tempResources': fields.ListOfObjectsField(
|
||||
'ResourceDefinitionV1', nullable=True),
|
||||
'removeResources': fields.ListOfObjectsField(
|
||||
'ResourceDefinitionV1', nullable=True),
|
||||
'updateResources': fields.ListOfObjectsField(
|
||||
'ResourceDefinitionV1', nullable=True),
|
||||
'placementConstraints': fields.ListOfObjectsField(
|
||||
'PlacementConstraintV1', nullable=True),
|
||||
'vimConstraints': fields.ListOfObjectsField(
|
||||
'VimConstraintV1', nullable=True),
|
||||
'additionalParams': fields.KeyValuePairsField(nullable=True),
|
||||
'_links': fields.ObjectField('GrantRequestV1_Links', nullable=False),
|
||||
}
|
||||
|
||||
|
||||
@base.TackerObjectRegistry.register
|
||||
class GrantRequestV1_Links(base.TackerObject):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'vnfLcmOpOcc': fields.ObjectField('Link', nullable=False),
|
||||
'vnfInstance': fields.ObjectField('Link', nullable=False),
|
||||
}
|
51
tacker/sol_refactored/objects/v1/placement_constraint.py
Normal file
51
tacker/sol_refactored/objects/v1/placement_constraint.py
Normal file
@ -0,0 +1,51 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v2.6.1 9.5.3.6 (API version: 1.3.0)
|
||||
# - v2.7.1 9.5.3.6 (API version: 1.3.0)
|
||||
# - v2.8.1 9.5.3.6 (API version: 1.3.0)
|
||||
# - v3.3.1 9.5.3.6 (API version: 1.4.0)
|
||||
@base.TackerObjectRegistry.register
|
||||
class PlacementConstraintV1(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'affinityOrAntiAffinity': fields.EnumField(
|
||||
valid_values=[
|
||||
'AFFINITY',
|
||||
'ANTI_AFFINITY',
|
||||
],
|
||||
nullable=False
|
||||
),
|
||||
'scope': fields.EnumField(
|
||||
valid_values=[
|
||||
'NFVI_POP',
|
||||
'ZONE',
|
||||
'ZONE_GROUP',
|
||||
'NFVI_NODE',
|
||||
],
|
||||
nullable=False,
|
||||
),
|
||||
'resource': fields.ListOfObjectsField(
|
||||
'ConstraintResourceRefV1', nullable=False),
|
||||
'fallbackBestEffort': fields.BooleanField(nullable=True),
|
||||
}
|
46
tacker/sol_refactored/objects/v1/resource_definition.py
Normal file
46
tacker/sol_refactored/objects/v1/resource_definition.py
Normal file
@ -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),
|
||||
}
|
@ -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),
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v2.6.1 9.5.3.9 (API version: 1.3.0)
|
||||
# - v2.7.1 9.5.3.9 (API version: 1.3.0)
|
||||
# - v2.8.1 9.5.3.9 (API version: 1.3.0)
|
||||
# - v3.3.1 9.5.3.9 (API version: 1.4.0)
|
||||
@base.TackerObjectRegistry.register
|
||||
class VimComputeResourceFlavourV1(base.TackerObject,
|
||||
base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'vimConnectionId': fields.StringField(nullable=True),
|
||||
'resourceProviderId': fields.StringField(nullable=True),
|
||||
'vnfdVirtualComputeDescId': fields.StringField(nullable=False),
|
||||
'vimFlavourId': fields.StringField(nullable=False),
|
||||
}
|
35
tacker/sol_refactored/objects/v1/vim_constraint.py
Normal file
35
tacker/sol_refactored/objects/v1/vim_constraint.py
Normal file
@ -0,0 +1,35 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v2.6,1 9.5.3.7 (API version: 1.3.0)
|
||||
# - v2.7,1 9.5.3.7 (API version: 1.3.0)
|
||||
# - v2.8,1 9.5.3.7 (API version: 1.3.0)
|
||||
# - v3.3.1 9.5.3.7 (API version: 1.4.0)
|
||||
@base.TackerObjectRegistry.register
|
||||
class VimConstraintV1(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'sameResourceGroup': fields.BooleanField(nullable=True),
|
||||
'resource': fields.ListOfObjectsField(
|
||||
'ConstraintResourceRefV1', nullable=False),
|
||||
}
|
35
tacker/sol_refactored/objects/v1/vim_snapshot_resource.py
Normal file
35
tacker/sol_refactored/objects/v1/vim_snapshot_resource.py
Normal file
@ -0,0 +1,35 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v3.3.1 9.5.3.12 (API version: 1.4.0)
|
||||
@base.TackerObjectRegistry.register
|
||||
class VimSnapshotResourceV1(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'vimConnectionId': fields.StringField(nullable=True),
|
||||
'resourceProviderId': fields.StringField(nullable=True),
|
||||
'vnfSnapshotId': fields.StringField(nullable=False),
|
||||
'vnfcSnapshotId': fields.StringField(nullable=False),
|
||||
'storageSnapshotId': fields.StringField(nullable=True),
|
||||
'vimSnapshotResourceId': fields.StringField(nullable=False),
|
||||
}
|
36
tacker/sol_refactored/objects/v1/vim_software_image.py
Normal file
36
tacker/sol_refactored/objects/v1/vim_software_image.py
Normal file
@ -0,0 +1,36 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v2.6.1 9.5.3.10 (API version: 1.3.0)
|
||||
# - v2.7.1 9.5.3.10 (API version: 1.3.0)
|
||||
# - v2.8.1 9.5.3.10 (API version: 1.3.0)
|
||||
# - v3.3.1 9.5.3.10 (API version: 1.4.0)
|
||||
@base.TackerObjectRegistry.register
|
||||
class VimSoftwareImageV1(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'vimConnectionId': fields.StringField(nullable=True),
|
||||
'resourceProviderId': fields.StringField(nullable=True),
|
||||
'vnfdSoftwareImageId': fields.StringField(nullable=False),
|
||||
'vimSoftwareImageId': fields.StringField(nullable=False),
|
||||
}
|
33
tacker/sol_refactored/objects/v1/zone_group_info.py
Normal file
33
tacker/sol_refactored/objects/v1/zone_group_info.py
Normal file
@ -0,0 +1,33 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v2.6.1 9.5.3.5 (API version: 1.3.0)
|
||||
# - v2.7.1 9.5.3.5 (API version: 1.3.0)
|
||||
# - v2.8.1 9.5.3.5 (API version: 1.3.0)
|
||||
# - v3.3.1 9.5.3.5 (API version: 1.4.0)
|
||||
@base.TackerObjectRegistry.register
|
||||
class ZoneGroupInfoV1(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'zoneId': fields.ListOfStringsField(nullable=False),
|
||||
}
|
36
tacker/sol_refactored/objects/v1/zone_info.py
Normal file
36
tacker/sol_refactored/objects/v1/zone_info.py
Normal file
@ -0,0 +1,36 @@
|
||||
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from tacker.sol_refactored.objects import base
|
||||
from tacker.sol_refactored.objects import fields
|
||||
|
||||
|
||||
# NFV-SOL 003
|
||||
# - v2.6.1 9.5.3.4 (API version: 1.3.0)
|
||||
# - v2.7.1 9.5.3.4 (API version: 1.3.0)
|
||||
# - v2.8.1 9.5.3.4 (API version: 1.3.0)
|
||||
# - v3.3.1 9.5.3.4 (API version: 1.4.0)
|
||||
@base.TackerObjectRegistry.register
|
||||
class ZoneInfoV1(base.TackerObject, base.TackerObjectDictCompat):
|
||||
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
fields = {
|
||||
'id': fields.StringField(nullable=False),
|
||||
'zoneId': fields.StringField(nullable=False),
|
||||
'vimConnectionId': fields.StringField(nullable=True),
|
||||
'resourceProviderId': fields.StringField(nullable=True),
|
||||
}
|
41
tacker/sol_refactored/objects/v2/affected_ext_link_port.py
Normal file
41
tacker/sol_refactored/objects/v2/affected_ext_link_port.py
Normal file
@ -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),
|
||||
}
|
49
tacker/sol_refactored/objects/v2/affected_virtual_link.py
Normal file
49
tacker/sol_refactored/objects/v2/affected_virtual_link.py
Normal file
@ -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),
|
||||
}
|
46
tacker/sol_refactored/objects/v2/affected_virtual_storage.py
Normal file
46
tacker/sol_refactored/objects/v2/affected_virtual_storage.py
Normal file
@ -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
|
||||