Commit 2c66ad5e authored by Dimitris Fragkos's avatar Dimitris Fragkos
Browse files

add net_slice_info model in helper configuration endpoints

add in openapi.yml as well
parent a3e2f73e
Loading
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -295,6 +295,27 @@ components:
              type: integer
              example: 365
              description: time range when an invoker can make requests
            net_slice_info:
              type: array
              description: Network slice information list used for ACL policy assignment.
              items:
                type: object
                properties:
                  snssai:
                    type: object
                    properties:
                      sst:
                        type: integer
                        example: 1
                      sd:
                        type: string
                        example: "000001"
                  nsiId:
                    type: string
                    example: string
                  ensi:
                    type: string
                    example: string
          
          
          
+117 −0
Original line number Diff line number Diff line
from datetime import date, datetime  # noqa: F401
from typing import Dict, List  # noqa: F401

from configuration import util
from configuration.models.base_model import Model
from configuration.models.snssai import Snssai  # noqa: E501


class NetSliceId(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, snssai=None, nsi_id=None, ensi=None):  # noqa: E501
        """NetSliceId - a model defined in OpenAPI

        :param snssai: The snssai of this NetSliceId.  # noqa: E501
        :type snssai: Snssai
        :param nsi_id: The nsi_id of this NetSliceId.  # noqa: E501
        :type nsi_id: str
        :param ensi: The ensi of this NetSliceId.  # noqa: E501
        :type ensi: str
        """
        self.openapi_types = {
            'snssai': Snssai,
            'nsi_id': str,
            'ensi': str
        }

        self.attribute_map = {
            'snssai': 'snssai',
            'nsi_id': 'nsiId',
            'ensi': 'ensi'
        }

        self._snssai = snssai
        self._nsi_id = nsi_id
        self._ensi = ensi

    @classmethod
    def from_dict(cls, dikt) -> 'NetSliceId':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The NetSliceId of this NetSliceId.  # noqa: E501
        :rtype: NetSliceId
        """
        return util.deserialize_model(dikt, cls)

    @property
    def snssai(self) -> Snssai:
        """Gets the snssai of this NetSliceId.


        :return: The snssai of this NetSliceId.
        :rtype: Snssai
        """
        return self._snssai

    @snssai.setter
    def snssai(self, snssai: Snssai):
        """Sets the snssai of this NetSliceId.


        :param snssai: The snssai of this NetSliceId.
        :type snssai: Snssai
        """

        self._snssai = snssai

    @property
    def nsi_id(self) -> str:
        """Gets the nsi_id of this NetSliceId.

        Contains the Identifier of the selected Network Slice instance.  # noqa: E501

        :return: The nsi_id of this NetSliceId.
        :rtype: str
        """
        return self._nsi_id

    @nsi_id.setter
    def nsi_id(self, nsi_id: str):
        """Sets the nsi_id of this NetSliceId.

        Contains the Identifier of the selected Network Slice instance.  # noqa: E501

        :param nsi_id: The nsi_id of this NetSliceId.
        :type nsi_id: str
        """

        self._nsi_id = nsi_id

    @property
    def ensi(self) -> str:
        """Gets the ensi of this NetSliceId.

        External Network Slice Information identifier.  # noqa: E501

        :return: The ensi of this NetSliceId.
        :rtype: str
        """
        return self._ensi

    @ensi.setter
    def ensi(self, ensi: str):
        """Sets the ensi of this NetSliceId.

        External Network Slice Information identifier.  # noqa: E501

        :param ensi: The ensi of this NetSliceId.
        :type ensi: str
        """

        self._ensi = ensi
+30 −3
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ from typing import Dict, List # noqa: F401

from configuration import util
from configuration.models.base_model import Model
from configuration.models.net_slice_id import NetSliceId  # noqa: E501


class SettingsAclPolicySettings(Model):
@@ -11,7 +12,7 @@ class SettingsAclPolicySettings(Model):
    Do not edit the class manually.
    """

    def __init__(self, allowed_total_invocations=None, allowed_invocations_per_second=None, allowed_invocations_time_range_days=None):  # noqa: E501
    def __init__(self, allowed_total_invocations=None, allowed_invocations_per_second=None, allowed_invocations_time_range_days=None, net_slice_info=None):  # noqa: E501
        """SettingsAclPolicySettings - a model defined in OpenAPI

        :param allowed_total_invocations: The allowed_total_invocations of this SettingsAclPolicySettings.  # noqa: E501
@@ -20,22 +21,27 @@ class SettingsAclPolicySettings(Model):
        :type allowed_invocations_per_second: str
        :param allowed_invocations_time_range_days: The allowed_invocations_time_range_days of this SettingsAclPolicySettings.  # noqa: E501
        :type allowed_invocations_time_range_days: int
        :param net_slice_info: The net_slice_info of this SettingsAclPolicySettings.  # noqa: E501
        :type net_slice_info: List[NetSliceId]
        """
        self.openapi_types = {
            'allowed_total_invocations': str,
            'allowed_invocations_per_second': str,
            'allowed_invocations_time_range_days': int
            'allowed_invocations_time_range_days': int,
            'net_slice_info': List[NetSliceId]
        }

        self.attribute_map = {
            'allowed_total_invocations': 'allowed_total_invocations',
            'allowed_invocations_per_second': 'allowed_invocations_per_second',
            'allowed_invocations_time_range_days': 'allowed_invocations_time_range_days'
            'allowed_invocations_time_range_days': 'allowed_invocations_time_range_days',
            'net_slice_info': 'net_slice_info'
        }

        self._allowed_total_invocations = allowed_total_invocations
        self._allowed_invocations_per_second = allowed_invocations_per_second
        self._allowed_invocations_time_range_days = allowed_invocations_time_range_days
        self._net_slice_info = net_slice_info

    @classmethod
    def from_dict(cls, dikt) -> 'SettingsAclPolicySettings':
