Loading tests/libraries/api_publish_service/bodyRequests.py +18 −1 Original line number Diff line number Diff line Loading @@ -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": [ Loading Loading @@ -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. """ Loading @@ -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 tests/libraries/common/types.json +45 −7 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ }, "optional_attributes": { "apiId": "string", "apiStatus": "ApiStatus", "aefProfiles": "AefProfile", "description": "string", "supportedFeatures": "SupportedFeatures", Loading @@ -83,7 +84,7 @@ "apiSuppFeats": "SupportedFeatures", "pubApiPath": "PublishedApiPath", "ccfId": "string", "apiStatus": "ApiStatus" "apiProvName": "string" }, "regex_attributes": { "^vendorSpecific-(.*)": "VendorSpecificObject" Loading Loading @@ -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" Loading Loading @@ -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": {}, Loading Loading @@ -336,7 +370,7 @@ "mandatory_attributes": {}, "optional_attributes": { "start": "Ipv4Addr", "stop": "Ipv4Addr" "end": "Ipv4Addr" } }, "Ipv4Addr": { Loading Loading @@ -375,7 +409,8 @@ "DiscoveredAPIs": { "mandatory_attributes": {}, "optional_attributes": { "serviceAPIDescriptions": "ServiceAPIDescription" "serviceAPIDescriptions": "ServiceAPIDescription", "suppFeat": "SupportedFeatures" } }, "ServiceSecurity": { Loading Loading @@ -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"] Loading Loading
tests/libraries/api_publish_service/bodyRequests.py +18 −1 Original line number Diff line number Diff line Loading @@ -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": [ Loading Loading @@ -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. """ Loading @@ -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
tests/libraries/common/types.json +45 −7 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ }, "optional_attributes": { "apiId": "string", "apiStatus": "ApiStatus", "aefProfiles": "AefProfile", "description": "string", "supportedFeatures": "SupportedFeatures", Loading @@ -83,7 +84,7 @@ "apiSuppFeats": "SupportedFeatures", "pubApiPath": "PublishedApiPath", "ccfId": "string", "apiStatus": "ApiStatus" "apiProvName": "string" }, "regex_attributes": { "^vendorSpecific-(.*)": "VendorSpecificObject" Loading Loading @@ -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" Loading Loading @@ -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": {}, Loading Loading @@ -336,7 +370,7 @@ "mandatory_attributes": {}, "optional_attributes": { "start": "Ipv4Addr", "stop": "Ipv4Addr" "end": "Ipv4Addr" } }, "Ipv4Addr": { Loading Loading @@ -375,7 +409,8 @@ "DiscoveredAPIs": { "mandatory_attributes": {}, "optional_attributes": { "serviceAPIDescriptions": "ServiceAPIDescription" "serviceAPIDescriptions": "ServiceAPIDescription", "suppFeat": "SupportedFeatures" } }, "ServiceSecurity": { Loading Loading @@ -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"] Loading