aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFu Jinhua <fu.jinhua@zte.com.cn>2019-04-04 02:58:41 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-04 02:58:41 +0000
commit93c9c026a20214473ee04967f1e5d101c98ba5e7 (patch)
tree7d357a24899032361ce1dcccad6422b1db1b585c
parentfde1ec48de02b6b467f3c34a7cfb1da24fe66881 (diff)
parent6d6bbbd6df701ebbebdc0c46068d0663dc0db3e4 (diff)
Merge "Fix NS update serializers error"
-rw-r--r--lcm/ns/serializers/sol/subscription_auth_data.py28
-rw-r--r--lcm/ns/serializers/sol/terminate_ns_serializers.py4
-rw-r--r--lcm/ns/serializers/sol/update_serializers.py671
3 files changed, 443 insertions, 260 deletions
diff --git a/lcm/ns/serializers/sol/subscription_auth_data.py b/lcm/ns/serializers/sol/subscription_auth_data.py
index d5680b05..72015e92 100644
--- a/lcm/ns/serializers/sol/subscription_auth_data.py
+++ b/lcm/ns/serializers/sol/subscription_auth_data.py
@@ -20,33 +20,43 @@ from lcm.ns import const
class OAuthCredentialsSerializer(serializers.Serializer):
clientId = serializers.CharField(
- help_text="Client identifier to be used in the access token request of the OAuth 2.0 client "
- "credentials grant type.", required=False, max_length=255, allow_null=False)
+ help_text="Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type.",
+ required=False,
+ max_length=255,
+ allow_null=False)
clientPassword = serializers.CharField(
- help_text="Client password to be used in the access token request of the OAuth 2.0 client"
- " credentials grant type.", required=False, max_length=255, allow_null=False)
+ help_text="Client password to be used in the access token request of the OAuth 2.0 client credentials grant type.",
+ required=False,
+ max_length=255,
+ allow_null=False)
tokenEndpoint = serializers.CharField(
- help_text="The token endpoint from which the access token can be obtained.", required=False,
+ help_text="The token endpoint from which the access token can be obtained.",
+ required=False,
max_length=255,
allow_null=False)
class BasicAuthSerializer(serializers.Serializer):
userName = serializers.CharField(
- help_text="Username to be used in HTTP Basic authentication.", max_length=255,
+ help_text="Username to be used in HTTP Basic authentication.",
+ max_length=255,
required=False,
allow_null=False)
password = serializers.CharField(
- help_text="Password to be used in HTTP Basic authentication.", max_length=255,
+ help_text="Password to be used in HTTP Basic authentication.",
+ max_length=255,
required=False,
allow_null=False)
class SubscriptionAuthenticationSerializer(serializers.Serializer):
authType = serializers.ListField(
- child=serializers.ChoiceField(required=True, choices=const.AUTH_TYPES),
help_text="Defines the types of Authentication / Authorization which the API consumer is"
- " willing to accept when receiving a notification.", required=True)
+ " willing to accept when receiving a notification.",
+ child=serializers.ChoiceField(
+ required=True,
+ choices=const.AUTH_TYPES),
+ required=True)
paramsBasic = BasicAuthSerializer(
help_text="Parameters for authentication/authorization using BASIC.",
required=False,
diff --git a/lcm/ns/serializers/sol/terminate_ns_serializers.py b/lcm/ns/serializers/sol/terminate_ns_serializers.py
index 582ad963..5972483e 100644
--- a/lcm/ns/serializers/sol/terminate_ns_serializers.py
+++ b/lcm/ns/serializers/sol/terminate_ns_serializers.py
@@ -16,4 +16,6 @@ from rest_framework import serializers
class TerminateNsReqSerializer(serializers.Serializer):
- terminationTime = serializers.CharField(help_text="Timestamp indicating the end time of the NS.", required=False)
+ terminationTime = serializers.CharField(
+ help_text="Timestamp indicating the end time of the NS.",
+ required=False)
diff --git a/lcm/ns/serializers/sol/update_serializers.py b/lcm/ns/serializers/sol/update_serializers.py
index 4ddfe8e6..f953984d 100644
--- a/lcm/ns/serializers/sol/update_serializers.py
+++ b/lcm/ns/serializers/sol/update_serializers.py
@@ -21,131 +21,193 @@ from lcm.ns.serializers.sol.cp_serializers import IpAddressesDataSerialzier
class VnfInstanceDataSerializer(serializers.Serializer):
- vnfInstanceId = serializers.CharField(help_text="Specify the target NS instance where the VNF instances are "
- "moved to", required=True)
- vnfProfileId = serializers.CharField(help_text="Specify the VNF instance that is moved.",
- required=False, allow_null=True)
+ vnfInstanceId = serializers.CharField(
+ help_text="Specify the target NS instance where the VNF instances are moved to",
+ required=True)
+ vnfProfileId = serializers.CharField(
+ help_text="Specify the VNF instance that is moved.",
+ required=False,
+ allow_null=True)
class InstantiateVnfDataSerializer(serializers.Serializer):
- vnfdId = serializers.CharField(help_text="Information sufficient to identify the VNFD which defines the VNF to be"
- " instantiated. ", required=True)
- vnfFlavourId = serializers.CharField(help_text="Identifier of the VNF deployment flavour to be instantiated.",
- required=True)
- vnfInstantiationLevelId = serializers.CharField(help_text="Identifier of the instantiation level of the deployment "
- "flavour to be instantiated. ", required=False,
- allow_null=True)
- vnfInstanceName = serializers.CharField(help_text="Human-readable name of the VNF instance to be created.",
- required=False, allow_null=True)
+ vnfdId = serializers.CharField(
+ help_text="Information sufficient to identify the VNFD which defines the VNF to be instantiated.",
+ required=True)
+ vnfFlavourId = serializers.CharField(
+ help_text="Identifier of the VNF deployment flavour to be instantiated.",
+ required=True)
+ vnfInstantiationLevelId = serializers.CharField(
+ help_text="Identifier of the instantiation level of the deployment flavour to be instantiated.",
+ required=False,
+ allow_null=True)
+ vnfInstanceName = serializers.CharField(
+ help_text="Human-readable name of the VNF instance to be created.",
+ required=False,
+ allow_null=True)
class IpOverEthernetAddressDataSerializer(serializers.Serializer):
- macAddress = serializers.CharField(help_text="Mac address", required=False, allow_null=True)
- ipAddresses = IpAddressesDataSerialzier(help_text="List of IP addresses to assign to the extCP instance.",
- required=False, allow_null=True, many=True)
+ macAddress = serializers.CharField(
+ help_text="Mac address",
+ required=False,
+ allow_null=True)
+ ipAddresses = IpAddressesDataSerialzier(
+ help_text="List of IP addresses to assign to the extCP instance.",
+ required=False,
+ allow_null=True,
+ many=True)
class VnfExtCpConfigSerializer(serializers.Serializer):
- cpInstanceId = serializers.CharField(help_text="Identifier of the external CP instance to which this set of "
- "configuration parameters is requested to be applied.",
- required=False, allow_null=True)
- linkPortId = serializers.CharField(help_text="Identifier of a pre-conFigured link port to which the external CP "
- "will be associated.", required=False, allow_null=True)
- cpProtocolData = serializers.ListField(help_text="Parameters for configuring the network protocols on the link "
- "port that connects the CP to a VL",
- child=(CpProtocolDataSerializer(help_text="This type represents network "
- "protocol data.", required=True)),
- required=False, allow_null=True)
+ cpInstanceId = serializers.CharField(
+ help_text="Identifier of the external CP instance to which this set of configuration parameters is requested to be applied.",
+ required=False,
+ allow_null=True)
+ linkPortId = serializers.CharField(
+ help_text="Identifier of a pre-conFigured link port to which the external CP will be associated.",
+ required=False,
+ allow_null=True)
+ cpProtocolData = serializers.ListField(
+ help_text="Parameters for configuring the network protocols on the link port that connects the CP to a VL",
+ child=CpProtocolDataSerializer(
+ help_text="This type represents network protocol data.",
+ required=True),
+ required=False,
+ allow_null=True)
class VnfExtCpData(serializers.Serializer):
- cpdId = serializers.CharField(help_text="The identifier of the CPD in the VNFD.", required=True)
- cpConfig = serializers.ListField(help_text="List of instance data that need to be conFigured on the CP instances "
- "created from the respective CPD.",
- child=(VnfExtCpConfigSerializer(help_text="Config of vnf ext cp", required=True)),
- required=False, allow_null=True)
+ cpdId = serializers.CharField(
+ help_text="The identifier of the CPD in the VNFD.",
+ required=True)
+ cpConfig = serializers.ListField(
+ help_text="List of instance data that need to be conFigured on the CP instances created from the respective CPD.",
+ child=(VnfExtCpConfigSerializer(
+ help_text="Config of vnf ext cp",
+ required=True)),
+ required=False,
+ allow_null=True)
class ExtLinkPortDataSerializer(serializers.Serializer):
- id = serializers.CharField(help_text="Provided by the entity that has created the link port", required=True)
- resourceHandle = ResourceHandleSerializer(help_text="Identifier(s) of the virtualised network resource(s) "
- "realizing the VL instance", required=True)
+ id = serializers.CharField(
+ help_text="Provided by the entity that has created the link port.",
+ required=True)
+ resourceHandle = ResourceHandleSerializer(
+ help_text="Identifier(s) of the virtualised network resource(s) realizing the VL instance.",
+ required=True)
class ExtVirtualLinkDataSerializer(serializers.Serializer):
- extVirtualLinkId = serializers.CharField(help_text="The identifier of the external VL instance, if provided. ",
- required=False, allow_null=True)
- vimId = serializers.CharField(help_text="Identifier of the VIM that manages this resource.",
- required=False, allow_null=True)
- resourceProviderId = serializers.CharField(help_text="Identifies the entity responsible for the management of "
- "this resource.", required=False, allow_null=True)
- resourceId = serializers.CharField(help_text="The identifier of the resource in the scope of the VIM or the"
- " resource provider.", required=True)
- extCps = serializers.ListField(child=VnfExtCpData(help_text="External CPs of the VNF to be connected to this external "
- "VL.", required=True), required=False, allow_null=True)
- extLinkPorts = serializers.ListField(help_text="Externally provided link ports to be used to connect external "
- "connection points to this external VL. ",
- child=(ExtLinkPortDataSerializer(help_text="This type represents an externally"
- "provided link port to be used to "
- "connect a VNF external connection "
- "point to an external VL",
- required=True)),
- required=False, allow_null=True)
+ extVirtualLinkId = serializers.CharField(
+ help_text="The identifier of the external VL instance, if provided.",
+ required=False,
+ allow_null=True)
+ vimId = serializers.CharField(
+ help_text="Identifier of the VIM that manages this resource.",
+ required=False,
+ allow_null=True)
+ resourceProviderId = serializers.CharField(
+ help_text="Identifies the entity responsible for the management of this resource.",
+ required=False,
+ allow_null=True)
+ resourceId = serializers.CharField(
+ help_text="The identifier of the resource in the scope of the VIM or the resource provider.",
+ required=True)
+ extCps = serializers.ListField(
+ help_text="External CPs of the VNF to be connected to this external VL.",
+ child=VnfExtCpData(),
+ required=False,
+ allow_null=True)
+ extLinkPorts = serializers.ListField(
+ help_text="Externally provided link ports to be used to connect external connection points to this external VL.",
+ child=(ExtLinkPortDataSerializer(
+ help_text="This type represents an externally provided link port to be used to connect a VNF external connection point to an external VL",
+ required=True)),
+ required=False,
+ allow_null=True)
class ExtManagedVirtualLinkDataSerializer(serializers.Serializer):
- extManagedVirtualLinkId = serializers.CharField(help_text="The identifier of the externally-managed internal VL "
- "instance,if provided.", required=False, allow_null=True)
- virtualLinkDescId = serializers.CharField(help_text="The identifier of the VLD in the VNFD for this VL.",
- required=True)
-
- vimId = serializers.CharField(help_text="Identifier of the VIMthat manage this resource.",
- required=False, allow_null=True)
-
- resourceProviderId = serializers.CharField(help_text="Identifies the entity responsible for the management of"
- "this resource.", required=False, allow_null=True)
- resourceId = serializers.CharField(help_text="The identifier of the resource in the scope of the VIM or"
- "the resource provider.", required=True)
+ extManagedVirtualLinkId = serializers.CharField(
+ help_text="The identifier of the externally-managed internal VL instance,if provided.",
+ required=False,
+ allow_null=True)
+ virtualLinkDescId = serializers.CharField(
+ help_text="The identifier of the VLD in the VNFD for this VL.",
+ required=True)
+ vimId = serializers.CharField(
+ help_text="Identifier of the VIMthat manage this resource.",
+ required=False,
+ allow_null=True)
+ resourceProviderId = serializers.CharField(
+ help_text="Identifies the entity responsible for the management of this resource.",
+ required=False,
+ allow_null=True)
+ resourceId = serializers.CharField(
+ help_text="The identifier of the resource in the scope of the VIM or the resource provider.",
+ required=True)
class ChangeVnfFlavourDataSerizlizer(serializers.Serializer):
- vnfInstanceId = serializers.CharField(help_text="Identifier of the VNF instance to be modified.", required=True)
- newFlavourId = serializers.CharField(help_text="Identifier of the VNF deployment flavour to be instantiated.",
- required=True)
- instantiationLevelId = serializers.CharField(help_text="Identifier of the instantiation level of the deployment "
- "flavour to be instantiated.",
- required=False, allow_null=True)
- extVirtualLinks = serializers.ListField(help_text="Information about external VLs to connect the VNF to.",
- child=(ExtVirtualLinkDataSerializer(help_text="This type represents "
- "an external VL",
- required=True)),
- required=False, allow_null=True)
- extManagedVirtualLinks = serializers.ListField(help_text="Information about internal VLs that are managed by NFVO",
- child=ExtManagedVirtualLinkDataSerializer(
- help_text="This type represents an externally-managed internal"
- "VL.", required=True), required=False, allow_null=True)
- additionalParams = serializers.CharField(help_text="Additional input parameters for the flavour change process",
- required=False, allow_null=True)
+ vnfInstanceId = serializers.CharField(
+ help_text="Identifier of the VNF instance to be modified.",
+ required=True)
+ newFlavourId = serializers.CharField(
+ help_text="Identifier of the VNF deployment flavour to be instantiated.",
+ required=True)
+ instantiationLevelId = serializers.CharField(
+ help_text="Identifier of the instantiation level of the deployment flavour to be instantiated.",
+ required=False,
+ allow_null=True)
+ extVirtualLinks = serializers.ListField(
+ help_text="Information about external VLs to connect the VNF to.",
+ child=ExtVirtualLinkDataSerializer(
+ help_text="This type represents an external VL",
+ required=True),
+ required=False,
+ allow_null=True)
+ extManagedVirtualLinks = serializers.ListField(
+ help_text="Information about internal VLs that are managed by NFVO.",
+ child=ExtManagedVirtualLinkDataSerializer(
+ help_text="This type represents an externally-managed internal VL.",
+ required=True),
+ required=False,
+ allow_null=True)
+ additionalParams = serializers.CharField(
+ help_text="Additional input parameters for the flavour change process",
+ required=False,
+ allow_null=True)
class OperationalStatesSerializer(serializers.Serializer):
- OperationalStates = serializers.ChoiceField(help_text="State of operation",
- choices=["STARTED", "STOPPED"])
+ OperationalStates = serializers.ChoiceField(
+ help_text="State of operation",
+ choices=["STARTED", "STOPPED"])
class StopTypeSerializer(serializers.Serializer):
- StopType = serializers.ChoiceField(help_text="Type of stop", choices=["FORCEFUL", "GRACEFUL"])
+ StopType = serializers.ChoiceField(
+ help_text="Type of stop",
+ choices=["FORCEFUL", "GRACEFUL"])
class OperateVnfDataSerializer(serializers.Serializer):
- vnfInstanceId = serializers.CharField(help_text="Identifier of the VNF instance.", required=True)
- changeStateTo = OperationalStatesSerializer(help_text="The desired operational state to change the VNF to.",
- required=True)
- stopType = StopTypeSerializer(help_text="It signals whether forceful or graceful stop is requested.",
- required=False, allow_null=True)
- gracefulStopTimeout = serializers.CharField(help_text="The time interval to wait for the VNF to be taken out of"
- "service during graceful stop.",
- required=False, allow_null=True)
+ vnfInstanceId = serializers.CharField(
+ help_text="Identifier of the VNF instance.",
+ required=True)
+ changeStateTo = OperationalStatesSerializer(
+ help_text="The desired operational state to change the VNF to.",
+ required=True)
+ stopType = StopTypeSerializer(
+ help_text="It signals whether forceful or graceful stop is requested.",
+ required=False,
+ allow_null=True)
+ gracefulStopTimeout = serializers.CharField(
+ help_text="The time interval to wait for the VNF to be taken out of service during graceful stop.",
+ required=False,
+ allow_null=True)
class ModifyVnfInfoDataSerializer(serializers.Serializer):
@@ -159,8 +221,7 @@ class ModifyVnfInfoDataSerializer(serializers.Serializer):
allow_null=True,
allow_blank=True)
vnfInstanceDescription = serializers.CharField(
- help_text="If present, this attribute signals modifications of the 'vnfInstanceDescription' attribute in "
- "'VnfInstance'",
+ help_text="If present, this attribute signals modifications of the 'vnfInstanceDescription' attribute in 'VnfInstance'",
required=False,
allow_null=True,
allow_blank=True)
@@ -169,218 +230,328 @@ class ModifyVnfInfoDataSerializer(serializers.Serializer):
)
vnfConfigurableProperties = serializers.DictField(
help_text="Modifications to entries in the 'vnfConfigurableProperties' list, as defined below this Table.",
- child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
+ child=serializers.CharField(
+ help_text="KeyValue Pairs",
+ allow_blank=True),
required=False,
allow_null=True)
metaData = serializers.DictField(
help_text="If present, this attribute signals modifications of certain 'metadata' attribute in 'vnfInstance'.",
- child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
+ child=serializers.CharField(
+ help_text="KeyValue Pairs",
+ allow_blank=True),
required=False,
allow_null=True)
extensions = serializers.DictField(
help_text="If present,this attribute signals modifications of certain 'extensions' attribute in 'vnfInstance'.",
- child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
+ child=serializers.CharField(
+ help_text="KeyValue Pairs",
+ allow_blank=True),
required=False,
allow_null=True)
class ChangeExtVnfConnectivityDataSerializer(serializers.Serializer):
- vnfInstanceId = serializers.CharField(help_text="Identifier of the VNF instance.", required=True, allow_null=True)
- extVirtualLinks = serializers.ListField(help_text="Information about external VLs to change",
- child=(ExtVirtualLinkDataSerializer(
- help_text="Data of ext virtual link", required=True)),
- required=False, allow_null=True)
- additionalParams = serializers.CharField(help_text="Additional parameters passed by the OSS as input to the "
- "external connectivity change process",
- required=False, allow_null=True)
+ vnfInstanceId = serializers.CharField(
+ help_text="Identifier of the VNF instance.",
+ required=True,
+ allow_null=True)
+ extVirtualLinks = serializers.ListField(
+ help_text="Information about external VLs to change",
+ child=ExtVirtualLinkDataSerializer(
+ help_text="Data of ext virtual link",
+ required=True),
+ required=False,
+ allow_null=True)
+ additionalParams = serializers.CharField(
+ help_text="Additional parameters passed by the OSS as input to the external connectivity change process",
+ required=False,
+ allow_null=True)
class SapDataSerializer(serializers.Serializer):
- sapdId = serializers.CharField(help_text="Reference to the SAPD for this SAP.", required=True)
- sapName = serializers.CharField(help_text="Human readable name for the SAP.", required=True)
- description = serializers.CharField(help_text="Human readable description for the SAP. ", required=True)
- sapProtocolData = serializers.ListField(help_text="Parameters for configuring the network protocols on the SAP.",
- child=(CpProtocolDataSerializer(
- help_text="This type represents network protocol data.", required=True)),
- required=False, allow_null=True)
+ sapdId = serializers.CharField(
+ help_text="Reference to the SAPD for this SAP.",
+ required=True)
+ sapName = serializers.CharField(
+ help_text="Human readable name for the SAP.",
+ required=True)
+ description = serializers.CharField(
+ help_text="Human readable description for the SAP. ",
+ required=True)
+ sapProtocolData = serializers.ListField(
+ help_text="Parameters for configuring the network protocols on the SAP.",
+ child=CpProtocolDataSerializer(
+ help_text="This type represents network protocol data.",
+ required=True),
+ required=False,
+ allow_null=True)
class AssocNewNsdVersionDataSerializer(serializers.Serializer):
- newNsdId = serializers.CharField(help_text="Identifier of the new NSD version that is to be associated to the NS "
- "instance. ", required=True)
+ newNsdId = serializers.CharField(
+ help_text="Identifier of the new NSD version that is to be associated to the NS instance.",
+ required=True)
class MoveVnfInstanceDataSerializer(serializers.Serializer):
- targetNsInstanceId = serializers.CharField(help_text="Specify the target NS instance where the VNF instances "
- "are moved to.", required=True)
- vnfInstanceId = serializers.CharField(help_text="Specify the VNF instance that is moved.",
- required=False, allow_null=True)
+ targetNsInstanceId = serializers.CharField(
+ help_text="Specify the target NS instance where the VNF instances are moved to.",
+ required=True)
+ vnfInstanceId = serializers.CharField(
+ help_text="Specify the VNF instance that is moved.",
+ required=False,
+ allow_null=True)
class PortRangeSerializer(serializers.Serializer):
- lowerPort = serializers.CharField(help_text="Identifies the lower bound of the port range. ", required=True)
- upperPort = serializers.CharField(help_text="Identifies the upper bound of the port range ", required=True)
+ lowerPort = serializers.CharField(
+ help_text="Identifies the lower bound of the port range.",
+ required=True)
+ upperPort = serializers.CharField(
+ help_text="Identifies the upper bound of the port range ",
+ required=True)
class NfpDataSerializer(serializers.Serializer):
- nfpInfoId = serializers.CharField(help_text="Identifier of the NFP to be modified.",
- required=False, allow_null=True)
- nfpName = serializers.CharField(help_text="Human readable name for the NFP.", required=False, allow_null=True)
- description = serializers.CharField(help_text="Human readable description for the NFP",
- required=False, allow_null=True)
- nsCpHandle = serializers.ListField(help_text="HanIdentifier(s) of the CPs and SAPs which the NFP passes by.",
- child=(NsCpHandleSerializer(
- help_text="This type represents an identifier of the CP or SAP instance.",
- required=True)), required=False, allow_null=True)
- nfpRule = NfpRuleSerializer(help_text="NFP classification and selection rule.", required=False, allow_null=True)
+ nfpInfoId = serializers.CharField(
+ help_text="Identifier of the NFP to be modified.",
+ required=False,
+ allow_null=True)
+ nfpName = serializers.CharField(
+ help_text="Human readable name for the NFP.",
+ required=False,
+ allow_null=True)
+ description = serializers.CharField(
+ help_text="Human readable description for the NFP.",
+ required=False,
+ allow_null=True)
+ nsCpHandle = serializers.ListField(
+ help_text="HanIdentifier(s) of the CPs and SAPs which the NFP passes by.",
+ child=NsCpHandleSerializer(
+ help_text="This type represents an identifier of the CP or SAP instance.",
+ required=True),
+ required=False,
+ allow_null=True)
+ nfpRule = NfpRuleSerializer(
+ help_text="NFP classification and selection rule.",
+ required=False,
+ allow_null=True)
class UpdateVnffgDataSerializer(serializers.Serializer):
- vnffgInfoId = serializers.CharField(help_text="Identifier of an existing VNFFG to be updated for the NS Instance.",
- required=True)
- nfp = serializers.ListField(help_text="nfp", child=(NfpDataSerializer(help_text="This type contains information "
- "used to create or modify NFP "
- "instance parameters for the update"
- "of an existing VNFFG instance. ",
- required=True)),
- required=False, allow_null=True)
- nfpInfoId = serializers.ListField(help_text="Identifier(s) of the NFP to be deleted from a given VNFFG.",
- required=False, allow_null=True)
+ vnffgInfoId = serializers.CharField(
+ help_text="Identifier of an existing VNFFG to be updated for the NS Instance.",
+ required=True)
+ nfp = serializers.ListField(
+ help_text="Indicate the desired new NFP(s) for a given VNFFG after the operations of addition/removal of NS components (e.g. VNFs, VLs, etc.) have been completed, or indicate the updated or newly created NFP classification and selection rule which applied to an existing NFP.",
+ child=NfpDataSerializer(),
+ required=False,
+ allow_null=True)
+ nfpInfoId = serializers.ListField(
+ help_text="Identifiers of the NFP to be deleted from a given VNFFG.",
+ child=serializers.CharField(help_text="Identifier of the NFP to be deleted from a given VNFFG."),
+ required=False,
+ allow_null=True)
class ChangeNsFlavourDataSerializer(serializers.Serializer):
newNsFlavourId = serializers.CharField(
- help_text="Identifier of the new NS DF to apply to this NS instance.", required=True)
+ help_text="Identifier of the new NS DF to apply to this NS instance.",
+ required=True)
instantiationLevelId = serializers.CharField(
help_text="Identifier of the instantiation level of the deployment flavour to be instantiated.",
- required=False, allow_null=True)
+ required=False,
+ allow_null=True)
-class IdentifierInPnfSerializer(serializers.Serializer):
- IdentifierInPnf = serializers.Serializer(help_text="An Identifier that is unique within respect to a PNF.")
+# class IdentifierInPnfSerializer(serializers.Serializer):
+# IdentifierInPnf = serializers.Serializer(
+# help_text="An Identifier that is unique within respect to a PNF.")
-class IdentifierInNsdSerializer(serializers.Serializer):
- IdentifierInNsd = serializers.Serializer(help_text="An identifier that is unique within a NS descriptor")
+# class IdentifierInNsdSerializer(serializers.Serializer):
+# IdentifierInNsd = serializers.Serializer(help_text="An identifier that is unique within a NS descriptor")
class PnfExtCpDataSerializer(serializers.Serializer):
- cpInstanceI16 = IdentifierInPnfSerializer(help_text="Identifier of the CP. Shall be present for existing CP.",
- required=False, allow_null=True)
- cpdId = IdentifierInNsdSerializer(help_text="Identifier of the Connection Point Descriptor (CPD) for this CP",
- required=False, allow_null=True)
- cpProtocolData = CpProtocolDataSerializer(help_text="Address assigned for this CP.",
- required=False, allow_null=True, many=True)
+ cpInstanceId = serializers.CharField( # sol 2.05.01 cpInstanceI16 typo
+ help_text="Identifier of the CP. Shall be present for existing CP.",
+ required=False,
+ allow_null=True)
+ cpdId = serializers.CharField(
+ help_text="Identifier of the Connection Point Descriptor (CPD) for this CP",
+ required=False, allow_null=True)
+ cpProtocolData = CpProtocolDataSerializer(
+ help_text="Address assigned for this CP.",
+ required=False,
+ allow_null=True,
+ many=True)
class AddPnfDataSerializer(serializers.Serializer):
- pnfId = serializers.CharField(help_text="Identifier of the PNF.", required=True)
- pnfName = serializers.CharField(help_text="Name of the PNF.", required=True)
- pnfdId = serializers.CharField(help_text="Identifier of the PNFD on which the PNF is based.", required=True)
+ pnfId = serializers.CharField(
+ help_text="Identifier of the PNF.",
+ required=True)
+ pnfName = serializers.CharField(
+ help_text="Name of the PNF.",
+ required=True)
+ pnfdId = serializers.CharField(
+ help_text="Identifier of the PNFD on which the PNF is based.",
+ required=True)
pnfProfileId = serializers.CharField(
- help_text="Identifier of related PnfProfile in the NSD on which the PNF is based.", required=True)
- cpData = PnfExtCpDataSerializer(help_text="Address assigned for the PNF external CP(s). ",
- required=False, allow_null=True, many=True)
+ help_text="Identifier of related PnfProfile in the NSD on which the PNF is based.",
+ required=True)
+ cpData = PnfExtCpDataSerializer(
+ help_text="Address assigned for the PNF external CP(s).",
+ required=False,
+ allow_null=True,
+ many=True)
class ModifyPnfDataSerializer(serializers.Serializer):
- pnfId = serializers.CharField(help_text="Identifier of the PNF.", required=True)
- pnfName = serializers.CharField(help_text="Name of the PNF", required=False, allow_null=True)
+ pnfId = serializers.CharField(
+ help_text="Identifier of the PNF.",
+ required=True)
+ pnfName = serializers.CharField(
+ help_text="Name of the PNF",
+ required=False,
+ allow_null=True)
cpData = serializers.ListField(
help_text="Address assigned for the PNF external CP(s).",
- child=(PnfExtCpDataSerializer(
- help_text="This type represents the configuration data on the external CP of the PNF.")),
- required=False, allow_null=True)
+ child=PnfExtCpDataSerializer(
+ help_text="This type represents the configuration data on the external CP of the PNF."),
+ required=False,
+ allow_null=True)
-class DateTimeSerializer(serializers.Serializer):
- DateTime = serializers.Serializer(help_text="Date-time stamp.")
+# class DateTimeSerializer(serializers.Serializer):
+# DateTime = serializers.Serializer(help_text="Date-time stamp.")
class UpdateNsReqSerializer(serializers.Serializer):
- updateType = serializers.ChoiceField(help_text="The type of update.",
- choices=["ADD_VNF", "REMOVE_VNF", "INSTANTIATE_VNF", "CHANGE_VNF_DF",
- "OPERATE_VNF", "MODIFY_VNF_INFORMATION",
- "CHANGE_EXTERNAL_VNF_CONNECTIVITY", "REMOVE_SAP", "ADD_NESTED_NS",
- "REMOVE_NESTED_NS", "ASSOC_NEW_NSD_VERSION", "MOVE_VNF", "ADD_VNFFG",
- "REMOVE_VNFFG", "UPDATE_VNFFG", "CHANGE_NS_DF", "ADD_PNF",
- "MODIFY_PNF", "REMOVE_PNF"], required=True)
- addVnfInstance = serializers.ListField(help_text="Identifies an existing VNF instance to be added to the NS "
- "instance.",
- child=(VnfInstanceDataSerializer(help_text="Data of vnf instance",
- required=True)),
- required=False, allow_null=True)
- removeVnfInstanceId = serializers.ListField(help_text="Identifies an existing VNF instance to be removed from "
- "the NS instance.", required=False, allow_null=True)
- instantiateVnfData = serializers.ListField(help_text="Identifies the new VNF to be instantiated.",
- child=(InstantiateVnfDataSerializer(help_text="Data of vnf instance",
- required=True)),
- required=False, allow_null=True)
- changeVnfFlavourData = serializers.ListField(help_text="Identifies the new DF of the VNF instance to be "
- "changed to.",
- child=(ChangeVnfFlavourDataSerizlizer(
- help_text="The type represents the information that is requested "
- "to be changed deployment flavour for an existing "
- "VNF instance.", required=True)),
- required=False, allow_null=True)
- operateVnfData = serializers.ListField(help_text="This type represents a VNF instance for which the operational "
- "state needs to be changed and the requested new state.",
- child=(OperateVnfDataSerializer(
- help_text="This type represents a VNF instance for which the operational"
- " state needs to be changed and the requested new state",
- required=True)), required=False, allow_null=True)
- modifyVnfInfoData = serializers.ListField(help_text="This type represents the information that is requested to be"
- " modified for a VNF instance. ",
- child=(ModifyVnfInfoDataSerializer(
- help_text="This type represents the information that is requested to "
- "be modified for a VNF instance. ", required=True)),
- required=False, allow_null=True)
- changeExtVnfConnectivityData = serializers.ListField(help_text="Specifies the new external connectivity data of the"
- "VNF instance to be changed",
- child=(ChangeExtVnfConnectivityDataSerializer(
- help_text="This type describes the information invoked by"
- "the NFVO to change the external VNF "
- "connectivity information maintained by"
- " the VNFM.", required=True)),
- required=False, allow_null=True)
- addSap = serializers.ListField(help_text="Identifies a new SAP to be added to the NS instance.",
- child=(SapDataSerializer(help_text="This type represents the information related to "
- "a SAP of a NS", required=True)),
- required=False, allow_null=True)
- removeSapId = serializers.ListField(help_text="The identifier an existing SAP to be removed from the "
- "NS instance", required=False, allow_null=True)
- addNestedNsId = serializers.ListField(help_text="The identifier of an existing nested NS instance to be added to "
- "the NS instance", required=False, allow_null=True)
- removeNestedNsId = serializers.ListField(help_text="The identifier of an existing nested NS instance to be "
- "removed from the NS instance.",
- required=False, allow_null=True)
- assocNewNsdVersionData = AssocNewNsdVersionDataSerializer(help_text="Specify the new NSD to be used for the NS "
- "instance.", required=False, allow_null=True)
- moveVnfInstanceData = serializers.ListField(help_text="Specify existing VNF instance to be moved from one NS "
- "instance to another NS instance",
- child=(MoveVnfInstanceDataSerializer()),
- required=False, allow_null=True)
- addVnffg = serializers.ListField(help_text="The identifier of an existing nested NS instance to be added to the"
- " NS instance.", required=False, allow_null=True)
- removeVnffgId = serializers.ListField(help_text="The identifier of an existing nested NS instance to be removed "
- "from the NS instance", required=False, allow_null=True)
- updateVnffg = serializers.ListField(help_text="Specify the new VNFFG Information data to be updated for a VNFFG"
- " of the NS Instance",
- child=(UpdateVnffgDataSerializer(help_text="This type specifies the parameters "
- "used for the update of an existing "
- "VNFFG instance.", required=True)),
- required=False, allow_null=True)
+ updateType = serializers.ChoiceField(
+ help_text="The type of update.",
+ choices=["ADD_VNF", "REMOVE_VNF", "INSTANTIATE_VNF", "CHANGE_VNF_DF",
+ "OPERATE_VNF", "MODIFY_VNF_INFORMATION",
+ "CHANGE_EXTERNAL_VNF_CONNECTIVITY", "REMOVE_SAP", "ADD_NESTED_NS",
+ "REMOVE_NESTED_NS", "ASSOC_NEW_NSD_VERSION", "MOVE_VNF", "ADD_VNFFG",
+ "REMOVE_VNFFG", "UPDATE_VNFFG", "CHANGE_NS_DF", "ADD_PNF",
+ "MODIFY_PNF", "REMOVE_PNF"],
+ required=True)
+ addVnfInstance = serializers.ListField(
+ help_text="Identifies an existing VNF instance to be added to the NS instance.",
+ child=VnfInstanceDataSerializer(
+ help_text="Data of vnf instance",
+ required=True),
+ required=False,
+ allow_null=True)
+ removeVnfInstanceId = serializers.ListField(
+ help_text="Identifies an existing VNF instance to be removed from the NS instance.",
+ child=serializers.CharField(),
+ required=False,
+ allow_null=True)
+ instantiateVnfData = serializers.ListField(
+ help_text="Identifies the new VNF to be instantiated.",
+ child=(InstantiateVnfDataSerializer(
+ help_text="Data of vnf instance.",
+ required=True)),
+ required=False,
+ allow_null=True)
+ changeVnfFlavourData = serializers.ListField(
+ help_text="Identifies the new DF of the VNF instance to be changed to.",
+ child=(ChangeVnfFlavourDataSerizlizer(
+ help_text="The type represents the information that is requested to be changed deployment flavour for an existing VNF instance.",
+ required=True)),
+ required=False,
+ allow_null=True)
+ operateVnfData = serializers.ListField(
+ help_text="This type represents a VNF instance for which the operational state needs to be changed and the requested new state.",
+ child=(OperateVnfDataSerializer(
+ help_text="This type represents a VNF instance for which the operational state needs to be changed and the requested new state",
+ required=True)),
+ required=False,
+ allow_null=True)
+ modifyVnfInfoData = serializers.ListField(
+ help_text="This type represents the information that is requested to be modified for a VNF instance. ",
+ child=(ModifyVnfInfoDataSerializer(
+ help_text="This type represents the information that is requested to be modified for a VNF instance. ",
+ required=True)),
+ required=False,
+ allow_null=True)
+ changeExtVnfConnectivityData = serializers.ListField(
+ help_text="Specifies the new external connectivity datas of the VNF instance to be changed.",
+ child=ChangeExtVnfConnectivityDataSerializer(
+ help_text="This type describes the information invoked by the NFVO to change the external VNF connectivity information maintained by the VNFM.",
+ required=True),
+ required=False,
+ allow_null=True)
+ addSap = serializers.ListField(
+ help_text="Identifies a new SAP to be added to the NS instance.",
+ child=SapDataSerializer(help_text="This type represents the information related to a SAP of a NS",
+ required=True),
+ required=False,
+ allow_null=True)
+ removeSapId = serializers.ListField(
+ help_text="The identifier an existing SAP to be removed from the NS instance",
+ required=False,
+ allow_null=True)
+ addNestedNsId = serializers.ListField(
+ help_text="The identifier of an existing nested NS instance to be added to the NS instance.",
+ required=False,
+ allow_null=True)
+ removeNestedNsId = serializers.ListField(
+ help_text="The identifier of an existing nested NS instance to be removed from the NS instance.",
+ required=False,
+ allow_null=True)
+ assocNewNsdVersionData = AssocNewNsdVersionDataSerializer(
+ help_text="Specify the new NSD to be used for the NS instance.",
+ required=False,
+ allow_null=True)
+ moveVnfInstanceData = serializers.ListField(
+ help_text="Specify existing VNF instance to be moved from one NS instance to another NS instance",
+ child=MoveVnfInstanceDataSerializer(),
+ required=False,
+ allow_null=True)
+ addVnffg = serializers.ListField(
+ help_text="The identifier of an existing nested NS instance to be added to the NS instance.",
+ required=False,
+ allow_null=True)
+ removeVnffgId = serializers.ListField(
+ help_text="The identifier of an existing nested NS instance to be removed from the NS instance",
+ child=serializers.CharField(),
+ required=False,
+ allow_null=True)
+ updateVnffg = serializers.ListField(
+ help_text="Specify the new VNFFG Information data to be updated for a VNFFG of the NS Instance.",
+ child=UpdateVnffgDataSerializer(
+ help_text="This type specifies the parameters used for the update of an existing VNFFG instance.",
+ required=True),
+ required=False,
+ allow_null=True)
changeNsFlavourData = ChangeNsFlavourDataSerializer(
- help_text="Specifies the new DF to be applied to the NS instance", required=False, allow_null=True)
- addPnfData = serializers.ListField(help_text="Specifies the PNF to be added into the NS instance.",
- child=(AddPnfDataSerializer(help_text="Serializer data of add pnf", required=True)),
- required=False, allow_null=True)
- modifyPnfData = serializers.ListField(help_text="Specifies the PNF to be modified in the NS instance.",
- child=(ModifyPnfDataSerializer(
- help_text="This type specifies an PNF to be modified in the NS instance.",
- required=True)),
- required=False, allow_null=True)
- removePnfId = serializers.ListField(help_text="Identifier of the PNF to be deleted from the NS instance.",
- required=False, allow_null=True)
- updateTime = DateTimeSerializer(help_text="Timestamp indicating the update time of the NS",
- required=False, allow_null=True)
+ help_text="Specifies the new DF to be applied to the NS instance.",
+ required=False,
+ allow_null=True)
+ addPnfData = serializers.ListField(
+ help_text="Specifies the PNF to be added into the NS instance.",
+ child=AddPnfDataSerializer(
+ help_text="Serializer data of add PNF",
+ required=True),
+ required=False,
+ allow_null=True)
+ modifyPnfData = serializers.ListField(
+ help_text="Specifies the PNF to be modified in the NS instance.",
+ child=ModifyPnfDataSerializer(
+ help_text="This type specifies an PNF to be modified in the NS instance.",
+ required=True),
+ required=False,
+ allow_null=True)
+ removePnfId = serializers.ListField(
+ help_text="Identifier of the PNF to be deleted from the NS instance.",
+ required=False,
+ allow_null=True)
+ updateTime = serializers.CharField(
+ help_text="Timestamp indicating the update time of the NS",
+ required=False
+ )