@@ -116,3 +122,24 @@ class SettingsAclPolicySettings(Model):
        """

        self._allowed_invocations_time_range_days = allowed_invocations_time_range_days

    @property
    def net_slice_info(self) -> List[NetSliceId]:
        """Gets the net_slice_info of this SettingsAclPolicySettings.


        :return: The net_slice_info of this SettingsAclPolicySettings.
        :rtype: List[NetSliceId]
        """
        return self._net_slice_info

    @net_slice_info.setter
    def net_slice_info(self, net_slice_info: List[NetSliceId]):
        """Sets the net_slice_info of this SettingsAclPolicySettings.


        :param net_slice_info: The net_slice_info of this SettingsAclPolicySettings.
        :type net_slice_info: List[NetSliceId]
        """

        self._net_slice_info = net_slice_info
+99 −0
Original line number Diff line number Diff line
import re  # noqa: E501
from datetime import date, datetime  # noqa: F401
from typing import Dict, List  # noqa: F401

from configuration import util
from configuration.models.base_model import Model


class Snssai(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, sst=None, sd=None):  # noqa: E501
        """Snssai - a model defined in OpenAPI

        :param sst: The sst of this Snssai.  # noqa: E501
        :type sst: int
        :param sd: The sd of this Snssai.  # noqa: E501
        :type sd: str
        """
        self.openapi_types = {
            'sst': int,
            'sd': str
        }

        self.attribute_map = {
            'sst': 'sst',
            'sd': 'sd'
        }

        self._sst = sst
        self._sd = sd

    @classmethod
    def from_dict(cls, dikt) -> 'Snssai':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The Snssai of this Snssai.  # noqa: E501
        :rtype: Snssai
        """
        return util.deserialize_model(dikt, cls)

    @property
    def sst(self) -> int:
        """Gets the sst of this Snssai.

        Unsigned integer, within the range 0 to 255, representing the Slice/Service Type.  # noqa: E501

        :return: The sst of this Snssai.
        :rtype: int
        """
        return self._sst

    @sst.setter
    def sst(self, sst: int):
        """Sets the sst of this Snssai.

        Unsigned integer, within the range 0 to 255, representing the Slice/Service Type.  # noqa: E501

        :param sst: The sst of this Snssai.
        :type sst: int
        """
        if sst is None:
            raise ValueError("Invalid value for `sst`, must not be `None`")  # noqa: E501
        if sst is not None and sst > 255:  # noqa: E501
            raise ValueError("Invalid value for `sst`, must be a value less than or equal to `255`")  # noqa: E501
        if sst is not None and sst < 0:  # noqa: E501
            raise ValueError("Invalid value for `sst`, must be a value greater than or equal to `0`")  # noqa: E501

        self._sst = sst

    @property
    def sd(self) -> str:
        """Gets the sd of this Snssai.

        Slice Differentiator represented as a 3-octet hexadecimal string.  # noqa: E501

        :return: The sd of this Snssai.
        :rtype: str
        """
        return self._sd

    @sd.setter
    def sd(self, sd: str):
        """Sets the sd of this Snssai.

        Slice Differentiator represented as a 3-octet hexadecimal string.  # noqa: E501

        :param sd: The sd of this Snssai.
        :type sd: str
        """
        if sd is not None and not re.search(r'^[A-Fa-f0-9]{6}$', sd):  # noqa: E501
            raise ValueError(r"Invalid value for `sd`, must follow pattern `/^[A-Fa-f0-9]{6}$/`")  # noqa: E501

        self._sd = sd
