Commit 5b945c44 authored by guillecxb's avatar guillecxb
Browse files

include file config

parent 299b7cca
Loading
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
{
  "capif_host": "capifcore",
  "register_host": "localhost",
  "capif_https_port": "443",
  "capif_register_port": "8084",
  "capif_username": "custom_user",
  "capif_password": "user_pass",
  "debug_mode": "True",
  "provider": {
    "provider_folder": "/Users/HI03132/Workdir/OpenCapif/pesp_capif_sdk/network_app_samples/network_app_provider_sample/test_provider_certificate_folder",
    "supported_features": "0",
    "cert_generation": {
      "csr_common_name": "provider",
      "csr_organizational_unit": "discovery",
      "csr_organization": "telefonica",
      "csr_locality": "madrid",
      "csr_state_or_province_name": "madrid",
      "csr_country_name": "ES",
      "csr_email_address": "hola@gmail.com"
    },
    "apfs": "2",
    "aefs": "3",
    "publish_req": {
      "service_api_id": "",
      "publisher_apf_id": "",
      "publisher_aefs_ids": ["", ""]
    },
    "api_description_path": "",
    "events": {
      "description": ["SERVICE_API_AVAILABLE"],
      "eventFilters": [
        {
          "apiIds": [""],
          "apiInvokerIds": [""],
          "aefIds": [""]
        }
      ],
      "notificationDestination" : "http://localhost:5000",
      "websockNotifConfig": {
        "websocketUri" : "http://localhost:5000",
        "requestWebsocketUri": true
      }
    },
    "log": {
      "apiName": "test1",
      "apiVersion": "v1",
      "resourceName": "MONITORING_SUBSCRIPTIONS",
      "uri": "/{scsAsId}/subscriptions",
      "protocol": "HTTP_2",
      "operation": "GET",
      "result": "200"
    }
  }
}
 No newline at end of file
+3 −2
Original line number Diff line number Diff line
@@ -51,6 +51,9 @@ class capif_provider_connector:
        """
        Initializes the CAPIFProvider connector with the parameters specified in the configuration file.
        """
        # Initialize logger for this class
        self.logger = logging.getLogger(self.__class__.__name__)
        
        # Load configuration from file if necessary
        config_file = os.path.abspath(config_file)
        self.config_path = os.path.dirname(config_file)+"/"
@@ -61,8 +64,6 @@ class capif_provider_connector:
        else:
            debug_mode = True

        # Initialize logger for this class
        self.logger = logging.getLogger(self.__class__.__name__)
        if debug_mode:
            self.logger.setLevel(logging.DEBUG)
        else: