diff --git a/tests/libraries/api_publish_service/bodyRequests.py b/tests/libraries/api_publish_service/bodyRequests.py index a86ce024841250ef3f1f61c2ad6760ca0750b52b..046e8e18f5e9d2f6d94b8af7de8c5dde24db7c3c 100644 --- a/tests/libraries/api_publish_service/bodyRequests.py +++ b/tests/libraries/api_publish_service/bodyRequests.py @@ -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 diff --git a/tests/libraries/common/types.json b/tests/libraries/common/types.json index 5d67162ccac720901bed11748ad558ff5a17f26f..076d833f8ff251c52575d926de53fa93dff0a98b 100644 --- a/tests/libraries/common/types.json +++ b/tests/libraries/common/types.json @@ -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"]