+72 −0
Original line number Diff line number Diff line
@@ -302,6 +302,17 @@ components:
            allowed_invocations_time_range_days: 365
            allowed_invocations_per_second: "5"
            allowed_total_invocations: "5"
            net_slice_info:
            - snssai:
                sst: 1
                sd: "000001"
              nsiId: string
              ensi: string
            - snssai:
                sst: 2
                sd: "000001"
              nsiId: string
              ensi: string
          certificates_expiry:
            ttl_superadmin_cert: 4300h
            ttl_invoker_cert: 4300h
@@ -314,6 +325,17 @@ components:
            allowed_invocations_time_range_days: 365
            allowed_invocations_per_second: "5"
            allowed_total_invocations: "5"
            net_slice_info:
            - snssai:
                sst: 1
                sd: "000001"
              nsiId: string
              ensi: string
            - snssai:
                sst: 2
                sd: "000001"
              nsiId: string
              ensi: string
          certificates_expiry:
            ttl_superadmin_cert: 4300h
            ttl_invoker_cert: 4300h
@@ -398,6 +420,17 @@ components:
          allowed_invocations_time_range_days: 365
          allowed_invocations_per_second: "5"
          allowed_total_invocations: "5"
          net_slice_info:
          - snssai:
              sst: 1
              sd: "000001"
            nsiId: string
            ensi: string
          - snssai:
              sst: 2
              sd: "000001"
            nsiId: string
            ensi: string
        certificates_expiry:
          ttl_superadmin_cert: 4300h
          ttl_invoker_cert: 4300h
@@ -462,6 +495,17 @@ components:
        allowed_invocations_time_range_days: 365
        allowed_invocations_per_second: "5"
        allowed_total_invocations: "5"
        net_slice_info:
        - snssai:
            sst: 1
            sd: "000001"
          nsiId: string
          ensi: string
        - snssai:
            sst: 2
            sd: "000001"
          nsiId: string
          ensi: string
      properties:
        allowed_total_invocations:
          description: total number of requests the invoker can make
@@ -478,5 +522,33 @@ components:
          example: 365
          title: allowed_invocations_time_range_days
          type: integer
        net_slice_info:
          description: Network slice information list used for ACL policy assignment.
          items:
            properties:
              snssai:
                properties:
                  sst:
                    example: 1
                    title: sst
                    type: integer
                  sd:
                    example: "000001"
                    title: sd
                    type: string
                title: snssai
                type: object
              nsiId:
                example: string
                title: nsiId
                type: string
              ensi:
                example: string
                title: ensi
                type: string
            title: net_slice_info_item
            type: object
          title: net_slice_info
          type: array
      title: Settings_acl_policy_settings
      type: object