Commit 50f35763 authored by Jorge Echevarria Uribarri's avatar Jorge Echevarria Uribarri
Browse files

simpificacion de event req

parent 4f562e14
Loading
Loading
Loading
Loading
+1 −21
Original line number Diff line number Diff line
@@ -53,27 +53,7 @@
          ]
        }
      ],
      "eventReq":{
        "immRep": true,
        "notifMethod": "string",
        "maxReportNbr": 5,
        "monDur": "DATE-time",
        "repPeriod": 5,
        "sampRatio": "integer from 1 to 100",
        "partitionCriteria": [
          "TAC"
        ],
        "grpRepTime": 3,
        "notifFlag": "ACTIVATE",
        "notifFlagInstruct": {
          "bufferedNotifs":"SEND_ALL",
          "subscription":"CLOSE"
        },
        "mutingSetting": {
          "maxNoOfNotif":5,
          "durationBufferedNotif":5
        }
      },
      "eventReq":"string",
      "requestTestNotification": true,
      "websockNotifConfig": {
        "websocketUri":"",
+2 −23
Original line number Diff line number Diff line
@@ -49,29 +49,8 @@ class capif_invoker_event_feature(capif_invoker_connector):

        path = self.capif_https_url + f"/{subscriberId}/subscriptions"

        payload = {
            "events": [
                "SERVICE_API_AVAILABLE",
                "string"
            ],
            "eventFilters": [
                {
                "apiIds": [
                    "string"
                ],
                "apiInvokerIds": [
                    "string"
                ],
                "aefIds": [
                    "string"
                ]
                }
            ],
            "eventReq": "string",
            "notificationDestination": f"{self.capif_callback_url}",
            "requestTestNotification": true,
            "websockNotifConfig": "string",
        }
        payload = self.events_config
        

        
        try:
+4 −0
Original line number Diff line number Diff line
@@ -99,6 +99,10 @@ class capif_invoker_connector:
        csr_country_name = os.getenv('INVOKER_CSR_COUNTRY_NAME', csr_config.get('csr_country_name', '')).strip()
        csr_email_address = os.getenv('INVOKER_CSR_EMAIL_ADDRESS', csr_config.get('csr_email_address', '')).strip()

        # Events configuration
        events_config = invoker_config.get('events', {})
        self.events_config = events_config

        # Define the invoker folder path and create it if it doesn't exist
        self.invoker_folder = os.path.join(invoker_general_folder, capif_username)
        os.makedirs(self.invoker_folder, exist_ok=True)