Loading services/envs/dev1.env +1 −0 Original line number Diff line number Diff line export CAPIF_NETWORK_NAME=capif-network-a export COMPOSE_PROJECT_NAME=ocf_a export CAPIF_INTERCONNECTION_HOSTNAME=capifcore-b # Capif vault configuration export CAPIF_VAULT_PORT=8200 Loading services/envs/dev2.env +1 −0 Original line number Diff line number Diff line export CAPIF_NETWORK_NAME=capif-network-b export COMPOSE_PROJECT_NAME=ocf_b export CAPIF_INTERCONNECTION_HOSTNAME=capifcore-a # Capif vault configuration export DEPLOY_VAULT=false Loading tests/features/Helper/Interconnection API/interconnection.robot +142 −0 Original line number Diff line number Diff line Loading @@ -354,6 +354,148 @@ Publish API after CAPIFs Interconnection with capifProvDoms not present Interconnection Request between CCF-A and CCF-B with one API published on CCF-B capifProvDoms not present [Tags] interconnection-7 # Interconnection Request between CCF-A and CCF-B ${INTERCONNECTION_CCF_HOSTNAME}= Set Variable capifcore-b:1443 ${INTERCONNECTION_CCF_REGISTER_HOSTNAME}= Set Variable register-b:8184 Set Global Variable ${CAPIF_HTTPS_URL_B} https://${INTERCONNECTION_CCF_HOSTNAME}/ Set Global Variable ${CAPIF_HTTPS_REGISTER_URL_B} https://${INTERCONNECTION_CCF_REGISTER_HOSTNAME}/ ${provider_username_b}= Set Variable ${provider_username}_B # Publish one api on CCF-A ## Register APF ${register_user_info}= Provider Default Registration register_server=${CAPIF_HTTPS_REGISTER_URL_B} capif_server=${CAPIF_HTTPS_URL_B} provider_username=${provider_username_b} ## Publish one api ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api ... ${register_user_info} ... is_shareable=${True} ... server=${CAPIF_HTTPS_URL_B} ${ccf_id_a}= Get Capif Ccf Id # Request interconnection between CCF-A and CCF-B ${resp}= Create Capif Interconnection server=${CAPIF_HTTPS_URL} ccf_hostname=${INTERCONNECTION_CCF_HOSTNAME} superadmin_username=${SUPERADMIN_USERNAME} ${ccf_id_b}= Set Variable ${resp.json()['ccfId']} ## Default Invoker Registration and Onboarding ${register_user_info_invoker_b} ${url} ${request_body}= Invoker Default Onboarding ... invoker_username=${INVOKER_USERNAME}_B ... register_server=${CAPIF_HTTPS_REGISTER_URL_B} ... capif_server=${CAPIF_HTTPS_URL_B} ## Test ${resp}= Get Request Capif ... ${DISCOVER_URL}${register_user_info_invoker_b['api_invoker_id']}&aef-id=${register_user_info['aef_id']} ... server=${CAPIF_HTTPS_URL_B} ... verify=ca.crt ... username=${INVOKER_USERNAME}_B Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 Dictionary Should Not Contain Key ${resp.json()['serviceAPIDescriptions'][0]} pubApiPath # List Should Contain Value ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} ${ccf_id_b} ## Default Invoker Registration and Onboarding ${register_user_info_invoker_a} ${url} ${request_body}= Invoker Default Onboarding ## Test ${resp}= Get Request Capif ... ${DISCOVER_URL}${register_user_info_invoker_a['api_invoker_id']}&aef-id=${register_user_info['aef_id']} ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt ... username=${INVOKER_USERNAME} Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs # Check Results Log "API discovered by authorised API invoker at CCF-A" Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 Should Not Be Empty ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']} Length Should Be ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} 1 List Should Contain Value ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} ${ccf_id_b} Publish API at CCF_B after CAPIFs Interconnection with capifProvDoms not present [Tags] interconnection-8 # Interconnection Request between CCF-A and CCF-B ${INTERCONNECTION_CCF_HOSTNAME}= Set Variable capifcore-b:1443 ${INTERCONNECTION_CCF_REGISTER_HOSTNAME}= Set Variable register-b:8184 Set Global Variable ${CAPIF_HTTPS_URL_B} https://${INTERCONNECTION_CCF_HOSTNAME}/ Set Global Variable ${CAPIF_HTTPS_REGISTER_URL_B} https://${INTERCONNECTION_CCF_REGISTER_HOSTNAME}/ ${provider_username_b}= Set Variable ${provider_username}_B ${ccf_id_a}= Get Capif Ccf Id # Request interconnection between CCF-A and CCF-B ${resp}= Create Capif Interconnection server=${CAPIF_HTTPS_URL} ccf_hostname=${INTERCONNECTION_CCF_HOSTNAME} superadmin_username=${SUPERADMIN_USERNAME} ${ccf_id_b}= Set Variable ${resp.json()['ccfId']} # Publish one api on CCF-B ## Register APF ${register_user_info}= Provider Default Registration register_server=${CAPIF_HTTPS_REGISTER_URL_B} capif_server=${CAPIF_HTTPS_URL_B} provider_username=${provider_username_b} ## Publish one api ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api ... ${register_user_info} ... is_shareable=${True} ... server=${CAPIF_HTTPS_URL_B} ## Default Invoker Registration and Onboarding ${register_user_info_invoker_b} ${url} ${request_body}= Invoker Default Onboarding ... invoker_username=${INVOKER_USERNAME}_B ... register_server=${CAPIF_HTTPS_REGISTER_URL_B} ... capif_server=${CAPIF_HTTPS_URL_B} ## Test ${resp}= Get Request Capif ... ${DISCOVER_URL}${register_user_info_invoker_b['api_invoker_id']}&aef-id=${register_user_info['aef_id']} ... server=${CAPIF_HTTPS_URL_B} ... verify=ca.crt ... username=${INVOKER_USERNAME}_B Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 Should Not Be Empty ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']} Length Should Be ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} 1 List Should Contain Value ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} ${ccf_id_b} ## Default Invoker Registration and Onboarding ${register_user_info_invoker_a} ${url} ${request_body}= Invoker Default Onboarding ## Test ${resp}= Get Request Capif ... ${DISCOVER_URL}${register_user_info_invoker_a['api_invoker_id']}&aef-id=${register_user_info['aef_id']} ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt ... username=${INVOKER_USERNAME} Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs # Check Results Log "API discovered by authorised API invoker at CCF-A" Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 Should Not Be Empty ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']} Length Should Be ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} 2 List Should Contain Value ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} ${ccf_id_b} List Should Contain Value ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} ${ccf_id_a} # Interconnection establish between CCF-A and CCF-B # [Tags] interconnection-10 Loading tests/resources/common/basicRequests.robot +7 −4 Original line number Diff line number Diff line Loading @@ -832,7 +832,7 @@ Provider Registration # Check Results Check Response Variable Type And Values ${resp} 201 APIProviderEnrolmentDetails ${resource_url}= Check Location Header ${resp} ${LOCATION_PROVIDER_RESOURCE_REGEX} ${server} ${resource_url}= Check Location Header ${resp} ${LOCATION_PROVIDER_RESOURCE_REGEX} hostname=${server} Log Dictionary ${resp.json()} Loading Loading @@ -927,6 +927,7 @@ Publish Service Api Request ... ${service_api_category}=${NONE} ... ${pub_api_path_ccf_ids}=${NONE} ... ${ccf_id}=${NONE} ... ${server}=${NONE} ${aef_ids}= Create List IF "${aef_id}" == "${NONE}" Loading Loading @@ -969,7 +970,7 @@ Publish Service Api Request ${resp}= Post Request Capif ... /published-apis/v1/${apf_id_to_use}/service-apis ... json=${request_body} ... server=${CAPIF_HTTPS_URL} ... server=${server} ... verify=ca.crt ... username=${apf_username_to_use} Loading @@ -994,6 +995,7 @@ Publish Service Api ... ${service_api_category}=${NONE} ... ${pub_api_path_ccf_ids}=${NONE} ... ${ccf_id}=${NONE} ... ${server}=${CAPIF_HTTPS_URL} ${resp} ${request_body}= Publish Service Api Request ... ${register_user_info_provider} Loading @@ -1013,10 +1015,11 @@ Publish Service Api ... ${service_api_category} ... ${pub_api_path_ccf_ids} ... ${ccf_id} ... server=${server} Check Response Variable Type And Values ${resp} 201 ServiceAPIDescription Dictionary Should Contain Key ${resp.json()} apiId ${resource_url}= Check Location Header ${resp} ${LOCATION_PUBLISH_RESOURCE_REGEX} ${resource_url}= Check Location Header ${resp} ${LOCATION_PUBLISH_RESOURCE_REGEX} hostname=${server} RETURN ${resp.json()} ${resource_url} ${request_body} Loading Loading @@ -1071,7 +1074,7 @@ Basic ACL registration ... username=${INVOKER_USERNAME} # Check Service Security Check Response Variable Type And Values ${resp} 201 ServiceSecurity ${resource_url}= Check Location Header ${resp} ${LOCATION_SECURITY_RESOURCE_REGEX} ${resource_url}= Check Location Header ${resp} ${LOCATION_SECURITY_RESOURCE_REGEX} hostname=${server} END RETURN ${register_user_info_invoker} ${register_user_info_provider} ${service_api_description_published} Loading Loading
services/envs/dev1.env +1 −0 Original line number Diff line number Diff line export CAPIF_NETWORK_NAME=capif-network-a export COMPOSE_PROJECT_NAME=ocf_a export CAPIF_INTERCONNECTION_HOSTNAME=capifcore-b # Capif vault configuration export CAPIF_VAULT_PORT=8200 Loading
services/envs/dev2.env +1 −0 Original line number Diff line number Diff line export CAPIF_NETWORK_NAME=capif-network-b export COMPOSE_PROJECT_NAME=ocf_b export CAPIF_INTERCONNECTION_HOSTNAME=capifcore-a # Capif vault configuration export DEPLOY_VAULT=false Loading
tests/features/Helper/Interconnection API/interconnection.robot +142 −0 Original line number Diff line number Diff line Loading @@ -354,6 +354,148 @@ Publish API after CAPIFs Interconnection with capifProvDoms not present Interconnection Request between CCF-A and CCF-B with one API published on CCF-B capifProvDoms not present [Tags] interconnection-7 # Interconnection Request between CCF-A and CCF-B ${INTERCONNECTION_CCF_HOSTNAME}= Set Variable capifcore-b:1443 ${INTERCONNECTION_CCF_REGISTER_HOSTNAME}= Set Variable register-b:8184 Set Global Variable ${CAPIF_HTTPS_URL_B} https://${INTERCONNECTION_CCF_HOSTNAME}/ Set Global Variable ${CAPIF_HTTPS_REGISTER_URL_B} https://${INTERCONNECTION_CCF_REGISTER_HOSTNAME}/ ${provider_username_b}= Set Variable ${provider_username}_B # Publish one api on CCF-A ## Register APF ${register_user_info}= Provider Default Registration register_server=${CAPIF_HTTPS_REGISTER_URL_B} capif_server=${CAPIF_HTTPS_URL_B} provider_username=${provider_username_b} ## Publish one api ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api ... ${register_user_info} ... is_shareable=${True} ... server=${CAPIF_HTTPS_URL_B} ${ccf_id_a}= Get Capif Ccf Id # Request interconnection between CCF-A and CCF-B ${resp}= Create Capif Interconnection server=${CAPIF_HTTPS_URL} ccf_hostname=${INTERCONNECTION_CCF_HOSTNAME} superadmin_username=${SUPERADMIN_USERNAME} ${ccf_id_b}= Set Variable ${resp.json()['ccfId']} ## Default Invoker Registration and Onboarding ${register_user_info_invoker_b} ${url} ${request_body}= Invoker Default Onboarding ... invoker_username=${INVOKER_USERNAME}_B ... register_server=${CAPIF_HTTPS_REGISTER_URL_B} ... capif_server=${CAPIF_HTTPS_URL_B} ## Test ${resp}= Get Request Capif ... ${DISCOVER_URL}${register_user_info_invoker_b['api_invoker_id']}&aef-id=${register_user_info['aef_id']} ... server=${CAPIF_HTTPS_URL_B} ... verify=ca.crt ... username=${INVOKER_USERNAME}_B Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 Dictionary Should Not Contain Key ${resp.json()['serviceAPIDescriptions'][0]} pubApiPath # List Should Contain Value ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} ${ccf_id_b} ## Default Invoker Registration and Onboarding ${register_user_info_invoker_a} ${url} ${request_body}= Invoker Default Onboarding ## Test ${resp}= Get Request Capif ... ${DISCOVER_URL}${register_user_info_invoker_a['api_invoker_id']}&aef-id=${register_user_info['aef_id']} ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt ... username=${INVOKER_USERNAME} Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs # Check Results Log "API discovered by authorised API invoker at CCF-A" Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 Should Not Be Empty ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']} Length Should Be ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} 1 List Should Contain Value ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} ${ccf_id_b} Publish API at CCF_B after CAPIFs Interconnection with capifProvDoms not present [Tags] interconnection-8 # Interconnection Request between CCF-A and CCF-B ${INTERCONNECTION_CCF_HOSTNAME}= Set Variable capifcore-b:1443 ${INTERCONNECTION_CCF_REGISTER_HOSTNAME}= Set Variable register-b:8184 Set Global Variable ${CAPIF_HTTPS_URL_B} https://${INTERCONNECTION_CCF_HOSTNAME}/ Set Global Variable ${CAPIF_HTTPS_REGISTER_URL_B} https://${INTERCONNECTION_CCF_REGISTER_HOSTNAME}/ ${provider_username_b}= Set Variable ${provider_username}_B ${ccf_id_a}= Get Capif Ccf Id # Request interconnection between CCF-A and CCF-B ${resp}= Create Capif Interconnection server=${CAPIF_HTTPS_URL} ccf_hostname=${INTERCONNECTION_CCF_HOSTNAME} superadmin_username=${SUPERADMIN_USERNAME} ${ccf_id_b}= Set Variable ${resp.json()['ccfId']} # Publish one api on CCF-B ## Register APF ${register_user_info}= Provider Default Registration register_server=${CAPIF_HTTPS_REGISTER_URL_B} capif_server=${CAPIF_HTTPS_URL_B} provider_username=${provider_username_b} ## Publish one api ${service_api_description_published} ${resource_url} ${request_body}= Publish Service Api ... ${register_user_info} ... is_shareable=${True} ... server=${CAPIF_HTTPS_URL_B} ## Default Invoker Registration and Onboarding ${register_user_info_invoker_b} ${url} ${request_body}= Invoker Default Onboarding ... invoker_username=${INVOKER_USERNAME}_B ... register_server=${CAPIF_HTTPS_REGISTER_URL_B} ... capif_server=${CAPIF_HTTPS_URL_B} ## Test ${resp}= Get Request Capif ... ${DISCOVER_URL}${register_user_info_invoker_b['api_invoker_id']}&aef-id=${register_user_info['aef_id']} ... server=${CAPIF_HTTPS_URL_B} ... verify=ca.crt ... username=${INVOKER_USERNAME}_B Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 Should Not Be Empty ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']} Length Should Be ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} 1 List Should Contain Value ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} ${ccf_id_b} ## Default Invoker Registration and Onboarding ${register_user_info_invoker_a} ${url} ${request_body}= Invoker Default Onboarding ## Test ${resp}= Get Request Capif ... ${DISCOVER_URL}${register_user_info_invoker_a['api_invoker_id']}&aef-id=${register_user_info['aef_id']} ... server=${CAPIF_HTTPS_URL} ... verify=ca.crt ... username=${INVOKER_USERNAME} Check Response Variable Type And Values ${resp} 200 DiscoveredAPIs # Check Results Log "API discovered by authorised API invoker at CCF-A" Should Not Be Empty ${resp.json()['serviceAPIDescriptions']} Length Should Be ${resp.json()['serviceAPIDescriptions']} 1 Should Not Be Empty ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']} Length Should Be ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} 2 List Should Contain Value ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} ${ccf_id_b} List Should Contain Value ${resp.json()['serviceAPIDescriptions'][0]['pubApiPath']['ccfIds']} ${ccf_id_a} # Interconnection establish between CCF-A and CCF-B # [Tags] interconnection-10 Loading
tests/resources/common/basicRequests.robot +7 −4 Original line number Diff line number Diff line Loading @@ -832,7 +832,7 @@ Provider Registration # Check Results Check Response Variable Type And Values ${resp} 201 APIProviderEnrolmentDetails ${resource_url}= Check Location Header ${resp} ${LOCATION_PROVIDER_RESOURCE_REGEX} ${server} ${resource_url}= Check Location Header ${resp} ${LOCATION_PROVIDER_RESOURCE_REGEX} hostname=${server} Log Dictionary ${resp.json()} Loading Loading @@ -927,6 +927,7 @@ Publish Service Api Request ... ${service_api_category}=${NONE} ... ${pub_api_path_ccf_ids}=${NONE} ... ${ccf_id}=${NONE} ... ${server}=${NONE} ${aef_ids}= Create List IF "${aef_id}" == "${NONE}" Loading Loading @@ -969,7 +970,7 @@ Publish Service Api Request ${resp}= Post Request Capif ... /published-apis/v1/${apf_id_to_use}/service-apis ... json=${request_body} ... server=${CAPIF_HTTPS_URL} ... server=${server} ... verify=ca.crt ... username=${apf_username_to_use} Loading @@ -994,6 +995,7 @@ Publish Service Api ... ${service_api_category}=${NONE} ... ${pub_api_path_ccf_ids}=${NONE} ... ${ccf_id}=${NONE} ... ${server}=${CAPIF_HTTPS_URL} ${resp} ${request_body}= Publish Service Api Request ... ${register_user_info_provider} Loading @@ -1013,10 +1015,11 @@ Publish Service Api ... ${service_api_category} ... ${pub_api_path_ccf_ids} ... ${ccf_id} ... server=${server} Check Response Variable Type And Values ${resp} 201 ServiceAPIDescription Dictionary Should Contain Key ${resp.json()} apiId ${resource_url}= Check Location Header ${resp} ${LOCATION_PUBLISH_RESOURCE_REGEX} ${resource_url}= Check Location Header ${resp} ${LOCATION_PUBLISH_RESOURCE_REGEX} hostname=${server} RETURN ${resp.json()} ${resource_url} ${request_body} Loading Loading @@ -1071,7 +1074,7 @@ Basic ACL registration ... username=${INVOKER_USERNAME} # Check Service Security Check Response Variable Type And Values ${resp} 201 ServiceSecurity ${resource_url}= Check Location Header ${resp} ${LOCATION_SECURITY_RESOURCE_REGEX} ${resource_url}= Check Location Header ${resp} ${LOCATION_SECURITY_RESOURCE_REGEX} hostname=${server} END RETURN ${register_user_info_invoker} ${register_user_info_provider} ${service_api_description_published} Loading