Commit f424819b authored by Pablo Armingol's avatar Pablo Armingol
Browse files

feat: Enhance L3VPN service template generation with dynamic site...

feat: Enhance L3VPN service template generation with dynamic site configurations, QoS, and static routing, and improve endpoint name extraction.
parent 884f9ed8
Loading
Loading
Loading
Loading
+6 −1
Changes for src/device/service/drivers/ietf_l3vpn/IetfL3VpnDriver.py: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -190,10 +190,15 @@ class IetfL3VpnDriver(_Driver):
        if len(resources) == 0: return results
        with self.__lock:
            if 'ipowdm' in str(resources):
                # Build controller URL from device address and port
                scheme = self.settings.get('scheme', 'http')
                controller_url = f"{scheme}://{self.address}:{self.port}"
                LOGGER.info("IPoWDM: Using controller URL: %s", controller_url)

                for resource in resources:
                    if 'ipowdm' in str(resource):
                        try:
                            create_request(resource)
                            create_request(resource, controller_url)
                            LOGGER.info('Request created successfully')
                            results.append((resource, True))
                        except Exception as e:
+2 −1
Changes for src/device/service/drivers/ietf_l3vpn/TfsApiClient.py: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -144,7 +144,8 @@ class TfsApiClient(RestApiClient):
                cr_rk : str = cr['custom']['resource_key']
                if not cr_rk.startswith('/endpoints/endpoint['): continue
                settings = json.loads(cr['custom']['resource_value'])
                ep_name = settings['name']
                ep_name = settings.get('name', settings.get('uuid'))
                if ep_name:
                    config_rule_dict[ep_name] = settings

            for json_endpoint in json_device['device_endpoints']:
Loading