Loading services/TS29222_CAPIF_Publish_Service_API/config.yaml +1 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ mongo: { 'col': 'serviceapidescriptions', 'certs_col': "certs", 'capif_provider_col': "providerenrolmentdetails", 'col_interconnected': "interconnected", 'host': 'mongo', 'port': "27017" } Loading services/TS29222_CAPIF_Publish_Service_API/published_apis/core/serviceapidescriptions.py +15 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,21 @@ class PublishServiceOperations(Resource): cause="apiStatus can't be set if apiStatusMonitoring is inactive", invalid_params=[{"param": "apiStatus", "reason": "defined but apiStatusMoniroting feature not active"}] ) # Here code to check publish on the interconnected CCF # 1. Check shareableInfo # 2. If true then iterate through capifProvDoms # 3. For each domain, check if there is record in the "interconnected" table # 4. If yes, make a publish request with CCF... certificate # 5. When get an ACK that API was published then proceed if serviceapidescription.shareable_info.is_sharable: interconnected_col = self.db.get_col_by_name(self.db.interconnected) for dom in serviceapidescription.shareable_info.capif_prov_doms: interconnected_ccf = interconnected_col.find_one({"dst_prov_dom": dom}) if interconnected_ccf: current_app.logger.debug("CCF interconnected and API can be shared: {}".format(dom)) mycol.insert_one(rec) self.auth_manager.add_auth_service(api_id, apf_id) Loading services/TS29222_CAPIF_Publish_Service_API/published_apis/db/db.py +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ class MongoDatabse(): self.service_api_descriptions = self.config['mongo']['col'] self.capif_provider_col = self.config['mongo']['capif_provider_col'] self.certs_col = self.config['mongo']['certs_col'] self.interconnected = self.config['mongo']['col_interconnected'] def get_col_by_name(self, name): return self.db[name].with_options(codec_options=CodecOptions(tz_aware=True)) Loading Loading
services/TS29222_CAPIF_Publish_Service_API/config.yaml +1 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ mongo: { 'col': 'serviceapidescriptions', 'certs_col': "certs", 'capif_provider_col': "providerenrolmentdetails", 'col_interconnected': "interconnected", 'host': 'mongo', 'port': "27017" } Loading
services/TS29222_CAPIF_Publish_Service_API/published_apis/core/serviceapidescriptions.py +15 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,21 @@ class PublishServiceOperations(Resource): cause="apiStatus can't be set if apiStatusMonitoring is inactive", invalid_params=[{"param": "apiStatus", "reason": "defined but apiStatusMoniroting feature not active"}] ) # Here code to check publish on the interconnected CCF # 1. Check shareableInfo # 2. If true then iterate through capifProvDoms # 3. For each domain, check if there is record in the "interconnected" table # 4. If yes, make a publish request with CCF... certificate # 5. When get an ACK that API was published then proceed if serviceapidescription.shareable_info.is_sharable: interconnected_col = self.db.get_col_by_name(self.db.interconnected) for dom in serviceapidescription.shareable_info.capif_prov_doms: interconnected_ccf = interconnected_col.find_one({"dst_prov_dom": dom}) if interconnected_ccf: current_app.logger.debug("CCF interconnected and API can be shared: {}".format(dom)) mycol.insert_one(rec) self.auth_manager.add_auth_service(api_id, apf_id) Loading
services/TS29222_CAPIF_Publish_Service_API/published_apis/db/db.py +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ class MongoDatabse(): self.service_api_descriptions = self.config['mongo']['col'] self.capif_provider_col = self.config['mongo']['capif_provider_col'] self.certs_col = self.config['mongo']['certs_col'] self.interconnected = self.config['mongo']['col_interconnected'] def get_col_by_name(self, name): return self.db[name].with_options(codec_options=CodecOptions(tz_aware=True)) Loading