Loading services/TS29222_CAPIF_Publish_Service_API/published_apis/core/auth_manager.py +4 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,10 @@ class AuthManager(Resource): auth_context = cert_col.find_one({"id":apf_id}) # Service APIs published by an interconnected CCF have no certificate entry if auth_context is None: return if "services" in auth_context["resources"]: if service_id in auth_context["resources"]["services"]: auth_context["resources"]["services"].remove(service_id) Loading services/TS29222_CAPIF_Publish_Service_API/published_apis/core/serviceapidescriptions.py +372 −39 File changed.Preview size limit exceeded, changes collapsed. Show changes 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 services/helper/helper_service/services/interconnection/core/ccfinstancedetails.py +10 −2 Original line number Diff line number Diff line Loading @@ -104,9 +104,13 @@ class CcfInstanceOperations(Resource): services_col = self.db.get_col_by_name(self.db.services_col) shareable_apis = services_col.find({ "shareable_info.is_shareable": True, "shareable_info.capif_prov_doms": peer_dom, "apf_id": {"$ne": peer_ccf_id}, "pub_api_path.ccf_ids": {"$ne": peer_ccf_id} "pub_api_path.ccf_ids": {"$ne": peer_ccf_id}, "$or": [ {"shareable_info.capif_prov_doms": peer_dom}, {"shareable_info.capif_prov_doms": {"$exists": False}}, {"shareable_info.capif_prov_doms": None} ] }) url = "https://{}/published-apis/v1/{}/service-apis".format(peer_dom, local_ccf_id) Loading @@ -130,6 +134,10 @@ class CcfInstanceOperations(Resource): # The peer stores the API as its own, it must not share it any further payload['shareable_info'] = {"is_shareable": False} # Publish between CCFs (Interface CAPIF-6 and CAPIF-6e) must include ccfId to contact when serviceAPICategory is used. if service_api.get("service_api_category") is not None: payload['ccf_id'] = local_ccf_id try: response = session.post(url, data=json.dumps(clean_n_camel_case(payload), cls=CustomJSONEncoder), Loading Loading
services/TS29222_CAPIF_Publish_Service_API/published_apis/core/auth_manager.py +4 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,10 @@ class AuthManager(Resource): auth_context = cert_col.find_one({"id":apf_id}) # Service APIs published by an interconnected CCF have no certificate entry if auth_context is None: return if "services" in auth_context["resources"]: if service_id in auth_context["resources"]["services"]: auth_context["resources"]["services"].remove(service_id) Loading
services/TS29222_CAPIF_Publish_Service_API/published_apis/core/serviceapidescriptions.py +372 −39 File changed.Preview size limit exceeded, changes collapsed. Show changes
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
services/helper/helper_service/services/interconnection/core/ccfinstancedetails.py +10 −2 Original line number Diff line number Diff line Loading @@ -104,9 +104,13 @@ class CcfInstanceOperations(Resource): services_col = self.db.get_col_by_name(self.db.services_col) shareable_apis = services_col.find({ "shareable_info.is_shareable": True, "shareable_info.capif_prov_doms": peer_dom, "apf_id": {"$ne": peer_ccf_id}, "pub_api_path.ccf_ids": {"$ne": peer_ccf_id} "pub_api_path.ccf_ids": {"$ne": peer_ccf_id}, "$or": [ {"shareable_info.capif_prov_doms": peer_dom}, {"shareable_info.capif_prov_doms": {"$exists": False}}, {"shareable_info.capif_prov_doms": None} ] }) url = "https://{}/published-apis/v1/{}/service-apis".format(peer_dom, local_ccf_id) Loading @@ -130,6 +134,10 @@ class CcfInstanceOperations(Resource): # The peer stores the API as its own, it must not share it any further payload['shareable_info'] = {"is_shareable": False} # Publish between CCFs (Interface CAPIF-6 and CAPIF-6e) must include ccfId to contact when serviceAPICategory is used. if service_api.get("service_api_category") is not None: payload['ccf_id'] = local_ccf_id try: response = session.post(url, data=json.dumps(clean_n_camel_case(payload), cls=CustomJSONEncoder), Loading