Commit ff4bc555 authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Merge branch 'OCFXXX-add-new-types-to-tests' into 'staging'

Update data types on tests according to changes on v18.7.0

See merge request !124
parents fdac337f 4e40066c
Loading
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -113,6 +113,20 @@ def create_aef_profile(aef_id,
                       security_method=None,
                       domain_name=None,
                       interface_descriptions=None):
    # "mandatory_attributes": {
    #   "aefId": "string",
    #   "versions": "Version"
    # },
    # "optional_attributes": {
    #   "protocol": "Protocol",
    #   "dataFormat": "DataFormat",
    #   "securityMethods": "SecurityMethod",
    #   "grantTypes": "OAuthGrantType",
    #   "domainName": "string",
    #   "interfaceDescriptions": "InterfaceDescription",
    #   "aefLocation": "AefLocation",
    #   "serviceKpis": "ServiceKpis",
    #   "ueIpRange": "IpAddrRange"
    data = {
        "aefId": aef_id,
        "versions": [
@@ -248,7 +262,8 @@ def create_interface_description(ipv4_addr=None,
                                 fqdn=None,
                                 port=None,
                                 api_prefix=None,
                                 security_methods=None):
                                 security_methods=None,
                                 grant_types=None):
    """
    Create an interface description with the given parameters.
    """
@@ -270,5 +285,7 @@ def create_interface_description(ipv4_addr=None,
        data['apiPrefix'] = api_prefix
    if security_methods is not None:
        data['securityMethods'] = security_methods
    if grant_types is not None:
        data['grantTypes'] = grant_types
    # Return the interface description
    return data
+45 −7
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@
    },
    "optional_attributes": {
      "apiId": "string",
      "apiStatus": "ApiStatus",
      "aefProfiles": "AefProfile",
      "description": "string",
      "supportedFeatures": "SupportedFeatures",
@@ -83,7 +84,7 @@
      "apiSuppFeats": "SupportedFeatures",
      "pubApiPath": "PublishedApiPath",
      "ccfId": "string",
      "apiStatus": "ApiStatus"
      "apiProvName": "string"
    },
    "regex_attributes": {
      "^vendorSpecific-(.*)": "VendorSpecificObject"
@@ -120,15 +121,45 @@
      "protocol": "Protocol",
      "dataFormat": "DataFormat",
      "securityMethods": "SecurityMethod",
      "grantTypes": "OAuthGrantType",
      "domainName": "string",
      "interfaceDescriptions": "InterfaceDescription",
      "aefLocation": "AefLocation"
      "aefLocation": "AefLocation",
      "serviceKpis": "ServiceKpis",
      "ueIpRange": "IpAddrRange"
    },
    "regex_attributes": {
      "^vendorSpecific-(.*)": "VendorSpecificObject"
    },
    "oneOf": ["interfaceDescriptions", "domainName"]
  },
  "ServiceKpis": {
    "mandatory_attributes": {},
    "optional_attributes": {
      "maxReqRate": "integer",
      "maxRestime": "integer",
      "availability": "integer",
      "avalComp": "Flops",
      "avalGraComp": "Flops",
      "avalMem": "Memory",
      "avalStor": "Memory",
      "conBand": "integer"
    }
  },
  "Flops": {
    "regex": "^[0-9]+(\\.[0-9]+)? (kFLOPS|MFLOPS|GFLOPS|TFLOPS|PFLOPS|EFLOPS|ZFLOPS)$"
  },
  "Memory": {
    "regex": "^[0-9]+(\\.[0-9]+)? (KB|MB|GB|TB|PB|EB|ZB|YB)$"
  },
  "IpAddrRange": {
    "mandatory_attributes": {},
    "optional_attributes": {
      "ueIpv4AddrRanges": "Ipv4AddressRange",
      "ueIpv6AddrRanges": "Ipv6AddressRange"
    },
    "oneOf": ["ueIpv4AddrRanges", "ueIpv6AddrRanges"]
  },
  "Version": {
    "mandatory_attributes": {
      "apiVersion": "string"
@@ -181,10 +212,13 @@
    "optional_attributes": {
      "ipv4Addr": "string",
      "ipv6Addr": "string",
      "fqdn": "Fqdn",
      "port": "integer",
      "securityMethods": "SecurityMethod"
      "apiPrefix": "string",
      "securityMethods": "SecurityMethod",
      "grantTypes": "OAuthGrantType"
    },
    "oneOf": ["ipv4Addr", "ipv6Addr"]
    "oneOf": ["ipv4Addr", "ipv6Addr", "fqdn"]
  },
  "AefLocation": {
    "mandatory_attributes": {},
@@ -336,7 +370,7 @@
    "mandatory_attributes": {},
    "optional_attributes": {
      "start": "Ipv4Addr",
      "stop": "Ipv4Addr"
      "end": "Ipv4Addr"
    }
  },
  "Ipv4Addr": {
@@ -375,7 +409,8 @@
  "DiscoveredAPIs": {
    "mandatory_attributes": {},
    "optional_attributes": {
      "serviceAPIDescriptions": "ServiceAPIDescription"
      "serviceAPIDescriptions": "ServiceAPIDescription",
      "suppFeat": "SupportedFeatures"
    }
  },
  "ServiceSecurity": {
@@ -576,7 +611,10 @@
    }
  },
  "GrantType": {
    "enum": ["client_credentials"]
    "enum": ["client_credentials","authorization_code"]
  },
  "OAuthGrantType": {
    "enum": ["CLIENT_CREDENTIALS", "AUTHORIZATION_CODE", "AUTHORIZATION_CODE_WITH_PKCE"]
  },
  "TokenType": {
    "enum": ["Bearer"]