Commit 283dee22 authored by Waleed Akbar's avatar Waleed Akbar
Browse files

Add DSCM NetConf Driver and associated test scripts (2nd commit)

- Implemented NetConfDriver for managing device configurations via NETCONF protocol.
- Created run_tests_locally-device-netconf-dscm.sh script for local testing of driver functionalities.
- Added Jinja2 templates for generating configuration XML for hub and leaf devices.
- Developed test cases in test_dscm_netconf_hub_leaf.py to validate configuration retrieval and setting for hub and leaf devices.
- Added example XML files for expected configurations and actual results for testing purposes.
parent 9080f0f8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ Jinja2==3.0.3
libyang==2.8.4
macaddress
ncclient==0.6.15
netconf-console2==3.0.1
numpy<2.0.0
p4runtime==1.3.0
pandas==1.5.*
+11 −0
Original line number Diff line number Diff line
@@ -252,3 +252,14 @@ if LOAD_ALL_DEVICE_DRIVERS:
                FilterFieldEnum.DRIVER     : DeviceDriverEnum.DEVICEDRIVER_QKD,
            }
        ]))

if LOAD_ALL_DEVICE_DRIVERS:
    from .netconf_dscm.NetConfDriver import NetConfDriver # pylint: disable=wrong-import-position
    DRIVERS.append(
        (NetConfDriver, [
            {
                # Real DSCM, specifying NetConf Driver => use NetConfDriver
                FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.DSCM_NODE,
                FilterFieldEnum.DRIVER     : DeviceDriverEnum.DRVICEDRIVER_NETCONF_DSCM,
            }
        ]))
+17 −15
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ NAMESPACE_POLICY_TYPES_2 = 'http://openconfig.net/yang/policy_types'
NAMESPACE_ROUTING_POLICY                      = 'http://openconfig.net/yang/routing-policy'
NAMESPACE_VLAN                                = 'http://openconfig.net/yang/vlan'
NAMESPACE_PLATFORM_TRANSCEIVER                = 'http://openconfig.net/yang/platform/transceiver'
NAMESPACE_TERMINAL_DEVICE_DIGITAL_SUBCARRIERS = 'http://openconfig.net/yang/terminal-device-digital-subcarriers'

NAMESPACES = {
    'nc'   : NAMESPACE_NETCONF,
@@ -46,4 +47,5 @@ NAMESPACES = {
    'ocrp' : NAMESPACE_ROUTING_POLICY,
    'ocv'  : NAMESPACE_VLAN,
    'ocptr': NAMESPACE_PLATFORM_TRANSCEIVER,
    'octds': NAMESPACE_TERMINAL_DEVICE_DIGITAL_SUBCARRIERS,
}