diff --git a/error-devices-onboarding.swift b/error-devices-onboarding.swift new file mode 100644 index 0000000000000000000000000000000000000000..beab91929590b4af7b5d8a09151b49e254b7b6e0 --- /dev/null +++ b/error-devices-onboarding.swift @@ -0,0 +1,317 @@ +l": "eyJzcmxfbm9raWEtbmV0d29yay1pbnN0YW5jZTpuZXR3b3JrLWluc3RhbmNlIjogW3sibmFtZSI6ICJtZ210IiwgInR5cGUiOiAic3JsX25va2lhLW5ldHdvcmstaW5zdGFuY2U6aXAtdnJmIiwgImFkbWluLXN0YXRlIjogImVuYWJsZSIsICJvcGVyLXN0YXRlIjogInVwIiwgImRlc2NyaXB0aW9uIjogIk1hbmFnZW1lbnQgbmV0d29yayBpbnN0YW5jZSIsICJpcC1mb3J3YXJkaW5nIjogeyJyZWNlaXZlLWlwdjQtY2hlY2siOiB0cnVlLCAicmVjZWl2ZS1pcHY2LWNoZWNrIjogdHJ1ZX0sICJpbnRlcmZhY2UiOiBbeyJuYW1lIjogIm1nbXQwLjAiLCAib3Blci1zdGF0ZSI6ICJ1cCIsICJpbmRleCI6ICIxIn1dLCAiaWNtcCI6IHsic3RhdGlzdGljcyI6IHsibGFzdC1jbGVhciI6ICIyMDI0LTA0LTA1VDA5OjE3OjI3LjgwNFoiLCAidG90YWwiOiB7ImluLXBhY2tldHMiOiAiMCIsICJpbi1lcnJvci1wYWNrZXRzIjogIjAiLCAib3V0LXBhY2tldHMiOiAiMCIsICJvdXQtZXJyb3ItcGFja2V0cyI6ICIwIn0sICJ0eXBlIjogW3sibmFtZSI6ICJlY2hvLXJlcGx5IiwgImluLXBhY2tldHMiOiAiMCIsICJvdXQtcGFja2V0cyI6ICIwIiwgIm91dC1lcnJvci1wYWNrZXRzIjogIjAifSwgeyJuYW1lIjogImRlc3QtdW5yZWFjaGFibGUiLCAiaW4tcGFja2V0cyI6ICIwIiwgIm91dC1wYWNrZXRzIjogIjAiLCAib3V0LWVycm9yLXBhY2tldHMiOiAiMCJ9LCB7Im5hbWUiOiAicmVk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WNlaXZlLWJ1ZmZlci1lcnJvcnMiOiAiMCIsICJzZW5kLWJ1ZmZlci1lcnJvcnMiOiAiMCIsICJpbi1jaGVja3N1bS1lcnJvcnMiOiAiMCIsICJpZ25vcmVkLW11bHRpY2FzdC1wYWNrZXRzIjogIjAifSwgImxpc3RlbmluZy1hcHBsaWNhdGlvbiI6IFt7ImxvY2FsLWFkZHJlc3MiOiAiMC4wLjAuMCIsICJsb2NhbC1wb3J0IjogMTYxfSwgeyJsb2NhbC1hZGRyZXNzIjogIjEyNy4wLjAuMSIsICJsb2NhbC1wb3J0IjogNTN9LCB7ImxvY2FsLWFkZHJlc3MiOiAiOjoiLCAibG9jYWwtcG9ydCI6IDE2MX0sIHsibG9jYWwtYWRkcmVzcyI6ICI6OjEiLCAibG9jYWwtcG9ydCI6IDUzfV19fV19"}}]} +Traceback (most recent call last): + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/GnmiSessionHandler.py", line 140, in get + results.extend(parse(str_path, value)) + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/handlers/__init__.py", line 134, in parse + return handler.parse(value) + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstance.py", line 438, in parse + if afi_safi_entry: +UnboundLocalError: local variable 'afi_safi_entry' referenced before assignment +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Original path: /srl_nokia-network-instance:network-instance, Schema path: /network-instance +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Mapped path schema: /network-instance +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Handler found for path: /network-instance +ERROR:device.service.drivers.gnmi_nokia_srlinux.GnmiNokiaSrLinuxDriver:[172.20.20.102:57400]:Exception processing notification {"atomic": false, "delete": [], "timestamp": "1712310240151604420", "update": [{"duplicates": 0, "path": {"elem": [], "element": [], "origin": "", "target": ""}, "val": {"json_ietf_val": "eyJzcmxfbm9raWEtbmV0d29yay1pbnN0YW5jZTpuZXR3b3JrLWluc3RhbmNlIjogW3sibmFtZSI6ICJtZ210IiwgImludGVyZmFjZSI6IFt7Im5hbWUiOiAibWdtdDAuMCIsICJvcGVyLXN0YXRlIjogInVwIiwgImluZGV4IjogIjEifV19XX0="}}]} +Traceback (most recent call last): + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/GnmiSessionHandler.py", line 140, in get + results.extend(parse(str_path, value)) + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/handlers/__init__.py", line 134, in parse + return handler.parse(value) + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstance.py", line 438, in parse + if afi_safi_entry: +UnboundLocalError: local variable 'afi_safi_entry' referenced before assignment +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Original path: /srl_nokia-routing-policy:routing-policy, Schema path: /routing-policy +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Mapped path schema: /routing-policy +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Handler found for path: /routing-policy +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/1]', {'name': 'ethernet-1/1', 'admin_state': 'enable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/2]', {'name': 'ethernet-1/2', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/3]', {'name': 'ethernet-1/3', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/4]', {'name': 'ethernet-1/4', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/5]', {'name': 'ethernet-1/5', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/6]', {'name': 'ethernet-1/6', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/7]', {'name': 'ethernet-1/7', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/8]', {'name': 'ethernet-1/8', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/9]', {'name': 'ethernet-1/9', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/10]', {'name': 'ethernet-1/10', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/11]', {'name': 'ethernet-1/11', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/12]', {'name': 'ethernet-1/12', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/13]', {'name': 'ethernet-1/13', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/14]', {'name': 'ethernet-1/14', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/15]', {'name': 'ethernet-1/15', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/16]', {'name': 'ethernet-1/16', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/17]', {'name': 'ethernet-1/17', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/18]', {'name': 'ethernet-1/18', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/19]', {'name': 'ethernet-1/19', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/20]', {'name': 'ethernet-1/20', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/21]', {'name': 'ethernet-1/21', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/22]', {'name': 'ethernet-1/22', 'admin_state': 'disable'})) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Original path: /srl_nokia-interfaces:interface, Schema path: /srl_nokia-interfaces:interface +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/23]', {'name': 'ethernet-1/23', 'admin_state': 'disable'})) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Mapped path schema: /srl_nokia-interfaces:interface +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/24]', {'name': 'ethernet-1/24', 'admin_state': 'disable'})) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers.Interface:Getting path for InterfaceHandler +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/25]', {'name': 'ethernet-1/25', 'admin_state': 'disable'})) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Handler found for path: /srl_nokia-interfaces:interface +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/26]', {'name': 'ethernet-1/26', 'admin_state': 'disable'})) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Original path: /srl_nokia-interfaces:interface, Schema path: /srl_nokia-interfaces:interface +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/27]', {'name': 'ethernet-1/27', 'admin_state': 'disable'})) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Mapped path schema: /srl_nokia-interfaces:interface +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/28]', {'name': 'ethernet-1/28', 'admin_state': 'disable'})) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers.Interface:Getting path for InterfaceHandler +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/29]', {'name': 'ethernet-1/29', 'admin_state': 'disable'})) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Handler found for path: /srl_nokia-interfaces:interface +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/30]', {'name': 'ethernet-1/30', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/31]', {'name': 'ethernet-1/31', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/32]', {'name': 'ethernet-1/32', 'admin_state': 'disable'})) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Original path: /srl_nokia-network-instance:network-instance, Schema path: /network-instance +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/33]', {'name': 'ethernet-1/33', 'admin_state': 'disable'})) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Mapped path schema: /network-instance +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/34]', {'name': 'ethernet-1/34', 'admin_state': 'disable'})) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Handler found for path: /network-instance +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/35]', {'name': 'ethernet-1/35', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/36]', {'name': 'ethernet-1/36', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/37]', {'name': 'ethernet-1/37', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/38]', {'name': 'ethernet-1/38', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/39]', {'name': 'ethernet-1/39', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/40]', {'name': 'ethernet-1/40', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/41]', {'name': 'ethernet-1/41', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/42]', {'name': 'ethernet-1/42', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/43]', {'name': 'ethernet-1/43', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/44]', {'name': 'ethernet-1/44', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/45]', {'name': 'ethernet-1/45', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/46]', {'name': 'ethernet-1/46', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/47]', {'name': 'ethernet-1/47', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/48]', {'name': 'ethernet-1/48', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/49]', {'name': 'ethernet-1/49', 'admin_state': 'enable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/50]', {'name': 'ethernet-1/50', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/51]', {'name': 'ethernet-1/51', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/52]', {'name': 'ethernet-1/52', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/53]', {'name': 'ethernet-1/53', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/54]', {'name': 'ethernet-1/54', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/55]', {'name': 'ethernet-1/55', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/56]', {'name': 'ethernet-1/56', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[mgmt0]/subinterface[0]', {'index': 0, 'admin-state': 'enable', 'type': None, 'ipv4': {'address': [{'ip-prefix': '172.20.20.102/24'}]}, 'vlan': {'encap': {'untagged': {}}}})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[mgmt0]', {'name': 'mgmt0', 'admin_state': 'enable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): Unable to Get Resource(key=/); Error(local variable 'afi_safi_entry' referenced before assignment) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): Unable to Get Resource(key=/); Error(local variable 'afi_safi_entry' referenced before assignment) +ERROR:device.service.drivers.gnmi_nokia_srlinux.GnmiNokiaSrLinuxDriver:[172.20.20.101:57400]:Exception processing notification {"atomic": false, "delete": [], "timestamp": "1712310240179530218", "update": [{"duplicates": 0, "path": {"elem": [], "element": [], "origin": "", "target": ""}, "val": {"json_ietf_val": "eyJzcmxfbm9raWEtbmV0d29yay1pbnN0YW5jZTpuZXR3b3JrLWluc3RhbmNlIjogW3sibmFtZSI6ICJtZ210IiwgInR5cGUiOiAic3JsX25va2lhLW5ldHdvcmstaW5zdGFuY2U6aXAtdnJmIiwgImFkbWluLXN0YXRlIjogImVuYWJsZSIsICJvcGVyLXN0YXRlIjogInVwIiwgImRlc2NyaXB0aW9uIjogIk1hbmFnZW1lbnQgbmV0d29yayBpbnN0YW5jZSIsICJpcC1mb3J3YXJkaW5nIjogeyJyZWNlaXZlLWlwdjQtY2hlY2siOiB0cnVlLCAicmVjZWl2ZS1pcHY2LWNoZWNrIjogdHJ1ZX0sICJpbnRlcmZhY2UiOiBbeyJuYW1lIjogIm1nbXQwLjAiLCAib3Blci1zdGF0ZSI6ICJ1cCIsICJpbmRleCI6ICIxIn1dLCAiaWNtcCI6IHsic3RhdGlzdGljcyI6IHsibGFzdC1jbGVhciI6ICIyMDI0LTA0LTA1VDA5OjE3OjI3LjU4MloiLCAidG90YWwiOiB7ImluLXBhY2tldHMiOiAiMCIsICJpbi1lcnJvci1wYWNrZXRzIjogIjAiLCAib3V0LXBhY2tldHMiOiAiMCIsICJvdXQtZXJyb3ItcGFja2V0cyI6ICIwIn0sICJ0eXBlIjogW3sibmFtZSI6ICJlY2hvLXJlcGx5IiwgImluLXBhY2tldHMiOiAiMCIsICJvdXQtcGFja2V0cyI6ICIwIiwgIm91dC1lcnJvci1wYWNrZXRzIjogIjAifSwgeyJuYW1lIjogImRlc3QtdW5yZWFjaGFibGUiLCAiaW4tcGFja2V0cyI6ICIwIiwgIm91dC1wYWNrZXRzIjogIjAiLCAib3V0LWVycm9yLXBhY2tldHMiOiAiMCJ9LCB7Im5hbWUiOiAicmVk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WNlaXZlLWJ1ZmZlci1lcnJvcnMiOiAiMCIsICJzZW5kLWJ1ZmZlci1lcnJvcnMiOiAiMCIsICJpbi1jaGVja3N1bS1lcnJvcnMiOiAiMCIsICJpZ25vcmVkLW11bHRpY2FzdC1wYWNrZXRzIjogIjAifSwgImxpc3RlbmluZy1hcHBsaWNhdGlvbiI6IFt7ImxvY2FsLWFkZHJlc3MiOiAiMC4wLjAuMCIsICJsb2NhbC1wb3J0IjogMTYxfSwgeyJsb2NhbC1hZGRyZXNzIjogIjEyNy4wLjAuMSIsICJsb2NhbC1wb3J0IjogNTN9LCB7ImxvY2FsLWFkZHJlc3MiOiAiOjoiLCAibG9jYWwtcG9ydCI6IDE2MX0sIHsibG9jYWwtYWRkcmVzcyI6ICI6OjEiLCAibG9jYWwtcG9ydCI6IDUzfV19fV19"}}]} +Traceback (most recent call last): + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/GnmiSessionHandler.py", line 140, in get + results.extend(parse(str_path, value)) + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/handlers/__init__.py", line 134, in parse + return handler.parse(value) + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstance.py", line 438, in parse + if afi_safi_entry: +UnboundLocalError: local variable 'afi_safi_entry' referenced before assignment +ERROR:device.service.DeviceServiceServicerImpl:AddDevice exception +Traceback (most recent call last): + File "/var/teraflow/common/method_wrappers/Decorator.py", line 220, in inner_wrapper + reply = func(self, request, grpc_context) + File "/var/teraflow/device/service/DeviceServiceServicerImpl.py", line 122, in AddDevice + raise OperationFailedException('AddDevice', extra_details=errors) +common.method_wrappers.ServiceExceptions.OperationFailedException: Operation(AddDevice) failed; DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/1]', {'name': 'ethernet-1/1', 'admin_state': 'enable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/2]', {'name': 'ethernet-1/2', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/3]', {'name': 'ethernet-1/3', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/4]', {'name': 'ethernet-1/4', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/5]', {'name': 'ethernet-1/5', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/6]', {'name': 'ethernet-1/6', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/7]', {'name': 'ethernet-1/7', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/8]', {'name': 'ethernet-1/8', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/9]', {'name': 'ethernet-1/9', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/10]', {'name': 'ethernet-1/10', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/11]', {'name': 'ethernet-1/11', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/12]', {'name': 'ethernet-1/12', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/13]', {'name': 'ethernet-1/13', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/14]', {'name': 'ethernet-1/14', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/15]', {'name': 'ethernet-1/15', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/16]', {'name': 'ethernet-1/16', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/17]', {'name': 'ethernet-1/17', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/18]', {'name': 'ethernet-1/18', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/19]', {'name': 'ethernet-1/19', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/20]', {'name': 'ethernet-1/20', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/21]', {'name': 'ethernet-1/21', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/22]', {'name': 'ethernet-1/22', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/23]', {'name': 'ethernet-1/23', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/24]', {'name': 'ethernet-1/24', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/25]', {'name': 'ethernet-1/25', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/26]', {'name': 'ethernet-1/26', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/27]', {'name': 'ethernet-1/27', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/28]', {'name': 'ethernet-1/28', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/29]', {'name': 'ethernet-1/29', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/30]', {'name': 'ethernet-1/30', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/31]', {'name': 'ethernet-1/31', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/32]', {'name': 'ethernet-1/32', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/33]', {'name': 'ethernet-1/33', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/34]', {'name': 'ethernet-1/34', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/35]', {'name': 'ethernet-1/35', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/36]', {'name': 'ethernet-1/36', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/37]', {'name': 'ethernet-1/37', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/38]', {'name': 'ethernet-1/38', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/39]', {'name': 'ethernet-1/39', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/40]', {'name': 'ethernet-1/40', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/41]', {'name': 'ethernet-1/41', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/42]', {'name': 'ethernet-1/42', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/43]', {'name': 'ethernet-1/43', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/44]', {'name': 'ethernet-1/44', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/45]', {'name': 'ethernet-1/45', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/46]', {'name': 'ethernet-1/46', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/47]', {'name': 'ethernet-1/47', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/48]', {'name': 'ethernet-1/48', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/49]', {'name': 'ethernet-1/49', 'admin_state': 'enable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/50]', {'name': 'ethernet-1/50', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/51]', {'name': 'ethernet-1/51', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/52]', {'name': 'ethernet-1/52', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/53]', {'name': 'ethernet-1/53', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/54]', {'name': 'ethernet-1/54', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/55]', {'name': 'ethernet-1/55', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/56]', {'name': 'ethernet-1/56', 'admin_state': 'disable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[mgmt0]/subinterface[0]', {'index': 0, 'admin-state': 'enable', 'type': None, 'ipv4': {'address': [{'ip-prefix': '172.20.20.102/24'}]}, 'vlan': {'encap': {'untagged': {}}}})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): GetConfig retrieved unsupported Resource(('/interface[mgmt0]', {'name': 'mgmt0', 'admin_state': 'enable'})); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): Unable to Get Resource(key=/); Error(local variable 'afi_safi_entry' referenced before assignment); DeviceId(50c36ec0-09ba-546a-b18f-27f9776ce876): Unable to Get Resource(key=/); Error(local variable 'afi_safi_entry' referenced before assignment) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Original path: /srl_nokia-network-instance:network-instance, Schema path: /network-instance +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Mapped path schema: /network-instance +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Handler found for path: /network-instance +ERROR:device.service.drivers.gnmi_nokia_srlinux.GnmiNokiaSrLinuxDriver:[172.20.20.101:57400]:Exception processing notification {"atomic": false, "delete": [], "timestamp": "1712310240181392223", "update": [{"duplicates": 0, "path": {"elem": [], "element": [], "origin": "", "target": ""}, "val": {"json_ietf_val": "eyJzcmxfbm9raWEtbmV0d29yay1pbnN0YW5jZTpuZXR3b3JrLWluc3RhbmNlIjogW3sibmFtZSI6ICJtZ210IiwgImludGVyZmFjZSI6IFt7Im5hbWUiOiAibWdtdDAuMCIsICJvcGVyLXN0YXRlIjogInVwIiwgImluZGV4IjogIjEifV19XX0="}}]} +Traceback (most recent call last): + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/GnmiSessionHandler.py", line 140, in get + results.extend(parse(str_path, value)) + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/handlers/__init__.py", line 134, in parse + return handler.parse(value) + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstance.py", line 438, in parse + if afi_safi_entry: +UnboundLocalError: local variable 'afi_safi_entry' referenced before assignment +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Original path: /srl_nokia-routing-policy:routing-policy, Schema path: /routing-policy +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Mapped path schema: /routing-policy +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Handler found for path: /routing-policy +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/1]', {'name': 'ethernet-1/1', 'admin_state': 'enable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/2]', {'name': 'ethernet-1/2', 'admin_state': 'enable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/3]', {'name': 'ethernet-1/3', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/4]', {'name': 'ethernet-1/4', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/5]', {'name': 'ethernet-1/5', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/6]', {'name': 'ethernet-1/6', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/7]', {'name': 'ethernet-1/7', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/8]', {'name': 'ethernet-1/8', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/9]', {'name': 'ethernet-1/9', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/10]', {'name': 'ethernet-1/10', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/11]', {'name': 'ethernet-1/11', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/12]', {'name': 'ethernet-1/12', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/13]', {'name': 'ethernet-1/13', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/14]', {'name': 'ethernet-1/14', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/15]', {'name': 'ethernet-1/15', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/16]', {'name': 'ethernet-1/16', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/17]', {'name': 'ethernet-1/17', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/18]', {'name': 'ethernet-1/18', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/19]', {'name': 'ethernet-1/19', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/20]', {'name': 'ethernet-1/20', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/21]', {'name': 'ethernet-1/21', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/22]', {'name': 'ethernet-1/22', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/23]', {'name': 'ethernet-1/23', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/24]', {'name': 'ethernet-1/24', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/25]', {'name': 'ethernet-1/25', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/26]', {'name': 'ethernet-1/26', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/27]', {'name': 'ethernet-1/27', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/28]', {'name': 'ethernet-1/28', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/29]', {'name': 'ethernet-1/29', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/30]', {'name': 'ethernet-1/30', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/31]', {'name': 'ethernet-1/31', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/32]', {'name': 'ethernet-1/32', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/33]', {'name': 'ethernet-1/33', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/34]', {'name': 'ethernet-1/34', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[mgmt0]/subinterface[0]', {'index': 0, 'admin-state': 'enable', 'type': None, 'ipv4': {'address': [{'ip-prefix': '172.20.20.101/24'}]}, 'vlan': {'encap': {'untagged': {}}}})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[mgmt0]', {'name': 'mgmt0', 'admin_state': 'enable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): Unable to Get Resource(key=/); Error(local variable 'afi_safi_entry' referenced before assignment) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): Unable to Get Resource(key=/); Error(local variable 'afi_safi_entry' referenced before assignment) +ERROR:device.service.DeviceServiceServicerImpl:AddDevice exception +Traceback (most recent call last): + File "/var/teraflow/common/method_wrappers/Decorator.py", line 220, in inner_wrapper + reply = func(self, request, grpc_context) + File "/var/teraflow/device/service/DeviceServiceServicerImpl.py", line 122, in AddDevice + raise OperationFailedException('AddDevice', extra_details=errors) +common.method_wrappers.ServiceExceptions.OperationFailedException: Operation(AddDevice) failed; DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/1]', {'name': 'ethernet-1/1', 'admin_state': 'enable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/2]', {'name': 'ethernet-1/2', 'admin_state': 'enable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/3]', {'name': 'ethernet-1/3', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/4]', {'name': 'ethernet-1/4', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/5]', {'name': 'ethernet-1/5', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/6]', {'name': 'ethernet-1/6', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/7]', {'name': 'ethernet-1/7', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/8]', {'name': 'ethernet-1/8', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/9]', {'name': 'ethernet-1/9', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/10]', {'name': 'ethernet-1/10', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/11]', {'name': 'ethernet-1/11', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/12]', {'name': 'ethernet-1/12', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/13]', {'name': 'ethernet-1/13', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/14]', {'name': 'ethernet-1/14', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/15]', {'name': 'ethernet-1/15', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/16]', {'name': 'ethernet-1/16', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/17]', {'name': 'ethernet-1/17', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/18]', {'name': 'ethernet-1/18', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/19]', {'name': 'ethernet-1/19', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/20]', {'name': 'ethernet-1/20', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/21]', {'name': 'ethernet-1/21', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/22]', {'name': 'ethernet-1/22', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/23]', {'name': 'ethernet-1/23', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/24]', {'name': 'ethernet-1/24', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/25]', {'name': 'ethernet-1/25', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/26]', {'name': 'ethernet-1/26', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/27]', {'name': 'ethernet-1/27', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/28]', {'name': 'ethernet-1/28', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/29]', {'name': 'ethernet-1/29', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/30]', {'name': 'ethernet-1/30', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/31]', {'name': 'ethernet-1/31', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/32]', {'name': 'ethernet-1/32', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/33]', {'name': 'ethernet-1/33', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/34]', {'name': 'ethernet-1/34', 'admin_state': 'disable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[mgmt0]/subinterface[0]', {'index': 0, 'admin-state': 'enable', 'type': None, 'ipv4': {'address': [{'ip-prefix': '172.20.20.101/24'}]}, 'vlan': {'encap': {'untagged': {}}}})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): GetConfig retrieved unsupported Resource(('/interface[mgmt0]', {'name': 'mgmt0', 'admin_state': 'enable'})); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): Unable to Get Resource(key=/); Error(local variable 'afi_safi_entry' referenced before assignment); DeviceId(fcbf1c99-3a0a-5487-af2b-034ab906f2a4): Unable to Get Resource(key=/); Error(local variable 'afi_safi_entry' referenced before assignment) +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Original path: /srl_nokia-interfaces:interface, Schema path: /srl_nokia-interfaces:interface +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Mapped path schema: /srl_nokia-interfaces:interface +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers.Interface:Getting path for InterfaceHandler +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Handler found for path: /srl_nokia-interfaces:interface +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Original path: /srl_nokia-interfaces:interface, Schema path: /srl_nokia-interfaces:interface +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Mapped path schema: /srl_nokia-interfaces:interface +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers.Interface:Getting path for InterfaceHandler +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Handler found for path: /srl_nokia-interfaces:interface +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Original path: /srl_nokia-network-instance:network-instance, Schema path: /network-instance +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Mapped path schema: /network-instance +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Handler found for path: /network-instance +ERROR:device.service.drivers.gnmi_nokia_srlinux.GnmiNokiaSrLinuxDriver:[172.20.20.103:57400]:Exception processing notification {"atomic": false, "delete": [], "timestamp": "1712310240224040603", "update": [{"duplicates": 0, "path": {"elem": [], "element": [], "origin": "", "target": ""}, "val": {"json_ietf_val": "eyJzcmxfbm9raWEtbmV0d29yay1pbnN0YW5jZTpuZXR3b3JrLWluc3RhbmNlIjogW3sibmFtZSI6ICJtZ210IiwgInR5cGUiOiAic3JsX25va2lhLW5ldHdvcmstaW5zdGFuY2U6aXAtdnJmIiwgImFkbWluLXN0YXRlIjogImVuYWJsZSIsICJvcGVyLXN0YXRlIjogInVwIiwgImRlc2NyaXB0aW9uIjogIk1hbmFnZW1lbnQgbmV0d29yayBpbnN0YW5jZSIsICJpcC1mb3J3YXJkaW5nIjogeyJyZWNlaXZlLWlwdjQtY2hlY2siOiB0cnVlLCAicmVjZWl2ZS1pcHY2LWNoZWNrIjogdHJ1ZX0sICJpbnRlcmZhY2UiOiBbeyJuYW1lIjogIm1nbXQwLjAiLCAib3Blci1zdGF0ZSI6ICJ1cCIsICJpbmRleCI6ICIxIn1dLCAiaWNtcCI6IHsic3RhdGlzdGljcyI6IHsibGFzdC1jbGVhciI6ICIyMDI0LTA0LTA1VDA5OjE3OjI3LjcwMloiLCAidG90YWwiOiB7ImluLXBhY2tldHMiOiAiMCIsICJpbi1lcnJvci1wYWNrZXRzIjogIjAiLCAib3V0LXBhY2tldHMiOiAiMCIsICJvdXQtZXJyb3ItcGFja2V0cyI6ICIwIn0sICJ0eXBlIjogW3sibmFtZSI6ICJlY2hvLXJlcGx5IiwgImluLXBhY2tldHMiOiAiMCIsICJvdXQtcGFja2V0cyI6ICIwIiwgIm91dC1lcnJvci1wYWNrZXRzIjogIjAifSwgeyJuYW1lIjogImRlc3QtdW5yZWFjaGFibGUiLCAiaW4tcGFja2V0cyI6ICIwIiwgIm91dC1wYWNrZXRzIjogIjAiLCAib3V0LWVycm9yLXBhY2tldHMi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iLCAib3V0LXBhY2tldHMiOiAiMCIsICJyZWNlaXZlLWJ1ZmZlci1lcnJvcnMiOiAiMCIsICJzZW5kLWJ1ZmZlci1lcnJvcnMiOiAiMCIsICJpbi1jaGVja3N1bS1lcnJvcnMiOiAiMCIsICJpZ25vcmVkLW11bHRpY2FzdC1wYWNrZXRzIjogIjAifSwgImxpc3RlbmluZy1hcHBsaWNhdGlvbiI6IFt7ImxvY2FsLWFkZHJlc3MiOiAiMC4wLjAuMCIsICJsb2NhbC1wb3J0IjogMTYxfSwgeyJsb2NhbC1hZGRyZXNzIjogIjEyNy4wLjAuMSIsICJsb2NhbC1wb3J0IjogNTN9LCB7ImxvY2FsLWFkZHJlc3MiOiAiOjoiLCAibG9jYWwtcG9ydCI6IDE2MX0sIHsibG9jYWwtYWRkcmVzcyI6ICI6OjEiLCAibG9jYWwtcG9ydCI6IDUzfV19fV19"}}]} +Traceback (most recent call last): + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/GnmiSessionHandler.py", line 140, in get + results.extend(parse(str_path, value)) + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/handlers/__init__.py", line 134, in parse + return handler.parse(value) + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstance.py", line 438, in parse + if afi_safi_entry: +UnboundLocalError: local variable 'afi_safi_entry' referenced before assignment +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Original path: /srl_nokia-network-instance:network-instance, Schema path: /network-instance +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Mapped path schema: /network-instance +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Handler found for path: /network-instance +ERROR:device.service.drivers.gnmi_nokia_srlinux.GnmiNokiaSrLinuxDriver:[172.20.20.103:57400]:Exception processing notification {"atomic": false, "delete": [], "timestamp": "1712310240225720524", "update": [{"duplicates": 0, "path": {"elem": [], "element": [], "origin": "", "target": ""}, "val": {"json_ietf_val": "eyJzcmxfbm9raWEtbmV0d29yay1pbnN0YW5jZTpuZXR3b3JrLWluc3RhbmNlIjogW3sibmFtZSI6ICJtZ210IiwgImludGVyZmFjZSI6IFt7Im5hbWUiOiAibWdtdDAuMCIsICJvcGVyLXN0YXRlIjogInVwIiwgImluZGV4IjogIjEifV19XX0="}}]} +Traceback (most recent call last): + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/GnmiSessionHandler.py", line 140, in get + results.extend(parse(str_path, value)) + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/handlers/__init__.py", line 134, in parse + return handler.parse(value) + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstance.py", line 438, in parse + if afi_safi_entry: +UnboundLocalError: local variable 'afi_safi_entry' referenced before assignment +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Original path: /srl_nokia-routing-policy:routing-policy, Schema path: /routing-policy +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Mapped path schema: /routing-policy +DEBUG:device.service.drivers.gnmi_nokia_srlinux.handlers:Handler found for path: /routing-policy +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/1]', {'name': 'ethernet-1/1', 'admin_state': 'enable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/2]', {'name': 'ethernet-1/2', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/3]', {'name': 'ethernet-1/3', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/4]', {'name': 'ethernet-1/4', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/5]', {'name': 'ethernet-1/5', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/6]', {'name': 'ethernet-1/6', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/7]', {'name': 'ethernet-1/7', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/8]', {'name': 'ethernet-1/8', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/9]', {'name': 'ethernet-1/9', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/10]', {'name': 'ethernet-1/10', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/11]', {'name': 'ethernet-1/11', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/12]', {'name': 'ethernet-1/12', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/13]', {'name': 'ethernet-1/13', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/14]', {'name': 'ethernet-1/14', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/15]', {'name': 'ethernet-1/15', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/16]', {'name': 'ethernet-1/16', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/17]', {'name': 'ethernet-1/17', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/18]', {'name': 'ethernet-1/18', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/19]', {'name': 'ethernet-1/19', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/20]', {'name': 'ethernet-1/20', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/21]', {'name': 'ethernet-1/21', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/22]', {'name': 'ethernet-1/22', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/23]', {'name': 'ethernet-1/23', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/24]', {'name': 'ethernet-1/24', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/25]', {'name': 'ethernet-1/25', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/26]', {'name': 'ethernet-1/26', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/27]', {'name': 'ethernet-1/27', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/28]', {'name': 'ethernet-1/28', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/29]', {'name': 'ethernet-1/29', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/30]', {'name': 'ethernet-1/30', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/31]', {'name': 'ethernet-1/31', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/32]', {'name': 'ethernet-1/32', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/33]', {'name': 'ethernet-1/33', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/34]', {'name': 'ethernet-1/34', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/35]', {'name': 'ethernet-1/35', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/36]', {'name': 'ethernet-1/36', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/37]', {'name': 'ethernet-1/37', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/38]', {'name': 'ethernet-1/38', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/39]', {'name': 'ethernet-1/39', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/40]', {'name': 'ethernet-1/40', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/41]', {'name': 'ethernet-1/41', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/42]', {'name': 'ethernet-1/42', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/43]', {'name': 'ethernet-1/43', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/44]', {'name': 'ethernet-1/44', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/45]', {'name': 'ethernet-1/45', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/46]', {'name': 'ethernet-1/46', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/47]', {'name': 'ethernet-1/47', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/48]', {'name': 'ethernet-1/48', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/49]', {'name': 'ethernet-1/49', 'admin_state': 'enable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/50]', {'name': 'ethernet-1/50', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/51]', {'name': 'ethernet-1/51', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/52]', {'name': 'ethernet-1/52', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/53]', {'name': 'ethernet-1/53', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/54]', {'name': 'ethernet-1/54', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/55]', {'name': 'ethernet-1/55', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/56]', {'name': 'ethernet-1/56', 'admin_state': 'disable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[mgmt0]/subinterface[0]', {'index': 0, 'admin-state': 'enable', 'type': None, 'ipv4': {'address': [{'ip-prefix': '172.20.20.103/24'}]}, 'vlan': {'encap': {'untagged': {}}}})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[mgmt0]', {'name': 'mgmt0', 'admin_state': 'enable'})) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): Unable to Get Resource(key=/); Error(local variable 'afi_safi_entry' referenced before assignment) +ERROR:device.service.DeviceServiceServicerImpl:DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): Unable to Get Resource(key=/); Error(local variable 'afi_safi_entry' referenced before assignment) +ERROR:device.service.DeviceServiceServicerImpl:AddDevice exception +Traceback (most recent call last): + File "/var/teraflow/common/method_wrappers/Decorator.py", line 220, in inner_wrapper + reply = func(self, request, grpc_context) + File "/var/teraflow/device/service/DeviceServiceServicerImpl.py", line 122, in AddDevice + raise OperationFailedException('AddDevice', extra_details=errors) +common.method_wrappers.ServiceExceptions.OperationFailedException: Operation(AddDevice) failed; DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/1]', {'name': 'ethernet-1/1', 'admin_state': 'enable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/2]', {'name': 'ethernet-1/2', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/3]', {'name': 'ethernet-1/3', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/4]', {'name': 'ethernet-1/4', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/5]', {'name': 'ethernet-1/5', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/6]', {'name': 'ethernet-1/6', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/7]', {'name': 'ethernet-1/7', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/8]', {'name': 'ethernet-1/8', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/9]', {'name': 'ethernet-1/9', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/10]', {'name': 'ethernet-1/10', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/11]', {'name': 'ethernet-1/11', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/12]', {'name': 'ethernet-1/12', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/13]', {'name': 'ethernet-1/13', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/14]', {'name': 'ethernet-1/14', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/15]', {'name': 'ethernet-1/15', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/16]', {'name': 'ethernet-1/16', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/17]', {'name': 'ethernet-1/17', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/18]', {'name': 'ethernet-1/18', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/19]', {'name': 'ethernet-1/19', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/20]', {'name': 'ethernet-1/20', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/21]', {'name': 'ethernet-1/21', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/22]', {'name': 'ethernet-1/22', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/23]', {'name': 'ethernet-1/23', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/24]', {'name': 'ethernet-1/24', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/25]', {'name': 'ethernet-1/25', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/26]', {'name': 'ethernet-1/26', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/27]', {'name': 'ethernet-1/27', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/28]', {'name': 'ethernet-1/28', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/29]', {'name': 'ethernet-1/29', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/30]', {'name': 'ethernet-1/30', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/31]', {'name': 'ethernet-1/31', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/32]', {'name': 'ethernet-1/32', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/33]', {'name': 'ethernet-1/33', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/34]', {'name': 'ethernet-1/34', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/35]', {'name': 'ethernet-1/35', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/36]', {'name': 'ethernet-1/36', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/37]', {'name': 'ethernet-1/37', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/38]', {'name': 'ethernet-1/38', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/39]', {'name': 'ethernet-1/39', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/40]', {'name': 'ethernet-1/40', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/41]', {'name': 'ethernet-1/41', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/42]', {'name': 'ethernet-1/42', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/43]', {'name': 'ethernet-1/43', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/44]', {'name': 'ethernet-1/44', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/45]', {'name': 'ethernet-1/45', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/46]', {'name': 'ethernet-1/46', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/47]', {'name': 'ethernet-1/47', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/48]', {'name': 'ethernet-1/48', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/49]', {'name': 'ethernet-1/49', 'admin_state': 'enable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/50]', {'name': 'ethernet-1/50', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/51]', {'name': 'ethernet-1/51', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/52]', {'name': 'ethernet-1/52', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/53]', {'name': 'ethernet-1/53', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/54]', {'name': 'ethernet-1/54', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/55]', {'name': 'ethernet-1/55', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[ethernet-1/56]', {'name': 'ethernet-1/56', 'admin_state': 'disable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[mgmt0]/subinterface[0]', {'index': 0, 'admin-state': 'enable', 'type': None, 'ipv4': {'address': [{'ip-prefix': '172.20.20.103/24'}]}, 'vlan': {'encap': {'untagged': {}}}})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): GetConfig retrieved unsupported Resource(('/interface[mgmt0]', {'name': 'mgmt0', 'admin_state': 'enable'})); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): Unable to Get Resource(key=/); Error(local variable 'afi_safi_entry' referenced before assignment); DeviceId(5cca8a65-8a20-50ab-8d47-d12294f0dca1): Unable to Get Resource(key=/); Error(local variable 'afi_safi_entry' referenced before assignment) +Exception in thread Thread-25: +Traceback (most recent call last): + File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner + self.run() + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/MonitoringThread.py", line 135, in run + for subscribe_response in self._response_iterator: + File "/usr/local/lib/python3.9/site-packages/grpc/_channel.py", line 426, in __next__ + return self._next() + File "/usr/local/lib/python3.9/site-packages/grpc/_channel.py", line 826, in _next + raise self +grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: + status = StatusCode.UNAVAILABLE + details = "Socket closed" + debug_error_string = "{"created":"@1712310326.014542657","description":"Error received from peer ipv4:172.20.20.103:57400","file":"src/core/lib/surface/call.cc","file_line":966,"grpc_message":"Socket closed","grpc_status":14}" +> +Exception in thread Thread-20: +Traceback (most recent call last): + File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner +Exception in thread Thread-23: +Traceback (most recent call last): + File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner + self.run() + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/MonitoringThread.py", line 135, in run + self.run() + for subscribe_response in self._response_iterator: + File "/var/teraflow/device/service/drivers/gnmi_nokia_srlinux/MonitoringThread.py", line 135, in run + File "/usr/local/lib/python3.9/site-packages/grpc/_channel.py", line 426, in __next__ + for subscribe_response in self._response_iterator: + File "/usr/local/lib/python3.9/site-packages/grpc/_channel.py", line 426, in __next__ + return self._next() + File "/usr/local/lib/python3.9/site-packages/grpc/_channel.py", line 826, in _next + raise self +grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: + status = StatusCode.UNAVAILABLE + details = "Socket closed" + debug_error_string = "{"created":"@1712310326.018710184","description":"Error received from peer ipv4:172.20.20.101:57400","file":"src/core/lib/surface/call.cc","file_line":966,"grpc_message":"Socket closed","grpc_status":14}" +> + return self._next() + File "/usr/local/lib/python3.9/site-packages/grpc/_channel.py", line 826, in _next + raise self +grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: + status = StatusCode.UNAVAILABLE + details = "Socket closed" + debug_error_string = "{"created":"@1712310326.018746615","description":"Error received from peer ipv4:172.20.20.102:57400","file":"src/core/lib/surface/call.cc","file_line":966,"grpc_message":"Socket closed","grpc_status":14}" \ No newline at end of file diff --git a/my_deploy.sh b/my_deploy.sh index a9f3f00e33d8f56f9145c7dd4069d229d48d1117..7c9b68b7002095b7cedf4d2c05faf1e8e42c5fef 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -90,7 +90,7 @@ export CRDB_DATABASE="tfs" export CRDB_DEPLOY_MODE="single" # Disable flag for dropping database, if it exists. -export CRDB_DROP_DATABASE_IF_EXISTS="" +export CRDB_DROP_DATABASE_IF_EXISTS="YES" # Disable flag for re-deploying CockroachDB from scratch. export CRDB_REDEPLOY="" @@ -138,7 +138,7 @@ export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis" export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups" # Disable flag for dropping tables if they exist. -export QDB_DROP_TABLES_IF_EXIST="" +export QDB_DROP_TABLES_IF_EXIST="YES" # Disable flag for re-deploying QuestDB from scratch. export QDB_REDEPLOY="" diff --git a/proto/context.proto b/proto/context.proto index 3ccc13ab199ae7587b0c99340c85524f16e86431..b5fa5eb83f864473e798ee7485ef0acb959b5f83 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -201,6 +201,7 @@ enum DeviceDriverEnum { DEVICEDRIVER_XR = 6; DEVICEDRIVER_IETF_L2VPN = 7; DEVICEDRIVER_GNMI_OPENCONFIG = 8; + DEVICEDRIVER_GNMI_NOKIA_SRLINUX = 9; } enum DeviceOperationalStatusEnum { diff --git a/scripts/run_tests_locally-device-gnmi-nokia-srlinux-get-ifs.sh b/scripts/run_tests_locally-device-gnmi-nokia-srlinux-get-ifs.sh new file mode 100755 index 0000000000000000000000000000000000000000..f34a048aeb4c3ea040b2b8251f046299a6aba17c --- /dev/null +++ b/scripts/run_tests_locally-device-gnmi-nokia-srlinux-get-ifs.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +PROJECTDIR=`pwd` + +cd $PROJECTDIR/src +RCFILE=$PROJECTDIR/coverage/.coveragerc + +# Run unitary tests and analyze coverage of code at same time +coverage run --rcfile=$RCFILE --append -m pytest --log-level=DEBUG -o log_cli=true --verbose \ + device/tests/test_gnmi_nokia_srlinux-get-ifs.py diff --git a/scripts/run_tests_locally-device-gnmi-nokia-srlinux.sh b/scripts/run_tests_locally-device-gnmi-nokia-srlinux.sh new file mode 100755 index 0000000000000000000000000000000000000000..beae4f72d0e867f88067237cbd92b54f68c10902 --- /dev/null +++ b/scripts/run_tests_locally-device-gnmi-nokia-srlinux.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +PROJECTDIR=`pwd` + +cd $PROJECTDIR/src +RCFILE=$PROJECTDIR/coverage/.coveragerc + +# Run unitary tests and analyze coverage of code at same time +coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO -o log_cli=true --verbose \ + device/tests/test_gnmi_nokia_srlinux.py + #\ device/service/drivers/gnmi_nokia_srlinux/handlers/__init__.py + #\ device/service/driver_api/_Driver.py diff --git a/src/common/type_checkers/Assertions.py b/src/common/type_checkers/Assertions.py index 286ae179d325b6e70d6ebf509de92e354ba42bc8..31e6631fffb4b45f9d5401819553183e1f6e4da5 100644 --- a/src/common/type_checkers/Assertions.py +++ b/src/common/type_checkers/Assertions.py @@ -35,6 +35,7 @@ def validate_device_driver_enum(message): 'DEVICEDRIVER_XR', 'DEVICEDRIVER_IETF_L2VPN', 'DEVICEDRIVER_GNMI_OPENCONFIG', + 'DEVICEDRIVER_GNMI_NOKIA_SRLINUX', ] def validate_device_operational_status_enum(message): diff --git a/src/context/service/database/models/enums/DeviceDriver.py b/src/context/service/database/models/enums/DeviceDriver.py index 66635decc5369c8b7601863da85f497626d70ac8..42d1eb6e6c7f4460602a1f5679581829dff6a899 100644 --- a/src/context/service/database/models/enums/DeviceDriver.py +++ b/src/context/service/database/models/enums/DeviceDriver.py @@ -31,6 +31,7 @@ class ORM_DeviceDriverEnum(enum.Enum): XR = DeviceDriverEnum.DEVICEDRIVER_XR IETF_L2VPN = DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN GNMI_OPENCONFIG = DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG + GNMI_NOKIA_SRLINUX = DeviceDriverEnum.DEVICEDRIVER_GNMI_NOKIA_SRLINUX grpc_to_enum__device_driver = functools.partial( grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum) diff --git a/src/device/service/Tools.py b/src/device/service/Tools.py index b2b206471e07b654e5339f81db632699ae8b95df..db15440ccfa50550720302a501c82bffbf2f3f61 100644 --- a/src/device/service/Tools.py +++ b/src/device/service/Tools.py @@ -246,7 +246,7 @@ def _raw_config_rules_to_grpc( raw_config_rules : List[Tuple[str, Union[Any, Exception, None]]] ) -> List[str]: errors : List[str] = list() - + LOGGER.warning('raw_config_rules={:s}'.format(str(raw_config_rules))) for resource_key, resource_value in raw_config_rules: if isinstance(resource_value, Exception): errors.append(error_template.format( diff --git a/src/device/service/driver_api/_Driver.py b/src/device/service/driver_api/_Driver.py index 0aa1a6c5a8697d4c75f7044981221c6dd47e3aff..9720d7d4017de7ea0b9287f05ecb4517bacaaf26 100644 --- a/src/device/service/driver_api/_Driver.py +++ b/src/device/service/driver_api/_Driver.py @@ -25,6 +25,9 @@ RESOURCE_ROUTING_POLICIES = '__routing_policies__' RESOURCE_SERVICES = '__services__' RESOURCE_ACL = '__acl__' RESOURCE_INVENTORY = '__inventory__' +RESOURCE_NETWORK_INSTANCE_VXLAN = '__network_instance_vxlan__' +RESOURCE_ROUTING_POLICY='__routing_policy__' +RESOURCE_TUNNEL_INTERFACE='__tunnel_interface__' class _Driver: diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index 0d85e8ff9668c5715dfc9d830027a5ae1faed9b5..d1b0f0c9184b6a1cda887ce24bde607c5b56d264 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -71,6 +71,7 @@ DRIVERS.append( # DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY, # DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532, # DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG, + # DeviceDriverEnum.DEVICEDRIVER_GNMI_NOKIA_SRLINUX, # ], #} ])) @@ -106,6 +107,17 @@ if LOAD_ALL_DEVICE_DRIVERS: } ])) +if LOAD_ALL_DEVICE_DRIVERS: + from .gnmi_nokia_srlinux.GnmiNokiaSrLinuxDriver import GnmiNokiaSrLinuxDriver # pylint: disable=wrong-import-position + DRIVERS.append( + (GnmiNokiaSrLinuxDriver, [ + { + # Real Packet Router, specifying gNMI Nokia SR Linux Driver => use GnmiNokiaSrLinuxDriver + FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.PACKET_ROUTER, + FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_GNMI_NOKIA_SRLINUX, + } + ])) + if LOAD_ALL_DEVICE_DRIVERS: from .transport_api.TransportApiDriver import TransportApiDriver # pylint: disable=wrong-import-position DRIVERS.append( diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/DeltaSampleCache.py b/src/device/service/drivers/gnmi_nokia_srlinux/DeltaSampleCache.py new file mode 100644 index 0000000000000000000000000000000000000000..5083082fe5694a95e95d95cd8ed72563d77dc098 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/DeltaSampleCache.py @@ -0,0 +1,35 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import copy +from typing import Any, Dict, Tuple, Union + +class DeltaSampleCache: + def __init__(self) -> None: + self._previous_samples : Dict[str, Tuple[float, Union[int, float]]] = dict() + + def get_delta(self, path : str, current_timestamp : float, current_value : Any) -> None: + previous_sample = copy.deepcopy(self._previous_samples.get(path)) + self._previous_samples[path] = current_timestamp, current_value + + if not isinstance(current_value, (int, float)): return None + if previous_sample is None: return current_timestamp, 0 + previous_timestamp, previous_value = previous_sample + if not isinstance(previous_value, (int, float)): return None + + delta_value = max(0, current_value - previous_value) + delay = current_timestamp - previous_timestamp + delta_sample = current_timestamp, delta_value / delay + + return delta_sample diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/GnmiNokiaSrLinuxDriver.py b/src/device/service/drivers/gnmi_nokia_srlinux/GnmiNokiaSrLinuxDriver.py new file mode 100644 index 0000000000000000000000000000000000000000..6819a433dd11f98bfd5db5439303eb2c9ee11fad --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/GnmiNokiaSrLinuxDriver.py @@ -0,0 +1,100 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, queue, threading +from typing import Any, Iterator, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.type_checkers.Checkers import chk_type +from device.service.driver_api._Driver import _Driver +from .GnmiSessionHandler import GnmiSessionHandler + +DRIVER_NAME = 'gnmi_nokiasrlinux' +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) + +class GnmiNokiaSrLinuxDriver(_Driver): + def __init__(self, address : str, port : int, **settings) -> None: + super().__init__(DRIVER_NAME, address, port, **settings) + self.__logger = logging.getLogger('{:s}:[{:s}:{:s}]'.format(str(__name__), str(self.address), str(self.port))) + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + self.__handler = GnmiSessionHandler(self.address, self.port, settings, self.__logger) + self.__out_samples = self.__handler.out_samples + + def Connect(self) -> bool: + with self.__lock: + if self.__started.is_set(): return True + self.__handler.connect() + self.__started.set() + return True + + def Disconnect(self) -> bool: + with self.__lock: + # Trigger termination of loops and processes + self.__terminate.set() + # If not started, assume it is already disconnected + if not self.__started.is_set(): return True + self.__handler.disconnect() + return True + + @metered_subclass_method(METRICS_POOL) + def GetInitialConfig(self) -> List[Tuple[str, Any]]: + with self.__lock: + return [] + + @metered_subclass_method(METRICS_POOL) + def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: + chk_type('resources', resource_keys, list) + with self.__lock: + return self.__handler.get(resource_keys) + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + with self.__lock: + return self.__handler.set(resources) + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + with self.__lock: + return self.__handler.delete(resources) + + @metered_subclass_method(METRICS_POOL) + def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + chk_type('subscriptions', subscriptions, list) + if len(subscriptions) == 0: return [] + with self.__lock: + return self.__handler.subscribe(subscriptions) + + @metered_subclass_method(METRICS_POOL) + def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + chk_type('subscriptions', subscriptions, list) + if len(subscriptions) == 0: return [] + with self.__lock: + return self.__handler.unsubscribe(subscriptions) + + def GetState(self, blocking=False, terminate : Optional[threading.Event] = None) -> Iterator[Tuple[str, Any]]: + while True: + if self.__terminate.is_set(): break + if terminate is not None and terminate.is_set(): break + try: + sample = self.__out_samples.get(block=blocking, timeout=0.1) + except queue.Empty: + if blocking: continue + return + if sample is None: continue + yield sample diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/GnmiSessionHandler.py b/src/device/service/drivers/gnmi_nokia_srlinux/GnmiSessionHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..3444b015b621a7d53f72c57d7901e5d38249be92 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/GnmiSessionHandler.py @@ -0,0 +1,358 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import copy,grpc,json, logging, queue, threading +from typing import Any, Dict, List, Optional, Tuple, Union +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.type_checkers.Checkers import chk_float, chk_length, chk_string, chk_type +from device.service.drivers.gnmi_nokia_srlinux.handlers.Tools import get_schema +from .gnmi.gnmi_pb2_grpc import gNMIStub +from .gnmi.gnmi_pb2 import Encoding, GetRequest, SetRequest, UpdateResult # pylint: disable=no-name-in-module +from .handlers import ALL_RESOURCE_KEYS, compose, get_path, parse +from .tools.Capabilities import get_supported_encodings +from .tools.Channel import get_grpc_channel +from .tools.Path import path_from_string, path_to_string #, compose_path +from .tools.Subscriptions import Subscriptions +from .tools.Value import decode_value #, value_exists +from .MonitoringThread import MonitoringThread + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + + +class GnmiSessionHandler: + def __init__(self, address : str, port : int, settings : Dict, logger : logging.Logger) -> None: + self._address = address + self._port = port + self._settings = copy.deepcopy(settings) + self._logger = logger + self._lock = threading.Lock() + self._connected = threading.Event() + self._username = settings.get('username') + self._password = settings.get('password') + self._use_tls = settings.get('use_tls', False) + self._channel : Optional[grpc.Channel] = None + self._stub : Optional[gNMIStub] = None + self._monit_thread = None + self._supported_encodings = None + self._subscriptions = Subscriptions() + self._in_subscriptions = queue.Queue() + self._out_samples = queue.Queue() + + @property + def subscriptions(self): return self._subscriptions + + @property + def in_subscriptions(self): return self._in_subscriptions + + @property + def out_samples(self): return self._out_samples + + def connect(self): + with self._lock: + self._channel = get_grpc_channel(self._address, self._port, self._use_tls, self._logger) + self._stub = gNMIStub(self._channel) + self._supported_encodings = get_supported_encodings( + self._stub, self._username, self._password, timeout=120) + self._monit_thread = MonitoringThread( + self._stub, self._logger, self._settings, self._in_subscriptions, self._out_samples) + self._monit_thread.start() + self._connected.set() + + def disconnect(self): + if not self._connected.is_set(): return + with self._lock: + self._monit_thread.stop() + self._monit_thread.join() + self._channel.close() + self._connected.clear() + + def get(self, resource_keys : List[str]) -> List[Tuple[str, Union[Any, None, Exception]]]: + if len(resource_keys) == 0: resource_keys = ALL_RESOURCE_KEYS + chk_type('resources', resource_keys, list) + + parsing_results = [] + map_paths_to_resource_keys : Dict[str, List[str]] = {} + + get_request = GetRequest() + get_request.type = GetRequest.DataType.ALL + get_request.encoding = Encoding.JSON_IETF + #get_request.use_models.add() # kept empty: return for all models supported + for i,resource_key in enumerate(resource_keys): + str_resource_name = 'resource_key[#{:d}]'.format(i) + try: + chk_string(str_resource_name, resource_key, allow_empty=False) + self._logger.debug('[GnmiSessionHandler:get] resource_key = {:s}'.format(str(resource_key))) + str_path = get_path(resource_key) + map_paths_to_resource_keys.setdefault(get_schema(str_path), list()).append(resource_key) + self._logger.debug('[GnmiSessionHandler:get] str_path = {:s}'.format(str(str_path))) + get_request.path.append(path_from_string(str_path)) + except Exception as e: # pylint: disable=broad-except + MSG = 'Exception parsing {:s}: {:s}' + self._logger.exception(MSG.format(str_resource_name, str(resource_key))) + parsing_results.append((resource_key, e)) # if validation fails, store the exception + + if len(parsing_results) > 0: + return parsing_results + + metadata = [('username', self._username), ('password', self._password)] + timeout = None # GNMI_SUBSCRIPTION_TIMEOUT = int(sampling_duration) + get_reply = self._stub.Get(get_request, metadata=metadata, timeout=timeout) + #self._logger.info('get_reply={:s}'.format(grpc_message_to_json_string(get_reply))) + + results = [] + #results[str_filter] = [i, None, False] # (index, value, processed?) + + for notification in get_reply.notification: + #for delete_path in notification.delete: + # self._logger.info('delete_path={:s}'.format(grpc_message_to_json_string(delete_path))) + # str_path = path_to_string(delete_path) + # resource_key_tuple = results.get(str_path) + # if resource_key_tuple is None: + # # pylint: disable=broad-exception-raised + # MSG = 'Unexpected Delete Path({:s}); requested resource_keys({:s})' + # raise Exception(MSG.format(str(str_path), str(resource_keys))) + # resource_key_tuple[2] = True + + for update in notification.update: + #self._logger.info('update.path={:s}'.format(grpc_message_to_json_string(update.path))) + str_path = path_to_string(update.path) + #self._logger.info('str_path is ={:s}'.format(str(str_path))) + #resource_key_tuple = results.get(str_path) + #if resource_key_tuple is None: + # # pylint: disable=broad-exception-raised + # MSG = 'Unexpected Update Path({:s}); requested resource_keys({:s})' + # raise Exception(MSG.format(str(str_path), str(resource_keys))) + try: + value = decode_value(update.val) + #self._logger.info('value is ={:s}'.format(str(value))) # uncomment to see decoded message from the device + #resource_key_tuple[1] = value + #resource_key_tuple[2] = True + #results.extend(parse(str_path, value)) + _str_path = '/{:s}'.format(list(value.keys())[0]) if str_path == '/' else str_path + _str_path = get_schema(_str_path) + resource_keys = map_paths_to_resource_keys.get(_str_path, list()) + self._logger.debug('[GnmiSessionHandler:get] _str_path is = {:s}'.format(_str_path)) + if len(resource_keys) == 0: + MSG = 'No resource_keys found for str_path({:s})/_str_path({:s}). map_paths_to_resource_keys={:s}' + self._logger.error(MSG.format(str(str_path), str(_str_path), str(map_paths_to_resource_keys))) + else: + MSG = 'resource_keys for str_path({:s})/_str_path({:s}): {:s}' + self._logger.info(MSG.format(str(str_path), str(_str_path), str(resource_keys))) + for resource_key in resource_keys: + results.extend(parse(resource_key, str_path, value)) + except Exception as e: # pylint: disable=broad-except + MSG = 'Exception processing notification {:s}' + self._logger.exception(MSG.format(grpc_message_to_json_string(notification))) + results.append((str_path, e)) # if validation fails, store the exception + + #_results = sorted(results.items(), key=lambda x: x[1][0]) + #results = list() + #for resource_key,resource_key_tuple in _results: + # _, value, processed = resource_key_tuple + # value = value if processed else Exception('Not Processed') + # results.append((resource_key, value)) + return results + + def set(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + #resource_keys = [key for key,_ in resources] + #current_values = self.get(resource_keys) + + #resource_tuples = { + # resource_key : [i, value, value_exists(value), None] + # for i,(resource_key,value) in enumerate(current_values) + #} + + #self._logger.info('---0') + #self._logger.info(str(resource_tuples)) + + set_request = SetRequest() + #for resource_key in resource_keys: + for resource_key, resource_value in resources: + self._logger.info('Resource from test script:') + self._logger.info(' resource_key = ' + str(resource_key)) + self._logger.info(' resource_value = ' + str(resource_value)) + + #resource_tuple = resource_tuples.get(resource_key) + #if resource_tuple is None: continue + #_, value, exists, operation_done = resource_tuple + if isinstance(resource_value, str): resource_value = json.loads(resource_value) + str_path, str_data = compose(resource_key, resource_value, delete=False) + + self._logger.info('Request being sent to device:') + self._logger.info(' path = ' + str(str_path)) + self._logger.info(' data = ' + str(str_data)) + + set_request_list = set_request.update #if exists else set_request.replace + set_request_entry = set_request_list.add() + set_request_entry.path.CopyFrom(path_from_string(str_path)) + set_request_entry.val.json_ietf_val = str_data.encode('UTF-8') + + + self._logger.info('set_request={:s}'.format(grpc_message_to_json_string(set_request))) + metadata = [('username', self._username), ('password', self._password)] + timeout = None # GNMI_SUBSCRIPTION_TIMEOUT = int(sampling_duration) + set_reply = self._stub.Set(set_request, metadata=metadata, timeout=timeout) + self._logger.info('set_reply={:s}'.format(grpc_message_to_json_string(set_reply))) + + results = [] + for (resource_key, resource_value), update_result in zip(resources, set_reply.response): + operation = update_result.op + if operation == UpdateResult.UPDATE: + results.append((resource_key, True)) + else: + results.append((resource_key, Exception('Unexpected'))) + + #str_path = path_to_string(update_result.path) + #resource_tuple = resource_tuples.get(str_path) + #if resource_tuple is None: continue + #resource_tuple[3] = operation + + #resource_tuples = sorted(resource_tuples.items(), key=lambda x: x[1][0]) + #results = list() + #for resource_key,resource_tuple in resource_tuples: + # _, _, exists, operation_done = resource_tuple + # desired_operation = 'update' if exists else 'replace' + # + # if operation_done == UpdateResult.INVALID: + # value = Exception('Invalid') + # elif operation_done == UpdateResult.DELETE: + # value = Exception('Unexpected Delete') + # elif operation_done == UpdateResult.REPLACE: + # value = True if desired_operation == 'replace' else Exception('Failed') + # elif operation_done == UpdateResult.UPDATE: + # value = True if desired_operation == 'update' else Exception('Failed') + # else: + # value = Exception('Unexpected') + # results.append((resource_key, value)) + return results + + def delete(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + #resource_keys = [key for key,_ in resources] + #current_values = self.get(resource_keys) + + #resource_tuples = { + # resource_key : [i, value, value_exists(value), None] + # for i,(resource_key,value) in enumerate(current_values) + #} + + #self._logger.info('---0') + #self._logger.info(str(resource_tuples)) + + set_request = SetRequest() + #for resource_key in resource_keys: + for resource_key, resource_value in resources: + self._logger.info('---1') + self._logger.info(str(resource_key)) + self._logger.info(str(resource_value)) + #resource_tuple = resource_tuples.get(resource_key) + #if resource_tuple is None: continue + #_, value, exists, operation_done = resource_tuple + #if not exists: continue + if isinstance(resource_value, str): resource_value = json.loads(resource_value) + str_path, str_data = compose(resource_key, resource_value, delete=True) + self._logger.info('---3') + self._logger.info(str(str_path)) + self._logger.info(str(str_data)) + set_request_entry = set_request.delete.add() + set_request_entry.CopyFrom(path_from_string(str_path)) + + self._logger.info('set_request={:s}'.format(grpc_message_to_json_string(set_request))) + metadata = [('username', self._username), ('password', self._password)] + timeout = None # GNMI_SUBSCRIPTION_TIMEOUT = int(sampling_duration) + set_reply = self._stub.Set(set_request, metadata=metadata, timeout=timeout) + self._logger.info('set_reply={:s}'.format(grpc_message_to_json_string(set_reply))) + + results = [] + for (resource_key, resource_value), update_result in zip(resources, set_reply.response): + operation = update_result.op + if operation == UpdateResult.DELETE: + results.append((resource_key, True)) + else: + results.append((resource_key, Exception('Unexpected'))) + + #str_path = path_to_string(update_result.path) + #resource_tuple = resource_tuples.get(str_path) + #if resource_tuple is None: continue + #resource_tuple[3] = operation + + #resource_tuples = sorted(resource_tuples.items(), key=lambda x: x[1][0]) + #results = list() + #for resource_key,resource_tuple in resource_tuples: + # _, _, exists, operation_done = resource_tuple + # if operation_done == UpdateResult.INVALID: + # value = Exception('Invalid') + # elif operation_done == UpdateResult.DELETE: + # value = True + # elif operation_done == UpdateResult.REPLACE: + # value = Exception('Unexpected Replace') + # elif operation_done == UpdateResult.UPDATE: + # value = Exception('Unexpected Update') + # else: + # value = Exception('Unexpected') + # results.append((resource_key, value)) + return results + + def subscribe(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + results = [] + for i,subscription in enumerate(subscriptions): + str_subscription_name = 'subscriptions[#{:d}]'.format(i) + try: + chk_type(str_subscription_name, subscription, (list, tuple)) + chk_length(str_subscription_name, subscription, min_length=3, max_length=3) + resource_key, sampling_duration, sampling_interval = subscription + chk_string(str_subscription_name + '.resource_key', resource_key, allow_empty=False) + chk_float(str_subscription_name + '.sampling_duration', sampling_duration, min_value=0) + chk_float(str_subscription_name + '.sampling_interval', sampling_interval, min_value=0) + except Exception as e: # pylint: disable=broad-except + MSG = 'Exception validating {:s}: {:s}' + self._logger.exception(MSG.format(str_subscription_name, str(resource_key))) + results.append(e) # if validation fails, store the exception + continue + + #resource_path = resource_key.split('/') + #self._subscriptions.add(resource_path, sampling_duration, sampling_interval, reference) + subscription = 'subscribe', resource_key, sampling_duration, sampling_interval + self._in_subscriptions.put_nowait(subscription) + results.append(True) + return results + + def unsubscribe(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + results = [] + for i,subscription in enumerate(subscriptions): + str_subscription_name = 'subscriptions[#{:d}]'.format(i) + try: + chk_type(str_subscription_name, subscription, (list, tuple)) + chk_length(str_subscription_name, subscription, min_length=3, max_length=3) + resource_key, sampling_duration, sampling_interval = subscription + chk_string(str_subscription_name + '.resource_key', resource_key, allow_empty=False) + chk_float(str_subscription_name + '.sampling_duration', sampling_duration, min_value=0) + chk_float(str_subscription_name + '.sampling_interval', sampling_interval, min_value=0) + except Exception as e: # pylint: disable=broad-except + MSG = 'Exception validating {:s}: {:s}' + self._logger.exception(MSG.format(str_subscription_name, str(resource_key))) + results.append(e) # if validation fails, store the exception + continue + + #resource_path = resource_key.split('/') + #reference = self._subscriptions.get(resource_path, sampling_duration, sampling_interval) + #if reference is None: + # results.append(False) + # continue + #self._subscriptions.delete(reference) + subscription = 'unsubscribe', resource_key, sampling_duration, sampling_interval + self._in_subscriptions.put_nowait(subscription) + results.append(True) + return results diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/MonitoringThread.py b/src/device/service/drivers/gnmi_nokia_srlinux/MonitoringThread.py new file mode 100644 index 0000000000000000000000000000000000000000..7cbd0da87d15b6fac0ea7f4a5de3c02259a07dc8 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/MonitoringThread.py @@ -0,0 +1,171 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Ref: https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md +# Ref: https://github.com/openconfig/gnmi/blob/master/proto/gnmi/gnmi.proto + +from __future__ import annotations +import grpc, logging, queue, re, threading +from collections.abc import Iterator +from datetime import datetime +from typing import Dict +from common.tools.grpc.Tools import grpc_message_to_json_string +from .gnmi.gnmi_pb2 import ( # pylint: disable=no-name-in-module + QOSMarking, SubscribeRequest, Subscription, SubscriptionList, SubscriptionMode +) +from .gnmi.gnmi_pb2_grpc import gNMIStub +from .tools.Path import path_from_string, path_to_string +from .DeltaSampleCache import DeltaSampleCache + + +LOGGER = logging.getLogger(__name__) + +# SubscriptionList Mode: Mode of the subscription. +# STREAM = 0: Values streamed by the target. gNMI Specification Section 3.5.1.5.2 +# ONCE = 1: Values sent once-off by the target. gNMI Specification Section 3.5.1.5.1 +# POLL = 2: Values sent in response to a poll request. gNMI Specification Section 3.5.1.5.3 +GNMI_SUBSCRIPTION_LIST_MODE = SubscriptionList.Mode.STREAM + +# Path Prefix: Prefix used for paths. +GNMI_PATH_PREFIX = None + +# QOS MArking: DSCP marking to be used. +GNMI_QOS_MARKING = None + +# Allow Aggregation: Whether elements of the schema that are marked as eligible for aggregation +# should be aggregated or not. +GNMI_ALLOW_AGGREGATION = False + +# Encoding: The encoding that the target should use within the Notifications generated +# corresponding to the SubscriptionList. +GNMI_ENCODING = 'JSON' + +#Subscription Mode: The mode of the subscription, specifying how the target must return values +# in a subscription. gNMI Specification Section 3.5.1.3 +# TARGET_DEFINED = 0: The target selects the relevant mode for each element. +# ON_CHANGE = 1: The target sends an update on element value change. +# SAMPLE = 2: The target samples values according to the interval. +GNMI_SUBSCRIPTION_MODE = SubscriptionMode.SAMPLE + +# Suppress Redundant: Indicates whether values that have not changed should be sent in a SAMPLE +# subscription. gNMI Specification Section 3.5.1.3 +GNMI_SUPPRESS_REDUNDANT = False + +# Heartbeat Interval: Specifies the maximum allowable silent period in nanoseconds when +# suppress_redundant is in use. The target should send a value at least once in the period +# specified. gNMI Specification Section 3.5.1.3 +GNMI_HEARTBEAT_INTERVAL = 10 # seconds + +GNMI_SUBSCRIPTION_TIMEOUT = None + +class MonitoringThread(threading.Thread): + def __init__( + self, stub : gNMIStub, logger : logging.Logger, settings : Dict, + in_subscriptions : queue.Queue, out_samples : queue.Queue + ) -> None: + super().__init__(daemon=True) + self._terminate = threading.Event() + self._stub = stub + self._logger = logger + self._username = settings.get('username') + self._password = settings.get('password') + self._in_subscriptions = in_subscriptions + self._out_samples = out_samples + self._response_iterator = None + self._delta_sample_cache = DeltaSampleCache() + + def stop(self) -> None: + self._terminate.set() + if self._response_iterator is not None: + self._response_iterator.cancel() + + def generate_requests(self) -> Iterator[SubscribeRequest]: + subscriptions = [] + while not self._terminate.is_set(): + try: + subscription = self._in_subscriptions.get(block=True, timeout=0.1) + operation, resource_key, sampling_duration, sampling_interval = subscription # pylint: disable=unused-variable + if operation != 'subscribe': continue # Unsubscribe not supported by gNM, needs to cancel entire connection + # options.timeout = int(sampling_duration) + #_path = parse_xpath(resource_key) + path = path_from_string(resource_key) + subscription = Subscription( + path=path, mode=GNMI_SUBSCRIPTION_MODE, suppress_redundant=GNMI_SUPPRESS_REDUNDANT, + sample_interval=int(sampling_interval * 1000000000), + heartbeat_interval=int(GNMI_HEARTBEAT_INTERVAL * 1000000000)) + subscriptions.append(subscription) + except queue.Empty: + if len(subscriptions) == 0: continue + #self._logger.warning('[generate_requests] process') + prefix = path_from_string(GNMI_PATH_PREFIX) if GNMI_PATH_PREFIX is not None else None + qos = QOSMarking(marking=GNMI_QOS_MARKING) if GNMI_QOS_MARKING is not None else None + subscriptions_list = SubscriptionList( + prefix=prefix, mode=GNMI_SUBSCRIPTION_LIST_MODE, allow_aggregation=GNMI_ALLOW_AGGREGATION, + encoding=GNMI_ENCODING, subscription=subscriptions, qos=qos) + subscribe_request = SubscribeRequest(subscribe=subscriptions_list) + #str_subscribe_request = grpc_message_to_json_string(subscribe_request) + #self._logger.warning('[generate_requests] subscribe_request={:s}'.format(str_subscribe_request)) + yield subscribe_request + subscriptions = [] + except: # pylint: disable=bare-except + self._logger.exception('[generate_requests] Unhandled Exception') + + def run(self) -> None: + # Add a dummy subscription to be used as keep-alive + # usable only with SRLinux native data models + #subscription = ('/system/name/host-name', None, 1) + #self._in_subscriptions.put_nowait(subscription) + + try: + request_iterator = self.generate_requests() + metadata = [('username', self._username), ('password', self._password)] + timeout = None # GNMI_SUBSCRIPTION_TIMEOUT = int(sampling_duration) + self._response_iterator = self._stub.Subscribe(request_iterator, metadata=metadata, timeout=timeout) + for subscribe_response in self._response_iterator: + str_subscribe_response = grpc_message_to_json_string(subscribe_response) + self._logger.warning('[run] subscribe_response={:s}'.format(str_subscribe_response)) + update = subscribe_response.update + timestamp_device = float(update.timestamp) / 1.e9 + timestamp_local = datetime.timestamp(datetime.utcnow()) + # if difference between timestamp from device and local is lower than 1 second + if abs(timestamp_device - timestamp_local) <= 1: + # assume clocks are synchronized, use timestamp from device + timestamp = timestamp_device + else: + # might be clocks are not synchronized, use local timestamp + timestamp = timestamp_local + for update_entry in update.update: + str_path = path_to_string(update_entry.path) + #if str_path != '/system/name/host-name': continue + #counter_name = update_entry.path[-1].name + value_type = update_entry.val.WhichOneof('value') + value = getattr(update_entry.val, value_type) + if re.match(r'^[0-9]+$', value) is not None: + value = int(value) + elif re.match(r'^[0-9]*\.[0-9]*$', value) is not None: + value = float(value) + else: + value = str(value) + delta_sample = self._delta_sample_cache.get_delta(str_path, timestamp, value) + if delta_sample is None: + sample = (timestamp, str_path, value) + else: + sample = (delta_sample[0], str_path, delta_sample[1]) + self._logger.warning('[run] sample={:s}'.format(str(sample))) + self._out_samples.put_nowait(sample) + except grpc.RpcError as e: + if e.code() != grpc.StatusCode.CANCELLED: raise # pylint: disable=no-member + if e.details() != 'Locally cancelled by application!': raise # pylint: disable=no-member + except: # pylint: disable=bare-except + self._logger.exception('Unhandled Exception') diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/__init__.py b/src/device/service/drivers/gnmi_nokia_srlinux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1549d9811aa5d1c193a44ad45d0d7773236c0612 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/Acknowledgement.txt b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/Acknowledgement.txt new file mode 100644 index 0000000000000000000000000000000000000000..a004e1f58bdea3ba78263a06e6e473f593e1b390 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/Acknowledgement.txt @@ -0,0 +1,25 @@ +This code is partially based on: +https://github.com/nokia/pygnmi/blob/master/gNMI_Subscribe.py + + +MIT License + +Copyright (c) 2017 Nokia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/__init__.py b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1549d9811aa5d1c193a44ad45d0d7773236c0612 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi.proto b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi.proto new file mode 100644 index 0000000000000000000000000000000000000000..292880a55586f5a5c05b0edcfc0f2f73baf7be13 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi.proto @@ -0,0 +1,501 @@ +syntax = "proto3"; + +import "google/protobuf/any.proto"; +import "google/protobuf/descriptor.proto"; +// import gnmi_ext.proto; + +// Package gNMI defines a service specification for the gRPC Network Management +// Interface. This interface is defined to be a standard interface via which +// a network management system ("client") can subscribe to state values, +// retrieve snapshots of state information, and manipulate the state of a data +// tree supported by a device ("target"). +// +// This document references the gNMI Specification which can be found at +// http://github.com/openconfig/reference/blob/master/rpc/gnmi +package gnmi; + +// Define a protobuf FileOption that defines the gNMI service version. +extend google.protobuf.FileOptions { + // The gNMI service semantic version. + string gnmi_service = 1001; +} + +// gNMI_service is the current version of the gNMI service, returned through +// the Capabilities RPC. +option (gnmi_service) = "0.8.0"; + +option go_package = "github.com/openconfig/gnmi/proto/gnmi"; +option java_multiple_files = true; +option java_outer_classname = "GnmiProto"; +option java_package = "com.github.gnmi.proto"; + + +service gNMI { + // Capabilities allows the client to retrieve the set of capabilities that + // is supported by the target. This allows the target to validate the + // service version that is implemented and retrieve the set of models that + // the target supports. The models can then be specified in subsequent RPCs + // to restrict the set of data that is utilized. + // Reference: gNMI Specification Section 3.2 + rpc Capabilities(CapabilityRequest) returns (CapabilityResponse); + // Retrieve a snapshot of data from the target. A Get RPC requests that the + // target snapshots a subset of the data tree as specified by the paths + // included in the message and serializes this to be returned to the + // client using the specified encoding. + // Reference: gNMI Specification Section 3.3 + rpc Get(GetRequest) returns (GetResponse); + // Set allows the client to modify the state of data on the target. The + // paths to modified along with the new values that the client wishes + // to set the value to. + // Reference: gNMI Specification Section 3.4 + rpc Set(SetRequest) returns (SetResponse); + // Subscribe allows a client to request the target to send it values + // of particular paths within the data tree. These values may be streamed + // at a particular cadence (STREAM), sent one off on a long-lived channel + // (POLL), or sent as a one-off retrieval (ONCE). + // Reference: gNMI Specification Section 3.5 + rpc Subscribe(stream SubscribeRequest) returns (stream SubscribeResponse); +} +// The Extension message contains a single gNMI extension. +message Extension { + oneof ext { + RegisteredExtension registered_ext = 1; // A registered extension. + // Well known extensions. + MasterArbitration master_arbitration = 2; // Master arbitration extension. + History history = 3; // History extension. + } +} + +// The RegisteredExtension message defines an extension which is defined outside +// of this file. +message RegisteredExtension { + ExtensionID id = 1; // The unique ID assigned to this extension. + bytes msg = 2; // The binary-marshalled protobuf extension payload. +} + +// RegisteredExtension is an enumeration acting as a registry for extensions +// defined by external sources. +enum ExtensionID { + EID_UNSET = 0; + // New extensions are to be defined within this enumeration - their definition + // MUST link to a reference describing their implementation. + + // An experimental extension that may be used during prototyping of a new + // extension. + EID_EXPERIMENTAL = 999; +} + +// MasterArbitration is used to select the master among multiple gNMI clients +// with the same Roles. The client with the largest election_id is honored as +// the master. +// The document about gNMI master arbitration can be found at +// https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-master-arbitration.md +message MasterArbitration { + Role role = 1; + Uint128 election_id = 2; +} + +// Representation of unsigned 128-bit integer. +message Uint128 { + uint64 high = 1; + uint64 low = 2; +} + +// There can be one master for each role. The role is identified by its id. +message Role { + string id = 1; + // More fields can be added if needed, for example, to specify what paths the + // role can read/write. +} + +// The History extension allows clients to request historical data. Its +// spec can be found at +// https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-history.md +message History { + oneof request { + int64 snapshot_time = 1; // Nanoseconds since the epoch + TimeRange range = 2; + } +} + +message TimeRange { + int64 start = 1; // Nanoseconds since the epoch + int64 end = 2; // Nanoseconds since the epoch +} +// Notification is a re-usable message that is used to encode data from the +// target to the client. A Notification carries two types of changes to the data +// tree: +// - Deleted values (delete) - a set of paths that have been removed from the +// data tree. +// - Updated values (update) - a set of path-value pairs indicating the path +// whose value has changed in the data tree. +// Reference: gNMI Specification Section 2.1 +message Notification { + int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. + Path prefix = 2; // Prefix used for paths in the message. + repeated Update update = 4; // Data elements that have changed values. + repeated Path delete = 5; // Data elements that have been deleted. + // This notification contains a set of paths that are always updated together + // referenced by a globally unique prefix. + bool atomic = 6; + // Reserved field numbers and identifiers. + reserved "alias"; + reserved 3; +} + +// Update is a re-usable message that is used to store a particular Path, +// Value pair. +// Reference: gNMI Specification Section 2.1 +message Update { + Path path = 1; // The path (key) for the update. + Value value = 2 [deprecated=true]; // The value (value) for the update. + TypedValue val = 3; // The explicitly typed update value. + uint32 duplicates = 4; // Number of coalesced duplicates. +} + +// TypedValue is used to encode a value being sent between the client and +// target (originated by either entity). +message TypedValue { + // One of the fields within the val oneof is populated with the value + // of the update. The type of the value being included in the Update + // determines which field should be populated. In the case that the + // encoding is a particular form of the base protobuf type, a specific + // field is used to store the value (e.g., json_val). + oneof value { + string string_val = 1; // String value. + int64 int_val = 2; // Integer value. + uint64 uint_val = 3; // Unsigned integer value. + bool bool_val = 4; // Bool value. + bytes bytes_val = 5; // Arbitrary byte sequence value. + float float_val = 6 [deprecated=true]; // Deprecated - use double_val. + double double_val = 14; // Floating point value. + Decimal64 decimal_val = 7 [deprecated=true]; // Deprecated - use double_val. + ScalarArray leaflist_val = 8; // Mixed type scalar array value. + google.protobuf.Any any_val = 9; // protobuf.Any encoded bytes. + bytes json_val = 10; // JSON-encoded text. + bytes json_ietf_val = 11; // JSON-encoded text per RFC7951. + string ascii_val = 12; // Arbitrary ASCII text. + // Protobuf binary encoded bytes. The message type is not included. + // See the specification at + // github.com/openconfig/reference/blob/master/rpc/gnmi/protobuf-vals.md + // for a complete specification. [Experimental] + bytes proto_bytes = 13; + } +} + +// Path encodes a data tree path as a series of repeated strings, with +// each element of the path representing a data tree node name and the +// associated attributes. +// Reference: gNMI Specification Section 2.2.2. +message Path { + // Elements of the path are no longer encoded as a string, but rather within + // the elem field as a PathElem message. + repeated string element = 1 [deprecated=true]; + string origin = 2; // Label to disambiguate path. + repeated PathElem elem = 3; // Elements of the path. + string target = 4; // The name of the target + // (Sec. 2.2.2.1) +} + +// PathElem encodes an element of a gNMI path, along with any attributes (keys) +// that may be associated with it. +// Reference: gNMI Specification Section 2.2.2. +message PathElem { + string name = 1; // The name of the element in the path. + map key = 2; // Map of key (attribute) name to value. +} + +// Value encodes a data tree node's value - along with the way in which +// the value is encoded. This message is deprecated by gNMI 0.3.0. +// Reference: gNMI Specification Section 2.2.3. +message Value { + option deprecated = true; + bytes value = 1; // Value of the variable being transmitted. + Encoding type = 2; // Encoding used for the value field. +} + +// Encoding defines the value encoding formats that are supported by the gNMI +// protocol. These encodings are used by both the client (when sending Set +// messages to modify the state of the target) and the target when serializing +// data to be returned to the client (in both Subscribe and Get RPCs). +// Reference: gNMI Specification Section 2.3 +enum Encoding { + JSON = 0; // JSON encoded text. + BYTES = 1; // Arbitrarily encoded bytes. + PROTO = 2; // Encoded according to scalar values of TypedValue. + ASCII = 3; // ASCII text of an out-of-band agreed format. + JSON_IETF = 4; // JSON encoded text as per RFC7951. +} + +// Error message previously utilised to return errors to the client. Deprecated +// in favour of using the google.golang.org/genproto/googleapis/rpc/status +// message in the RPC response. +// Reference: gNMI Specification Section 2.5 +message Error { + option deprecated = true; + uint32 code = 1; // Canonical gRPC error code. + string message = 2; // Human readable error. + google.protobuf.Any data = 3; // Optional additional information. +} + +// Decimal64 is used to encode a fixed precision decimal number. The value +// is expressed as a set of digits with the precision specifying the +// number of digits following the decimal point in the digit set. +// This message is deprecated in favor of encoding all floating point types +// as double precision. +message Decimal64 { + option deprecated = true; + int64 digits = 1; // Set of digits. + uint32 precision = 2; // Number of digits following the decimal point. +} + +// ScalarArray is used to encode a mixed-type array of values. +message ScalarArray { + // The set of elements within the array. Each TypedValue message should + // specify only elements that have a field identifier of 1-7 (i.e., the + // values are scalar values). + repeated TypedValue element = 1; +} + +// SubscribeRequest is the message sent by the client to the target when +// initiating a subscription to a set of paths within the data tree. The +// request field must be populated and the initial message must specify a +// SubscriptionList to initiate a subscription. +// Reference: gNMI Specification Section 3.5.1.1 +message SubscribeRequest { + oneof request { + SubscriptionList subscribe = 1; // Specify the paths within a subscription. + Poll poll = 3; // Trigger a polled update. + } + // Extension messages associated with the SubscribeRequest. See the + // gNMI extension specification for further definition. + repeated Extension extension = 5; + // Reserved field numbers and identifiers. + reserved 4; + reserved "aliases"; +} + +// Poll is sent within a SubscribeRequest to trigger the device to +// send telemetry updates for the paths that are associated with the +// subscription. +// Reference: gNMI Specification Section Section 3.5.1.4 +message Poll { +} + +// SubscribeResponse is the message used by the target within a Subscribe RPC. +// The target includes a Notification message which is used to transmit values +// of the path(s) that are associated with the subscription. The same message +// is to indicate that the target has sent all data values once (is +// synchronized). +// Reference: gNMI Specification Section 3.5.1.4 +message SubscribeResponse { + oneof response { + Notification update = 1; // Changed or sampled value for a path. + // Indicate target has sent all values associated with the subscription + // at least once. + bool sync_response = 3; + // Deprecated in favour of google.golang.org/genproto/googleapis/rpc/status + Error error = 4 [deprecated=true]; + } + // Extension messages associated with the SubscribeResponse. See the + // gNMI extension specification for further definition. + repeated Extension extension = 5; +} + +// SubscriptionList is used within a Subscribe message to specify the list of +// paths that the client wishes to subscribe to. The message consists of a +// list of (possibly prefixed) paths, and options that relate to the +// subscription. +// Reference: gNMI Specification Section 3.5.1.2 +message SubscriptionList { + Path prefix = 1; // Prefix used for paths. + repeated Subscription subscription = 2; // Set of subscriptions to create. + QOSMarking qos = 4; // DSCP marking to be used. + // Mode of the subscription. + enum Mode { + STREAM = 0; // Values streamed by the target (Sec. 3.5.1.5.2). + ONCE = 1; // Values sent once-off by the target (Sec. 3.5.1.5.1). + POLL = 2; // Values sent in response to a poll request (Sec. 3.5.1.5.3). + } + Mode mode = 5; + // Whether elements of the schema that are marked as eligible for aggregation + // should be aggregated or not. + bool allow_aggregation = 6; + // The set of schemas that define the elements of the data tree that should + // be sent by the target. + repeated ModelData use_models = 7; + // The encoding that the target should use within the Notifications generated + // corresponding to the SubscriptionList. + Encoding encoding = 8; + // An optional field to specify that only updates to current state should be + // sent to a client. If set, the initial state is not sent to the client but + // rather only the sync message followed by any subsequent updates to the + // current state. For ONCE and POLL modes, this causes the server to send only + // the sync message (Sec. 3.5.2.3). + bool updates_only = 9; + // Reserved field numbers and identifiers. + reserved 3; + reserved "use_aliases"; +} + +// Subscription is a single request within a SubscriptionList. The path +// specified is interpreted (along with the prefix) as the elements of the data +// tree that the client is subscribing to. The mode determines how the target +// should trigger updates to be sent. +// Reference: gNMI Specification Section 3.5.1.3 +message Subscription { + Path path = 1; // The data tree path. + SubscriptionMode mode = 2; // Subscription mode to be used. + uint64 sample_interval = 3; // ns between samples in SAMPLE mode. + // Indicates whether values that have not changed should be sent in a SAMPLE + // subscription. + bool suppress_redundant = 4; + // Specifies the maximum allowable silent period in nanoseconds when + // suppress_redundant is in use. The target should send a value at least once + // in the period specified. + uint64 heartbeat_interval = 5; +} + +// SubscriptionMode is the mode of the subscription, specifying how the +// target must return values in a subscription. +// Reference: gNMI Specification Section 3.5.1.3 +enum SubscriptionMode { + TARGET_DEFINED = 0; // The target selects the relevant mode for each element. + ON_CHANGE = 1; // The target sends an update on element value change. + SAMPLE = 2; // The target samples values according to the interval. +} + +// QOSMarking specifies the DSCP value to be set on transmitted telemetry +// updates from the target. +// Reference: gNMI Specification Section 3.5.1.2 +message QOSMarking { + uint32 marking = 1; +} + +// SetRequest is sent from a client to the target to update values in the data +// tree. Paths are either deleted by the client, or modified by means of being +// updated, or replaced. Where a replace is used, unspecified values are +// considered to be replaced, whereas when update is used the changes are +// considered to be incremental. The set of changes that are specified within +// a single SetRequest are considered to be a transaction. +// Reference: gNMI Specification Section 3.4.1 +message SetRequest { + Path prefix = 1; // Prefix used for paths in the message. + repeated Path delete = 2; // Paths to be deleted from the data tree. + repeated Update replace = 3; // Updates specifying elements to be replaced. + repeated Update update = 4; // Updates specifying elements to updated. + // Extension messages associated with the SetRequest. See the + // gNMI extension specification for further definition. + repeated Extension extension = 5; +} + +// SetResponse is the response to a SetRequest, sent from the target to the +// client. It reports the result of the modifications to the data tree that were +// specified by the client. Errors for this RPC should be reported using the +// https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto +// message in the RPC return. The gnmi.Error message can be used to add additional +// details where required. +// Reference: gNMI Specification Section 3.4.2 +message SetResponse { + Path prefix = 1; // Prefix used for paths. + // A set of responses specifying the result of the operations specified in + // the SetRequest. + repeated UpdateResult response = 2; + Error message = 3 [deprecated=true]; // The overall status of the transaction. + int64 timestamp = 4; // Timestamp of transaction (ns since epoch). + // Extension messages associated with the SetResponse. See the + // gNMI extension specification for further definition. + repeated Extension extension = 5; +} + +// UpdateResult is used within the SetResponse message to communicate the +// result of an operation specified within a SetRequest message. +// Reference: gNMI Specification Section 3.4.2 +message UpdateResult { + // The operation that was associated with the Path specified. + enum Operation { + INVALID = 0; + DELETE = 1; // The result relates to a delete of Path. + REPLACE = 2; // The result relates to a replace of Path. + UPDATE = 3; // The result relates to an update of Path. + } + // Deprecated timestamp for the UpdateResult, this field has been + // replaced by the timestamp within the SetResponse message, since + // all mutations effected by a set should be applied as a single + // transaction. + int64 timestamp = 1 [deprecated=true]; + Path path = 2; // Path associated with the update. + Error message = 3 [deprecated=true]; // Status of the update operation. + Operation op = 4; // Update operation type. +} + +// GetRequest is sent when a client initiates a Get RPC. It is used to specify +// the set of data elements for which the target should return a snapshot of +// data. The use_models field specifies the set of schema modules that are to +// be used by the target - where use_models is not specified then the target +// must use all schema models that it has. +// Reference: gNMI Specification Section 3.3.1 +message GetRequest { + Path prefix = 1; // Prefix used for paths. + repeated Path path = 2; // Paths requested by the client. + // Type of elements within the data tree. + enum DataType { + ALL = 0; // All data elements. + CONFIG = 1; // Config (rw) only elements. + STATE = 2; // State (ro) only elements. + // Data elements marked in the schema as operational. This refers to data + // elements whose value relates to the state of processes or interactions + // running on the device. + OPERATIONAL = 3; + } + DataType type = 3; // The type of data being requested. + Encoding encoding = 5; // Encoding to be used. + repeated ModelData use_models = 6; // The schema models to be used. + // Extension messages associated with the GetRequest. See the + // gNMI extension specification for further definition. + repeated Extension extension = 7; +} + +// GetResponse is used by the target to respond to a GetRequest from a client. +// The set of Notifications corresponds to the data values that are requested +// by the client in the GetRequest. +// Reference: gNMI Specification Section 3.3.2 +message GetResponse { + repeated Notification notification = 1; // Data values. + Error error = 2 [deprecated=true]; // Errors that occurred in the Get. + // Extension messages associated with the GetResponse. See the + // gNMI extension specification for further definition. + repeated Extension extension = 3; +} + +// CapabilityRequest is sent by the client in the Capabilities RPC to request +// that the target reports its capabilities. +// Reference: gNMI Specification Section 3.2.1 +message CapabilityRequest { + // Extension messages associated with the CapabilityRequest. See the + // gNMI extension specification for further definition. + repeated Extension extension = 1; +} + +// CapabilityResponse is used by the target to report its capabilities to the +// client within the Capabilities RPC. +// Reference: gNMI Specification Section 3.2.2 +message CapabilityResponse { + repeated ModelData supported_models = 1; // Supported schema models. + repeated Encoding supported_encodings = 2; // Supported encodings. + string gNMI_version = 3; // Supported gNMI version. + // Extension messages associated with the CapabilityResponse. See the + // gNMI extension specification for further definition. + repeated Extension extension = 4; +} + +// ModelData is used to describe a set of schema modules. It can be used in a +// CapabilityResponse where a target reports the set of modules that it +// supports, and within the SubscribeRequest and GetRequest messages to specify +// the set of models from which data tree elements should be reported. +// Reference: gNMI Specification Section 3.2.3 +message ModelData { + string name = 1; // Name of the model. + string organization = 2; // Organization publishing the model. + string version = 3; // Semantic version of the model. +} \ No newline at end of file diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_ext.proto b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_ext.proto new file mode 100644 index 0000000000000000000000000000000000000000..9960f12afa9d19a45b3d30fd127cb27586f02607 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_ext.proto @@ -0,0 +1,76 @@ +syntax = "proto3"; + +// Package gnmi_ext defines a set of extensions messages which can be optionally +// included with the request and response messages of gNMI RPCs. A set of +// well-known extensions are defined within this file, along with a registry for +// extensions defined outside of this package. +package gnmi_ext; + +option go_package = "github.com/openconfig/gnmi/proto/gnmi_ext"; + +// The Extension message contains a single gNMI extension. +message Extension { + oneof ext { + RegisteredExtension registered_ext = 1; // A registered extension. + // Well known extensions. + MasterArbitration master_arbitration = 2; // Master arbitration extension. + History history = 3; // History extension. + } +} + +// The RegisteredExtension message defines an extension which is defined outside +// of this file. +message RegisteredExtension { + ExtensionID id = 1; // The unique ID assigned to this extension. + bytes msg = 2; // The binary-marshalled protobuf extension payload. +} + +// RegisteredExtension is an enumeration acting as a registry for extensions +// defined by external sources. +enum ExtensionID { + EID_UNSET = 0; + // New extensions are to be defined within this enumeration - their definition + // MUST link to a reference describing their implementation. + + // An experimental extension that may be used during prototyping of a new + // extension. + EID_EXPERIMENTAL = 999; +} + +// MasterArbitration is used to select the master among multiple gNMI clients +// with the same Roles. The client with the largest election_id is honored as +// the master. +// The document about gNMI master arbitration can be found at +// https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-master-arbitration.md +message MasterArbitration { + Role role = 1; + Uint128 election_id = 2; +} + +// Representation of unsigned 128-bit integer. +message Uint128 { + uint64 high = 1; + uint64 low = 2; +} + +// There can be one master for each role. The role is identified by its id. +message Role { + string id = 1; + // More fields can be added if needed, for example, to specify what paths the + // role can read/write. +} + +// The History extension allows clients to request historical data. Its +// spec can be found at +// https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-history.md +message History { + oneof request { + int64 snapshot_time = 1; // Nanoseconds since the epoch + TimeRange range = 2; + } +} + +message TimeRange { + int64 start = 1; // Nanoseconds since the epoch + int64 end = 2; // Nanoseconds since the epoch +} \ No newline at end of file diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_pb2.py b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..af67f9a8ca1d4e01d1a95a0d86adbabe6d8e83ea --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_pb2.py @@ -0,0 +1,129 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: gnmi.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\ngnmi.proto\x12\x04gnmi\x1a\x19google/protobuf/any.proto\x1a google/protobuf/descriptor.proto\"\xa0\x01\n\tExtension\x12\x33\n\x0eregistered_ext\x18\x01 \x01(\x0b\x32\x19.gnmi.RegisteredExtensionH\x00\x12\x35\n\x12master_arbitration\x18\x02 \x01(\x0b\x32\x17.gnmi.MasterArbitrationH\x00\x12 \n\x07history\x18\x03 \x01(\x0b\x32\r.gnmi.HistoryH\x00\x42\x05\n\x03\x65xt\"A\n\x13RegisteredExtension\x12\x1d\n\x02id\x18\x01 \x01(\x0e\x32\x11.gnmi.ExtensionID\x12\x0b\n\x03msg\x18\x02 \x01(\x0c\"Q\n\x11MasterArbitration\x12\x18\n\x04role\x18\x01 \x01(\x0b\x32\n.gnmi.Role\x12\"\n\x0b\x65lection_id\x18\x02 \x01(\x0b\x32\r.gnmi.Uint128\"$\n\x07Uint128\x12\x0c\n\x04high\x18\x01 \x01(\x04\x12\x0b\n\x03low\x18\x02 \x01(\x04\"\x12\n\x04Role\x12\n\n\x02id\x18\x01 \x01(\t\"O\n\x07History\x12\x17\n\rsnapshot_time\x18\x01 \x01(\x03H\x00\x12 \n\x05range\x18\x02 \x01(\x0b\x32\x0f.gnmi.TimeRangeH\x00\x42\t\n\x07request\"\'\n\tTimeRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"\x94\x01\n\x0cNotification\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\x1a\n\x06prefix\x18\x02 \x01(\x0b\x32\n.gnmi.Path\x12\x1c\n\x06update\x18\x04 \x03(\x0b\x32\x0c.gnmi.Update\x12\x1a\n\x06\x64\x65lete\x18\x05 \x03(\x0b\x32\n.gnmi.Path\x12\x0e\n\x06\x61tomic\x18\x06 \x01(\x08J\x04\x08\x03\x10\x04R\x05\x61lias\"u\n\x06Update\x12\x18\n\x04path\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0b.gnmi.ValueB\x02\x18\x01\x12\x1d\n\x03val\x18\x03 \x01(\x0b\x32\x10.gnmi.TypedValue\x12\x12\n\nduplicates\x18\x04 \x01(\r\"\x83\x03\n\nTypedValue\x12\x14\n\nstring_val\x18\x01 \x01(\tH\x00\x12\x11\n\x07int_val\x18\x02 \x01(\x03H\x00\x12\x12\n\x08uint_val\x18\x03 \x01(\x04H\x00\x12\x12\n\x08\x62ool_val\x18\x04 \x01(\x08H\x00\x12\x13\n\tbytes_val\x18\x05 \x01(\x0cH\x00\x12\x17\n\tfloat_val\x18\x06 \x01(\x02\x42\x02\x18\x01H\x00\x12\x14\n\ndouble_val\x18\x0e \x01(\x01H\x00\x12*\n\x0b\x64\x65\x63imal_val\x18\x07 \x01(\x0b\x32\x0f.gnmi.Decimal64B\x02\x18\x01H\x00\x12)\n\x0cleaflist_val\x18\x08 \x01(\x0b\x32\x11.gnmi.ScalarArrayH\x00\x12\'\n\x07\x61ny_val\x18\t \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x12\n\x08json_val\x18\n \x01(\x0cH\x00\x12\x17\n\rjson_ietf_val\x18\x0b \x01(\x0cH\x00\x12\x13\n\tascii_val\x18\x0c \x01(\tH\x00\x12\x15\n\x0bproto_bytes\x18\r \x01(\x0cH\x00\x42\x07\n\x05value\"Y\n\x04Path\x12\x13\n\x07\x65lement\x18\x01 \x03(\tB\x02\x18\x01\x12\x0e\n\x06origin\x18\x02 \x01(\t\x12\x1c\n\x04\x65lem\x18\x03 \x03(\x0b\x32\x0e.gnmi.PathElem\x12\x0e\n\x06target\x18\x04 \x01(\t\"j\n\x08PathElem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x03key\x18\x02 \x03(\x0b\x32\x17.gnmi.PathElem.KeyEntry\x1a*\n\x08KeyEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"8\n\x05Value\x12\r\n\x05value\x18\x01 \x01(\x0c\x12\x1c\n\x04type\x18\x02 \x01(\x0e\x32\x0e.gnmi.Encoding:\x02\x18\x01\"N\n\x05\x45rror\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\"\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x18\x01\"2\n\tDecimal64\x12\x0e\n\x06\x64igits\x18\x01 \x01(\x03\x12\x11\n\tprecision\x18\x02 \x01(\r:\x02\x18\x01\"0\n\x0bScalarArray\x12!\n\x07\x65lement\x18\x01 \x03(\x0b\x32\x10.gnmi.TypedValue\"\x99\x01\n\x10SubscribeRequest\x12+\n\tsubscribe\x18\x01 \x01(\x0b\x32\x16.gnmi.SubscriptionListH\x00\x12\x1a\n\x04poll\x18\x03 \x01(\x0b\x32\n.gnmi.PollH\x00\x12\"\n\textension\x18\x05 \x03(\x0b\x32\x0f.gnmi.ExtensionB\t\n\x07requestJ\x04\x08\x04\x10\x05R\x07\x61liases\"\x06\n\x04Poll\"\xa4\x01\n\x11SubscribeResponse\x12$\n\x06update\x18\x01 \x01(\x0b\x32\x12.gnmi.NotificationH\x00\x12\x17\n\rsync_response\x18\x03 \x01(\x08H\x00\x12 \n\x05\x65rror\x18\x04 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01H\x00\x12\"\n\textension\x18\x05 \x03(\x0b\x32\x0f.gnmi.ExtensionB\n\n\x08response\"\xd5\x02\n\x10SubscriptionList\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12(\n\x0csubscription\x18\x02 \x03(\x0b\x32\x12.gnmi.Subscription\x12\x1d\n\x03qos\x18\x04 \x01(\x0b\x32\x10.gnmi.QOSMarking\x12)\n\x04mode\x18\x05 \x01(\x0e\x32\x1b.gnmi.SubscriptionList.Mode\x12\x19\n\x11\x61llow_aggregation\x18\x06 \x01(\x08\x12#\n\nuse_models\x18\x07 \x03(\x0b\x32\x0f.gnmi.ModelData\x12 \n\x08\x65ncoding\x18\x08 \x01(\x0e\x32\x0e.gnmi.Encoding\x12\x14\n\x0cupdates_only\x18\t \x01(\x08\"&\n\x04Mode\x12\n\n\x06STREAM\x10\x00\x12\x08\n\x04ONCE\x10\x01\x12\x08\n\x04POLL\x10\x02J\x04\x08\x03\x10\x04R\x0buse_aliases\"\x9f\x01\n\x0cSubscription\x12\x18\n\x04path\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12$\n\x04mode\x18\x02 \x01(\x0e\x32\x16.gnmi.SubscriptionMode\x12\x17\n\x0fsample_interval\x18\x03 \x01(\x04\x12\x1a\n\x12suppress_redundant\x18\x04 \x01(\x08\x12\x1a\n\x12heartbeat_interval\x18\x05 \x01(\x04\"\x1d\n\nQOSMarking\x12\x0f\n\x07marking\x18\x01 \x01(\r\"\xa5\x01\n\nSetRequest\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\x1a\n\x06\x64\x65lete\x18\x02 \x03(\x0b\x32\n.gnmi.Path\x12\x1d\n\x07replace\x18\x03 \x03(\x0b\x32\x0c.gnmi.Update\x12\x1c\n\x06update\x18\x04 \x03(\x0b\x32\x0c.gnmi.Update\x12\"\n\textension\x18\x05 \x03(\x0b\x32\x0f.gnmi.Extension\"\xa8\x01\n\x0bSetResponse\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12$\n\x08response\x18\x02 \x03(\x0b\x32\x12.gnmi.UpdateResult\x12 \n\x07message\x18\x03 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01\x12\x11\n\ttimestamp\x18\x04 \x01(\x03\x12\"\n\textension\x18\x05 \x03(\x0b\x32\x0f.gnmi.Extension\"\xca\x01\n\x0cUpdateResult\x12\x15\n\ttimestamp\x18\x01 \x01(\x03\x42\x02\x18\x01\x12\x18\n\x04path\x18\x02 \x01(\x0b\x32\n.gnmi.Path\x12 \n\x07message\x18\x03 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01\x12(\n\x02op\x18\x04 \x01(\x0e\x32\x1c.gnmi.UpdateResult.Operation\"=\n\tOperation\x12\x0b\n\x07INVALID\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x0b\n\x07REPLACE\x10\x02\x12\n\n\x06UPDATE\x10\x03\"\x93\x02\n\nGetRequest\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\x18\n\x04path\x18\x02 \x03(\x0b\x32\n.gnmi.Path\x12\'\n\x04type\x18\x03 \x01(\x0e\x32\x19.gnmi.GetRequest.DataType\x12 \n\x08\x65ncoding\x18\x05 \x01(\x0e\x32\x0e.gnmi.Encoding\x12#\n\nuse_models\x18\x06 \x03(\x0b\x32\x0f.gnmi.ModelData\x12\"\n\textension\x18\x07 \x03(\x0b\x32\x0f.gnmi.Extension\";\n\x08\x44\x61taType\x12\x07\n\x03\x41LL\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\t\n\x05STATE\x10\x02\x12\x0f\n\x0bOPERATIONAL\x10\x03\"{\n\x0bGetResponse\x12(\n\x0cnotification\x18\x01 \x03(\x0b\x32\x12.gnmi.Notification\x12\x1e\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01\x12\"\n\textension\x18\x03 \x03(\x0b\x32\x0f.gnmi.Extension\"7\n\x11\x43\x61pabilityRequest\x12\"\n\textension\x18\x01 \x03(\x0b\x32\x0f.gnmi.Extension\"\xa6\x01\n\x12\x43\x61pabilityResponse\x12)\n\x10supported_models\x18\x01 \x03(\x0b\x32\x0f.gnmi.ModelData\x12+\n\x13supported_encodings\x18\x02 \x03(\x0e\x32\x0e.gnmi.Encoding\x12\x14\n\x0cgNMI_version\x18\x03 \x01(\t\x12\"\n\textension\x18\x04 \x03(\x0b\x32\x0f.gnmi.Extension\"@\n\tModelData\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0corganization\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t*3\n\x0b\x45xtensionID\x12\r\n\tEID_UNSET\x10\x00\x12\x15\n\x10\x45ID_EXPERIMENTAL\x10\xe7\x07*D\n\x08\x45ncoding\x12\x08\n\x04JSON\x10\x00\x12\t\n\x05\x42YTES\x10\x01\x12\t\n\x05PROTO\x10\x02\x12\t\n\x05\x41SCII\x10\x03\x12\r\n\tJSON_IETF\x10\x04*A\n\x10SubscriptionMode\x12\x12\n\x0eTARGET_DEFINED\x10\x00\x12\r\n\tON_CHANGE\x10\x01\x12\n\n\x06SAMPLE\x10\x02\x32\xe3\x01\n\x04gNMI\x12\x41\n\x0c\x43\x61pabilities\x12\x17.gnmi.CapabilityRequest\x1a\x18.gnmi.CapabilityResponse\x12*\n\x03Get\x12\x10.gnmi.GetRequest\x1a\x11.gnmi.GetResponse\x12*\n\x03Set\x12\x10.gnmi.SetRequest\x1a\x11.gnmi.SetResponse\x12@\n\tSubscribe\x12\x16.gnmi.SubscribeRequest\x1a\x17.gnmi.SubscribeResponse(\x01\x30\x01:3\n\x0cgnmi_service\x12\x1c.google.protobuf.FileOptions\x18\xe9\x07 \x01(\tBS\n\x15\x63om.github.gnmi.protoB\tGnmiProtoP\x01Z%github.com/openconfig/gnmi/proto/gnmi\xca>\x05\x30.8.0b\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'gnmi_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(gnmi_service) + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\025com.github.gnmi.protoB\tGnmiProtoP\001Z%github.com/openconfig/gnmi/proto/gnmi\312>\0050.8.0' + _UPDATE.fields_by_name['value']._options = None + _UPDATE.fields_by_name['value']._serialized_options = b'\030\001' + _TYPEDVALUE.fields_by_name['float_val']._options = None + _TYPEDVALUE.fields_by_name['float_val']._serialized_options = b'\030\001' + _TYPEDVALUE.fields_by_name['decimal_val']._options = None + _TYPEDVALUE.fields_by_name['decimal_val']._serialized_options = b'\030\001' + _PATH.fields_by_name['element']._options = None + _PATH.fields_by_name['element']._serialized_options = b'\030\001' + _PATHELEM_KEYENTRY._options = None + _PATHELEM_KEYENTRY._serialized_options = b'8\001' + _VALUE._options = None + _VALUE._serialized_options = b'\030\001' + _ERROR._options = None + _ERROR._serialized_options = b'\030\001' + _DECIMAL64._options = None + _DECIMAL64._serialized_options = b'\030\001' + _SUBSCRIBERESPONSE.fields_by_name['error']._options = None + _SUBSCRIBERESPONSE.fields_by_name['error']._serialized_options = b'\030\001' + _SETRESPONSE.fields_by_name['message']._options = None + _SETRESPONSE.fields_by_name['message']._serialized_options = b'\030\001' + _UPDATERESULT.fields_by_name['timestamp']._options = None + _UPDATERESULT.fields_by_name['timestamp']._serialized_options = b'\030\001' + _UPDATERESULT.fields_by_name['message']._options = None + _UPDATERESULT.fields_by_name['message']._serialized_options = b'\030\001' + _GETRESPONSE.fields_by_name['error']._options = None + _GETRESPONSE.fields_by_name['error']._serialized_options = b'\030\001' + _EXTENSIONID._serialized_start=3780 + _EXTENSIONID._serialized_end=3831 + _ENCODING._serialized_start=3833 + _ENCODING._serialized_end=3901 + _SUBSCRIPTIONMODE._serialized_start=3903 + _SUBSCRIPTIONMODE._serialized_end=3968 + _EXTENSION._serialized_start=82 + _EXTENSION._serialized_end=242 + _REGISTEREDEXTENSION._serialized_start=244 + _REGISTEREDEXTENSION._serialized_end=309 + _MASTERARBITRATION._serialized_start=311 + _MASTERARBITRATION._serialized_end=392 + _UINT128._serialized_start=394 + _UINT128._serialized_end=430 + _ROLE._serialized_start=432 + _ROLE._serialized_end=450 + _HISTORY._serialized_start=452 + _HISTORY._serialized_end=531 + _TIMERANGE._serialized_start=533 + _TIMERANGE._serialized_end=572 + _NOTIFICATION._serialized_start=575 + _NOTIFICATION._serialized_end=723 + _UPDATE._serialized_start=725 + _UPDATE._serialized_end=842 + _TYPEDVALUE._serialized_start=845 + _TYPEDVALUE._serialized_end=1232 + _PATH._serialized_start=1234 + _PATH._serialized_end=1323 + _PATHELEM._serialized_start=1325 + _PATHELEM._serialized_end=1431 + _PATHELEM_KEYENTRY._serialized_start=1389 + _PATHELEM_KEYENTRY._serialized_end=1431 + _VALUE._serialized_start=1433 + _VALUE._serialized_end=1489 + _ERROR._serialized_start=1491 + _ERROR._serialized_end=1569 + _DECIMAL64._serialized_start=1571 + _DECIMAL64._serialized_end=1621 + _SCALARARRAY._serialized_start=1623 + _SCALARARRAY._serialized_end=1671 + _SUBSCRIBEREQUEST._serialized_start=1674 + _SUBSCRIBEREQUEST._serialized_end=1827 + _POLL._serialized_start=1829 + _POLL._serialized_end=1835 + _SUBSCRIBERESPONSE._serialized_start=1838 + _SUBSCRIBERESPONSE._serialized_end=2002 + _SUBSCRIPTIONLIST._serialized_start=2005 + _SUBSCRIPTIONLIST._serialized_end=2346 + _SUBSCRIPTIONLIST_MODE._serialized_start=2289 + _SUBSCRIPTIONLIST_MODE._serialized_end=2327 + _SUBSCRIPTION._serialized_start=2349 + _SUBSCRIPTION._serialized_end=2508 + _QOSMARKING._serialized_start=2510 + _QOSMARKING._serialized_end=2539 + _SETREQUEST._serialized_start=2542 + _SETREQUEST._serialized_end=2707 + _SETRESPONSE._serialized_start=2710 + _SETRESPONSE._serialized_end=2878 + _UPDATERESULT._serialized_start=2881 + _UPDATERESULT._serialized_end=3083 + _UPDATERESULT_OPERATION._serialized_start=3022 + _UPDATERESULT_OPERATION._serialized_end=3083 + _GETREQUEST._serialized_start=3086 + _GETREQUEST._serialized_end=3361 + _GETREQUEST_DATATYPE._serialized_start=3302 + _GETREQUEST_DATATYPE._serialized_end=3361 + _GETRESPONSE._serialized_start=3363 + _GETRESPONSE._serialized_end=3486 + _CAPABILITYREQUEST._serialized_start=3488 + _CAPABILITYREQUEST._serialized_end=3543 + _CAPABILITYRESPONSE._serialized_start=3546 + _CAPABILITYRESPONSE._serialized_end=3712 + _MODELDATA._serialized_start=3714 + _MODELDATA._serialized_end=3778 + _GNMI._serialized_start=3971 + _GNMI._serialized_end=4198 +# @@protoc_insertion_point(module_scope) diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_pb2.py.old b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_pb2.py.old new file mode 100644 index 0000000000000000000000000000000000000000..313674f8ce5be1586c63df02226570f5082544ba --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_pb2.py.old @@ -0,0 +1,2037 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: proto/gnmi/gnmi.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='proto/gnmi/gnmi.proto', + package='gnmi', + syntax='proto3', + serialized_pb=_b('\n\x15proto/gnmi/gnmi.proto\x12\x04gnmi\x1a\x19google/protobuf/any.proto\x1a google/protobuf/descriptor.proto\"\x86\x01\n\x0cNotification\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\x1a\n\x06prefix\x18\x02 \x01(\x0b\x32\n.gnmi.Path\x12\r\n\x05\x61lias\x18\x03 \x01(\t\x12\x1c\n\x06update\x18\x04 \x03(\x0b\x32\x0c.gnmi.Update\x12\x1a\n\x06\x64\x65lete\x18\x05 \x03(\x0b\x32\n.gnmi.Path\"u\n\x06Update\x12\x18\n\x04path\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0b.gnmi.ValueB\x02\x18\x01\x12\x1d\n\x03val\x18\x03 \x01(\x0b\x32\x10.gnmi.TypedValue\x12\x12\n\nduplicates\x18\x04 \x01(\r\"\xce\x02\n\nTypedValue\x12\x14\n\nstring_val\x18\x01 \x01(\tH\x00\x12\x11\n\x07int_val\x18\x02 \x01(\x03H\x00\x12\x12\n\x08uint_val\x18\x03 \x01(\x04H\x00\x12\x12\n\x08\x62ool_val\x18\x04 \x01(\x08H\x00\x12\x13\n\tbytes_val\x18\x05 \x01(\x0cH\x00\x12\x13\n\tfloat_val\x18\x06 \x01(\x02H\x00\x12&\n\x0b\x64\x65\x63imal_val\x18\x07 \x01(\x0b\x32\x0f.gnmi.Decimal64H\x00\x12)\n\x0cleaflist_val\x18\x08 \x01(\x0b\x32\x11.gnmi.ScalarArrayH\x00\x12\'\n\x07\x61ny_val\x18\t \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x12\n\x08json_val\x18\n \x01(\x0cH\x00\x12\x17\n\rjson_ietf_val\x18\x0b \x01(\x0cH\x00\x12\x13\n\tascii_val\x18\x0c \x01(\tH\x00\x42\x07\n\x05value\"Y\n\x04Path\x12\x13\n\x07\x65lement\x18\x01 \x03(\tB\x02\x18\x01\x12\x0e\n\x06origin\x18\x02 \x01(\t\x12\x1c\n\x04\x65lem\x18\x03 \x03(\x0b\x32\x0e.gnmi.PathElem\x12\x0e\n\x06target\x18\x04 \x01(\t\"j\n\x08PathElem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x03key\x18\x02 \x03(\x0b\x32\x17.gnmi.PathElem.KeyEntry\x1a*\n\x08KeyEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"8\n\x05Value\x12\r\n\x05value\x18\x01 \x01(\x0c\x12\x1c\n\x04type\x18\x02 \x01(\x0e\x32\x0e.gnmi.Encoding:\x02\x18\x01\"N\n\x05\x45rror\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\"\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x18\x01\".\n\tDecimal64\x12\x0e\n\x06\x64igits\x18\x01 \x01(\x04\x12\x11\n\tprecision\x18\x02 \x01(\r\"0\n\x0bScalarArray\x12!\n\x07\x65lement\x18\x01 \x03(\x0b\x32\x10.gnmi.TypedValue\"\x8a\x01\n\x10SubscribeRequest\x12+\n\tsubscribe\x18\x01 \x01(\x0b\x32\x16.gnmi.SubscriptionListH\x00\x12\x1a\n\x04poll\x18\x03 \x01(\x0b\x32\n.gnmi.PollH\x00\x12\"\n\x07\x61liases\x18\x04 \x01(\x0b\x32\x0f.gnmi.AliasListH\x00\x42\t\n\x07request\"\x06\n\x04Poll\"\x80\x01\n\x11SubscribeResponse\x12$\n\x06update\x18\x01 \x01(\x0b\x32\x12.gnmi.NotificationH\x00\x12\x17\n\rsync_response\x18\x03 \x01(\x08H\x00\x12 \n\x05\x65rror\x18\x04 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01H\x00\x42\n\n\x08response\"\xd7\x02\n\x10SubscriptionList\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12(\n\x0csubscription\x18\x02 \x03(\x0b\x32\x12.gnmi.Subscription\x12\x13\n\x0buse_aliases\x18\x03 \x01(\x08\x12\x1d\n\x03qos\x18\x04 \x01(\x0b\x32\x10.gnmi.QOSMarking\x12)\n\x04mode\x18\x05 \x01(\x0e\x32\x1b.gnmi.SubscriptionList.Mode\x12\x19\n\x11\x61llow_aggregation\x18\x06 \x01(\x08\x12#\n\nuse_models\x18\x07 \x03(\x0b\x32\x0f.gnmi.ModelData\x12 \n\x08\x65ncoding\x18\x08 \x01(\x0e\x32\x0e.gnmi.Encoding\x12\x14\n\x0cupdates_only\x18\t \x01(\x08\"&\n\x04Mode\x12\n\n\x06STREAM\x10\x00\x12\x08\n\x04ONCE\x10\x01\x12\x08\n\x04POLL\x10\x02\"\x9f\x01\n\x0cSubscription\x12\x18\n\x04path\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12$\n\x04mode\x18\x02 \x01(\x0e\x32\x16.gnmi.SubscriptionMode\x12\x17\n\x0fsample_interval\x18\x03 \x01(\x04\x12\x1a\n\x12suppress_redundant\x18\x04 \x01(\x08\x12\x1a\n\x12heartbeat_interval\x18\x05 \x01(\x04\"\x1d\n\nQOSMarking\x12\x0f\n\x07marking\x18\x01 \x01(\r\"0\n\x05\x41lias\x12\x18\n\x04path\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\r\n\x05\x61lias\x18\x02 \x01(\t\"\'\n\tAliasList\x12\x1a\n\x05\x61lias\x18\x01 \x03(\x0b\x32\x0b.gnmi.Alias\"\x81\x01\n\nSetRequest\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\x1a\n\x06\x64\x65lete\x18\x02 \x03(\x0b\x32\n.gnmi.Path\x12\x1d\n\x07replace\x18\x03 \x03(\x0b\x32\x0c.gnmi.Update\x12\x1c\n\x06update\x18\x04 \x03(\x0b\x32\x0c.gnmi.Update\"\x84\x01\n\x0bSetResponse\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12$\n\x08response\x18\x02 \x03(\x0b\x32\x12.gnmi.UpdateResult\x12 \n\x07message\x18\x03 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01\x12\x11\n\ttimestamp\x18\x04 \x01(\x03\"\xca\x01\n\x0cUpdateResult\x12\x15\n\ttimestamp\x18\x01 \x01(\x03\x42\x02\x18\x01\x12\x18\n\x04path\x18\x02 \x01(\x0b\x32\n.gnmi.Path\x12 \n\x07message\x18\x03 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01\x12(\n\x02op\x18\x04 \x01(\x0e\x32\x1c.gnmi.UpdateResult.Operation\"=\n\tOperation\x12\x0b\n\x07INVALID\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x0b\n\x07REPLACE\x10\x02\x12\n\n\x06UPDATE\x10\x03\"\xef\x01\n\nGetRequest\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\x18\n\x04path\x18\x02 \x03(\x0b\x32\n.gnmi.Path\x12\'\n\x04type\x18\x03 \x01(\x0e\x32\x19.gnmi.GetRequest.DataType\x12 \n\x08\x65ncoding\x18\x05 \x01(\x0e\x32\x0e.gnmi.Encoding\x12#\n\nuse_models\x18\x06 \x03(\x0b\x32\x0f.gnmi.ModelData\";\n\x08\x44\x61taType\x12\x07\n\x03\x41LL\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\t\n\x05STATE\x10\x02\x12\x0f\n\x0bOPERATIONAL\x10\x03\"W\n\x0bGetResponse\x12(\n\x0cnotification\x18\x01 \x03(\x0b\x32\x12.gnmi.Notification\x12\x1e\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01\"\x13\n\x11\x43\x61pabilityRequest\"\x82\x01\n\x12\x43\x61pabilityResponse\x12)\n\x10supported_models\x18\x01 \x03(\x0b\x32\x0f.gnmi.ModelData\x12+\n\x13supported_encodings\x18\x02 \x03(\x0e\x32\x0e.gnmi.Encoding\x12\x14\n\x0cgNMI_version\x18\x03 \x01(\t\"@\n\tModelData\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0corganization\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t*D\n\x08\x45ncoding\x12\x08\n\x04JSON\x10\x00\x12\t\n\x05\x42YTES\x10\x01\x12\t\n\x05PROTO\x10\x02\x12\t\n\x05\x41SCII\x10\x03\x12\r\n\tJSON_IETF\x10\x04*A\n\x10SubscriptionMode\x12\x12\n\x0eTARGET_DEFINED\x10\x00\x12\r\n\tON_CHANGE\x10\x01\x12\n\n\x06SAMPLE\x10\x02\x32\xe3\x01\n\x04gNMI\x12\x41\n\x0c\x43\x61pabilities\x12\x17.gnmi.CapabilityRequest\x1a\x18.gnmi.CapabilityResponse\x12*\n\x03Get\x12\x10.gnmi.GetRequest\x1a\x11.gnmi.GetResponse\x12*\n\x03Set\x12\x10.gnmi.SetRequest\x1a\x11.gnmi.SetResponse\x12@\n\tSubscribe\x12\x16.gnmi.SubscribeRequest\x1a\x17.gnmi.SubscribeResponse(\x01\x30\x01:3\n\x0cgnmi_service\x12\x1c.google.protobuf.FileOptions\x18\xe9\x07 \x01(\tB\x08\xca>\x05\x30.5.0b\x06proto3') + , + dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR,google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,]) + +_ENCODING = _descriptor.EnumDescriptor( + name='Encoding', + full_name='gnmi.Encoding', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='JSON', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BYTES', index=1, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PROTO', index=2, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ASCII', index=3, number=3, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='JSON_IETF', index=4, number=4, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=3053, + serialized_end=3121, +) +_sym_db.RegisterEnumDescriptor(_ENCODING) + +Encoding = enum_type_wrapper.EnumTypeWrapper(_ENCODING) +_SUBSCRIPTIONMODE = _descriptor.EnumDescriptor( + name='SubscriptionMode', + full_name='gnmi.SubscriptionMode', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='TARGET_DEFINED', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ON_CHANGE', index=1, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='SAMPLE', index=2, number=2, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=3123, + serialized_end=3188, +) +_sym_db.RegisterEnumDescriptor(_SUBSCRIPTIONMODE) + +SubscriptionMode = enum_type_wrapper.EnumTypeWrapper(_SUBSCRIPTIONMODE) +JSON = 0 +BYTES = 1 +PROTO = 2 +ASCII = 3 +JSON_IETF = 4 +TARGET_DEFINED = 0 +ON_CHANGE = 1 +SAMPLE = 2 + +GNMI_SERVICE_FIELD_NUMBER = 1001 +gnmi_service = _descriptor.FieldDescriptor( + name='gnmi_service', full_name='gnmi.gnmi_service', index=0, + number=1001, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=True, extension_scope=None, + options=None) + +_SUBSCRIPTIONLIST_MODE = _descriptor.EnumDescriptor( + name='Mode', + full_name='gnmi.SubscriptionList.Mode', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='STREAM', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='ONCE', index=1, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='POLL', index=2, number=2, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=1706, + serialized_end=1744, +) +_sym_db.RegisterEnumDescriptor(_SUBSCRIPTIONLIST_MODE) + +_UPDATERESULT_OPERATION = _descriptor.EnumDescriptor( + name='Operation', + full_name='gnmi.UpdateResult.Operation', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='INVALID', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='DELETE', index=1, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='REPLACE', index=2, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='UPDATE', index=3, number=3, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=2439, + serialized_end=2500, +) +_sym_db.RegisterEnumDescriptor(_UPDATERESULT_OPERATION) + +_GETREQUEST_DATATYPE = _descriptor.EnumDescriptor( + name='DataType', + full_name='gnmi.GetRequest.DataType', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='ALL', index=0, number=0, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='CONFIG', index=1, number=1, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='STATE', index=2, number=2, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='OPERATIONAL', index=3, number=3, + options=None, + type=None), + ], + containing_type=None, + options=None, + serialized_start=2683, + serialized_end=2742, +) +_sym_db.RegisterEnumDescriptor(_GETREQUEST_DATATYPE) + + +_NOTIFICATION = _descriptor.Descriptor( + name='Notification', + full_name='gnmi.Notification', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='timestamp', full_name='gnmi.Notification.timestamp', index=0, + number=1, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='prefix', full_name='gnmi.Notification.prefix', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='alias', full_name='gnmi.Notification.alias', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='update', full_name='gnmi.Notification.update', index=3, + number=4, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='delete', full_name='gnmi.Notification.delete', index=4, + number=5, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=93, + serialized_end=227, +) + + +_UPDATE = _descriptor.Descriptor( + name='Update', + full_name='gnmi.Update', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='path', full_name='gnmi.Update.path', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='gnmi.Update.value', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), + _descriptor.FieldDescriptor( + name='val', full_name='gnmi.Update.val', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='duplicates', full_name='gnmi.Update.duplicates', index=3, + number=4, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=229, + serialized_end=346, +) + + +_TYPEDVALUE = _descriptor.Descriptor( + name='TypedValue', + full_name='gnmi.TypedValue', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='string_val', full_name='gnmi.TypedValue.string_val', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='int_val', full_name='gnmi.TypedValue.int_val', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='uint_val', full_name='gnmi.TypedValue.uint_val', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='bool_val', full_name='gnmi.TypedValue.bool_val', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='bytes_val', full_name='gnmi.TypedValue.bytes_val', index=4, + number=5, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=_b(""), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='float_val', full_name='gnmi.TypedValue.float_val', index=5, + number=6, type=2, cpp_type=6, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='decimal_val', full_name='gnmi.TypedValue.decimal_val', index=6, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='leaflist_val', full_name='gnmi.TypedValue.leaflist_val', index=7, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='any_val', full_name='gnmi.TypedValue.any_val', index=8, + number=9, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='json_val', full_name='gnmi.TypedValue.json_val', index=9, + number=10, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=_b(""), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='json_ietf_val', full_name='gnmi.TypedValue.json_ietf_val', index=10, + number=11, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=_b(""), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='ascii_val', full_name='gnmi.TypedValue.ascii_val', index=11, + number=12, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='value', full_name='gnmi.TypedValue.value', + index=0, containing_type=None, fields=[]), + ], + serialized_start=349, + serialized_end=683, +) + + +_PATH = _descriptor.Descriptor( + name='Path', + full_name='gnmi.Path', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='element', full_name='gnmi.Path.element', index=0, + number=1, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), + _descriptor.FieldDescriptor( + name='origin', full_name='gnmi.Path.origin', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='elem', full_name='gnmi.Path.elem', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='target', full_name='gnmi.Path.target', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=685, + serialized_end=774, +) + + +_PATHELEM_KEYENTRY = _descriptor.Descriptor( + name='KeyEntry', + full_name='gnmi.PathElem.KeyEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='key', full_name='gnmi.PathElem.KeyEntry.key', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='value', full_name='gnmi.PathElem.KeyEntry.value', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=840, + serialized_end=882, +) + +_PATHELEM = _descriptor.Descriptor( + name='PathElem', + full_name='gnmi.PathElem', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='gnmi.PathElem.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='key', full_name='gnmi.PathElem.key', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[_PATHELEM_KEYENTRY, ], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=776, + serialized_end=882, +) + + +_VALUE = _descriptor.Descriptor( + name='Value', + full_name='gnmi.Value', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='value', full_name='gnmi.Value.value', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=_b(""), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='type', full_name='gnmi.Value.type', index=1, + number=2, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\030\001')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=884, + serialized_end=940, +) + + +_ERROR = _descriptor.Descriptor( + name='Error', + full_name='gnmi.Error', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='code', full_name='gnmi.Error.code', index=0, + number=1, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='message', full_name='gnmi.Error.message', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='data', full_name='gnmi.Error.data', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\030\001')), + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=942, + serialized_end=1020, +) + + +_DECIMAL64 = _descriptor.Descriptor( + name='Decimal64', + full_name='gnmi.Decimal64', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='digits', full_name='gnmi.Decimal64.digits', index=0, + number=1, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='precision', full_name='gnmi.Decimal64.precision', index=1, + number=2, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1022, + serialized_end=1068, +) + + +_SCALARARRAY = _descriptor.Descriptor( + name='ScalarArray', + full_name='gnmi.ScalarArray', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='element', full_name='gnmi.ScalarArray.element', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1070, + serialized_end=1118, +) + + +_SUBSCRIBEREQUEST = _descriptor.Descriptor( + name='SubscribeRequest', + full_name='gnmi.SubscribeRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='subscribe', full_name='gnmi.SubscribeRequest.subscribe', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='poll', full_name='gnmi.SubscribeRequest.poll', index=1, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='aliases', full_name='gnmi.SubscribeRequest.aliases', index=2, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='request', full_name='gnmi.SubscribeRequest.request', + index=0, containing_type=None, fields=[]), + ], + serialized_start=1121, + serialized_end=1259, +) + + +_POLL = _descriptor.Descriptor( + name='Poll', + full_name='gnmi.Poll', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1261, + serialized_end=1267, +) + + +_SUBSCRIBERESPONSE = _descriptor.Descriptor( + name='SubscribeResponse', + full_name='gnmi.SubscribeResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='update', full_name='gnmi.SubscribeResponse.update', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='sync_response', full_name='gnmi.SubscribeResponse.sync_response', index=1, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='error', full_name='gnmi.SubscribeResponse.error', index=2, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='response', full_name='gnmi.SubscribeResponse.response', + index=0, containing_type=None, fields=[]), + ], + serialized_start=1270, + serialized_end=1398, +) + + +_SUBSCRIPTIONLIST = _descriptor.Descriptor( + name='SubscriptionList', + full_name='gnmi.SubscriptionList', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='prefix', full_name='gnmi.SubscriptionList.prefix', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='subscription', full_name='gnmi.SubscriptionList.subscription', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='use_aliases', full_name='gnmi.SubscriptionList.use_aliases', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='qos', full_name='gnmi.SubscriptionList.qos', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='mode', full_name='gnmi.SubscriptionList.mode', index=4, + number=5, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='allow_aggregation', full_name='gnmi.SubscriptionList.allow_aggregation', index=5, + number=6, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='use_models', full_name='gnmi.SubscriptionList.use_models', index=6, + number=7, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='encoding', full_name='gnmi.SubscriptionList.encoding', index=7, + number=8, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='updates_only', full_name='gnmi.SubscriptionList.updates_only', index=8, + number=9, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _SUBSCRIPTIONLIST_MODE, + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1401, + serialized_end=1744, +) + + +_SUBSCRIPTION = _descriptor.Descriptor( + name='Subscription', + full_name='gnmi.Subscription', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='path', full_name='gnmi.Subscription.path', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='mode', full_name='gnmi.Subscription.mode', index=1, + number=2, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='sample_interval', full_name='gnmi.Subscription.sample_interval', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='suppress_redundant', full_name='gnmi.Subscription.suppress_redundant', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='heartbeat_interval', full_name='gnmi.Subscription.heartbeat_interval', index=4, + number=5, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1747, + serialized_end=1906, +) + + +_QOSMARKING = _descriptor.Descriptor( + name='QOSMarking', + full_name='gnmi.QOSMarking', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='marking', full_name='gnmi.QOSMarking.marking', index=0, + number=1, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1908, + serialized_end=1937, +) + + +_ALIAS = _descriptor.Descriptor( + name='Alias', + full_name='gnmi.Alias', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='path', full_name='gnmi.Alias.path', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='alias', full_name='gnmi.Alias.alias', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1939, + serialized_end=1987, +) + + +_ALIASLIST = _descriptor.Descriptor( + name='AliasList', + full_name='gnmi.AliasList', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='alias', full_name='gnmi.AliasList.alias', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1989, + serialized_end=2028, +) + + +_SETREQUEST = _descriptor.Descriptor( + name='SetRequest', + full_name='gnmi.SetRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='prefix', full_name='gnmi.SetRequest.prefix', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='delete', full_name='gnmi.SetRequest.delete', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='replace', full_name='gnmi.SetRequest.replace', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='update', full_name='gnmi.SetRequest.update', index=3, + number=4, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2031, + serialized_end=2160, +) + + +_SETRESPONSE = _descriptor.Descriptor( + name='SetResponse', + full_name='gnmi.SetResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='prefix', full_name='gnmi.SetResponse.prefix', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='response', full_name='gnmi.SetResponse.response', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='message', full_name='gnmi.SetResponse.message', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), + _descriptor.FieldDescriptor( + name='timestamp', full_name='gnmi.SetResponse.timestamp', index=3, + number=4, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2163, + serialized_end=2295, +) + + +_UPDATERESULT = _descriptor.Descriptor( + name='UpdateResult', + full_name='gnmi.UpdateResult', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='timestamp', full_name='gnmi.UpdateResult.timestamp', index=0, + number=1, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), + _descriptor.FieldDescriptor( + name='path', full_name='gnmi.UpdateResult.path', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='message', full_name='gnmi.UpdateResult.message', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), + _descriptor.FieldDescriptor( + name='op', full_name='gnmi.UpdateResult.op', index=3, + number=4, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _UPDATERESULT_OPERATION, + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2298, + serialized_end=2500, +) + + +_GETREQUEST = _descriptor.Descriptor( + name='GetRequest', + full_name='gnmi.GetRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='prefix', full_name='gnmi.GetRequest.prefix', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='path', full_name='gnmi.GetRequest.path', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='type', full_name='gnmi.GetRequest.type', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='encoding', full_name='gnmi.GetRequest.encoding', index=3, + number=5, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='use_models', full_name='gnmi.GetRequest.use_models', index=4, + number=6, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _GETREQUEST_DATATYPE, + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2503, + serialized_end=2742, +) + + +_GETRESPONSE = _descriptor.Descriptor( + name='GetResponse', + full_name='gnmi.GetResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='notification', full_name='gnmi.GetResponse.notification', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='error', full_name='gnmi.GetResponse.error', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2744, + serialized_end=2831, +) + + +_CAPABILITYREQUEST = _descriptor.Descriptor( + name='CapabilityRequest', + full_name='gnmi.CapabilityRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2833, + serialized_end=2852, +) + + +_CAPABILITYRESPONSE = _descriptor.Descriptor( + name='CapabilityResponse', + full_name='gnmi.CapabilityResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='supported_models', full_name='gnmi.CapabilityResponse.supported_models', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='supported_encodings', full_name='gnmi.CapabilityResponse.supported_encodings', index=1, + number=2, type=14, cpp_type=8, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='gNMI_version', full_name='gnmi.CapabilityResponse.gNMI_version', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2855, + serialized_end=2985, +) + + +_MODELDATA = _descriptor.Descriptor( + name='ModelData', + full_name='gnmi.ModelData', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='gnmi.ModelData.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='organization', full_name='gnmi.ModelData.organization', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='version', full_name='gnmi.ModelData.version', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=2987, + serialized_end=3051, +) + +_NOTIFICATION.fields_by_name['prefix'].message_type = _PATH +_NOTIFICATION.fields_by_name['update'].message_type = _UPDATE +_NOTIFICATION.fields_by_name['delete'].message_type = _PATH +_UPDATE.fields_by_name['path'].message_type = _PATH +_UPDATE.fields_by_name['value'].message_type = _VALUE +_UPDATE.fields_by_name['val'].message_type = _TYPEDVALUE +_TYPEDVALUE.fields_by_name['decimal_val'].message_type = _DECIMAL64 +_TYPEDVALUE.fields_by_name['leaflist_val'].message_type = _SCALARARRAY +_TYPEDVALUE.fields_by_name['any_val'].message_type = google_dot_protobuf_dot_any__pb2._ANY +_TYPEDVALUE.oneofs_by_name['value'].fields.append( + _TYPEDVALUE.fields_by_name['string_val']) +_TYPEDVALUE.fields_by_name['string_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] +_TYPEDVALUE.oneofs_by_name['value'].fields.append( + _TYPEDVALUE.fields_by_name['int_val']) +_TYPEDVALUE.fields_by_name['int_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] +_TYPEDVALUE.oneofs_by_name['value'].fields.append( + _TYPEDVALUE.fields_by_name['uint_val']) +_TYPEDVALUE.fields_by_name['uint_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] +_TYPEDVALUE.oneofs_by_name['value'].fields.append( + _TYPEDVALUE.fields_by_name['bool_val']) +_TYPEDVALUE.fields_by_name['bool_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] +_TYPEDVALUE.oneofs_by_name['value'].fields.append( + _TYPEDVALUE.fields_by_name['bytes_val']) +_TYPEDVALUE.fields_by_name['bytes_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] +_TYPEDVALUE.oneofs_by_name['value'].fields.append( + _TYPEDVALUE.fields_by_name['float_val']) +_TYPEDVALUE.fields_by_name['float_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] +_TYPEDVALUE.oneofs_by_name['value'].fields.append( + _TYPEDVALUE.fields_by_name['decimal_val']) +_TYPEDVALUE.fields_by_name['decimal_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] +_TYPEDVALUE.oneofs_by_name['value'].fields.append( + _TYPEDVALUE.fields_by_name['leaflist_val']) +_TYPEDVALUE.fields_by_name['leaflist_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] +_TYPEDVALUE.oneofs_by_name['value'].fields.append( + _TYPEDVALUE.fields_by_name['any_val']) +_TYPEDVALUE.fields_by_name['any_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] +_TYPEDVALUE.oneofs_by_name['value'].fields.append( + _TYPEDVALUE.fields_by_name['json_val']) +_TYPEDVALUE.fields_by_name['json_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] +_TYPEDVALUE.oneofs_by_name['value'].fields.append( + _TYPEDVALUE.fields_by_name['json_ietf_val']) +_TYPEDVALUE.fields_by_name['json_ietf_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] +_TYPEDVALUE.oneofs_by_name['value'].fields.append( + _TYPEDVALUE.fields_by_name['ascii_val']) +_TYPEDVALUE.fields_by_name['ascii_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] +_PATH.fields_by_name['elem'].message_type = _PATHELEM +_PATHELEM_KEYENTRY.containing_type = _PATHELEM +_PATHELEM.fields_by_name['key'].message_type = _PATHELEM_KEYENTRY +_VALUE.fields_by_name['type'].enum_type = _ENCODING +_ERROR.fields_by_name['data'].message_type = google_dot_protobuf_dot_any__pb2._ANY +_SCALARARRAY.fields_by_name['element'].message_type = _TYPEDVALUE +_SUBSCRIBEREQUEST.fields_by_name['subscribe'].message_type = _SUBSCRIPTIONLIST +_SUBSCRIBEREQUEST.fields_by_name['poll'].message_type = _POLL +_SUBSCRIBEREQUEST.fields_by_name['aliases'].message_type = _ALIASLIST +_SUBSCRIBEREQUEST.oneofs_by_name['request'].fields.append( + _SUBSCRIBEREQUEST.fields_by_name['subscribe']) +_SUBSCRIBEREQUEST.fields_by_name['subscribe'].containing_oneof = _SUBSCRIBEREQUEST.oneofs_by_name['request'] +_SUBSCRIBEREQUEST.oneofs_by_name['request'].fields.append( + _SUBSCRIBEREQUEST.fields_by_name['poll']) +_SUBSCRIBEREQUEST.fields_by_name['poll'].containing_oneof = _SUBSCRIBEREQUEST.oneofs_by_name['request'] +_SUBSCRIBEREQUEST.oneofs_by_name['request'].fields.append( + _SUBSCRIBEREQUEST.fields_by_name['aliases']) +_SUBSCRIBEREQUEST.fields_by_name['aliases'].containing_oneof = _SUBSCRIBEREQUEST.oneofs_by_name['request'] +_SUBSCRIBERESPONSE.fields_by_name['update'].message_type = _NOTIFICATION +_SUBSCRIBERESPONSE.fields_by_name['error'].message_type = _ERROR +_SUBSCRIBERESPONSE.oneofs_by_name['response'].fields.append( + _SUBSCRIBERESPONSE.fields_by_name['update']) +_SUBSCRIBERESPONSE.fields_by_name['update'].containing_oneof = _SUBSCRIBERESPONSE.oneofs_by_name['response'] +_SUBSCRIBERESPONSE.oneofs_by_name['response'].fields.append( + _SUBSCRIBERESPONSE.fields_by_name['sync_response']) +_SUBSCRIBERESPONSE.fields_by_name['sync_response'].containing_oneof = _SUBSCRIBERESPONSE.oneofs_by_name['response'] +_SUBSCRIBERESPONSE.oneofs_by_name['response'].fields.append( + _SUBSCRIBERESPONSE.fields_by_name['error']) +_SUBSCRIBERESPONSE.fields_by_name['error'].containing_oneof = _SUBSCRIBERESPONSE.oneofs_by_name['response'] +_SUBSCRIPTIONLIST.fields_by_name['prefix'].message_type = _PATH +_SUBSCRIPTIONLIST.fields_by_name['subscription'].message_type = _SUBSCRIPTION +_SUBSCRIPTIONLIST.fields_by_name['qos'].message_type = _QOSMARKING +_SUBSCRIPTIONLIST.fields_by_name['mode'].enum_type = _SUBSCRIPTIONLIST_MODE +_SUBSCRIPTIONLIST.fields_by_name['use_models'].message_type = _MODELDATA +_SUBSCRIPTIONLIST.fields_by_name['encoding'].enum_type = _ENCODING +_SUBSCRIPTIONLIST_MODE.containing_type = _SUBSCRIPTIONLIST +_SUBSCRIPTION.fields_by_name['path'].message_type = _PATH +_SUBSCRIPTION.fields_by_name['mode'].enum_type = _SUBSCRIPTIONMODE +_ALIAS.fields_by_name['path'].message_type = _PATH +_ALIASLIST.fields_by_name['alias'].message_type = _ALIAS +_SETREQUEST.fields_by_name['prefix'].message_type = _PATH +_SETREQUEST.fields_by_name['delete'].message_type = _PATH +_SETREQUEST.fields_by_name['replace'].message_type = _UPDATE +_SETREQUEST.fields_by_name['update'].message_type = _UPDATE +_SETRESPONSE.fields_by_name['prefix'].message_type = _PATH +_SETRESPONSE.fields_by_name['response'].message_type = _UPDATERESULT +_SETRESPONSE.fields_by_name['message'].message_type = _ERROR +_UPDATERESULT.fields_by_name['path'].message_type = _PATH +_UPDATERESULT.fields_by_name['message'].message_type = _ERROR +_UPDATERESULT.fields_by_name['op'].enum_type = _UPDATERESULT_OPERATION +_UPDATERESULT_OPERATION.containing_type = _UPDATERESULT +_GETREQUEST.fields_by_name['prefix'].message_type = _PATH +_GETREQUEST.fields_by_name['path'].message_type = _PATH +_GETREQUEST.fields_by_name['type'].enum_type = _GETREQUEST_DATATYPE +_GETREQUEST.fields_by_name['encoding'].enum_type = _ENCODING +_GETREQUEST.fields_by_name['use_models'].message_type = _MODELDATA +_GETREQUEST_DATATYPE.containing_type = _GETREQUEST +_GETRESPONSE.fields_by_name['notification'].message_type = _NOTIFICATION +_GETRESPONSE.fields_by_name['error'].message_type = _ERROR +_CAPABILITYRESPONSE.fields_by_name['supported_models'].message_type = _MODELDATA +_CAPABILITYRESPONSE.fields_by_name['supported_encodings'].enum_type = _ENCODING +DESCRIPTOR.message_types_by_name['Notification'] = _NOTIFICATION +DESCRIPTOR.message_types_by_name['Update'] = _UPDATE +DESCRIPTOR.message_types_by_name['TypedValue'] = _TYPEDVALUE +DESCRIPTOR.message_types_by_name['Path'] = _PATH +DESCRIPTOR.message_types_by_name['PathElem'] = _PATHELEM +DESCRIPTOR.message_types_by_name['Value'] = _VALUE +DESCRIPTOR.message_types_by_name['Error'] = _ERROR +DESCRIPTOR.message_types_by_name['Decimal64'] = _DECIMAL64 +DESCRIPTOR.message_types_by_name['ScalarArray'] = _SCALARARRAY +DESCRIPTOR.message_types_by_name['SubscribeRequest'] = _SUBSCRIBEREQUEST +DESCRIPTOR.message_types_by_name['Poll'] = _POLL +DESCRIPTOR.message_types_by_name['SubscribeResponse'] = _SUBSCRIBERESPONSE +DESCRIPTOR.message_types_by_name['SubscriptionList'] = _SUBSCRIPTIONLIST +DESCRIPTOR.message_types_by_name['Subscription'] = _SUBSCRIPTION +DESCRIPTOR.message_types_by_name['QOSMarking'] = _QOSMARKING +DESCRIPTOR.message_types_by_name['Alias'] = _ALIAS +DESCRIPTOR.message_types_by_name['AliasList'] = _ALIASLIST +DESCRIPTOR.message_types_by_name['SetRequest'] = _SETREQUEST +DESCRIPTOR.message_types_by_name['SetResponse'] = _SETRESPONSE +DESCRIPTOR.message_types_by_name['UpdateResult'] = _UPDATERESULT +DESCRIPTOR.message_types_by_name['GetRequest'] = _GETREQUEST +DESCRIPTOR.message_types_by_name['GetResponse'] = _GETRESPONSE +DESCRIPTOR.message_types_by_name['CapabilityRequest'] = _CAPABILITYREQUEST +DESCRIPTOR.message_types_by_name['CapabilityResponse'] = _CAPABILITYRESPONSE +DESCRIPTOR.message_types_by_name['ModelData'] = _MODELDATA +DESCRIPTOR.enum_types_by_name['Encoding'] = _ENCODING +DESCRIPTOR.enum_types_by_name['SubscriptionMode'] = _SUBSCRIPTIONMODE +DESCRIPTOR.extensions_by_name['gnmi_service'] = gnmi_service +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Notification = _reflection.GeneratedProtocolMessageType('Notification', (_message.Message,), dict( + DESCRIPTOR = _NOTIFICATION, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.Notification) + )) +_sym_db.RegisterMessage(Notification) + +Update = _reflection.GeneratedProtocolMessageType('Update', (_message.Message,), dict( + DESCRIPTOR = _UPDATE, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.Update) + )) +_sym_db.RegisterMessage(Update) + +TypedValue = _reflection.GeneratedProtocolMessageType('TypedValue', (_message.Message,), dict( + DESCRIPTOR = _TYPEDVALUE, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.TypedValue) + )) +_sym_db.RegisterMessage(TypedValue) + +Path = _reflection.GeneratedProtocolMessageType('Path', (_message.Message,), dict( + DESCRIPTOR = _PATH, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.Path) + )) +_sym_db.RegisterMessage(Path) + +PathElem = _reflection.GeneratedProtocolMessageType('PathElem', (_message.Message,), dict( + + KeyEntry = _reflection.GeneratedProtocolMessageType('KeyEntry', (_message.Message,), dict( + DESCRIPTOR = _PATHELEM_KEYENTRY, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.PathElem.KeyEntry) + )) + , + DESCRIPTOR = _PATHELEM, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.PathElem) + )) +_sym_db.RegisterMessage(PathElem) +_sym_db.RegisterMessage(PathElem.KeyEntry) + +Value = _reflection.GeneratedProtocolMessageType('Value', (_message.Message,), dict( + DESCRIPTOR = _VALUE, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.Value) + )) +_sym_db.RegisterMessage(Value) + +Error = _reflection.GeneratedProtocolMessageType('Error', (_message.Message,), dict( + DESCRIPTOR = _ERROR, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.Error) + )) +_sym_db.RegisterMessage(Error) + +Decimal64 = _reflection.GeneratedProtocolMessageType('Decimal64', (_message.Message,), dict( + DESCRIPTOR = _DECIMAL64, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.Decimal64) + )) +_sym_db.RegisterMessage(Decimal64) + +ScalarArray = _reflection.GeneratedProtocolMessageType('ScalarArray', (_message.Message,), dict( + DESCRIPTOR = _SCALARARRAY, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.ScalarArray) + )) +_sym_db.RegisterMessage(ScalarArray) + +SubscribeRequest = _reflection.GeneratedProtocolMessageType('SubscribeRequest', (_message.Message,), dict( + DESCRIPTOR = _SUBSCRIBEREQUEST, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.SubscribeRequest) + )) +_sym_db.RegisterMessage(SubscribeRequest) + +Poll = _reflection.GeneratedProtocolMessageType('Poll', (_message.Message,), dict( + DESCRIPTOR = _POLL, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.Poll) + )) +_sym_db.RegisterMessage(Poll) + +SubscribeResponse = _reflection.GeneratedProtocolMessageType('SubscribeResponse', (_message.Message,), dict( + DESCRIPTOR = _SUBSCRIBERESPONSE, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.SubscribeResponse) + )) +_sym_db.RegisterMessage(SubscribeResponse) + +SubscriptionList = _reflection.GeneratedProtocolMessageType('SubscriptionList', (_message.Message,), dict( + DESCRIPTOR = _SUBSCRIPTIONLIST, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.SubscriptionList) + )) +_sym_db.RegisterMessage(SubscriptionList) + +Subscription = _reflection.GeneratedProtocolMessageType('Subscription', (_message.Message,), dict( + DESCRIPTOR = _SUBSCRIPTION, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.Subscription) + )) +_sym_db.RegisterMessage(Subscription) + +QOSMarking = _reflection.GeneratedProtocolMessageType('QOSMarking', (_message.Message,), dict( + DESCRIPTOR = _QOSMARKING, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.QOSMarking) + )) +_sym_db.RegisterMessage(QOSMarking) + +Alias = _reflection.GeneratedProtocolMessageType('Alias', (_message.Message,), dict( + DESCRIPTOR = _ALIAS, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.Alias) + )) +_sym_db.RegisterMessage(Alias) + +AliasList = _reflection.GeneratedProtocolMessageType('AliasList', (_message.Message,), dict( + DESCRIPTOR = _ALIASLIST, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.AliasList) + )) +_sym_db.RegisterMessage(AliasList) + +SetRequest = _reflection.GeneratedProtocolMessageType('SetRequest', (_message.Message,), dict( + DESCRIPTOR = _SETREQUEST, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.SetRequest) + )) +_sym_db.RegisterMessage(SetRequest) + +SetResponse = _reflection.GeneratedProtocolMessageType('SetResponse', (_message.Message,), dict( + DESCRIPTOR = _SETRESPONSE, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.SetResponse) + )) +_sym_db.RegisterMessage(SetResponse) + +UpdateResult = _reflection.GeneratedProtocolMessageType('UpdateResult', (_message.Message,), dict( + DESCRIPTOR = _UPDATERESULT, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.UpdateResult) + )) +_sym_db.RegisterMessage(UpdateResult) + +GetRequest = _reflection.GeneratedProtocolMessageType('GetRequest', (_message.Message,), dict( + DESCRIPTOR = _GETREQUEST, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.GetRequest) + )) +_sym_db.RegisterMessage(GetRequest) + +GetResponse = _reflection.GeneratedProtocolMessageType('GetResponse', (_message.Message,), dict( + DESCRIPTOR = _GETRESPONSE, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.GetResponse) + )) +_sym_db.RegisterMessage(GetResponse) + +CapabilityRequest = _reflection.GeneratedProtocolMessageType('CapabilityRequest', (_message.Message,), dict( + DESCRIPTOR = _CAPABILITYREQUEST, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.CapabilityRequest) + )) +_sym_db.RegisterMessage(CapabilityRequest) + +CapabilityResponse = _reflection.GeneratedProtocolMessageType('CapabilityResponse', (_message.Message,), dict( + DESCRIPTOR = _CAPABILITYRESPONSE, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.CapabilityResponse) + )) +_sym_db.RegisterMessage(CapabilityResponse) + +ModelData = _reflection.GeneratedProtocolMessageType('ModelData', (_message.Message,), dict( + DESCRIPTOR = _MODELDATA, + __module__ = 'proto.gnmi.gnmi_pb2' + # @@protoc_insertion_point(class_scope:gnmi.ModelData) + )) +_sym_db.RegisterMessage(ModelData) + +google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(gnmi_service) + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\312>\0050.5.0')) +_UPDATE.fields_by_name['value'].has_options = True +_UPDATE.fields_by_name['value']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) +_PATH.fields_by_name['element'].has_options = True +_PATH.fields_by_name['element']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) +_PATHELEM_KEYENTRY.has_options = True +_PATHELEM_KEYENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) +_VALUE.has_options = True +_VALUE._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\030\001')) +_ERROR.has_options = True +_ERROR._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\030\001')) +_SUBSCRIBERESPONSE.fields_by_name['error'].has_options = True +_SUBSCRIBERESPONSE.fields_by_name['error']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) +_SETRESPONSE.fields_by_name['message'].has_options = True +_SETRESPONSE.fields_by_name['message']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) +_UPDATERESULT.fields_by_name['timestamp'].has_options = True +_UPDATERESULT.fields_by_name['timestamp']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) +_UPDATERESULT.fields_by_name['message'].has_options = True +_UPDATERESULT.fields_by_name['message']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) +_GETRESPONSE.fields_by_name['error'].has_options = True +_GETRESPONSE.fields_by_name['error']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) +try: + # THESE ELEMENTS WILL BE DEPRECATED. + # Please use the generated *_pb2_grpc.py files instead. + import grpc + from grpc.beta import implementations as beta_implementations + from grpc.beta import interfaces as beta_interfaces + from grpc.framework.common import cardinality + from grpc.framework.interfaces.face import utilities as face_utilities + + + class gNMIStub(object): + # missing associated documentation comment in .proto file + pass + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Capabilities = channel.unary_unary( + '/gnmi.gNMI/Capabilities', + request_serializer=CapabilityRequest.SerializeToString, + response_deserializer=CapabilityResponse.FromString, + ) + self.Get = channel.unary_unary( + '/gnmi.gNMI/Get', + request_serializer=GetRequest.SerializeToString, + response_deserializer=GetResponse.FromString, + ) + self.Set = channel.unary_unary( + '/gnmi.gNMI/Set', + request_serializer=SetRequest.SerializeToString, + response_deserializer=SetResponse.FromString, + ) + self.Subscribe = channel.stream_stream( + '/gnmi.gNMI/Subscribe', + request_serializer=SubscribeRequest.SerializeToString, + response_deserializer=SubscribeResponse.FromString, + ) + + + class gNMIServicer(object): + # missing associated documentation comment in .proto file + pass + + def Capabilities(self, request, context): + """Capabilities allows the client to retrieve the set of capabilities that + is supported by the target. This allows the target to validate the + service version that is implemented and retrieve the set of models that + the target supports. The models can then be specified in subsequent RPCs + to restrict the set of data that is utilized. + Reference: gNMI Specification Section 3.2 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Get(self, request, context): + """Retrieve a snapshot of data from the target. A Get RPC requests that the + target snapshots a subset of the data tree as specified by the paths + included in the message and serializes this to be returned to the + client using the specified encoding. + Reference: gNMI Specification Section 3.3 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Set(self, request, context): + """Set allows the client to modify the state of data on the target. The + paths to modified along with the new values that the client wishes + to set the value to. + Reference: gNMI Specification Section 3.4 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Subscribe(self, request_iterator, context): + """Subscribe allows a client to request the target to send it values + of particular paths within the data tree. These values may be streamed + at a particular cadence (STREAM), sent one off on a long-lived channel + (POLL), or sent as a one-off retrieval (ONCE). + Reference: gNMI Specification Section 3.5 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + + def add_gNMIServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Capabilities': grpc.unary_unary_rpc_method_handler( + servicer.Capabilities, + request_deserializer=CapabilityRequest.FromString, + response_serializer=CapabilityResponse.SerializeToString, + ), + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=GetRequest.FromString, + response_serializer=GetResponse.SerializeToString, + ), + 'Set': grpc.unary_unary_rpc_method_handler( + servicer.Set, + request_deserializer=SetRequest.FromString, + response_serializer=SetResponse.SerializeToString, + ), + 'Subscribe': grpc.stream_stream_rpc_method_handler( + servicer.Subscribe, + request_deserializer=SubscribeRequest.FromString, + response_serializer=SubscribeResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'gnmi.gNMI', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + class BetagNMIServicer(object): + """The Beta API is deprecated for 0.15.0 and later. + + It is recommended to use the GA API (classes and functions in this + file not marked beta) for all further purposes. This class was generated + only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" + # missing associated documentation comment in .proto file + pass + def Capabilities(self, request, context): + """Capabilities allows the client to retrieve the set of capabilities that + is supported by the target. This allows the target to validate the + service version that is implemented and retrieve the set of models that + the target supports. The models can then be specified in subsequent RPCs + to restrict the set of data that is utilized. + Reference: gNMI Specification Section 3.2 + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def Get(self, request, context): + """Retrieve a snapshot of data from the target. A Get RPC requests that the + target snapshots a subset of the data tree as specified by the paths + included in the message and serializes this to be returned to the + client using the specified encoding. + Reference: gNMI Specification Section 3.3 + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def Set(self, request, context): + """Set allows the client to modify the state of data on the target. The + paths to modified along with the new values that the client wishes + to set the value to. + Reference: gNMI Specification Section 3.4 + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + def Subscribe(self, request_iterator, context): + """Subscribe allows a client to request the target to send it values + of particular paths within the data tree. These values may be streamed + at a particular cadence (STREAM), sent one off on a long-lived channel + (POLL), or sent as a one-off retrieval (ONCE). + Reference: gNMI Specification Section 3.5 + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + + class BetagNMIStub(object): + """The Beta API is deprecated for 0.15.0 and later. + + It is recommended to use the GA API (classes and functions in this + file not marked beta) for all further purposes. This class was generated + only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0.""" + # missing associated documentation comment in .proto file + pass + def Capabilities(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Capabilities allows the client to retrieve the set of capabilities that + is supported by the target. This allows the target to validate the + service version that is implemented and retrieve the set of models that + the target supports. The models can then be specified in subsequent RPCs + to restrict the set of data that is utilized. + Reference: gNMI Specification Section 3.2 + """ + raise NotImplementedError() + Capabilities.future = None + def Get(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Retrieve a snapshot of data from the target. A Get RPC requests that the + target snapshots a subset of the data tree as specified by the paths + included in the message and serializes this to be returned to the + client using the specified encoding. + Reference: gNMI Specification Section 3.3 + """ + raise NotImplementedError() + Get.future = None + def Set(self, request, timeout, metadata=None, with_call=False, protocol_options=None): + """Set allows the client to modify the state of data on the target. The + paths to modified along with the new values that the client wishes + to set the value to. + Reference: gNMI Specification Section 3.4 + """ + raise NotImplementedError() + Set.future = None + def Subscribe(self, request_iterator, timeout, metadata=None, with_call=False, protocol_options=None): + """Subscribe allows a client to request the target to send it values + of particular paths within the data tree. These values may be streamed + at a particular cadence (STREAM), sent one off on a long-lived channel + (POLL), or sent as a one-off retrieval (ONCE). + Reference: gNMI Specification Section 3.5 + """ + raise NotImplementedError() + + + def beta_create_gNMI_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): + """The Beta API is deprecated for 0.15.0 and later. + + It is recommended to use the GA API (classes and functions in this + file not marked beta) for all further purposes. This function was + generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" + request_deserializers = { + ('gnmi.gNMI', 'Capabilities'): CapabilityRequest.FromString, + ('gnmi.gNMI', 'Get'): GetRequest.FromString, + ('gnmi.gNMI', 'Set'): SetRequest.FromString, + ('gnmi.gNMI', 'Subscribe'): SubscribeRequest.FromString, + } + response_serializers = { + ('gnmi.gNMI', 'Capabilities'): CapabilityResponse.SerializeToString, + ('gnmi.gNMI', 'Get'): GetResponse.SerializeToString, + ('gnmi.gNMI', 'Set'): SetResponse.SerializeToString, + ('gnmi.gNMI', 'Subscribe'): SubscribeResponse.SerializeToString, + } + method_implementations = { + ('gnmi.gNMI', 'Capabilities'): face_utilities.unary_unary_inline(servicer.Capabilities), + ('gnmi.gNMI', 'Get'): face_utilities.unary_unary_inline(servicer.Get), + ('gnmi.gNMI', 'Set'): face_utilities.unary_unary_inline(servicer.Set), + ('gnmi.gNMI', 'Subscribe'): face_utilities.stream_stream_inline(servicer.Subscribe), + } + server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) + return beta_implementations.server(method_implementations, options=server_options) + + + def beta_create_gNMI_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): + """The Beta API is deprecated for 0.15.0 and later. + + It is recommended to use the GA API (classes and functions in this + file not marked beta) for all further purposes. This function was + generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0""" + request_serializers = { + ('gnmi.gNMI', 'Capabilities'): CapabilityRequest.SerializeToString, + ('gnmi.gNMI', 'Get'): GetRequest.SerializeToString, + ('gnmi.gNMI', 'Set'): SetRequest.SerializeToString, + ('gnmi.gNMI', 'Subscribe'): SubscribeRequest.SerializeToString, + } + response_deserializers = { + ('gnmi.gNMI', 'Capabilities'): CapabilityResponse.FromString, + ('gnmi.gNMI', 'Get'): GetResponse.FromString, + ('gnmi.gNMI', 'Set'): SetResponse.FromString, + ('gnmi.gNMI', 'Subscribe'): SubscribeResponse.FromString, + } + cardinalities = { + 'Capabilities': cardinality.Cardinality.UNARY_UNARY, + 'Get': cardinality.Cardinality.UNARY_UNARY, + 'Set': cardinality.Cardinality.UNARY_UNARY, + 'Subscribe': cardinality.Cardinality.STREAM_STREAM, + } + stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) + return beta_implementations.dynamic_stub(channel, 'gnmi.gNMI', cardinalities, options=stub_options) +except ImportError: + pass +# @@protoc_insertion_point(module_scope) diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_pb2.pyi b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_pb2.pyi new file mode 100644 index 0000000000000000000000000000000000000000..423bcfb90e1a603c2ebcdc29092569c7695db2d0 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_pb2.pyi @@ -0,0 +1,380 @@ +from google.protobuf import any_pb2 as _any_pb2 +from google.protobuf import descriptor_pb2 as _descriptor_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +ASCII: Encoding +BYTES: Encoding +DESCRIPTOR: _descriptor.FileDescriptor +EID_EXPERIMENTAL: ExtensionID +EID_UNSET: ExtensionID +GNMI_SERVICE_FIELD_NUMBER: _ClassVar[int] +JSON: Encoding +JSON_IETF: Encoding +ON_CHANGE: SubscriptionMode +PROTO: Encoding +SAMPLE: SubscriptionMode +TARGET_DEFINED: SubscriptionMode +gnmi_service: _descriptor.FieldDescriptor + +class CapabilityRequest(_message.Message): + __slots__ = ["extension"] + EXTENSION_FIELD_NUMBER: _ClassVar[int] + extension: _containers.RepeatedCompositeFieldContainer[Extension] + def __init__(self, extension: _Optional[_Iterable[_Union[Extension, _Mapping]]] = ...) -> None: ... + +class CapabilityResponse(_message.Message): + __slots__ = ["extension", "gNMI_version", "supported_encodings", "supported_models"] + EXTENSION_FIELD_NUMBER: _ClassVar[int] + GNMI_VERSION_FIELD_NUMBER: _ClassVar[int] + SUPPORTED_ENCODINGS_FIELD_NUMBER: _ClassVar[int] + SUPPORTED_MODELS_FIELD_NUMBER: _ClassVar[int] + extension: _containers.RepeatedCompositeFieldContainer[Extension] + gNMI_version: str + supported_encodings: _containers.RepeatedScalarFieldContainer[Encoding] + supported_models: _containers.RepeatedCompositeFieldContainer[ModelData] + def __init__(self, supported_models: _Optional[_Iterable[_Union[ModelData, _Mapping]]] = ..., supported_encodings: _Optional[_Iterable[_Union[Encoding, str]]] = ..., gNMI_version: _Optional[str] = ..., extension: _Optional[_Iterable[_Union[Extension, _Mapping]]] = ...) -> None: ... + +class Decimal64(_message.Message): + __slots__ = ["digits", "precision"] + DIGITS_FIELD_NUMBER: _ClassVar[int] + PRECISION_FIELD_NUMBER: _ClassVar[int] + digits: int + precision: int + def __init__(self, digits: _Optional[int] = ..., precision: _Optional[int] = ...) -> None: ... + +class Error(_message.Message): + __slots__ = ["code", "data", "message"] + CODE_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + code: int + data: _any_pb2.Any + message: str + def __init__(self, code: _Optional[int] = ..., message: _Optional[str] = ..., data: _Optional[_Union[_any_pb2.Any, _Mapping]] = ...) -> None: ... + +class Extension(_message.Message): + __slots__ = ["history", "master_arbitration", "registered_ext"] + HISTORY_FIELD_NUMBER: _ClassVar[int] + MASTER_ARBITRATION_FIELD_NUMBER: _ClassVar[int] + REGISTERED_EXT_FIELD_NUMBER: _ClassVar[int] + history: History + master_arbitration: MasterArbitration + registered_ext: RegisteredExtension + def __init__(self, registered_ext: _Optional[_Union[RegisteredExtension, _Mapping]] = ..., master_arbitration: _Optional[_Union[MasterArbitration, _Mapping]] = ..., history: _Optional[_Union[History, _Mapping]] = ...) -> None: ... + +class GetRequest(_message.Message): + __slots__ = ["encoding", "extension", "path", "prefix", "type", "use_models"] + class DataType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ALL: GetRequest.DataType + CONFIG: GetRequest.DataType + ENCODING_FIELD_NUMBER: _ClassVar[int] + EXTENSION_FIELD_NUMBER: _ClassVar[int] + OPERATIONAL: GetRequest.DataType + PATH_FIELD_NUMBER: _ClassVar[int] + PREFIX_FIELD_NUMBER: _ClassVar[int] + STATE: GetRequest.DataType + TYPE_FIELD_NUMBER: _ClassVar[int] + USE_MODELS_FIELD_NUMBER: _ClassVar[int] + encoding: Encoding + extension: _containers.RepeatedCompositeFieldContainer[Extension] + path: _containers.RepeatedCompositeFieldContainer[Path] + prefix: Path + type: GetRequest.DataType + use_models: _containers.RepeatedCompositeFieldContainer[ModelData] + def __init__(self, prefix: _Optional[_Union[Path, _Mapping]] = ..., path: _Optional[_Iterable[_Union[Path, _Mapping]]] = ..., type: _Optional[_Union[GetRequest.DataType, str]] = ..., encoding: _Optional[_Union[Encoding, str]] = ..., use_models: _Optional[_Iterable[_Union[ModelData, _Mapping]]] = ..., extension: _Optional[_Iterable[_Union[Extension, _Mapping]]] = ...) -> None: ... + +class GetResponse(_message.Message): + __slots__ = ["error", "extension", "notification"] + ERROR_FIELD_NUMBER: _ClassVar[int] + EXTENSION_FIELD_NUMBER: _ClassVar[int] + NOTIFICATION_FIELD_NUMBER: _ClassVar[int] + error: Error + extension: _containers.RepeatedCompositeFieldContainer[Extension] + notification: _containers.RepeatedCompositeFieldContainer[Notification] + def __init__(self, notification: _Optional[_Iterable[_Union[Notification, _Mapping]]] = ..., error: _Optional[_Union[Error, _Mapping]] = ..., extension: _Optional[_Iterable[_Union[Extension, _Mapping]]] = ...) -> None: ... + +class History(_message.Message): + __slots__ = ["range", "snapshot_time"] + RANGE_FIELD_NUMBER: _ClassVar[int] + SNAPSHOT_TIME_FIELD_NUMBER: _ClassVar[int] + range: TimeRange + snapshot_time: int + def __init__(self, snapshot_time: _Optional[int] = ..., range: _Optional[_Union[TimeRange, _Mapping]] = ...) -> None: ... + +class MasterArbitration(_message.Message): + __slots__ = ["election_id", "role"] + ELECTION_ID_FIELD_NUMBER: _ClassVar[int] + ROLE_FIELD_NUMBER: _ClassVar[int] + election_id: Uint128 + role: Role + def __init__(self, role: _Optional[_Union[Role, _Mapping]] = ..., election_id: _Optional[_Union[Uint128, _Mapping]] = ...) -> None: ... + +class ModelData(_message.Message): + __slots__ = ["name", "organization", "version"] + NAME_FIELD_NUMBER: _ClassVar[int] + ORGANIZATION_FIELD_NUMBER: _ClassVar[int] + VERSION_FIELD_NUMBER: _ClassVar[int] + name: str + organization: str + version: str + def __init__(self, name: _Optional[str] = ..., organization: _Optional[str] = ..., version: _Optional[str] = ...) -> None: ... + +class Notification(_message.Message): + __slots__ = ["atomic", "delete", "prefix", "timestamp", "update"] + ATOMIC_FIELD_NUMBER: _ClassVar[int] + DELETE_FIELD_NUMBER: _ClassVar[int] + PREFIX_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + UPDATE_FIELD_NUMBER: _ClassVar[int] + atomic: bool + delete: _containers.RepeatedCompositeFieldContainer[Path] + prefix: Path + timestamp: int + update: _containers.RepeatedCompositeFieldContainer[Update] + def __init__(self, timestamp: _Optional[int] = ..., prefix: _Optional[_Union[Path, _Mapping]] = ..., update: _Optional[_Iterable[_Union[Update, _Mapping]]] = ..., delete: _Optional[_Iterable[_Union[Path, _Mapping]]] = ..., atomic: bool = ...) -> None: ... + +class Path(_message.Message): + __slots__ = ["elem", "element", "origin", "target"] + ELEMENT_FIELD_NUMBER: _ClassVar[int] + ELEM_FIELD_NUMBER: _ClassVar[int] + ORIGIN_FIELD_NUMBER: _ClassVar[int] + TARGET_FIELD_NUMBER: _ClassVar[int] + elem: _containers.RepeatedCompositeFieldContainer[PathElem] + element: _containers.RepeatedScalarFieldContainer[str] + origin: str + target: str + def __init__(self, element: _Optional[_Iterable[str]] = ..., origin: _Optional[str] = ..., elem: _Optional[_Iterable[_Union[PathElem, _Mapping]]] = ..., target: _Optional[str] = ...) -> None: ... + +class PathElem(_message.Message): + __slots__ = ["key", "name"] + class KeyEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + KEY_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + key: _containers.ScalarMap[str, str] + name: str + def __init__(self, name: _Optional[str] = ..., key: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class Poll(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class QOSMarking(_message.Message): + __slots__ = ["marking"] + MARKING_FIELD_NUMBER: _ClassVar[int] + marking: int + def __init__(self, marking: _Optional[int] = ...) -> None: ... + +class RegisteredExtension(_message.Message): + __slots__ = ["id", "msg"] + ID_FIELD_NUMBER: _ClassVar[int] + MSG_FIELD_NUMBER: _ClassVar[int] + id: ExtensionID + msg: bytes + def __init__(self, id: _Optional[_Union[ExtensionID, str]] = ..., msg: _Optional[bytes] = ...) -> None: ... + +class Role(_message.Message): + __slots__ = ["id"] + ID_FIELD_NUMBER: _ClassVar[int] + id: str + def __init__(self, id: _Optional[str] = ...) -> None: ... + +class ScalarArray(_message.Message): + __slots__ = ["element"] + ELEMENT_FIELD_NUMBER: _ClassVar[int] + element: _containers.RepeatedCompositeFieldContainer[TypedValue] + def __init__(self, element: _Optional[_Iterable[_Union[TypedValue, _Mapping]]] = ...) -> None: ... + +class SetRequest(_message.Message): + __slots__ = ["delete", "extension", "prefix", "replace", "update"] + DELETE_FIELD_NUMBER: _ClassVar[int] + EXTENSION_FIELD_NUMBER: _ClassVar[int] + PREFIX_FIELD_NUMBER: _ClassVar[int] + REPLACE_FIELD_NUMBER: _ClassVar[int] + UPDATE_FIELD_NUMBER: _ClassVar[int] + delete: _containers.RepeatedCompositeFieldContainer[Path] + extension: _containers.RepeatedCompositeFieldContainer[Extension] + prefix: Path + replace: _containers.RepeatedCompositeFieldContainer[Update] + update: _containers.RepeatedCompositeFieldContainer[Update] + def __init__(self, prefix: _Optional[_Union[Path, _Mapping]] = ..., delete: _Optional[_Iterable[_Union[Path, _Mapping]]] = ..., replace: _Optional[_Iterable[_Union[Update, _Mapping]]] = ..., update: _Optional[_Iterable[_Union[Update, _Mapping]]] = ..., extension: _Optional[_Iterable[_Union[Extension, _Mapping]]] = ...) -> None: ... + +class SetResponse(_message.Message): + __slots__ = ["extension", "message", "prefix", "response", "timestamp"] + EXTENSION_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + PREFIX_FIELD_NUMBER: _ClassVar[int] + RESPONSE_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + extension: _containers.RepeatedCompositeFieldContainer[Extension] + message: Error + prefix: Path + response: _containers.RepeatedCompositeFieldContainer[UpdateResult] + timestamp: int + def __init__(self, prefix: _Optional[_Union[Path, _Mapping]] = ..., response: _Optional[_Iterable[_Union[UpdateResult, _Mapping]]] = ..., message: _Optional[_Union[Error, _Mapping]] = ..., timestamp: _Optional[int] = ..., extension: _Optional[_Iterable[_Union[Extension, _Mapping]]] = ...) -> None: ... + +class SubscribeRequest(_message.Message): + __slots__ = ["extension", "poll", "subscribe"] + EXTENSION_FIELD_NUMBER: _ClassVar[int] + POLL_FIELD_NUMBER: _ClassVar[int] + SUBSCRIBE_FIELD_NUMBER: _ClassVar[int] + extension: _containers.RepeatedCompositeFieldContainer[Extension] + poll: Poll + subscribe: SubscriptionList + def __init__(self, subscribe: _Optional[_Union[SubscriptionList, _Mapping]] = ..., poll: _Optional[_Union[Poll, _Mapping]] = ..., extension: _Optional[_Iterable[_Union[Extension, _Mapping]]] = ...) -> None: ... + +class SubscribeResponse(_message.Message): + __slots__ = ["error", "extension", "sync_response", "update"] + ERROR_FIELD_NUMBER: _ClassVar[int] + EXTENSION_FIELD_NUMBER: _ClassVar[int] + SYNC_RESPONSE_FIELD_NUMBER: _ClassVar[int] + UPDATE_FIELD_NUMBER: _ClassVar[int] + error: Error + extension: _containers.RepeatedCompositeFieldContainer[Extension] + sync_response: bool + update: Notification + def __init__(self, update: _Optional[_Union[Notification, _Mapping]] = ..., sync_response: bool = ..., error: _Optional[_Union[Error, _Mapping]] = ..., extension: _Optional[_Iterable[_Union[Extension, _Mapping]]] = ...) -> None: ... + +class Subscription(_message.Message): + __slots__ = ["heartbeat_interval", "mode", "path", "sample_interval", "suppress_redundant"] + HEARTBEAT_INTERVAL_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + SAMPLE_INTERVAL_FIELD_NUMBER: _ClassVar[int] + SUPPRESS_REDUNDANT_FIELD_NUMBER: _ClassVar[int] + heartbeat_interval: int + mode: SubscriptionMode + path: Path + sample_interval: int + suppress_redundant: bool + def __init__(self, path: _Optional[_Union[Path, _Mapping]] = ..., mode: _Optional[_Union[SubscriptionMode, str]] = ..., sample_interval: _Optional[int] = ..., suppress_redundant: bool = ..., heartbeat_interval: _Optional[int] = ...) -> None: ... + +class SubscriptionList(_message.Message): + __slots__ = ["allow_aggregation", "encoding", "mode", "prefix", "qos", "subscription", "updates_only", "use_models"] + class Mode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + ALLOW_AGGREGATION_FIELD_NUMBER: _ClassVar[int] + ENCODING_FIELD_NUMBER: _ClassVar[int] + MODE_FIELD_NUMBER: _ClassVar[int] + ONCE: SubscriptionList.Mode + POLL: SubscriptionList.Mode + PREFIX_FIELD_NUMBER: _ClassVar[int] + QOS_FIELD_NUMBER: _ClassVar[int] + STREAM: SubscriptionList.Mode + SUBSCRIPTION_FIELD_NUMBER: _ClassVar[int] + UPDATES_ONLY_FIELD_NUMBER: _ClassVar[int] + USE_MODELS_FIELD_NUMBER: _ClassVar[int] + allow_aggregation: bool + encoding: Encoding + mode: SubscriptionList.Mode + prefix: Path + qos: QOSMarking + subscription: _containers.RepeatedCompositeFieldContainer[Subscription] + updates_only: bool + use_models: _containers.RepeatedCompositeFieldContainer[ModelData] + def __init__(self, prefix: _Optional[_Union[Path, _Mapping]] = ..., subscription: _Optional[_Iterable[_Union[Subscription, _Mapping]]] = ..., qos: _Optional[_Union[QOSMarking, _Mapping]] = ..., mode: _Optional[_Union[SubscriptionList.Mode, str]] = ..., allow_aggregation: bool = ..., use_models: _Optional[_Iterable[_Union[ModelData, _Mapping]]] = ..., encoding: _Optional[_Union[Encoding, str]] = ..., updates_only: bool = ...) -> None: ... + +class TimeRange(_message.Message): + __slots__ = ["end", "start"] + END_FIELD_NUMBER: _ClassVar[int] + START_FIELD_NUMBER: _ClassVar[int] + end: int + start: int + def __init__(self, start: _Optional[int] = ..., end: _Optional[int] = ...) -> None: ... + +class TypedValue(_message.Message): + __slots__ = ["any_val", "ascii_val", "bool_val", "bytes_val", "decimal_val", "double_val", "float_val", "int_val", "json_ietf_val", "json_val", "leaflist_val", "proto_bytes", "string_val", "uint_val"] + ANY_VAL_FIELD_NUMBER: _ClassVar[int] + ASCII_VAL_FIELD_NUMBER: _ClassVar[int] + BOOL_VAL_FIELD_NUMBER: _ClassVar[int] + BYTES_VAL_FIELD_NUMBER: _ClassVar[int] + DECIMAL_VAL_FIELD_NUMBER: _ClassVar[int] + DOUBLE_VAL_FIELD_NUMBER: _ClassVar[int] + FLOAT_VAL_FIELD_NUMBER: _ClassVar[int] + INT_VAL_FIELD_NUMBER: _ClassVar[int] + JSON_IETF_VAL_FIELD_NUMBER: _ClassVar[int] + JSON_VAL_FIELD_NUMBER: _ClassVar[int] + LEAFLIST_VAL_FIELD_NUMBER: _ClassVar[int] + PROTO_BYTES_FIELD_NUMBER: _ClassVar[int] + STRING_VAL_FIELD_NUMBER: _ClassVar[int] + UINT_VAL_FIELD_NUMBER: _ClassVar[int] + any_val: _any_pb2.Any + ascii_val: str + bool_val: bool + bytes_val: bytes + decimal_val: Decimal64 + double_val: float + float_val: float + int_val: int + json_ietf_val: bytes + json_val: bytes + leaflist_val: ScalarArray + proto_bytes: bytes + string_val: str + uint_val: int + def __init__(self, string_val: _Optional[str] = ..., int_val: _Optional[int] = ..., uint_val: _Optional[int] = ..., bool_val: bool = ..., bytes_val: _Optional[bytes] = ..., float_val: _Optional[float] = ..., double_val: _Optional[float] = ..., decimal_val: _Optional[_Union[Decimal64, _Mapping]] = ..., leaflist_val: _Optional[_Union[ScalarArray, _Mapping]] = ..., any_val: _Optional[_Union[_any_pb2.Any, _Mapping]] = ..., json_val: _Optional[bytes] = ..., json_ietf_val: _Optional[bytes] = ..., ascii_val: _Optional[str] = ..., proto_bytes: _Optional[bytes] = ...) -> None: ... + +class Uint128(_message.Message): + __slots__ = ["high", "low"] + HIGH_FIELD_NUMBER: _ClassVar[int] + LOW_FIELD_NUMBER: _ClassVar[int] + high: int + low: int + def __init__(self, high: _Optional[int] = ..., low: _Optional[int] = ...) -> None: ... + +class Update(_message.Message): + __slots__ = ["duplicates", "path", "val", "value"] + DUPLICATES_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + VAL_FIELD_NUMBER: _ClassVar[int] + duplicates: int + path: Path + val: TypedValue + value: Value + def __init__(self, path: _Optional[_Union[Path, _Mapping]] = ..., value: _Optional[_Union[Value, _Mapping]] = ..., val: _Optional[_Union[TypedValue, _Mapping]] = ..., duplicates: _Optional[int] = ...) -> None: ... + +class UpdateResult(_message.Message): + __slots__ = ["message", "op", "path", "timestamp"] + class Operation(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + DELETE: UpdateResult.Operation + INVALID: UpdateResult.Operation + MESSAGE_FIELD_NUMBER: _ClassVar[int] + OP_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + REPLACE: UpdateResult.Operation + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + UPDATE: UpdateResult.Operation + message: Error + op: UpdateResult.Operation + path: Path + timestamp: int + def __init__(self, timestamp: _Optional[int] = ..., path: _Optional[_Union[Path, _Mapping]] = ..., message: _Optional[_Union[Error, _Mapping]] = ..., op: _Optional[_Union[UpdateResult.Operation, str]] = ...) -> None: ... + +class Value(_message.Message): + __slots__ = ["type", "value"] + TYPE_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + type: Encoding + value: bytes + def __init__(self, value: _Optional[bytes] = ..., type: _Optional[_Union[Encoding, str]] = ...) -> None: ... + +class ExtensionID(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class Encoding(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + +class SubscriptionMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] \ No newline at end of file diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_pb2_grpc.py b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..517d3d9eb41c5833a28cc9b7f43859dde186f348 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/gnmi/gnmi_pb2_grpc.py @@ -0,0 +1,185 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import gnmi_pb2 as gnmi__pb2 + + +class gNMIStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Capabilities = channel.unary_unary( + '/gnmi.gNMI/Capabilities', + request_serializer=gnmi__pb2.CapabilityRequest.SerializeToString, + response_deserializer=gnmi__pb2.CapabilityResponse.FromString, + ) + self.Get = channel.unary_unary( + '/gnmi.gNMI/Get', + request_serializer=gnmi__pb2.GetRequest.SerializeToString, + response_deserializer=gnmi__pb2.GetResponse.FromString, + ) + self.Set = channel.unary_unary( + '/gnmi.gNMI/Set', + request_serializer=gnmi__pb2.SetRequest.SerializeToString, + response_deserializer=gnmi__pb2.SetResponse.FromString, + ) + self.Subscribe = channel.stream_stream( + '/gnmi.gNMI/Subscribe', + request_serializer=gnmi__pb2.SubscribeRequest.SerializeToString, + response_deserializer=gnmi__pb2.SubscribeResponse.FromString, + ) + + +class gNMIServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Capabilities(self, request, context): + """Capabilities allows the client to retrieve the set of capabilities that + is supported by the target. This allows the target to validate the + service version that is implemented and retrieve the set of models that + the target supports. The models can then be specified in subsequent RPCs + to restrict the set of data that is utilized. + Reference: gNMI Specification Section 3.2 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Get(self, request, context): + """Retrieve a snapshot of data from the target. A Get RPC requests that the + target snapshots a subset of the data tree as specified by the paths + included in the message and serializes this to be returned to the + client using the specified encoding. + Reference: gNMI Specification Section 3.3 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Set(self, request, context): + """Set allows the client to modify the state of data on the target. The + paths to modified along with the new values that the client wishes + to set the value to. + Reference: gNMI Specification Section 3.4 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Subscribe(self, request_iterator, context): + """Subscribe allows a client to request the target to send it values + of particular paths within the data tree. These values may be streamed + at a particular cadence (STREAM), sent one off on a long-lived channel + (POLL), or sent as a one-off retrieval (ONCE). + Reference: gNMI Specification Section 3.5 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_gNMIServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Capabilities': grpc.unary_unary_rpc_method_handler( + servicer.Capabilities, + request_deserializer=gnmi__pb2.CapabilityRequest.FromString, + response_serializer=gnmi__pb2.CapabilityResponse.SerializeToString, + ), + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=gnmi__pb2.GetRequest.FromString, + response_serializer=gnmi__pb2.GetResponse.SerializeToString, + ), + 'Set': grpc.unary_unary_rpc_method_handler( + servicer.Set, + request_deserializer=gnmi__pb2.SetRequest.FromString, + response_serializer=gnmi__pb2.SetResponse.SerializeToString, + ), + 'Subscribe': grpc.stream_stream_rpc_method_handler( + servicer.Subscribe, + request_deserializer=gnmi__pb2.SubscribeRequest.FromString, + response_serializer=gnmi__pb2.SubscribeResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'gnmi.gNMI', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class gNMI(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Capabilities(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/gnmi.gNMI/Capabilities', + gnmi__pb2.CapabilityRequest.SerializeToString, + gnmi__pb2.CapabilityResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Get(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/gnmi.gNMI/Get', + gnmi__pb2.GetRequest.SerializeToString, + gnmi__pb2.GetResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Set(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/gnmi.gNMI/Set', + gnmi__pb2.SetRequest.SerializeToString, + gnmi__pb2.SetResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Subscribe(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/gnmi.gNMI/Subscribe', + gnmi__pb2.SubscribeRequest.SerializeToString, + gnmi__pb2.SubscribeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/Component.py b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/Component.py new file mode 100644 index 0000000000000000000000000000000000000000..f7933e91f098462ee7825f6da9a4916dd4093ad8 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/Component.py @@ -0,0 +1,57 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import json, logging +from typing import Any, Dict, List, Tuple +from common.proto.kpi_sample_types_pb2 import KpiSampleType +from ._Handler import _Handler + +LOGGER = logging.getLogger(__name__) +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +#PATH_IF_CTR = "/interfaces/interface[name={:s}]/state/counters/{:s}" + +class ComponentHandler(_Handler): + def get_resource_key(self) -> str: return '/endpoints/endpoint' + def get_path(self) -> str: return '/srl_nokia-interfaces:interface' + + def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: + LOGGER.info('json_data = {:s}'.format(json.dumps(json_data))) + json_interface_list : List[Dict] = json_data.get('srl_nokia-interfaces:interface', []) + response = [] + for json_component in json_interface_list: + #LOGGER.info('json_component = {:s}'.format(json.dumps(json_component))) + endpoint = {} + interface_name = json_component.get('name') + if interface_name is None: + # LOGGER.info('DISCARDED json_interface = {:s}'.format(json.dumps(json_interface))) + continue + endpoint['uuid'] = interface_name + endpoint['name'] = interface_name + + #endpoint_type1 = json_component.get('srl_nokia-platform-healthz:healthz', {}) + endpoint_type = json_component.get('ethernet', {}) + port_speed = endpoint_type.get('port-speed') + if port_speed is not None: endpoint['type'] = port_speed + + #endpoint['sample_types'] = { + # KpiSampleType.KPISAMPLETYPE_BYTES_RECEIVED : PATH_IF_CTR.format(interface_name, 'in-octets' ), + # KpiSampleType.KPISAMPLETYPE_BYTES_TRANSMITTED : PATH_IF_CTR.format(interface_name, 'out-octets'), + # KpiSampleType.KPISAMPLETYPE_PACKETS_RECEIVED : PATH_IF_CTR.format(interface_name, 'in-pkts' ), + # KpiSampleType.KPISAMPLETYPE_PACKETS_TRANSMITTED: PATH_IF_CTR.format(interface_name, 'out-pkts' ), + #} + + if len(endpoint) == 0: continue + response.append(('/endpoints/endpoint[{:s}]'.format(endpoint['uuid']), endpoint)) + return response diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/Interface.py b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/Interface.py new file mode 100644 index 0000000000000000000000000000000000000000..95e4b868ee4ac6f37de3fee7f9597b46b0fc5eaa --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/Interface.py @@ -0,0 +1,198 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging +from typing import Any, Dict, List, Tuple + +from requests import get +from ._Handler import _Handler +from .Tools import dict_get_first + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +class InterfaceHandler(_Handler): + def get_resource_key(self) -> str: + #LOGGER.debug('Getting resource key for InterfaceHandler') + return '/interface' + + def get_path(self) -> str: + LOGGER.debug('Getting path for InterfaceHandler') + return '/srl_nokia-interfaces:interface' + + def compose(self, resource_key: str, resource_value: Dict, delete: bool = False) -> Tuple[str, str]: + if_name = str(resource_value['if_name']) + sif_index = int(resource_value.get('subif_index')) + + if delete: + PATH_TMPL = '/interface[name={:s}]/subinterface[index={:d}]' + str_path = PATH_TMPL.format(if_name, sif_index) + str_data = json.dumps({}) + return str_path, str_data + + str_path = '/interface[name={:s}]'.format(if_name) + json_interface = {} + + if 'if_name' in resource_value: + #if_name=str(resource_value['if_name']) + json_interface['name']=if_name + + + if 'if_admin_state' in resource_value: + bool_admin_state = bool(resource_value['if_admin_state']) + str_admin_state = 'enable' if bool_admin_state else 'disable' + json_interface['admin-state'] = str_admin_state + + if 'subif_index' in resource_value: + subif_index = int(resource_value['subif_index']) + else: + subif_index=0 + subif_list= json_interface.setdefault('subinterface', list()) + subif={'index':subif_index} + subif_list.append(subif) + + + if 'subif_ipv4_admin_state' in resource_value: + bool_ipv4_admin_state = bool(resource_value['subif_ipv4_admin_state']) + str_ipv4_admin_state = 'enable' if bool_ipv4_admin_state else 'disable' + ipv4 = subif.setdefault('ipv4', dict()) + ipv4['admin-state'] = str_ipv4_admin_state + + + + if 'subif_ipv4_address' in resource_value and 'subif_ipv4_prefix' in resource_value: + subif_ipv4_address = str(resource_value['subif_ipv4_address']) + subif_ipv4_prefix = int(resource_value['subif_ipv4_prefix']) + ipv4 = subif.setdefault('ipv4', dict()) + address_list= ipv4.setdefault('address', list()) + address_list.append({ + 'ip-prefix': '{:s}/{:d}'.format(subif_ipv4_address, subif_ipv4_prefix) + }) + + if 'if_vlan_tagging' in resource_value: + bool_if_vlan_tagging = bool(resource_value['if_vlan_tagging']) + json_interface['vlan-tagging']=bool_if_vlan_tagging + + + if 'subif_type' in resource_value: + subif_type = str(resource_value['subif_type']) + subif['type'] =subif_type + + + if 'subif_vlan_admin_state' in resource_value: + bool_vlan_admin_state = bool(resource_value['subif_vlan_admin_state']) + str_vlan_admin_state = 'enable' if bool_vlan_admin_state else 'disable' + subif['admin-state'] = str_vlan_admin_state + + + if 'subif_vlan_encap' in resource_value: + subif_vlan_encap=str(resource_value['subif_vlan_encap']) + vlan=subif.setdefault('vlan',dict()) + encap=vlan.setdefault('encap',dict()) + encap[subif_vlan_encap]=dict() + + + return str_path,json.dumps(json_interface) + + ############################PARSE############################################################## + + def parse(self, json_data: Dict) -> List[Tuple[str, Dict[str, Any]]]: + #LOGGER.info('json_data = {:s}'.format(json.dumps(json_data))) + # LOGGER.info('Parsing json_data for InterfaceHandler') + # LOGGER.debug('json_data = {:s}'.format(json.dumps(json_data))) + json_interface_list : List[Dict] = json_data.get('srl_nokia-interfaces:interface', []) + response = [] + + for json_interface in json_interface_list: + #LOGGER.info('json_interface = {:s}'.format(json.dumps(json_interface))) + interface = {} + interface_name = json_interface.get('name') + if interface_name is None: + # LOGGER.info('DISCARDED json_interface = {:s}'.format(json.dumps(json_interface))) + continue + interface['name'] = interface_name + #LOGGER.info('json_interface = {:s}'.format(json.dumps(json_interface))) + admin_state = json_interface.get('admin-state') + if admin_state is None: + continue + interface['admin_state'] = str(admin_state) + ##LOGGER.info('json_interface = {:s}'.format(json.dumps(json_interface))) + #vlan_tagging = json_interface.get('srl_nokia-interfaces-vlans:vlan-tagging') + #if vlan_tagging is not None: + # continue + #interface['vlan-tagging']=bool(vlan_tagging) + #LOGGER.info('interface = {:s}'.format(json.dumps(interface))) + + json_subinterface_list: List[Dict] = json_interface.get('subinterface', []) + for json_subinterface in json_subinterface_list: + #LOGGER.info('json_subinterface = {:s}'.format(json.dumps(json_subinterface))) + subinterface = {} + subinterface_index = json_subinterface.get('index') + if subinterface_index is None: + continue + subinterface['index'] = int(subinterface_index) + subinterface_adminstate = json_subinterface.get('admin-state') + if subinterface_adminstate is None: + continue + subinterface['admin-state'] = str(subinterface_adminstate) + vlan_type = json_subinterface.get('type') + #if vlan_type is None: + # continue + subinterface['type'] = vlan_type + ipv4_admin_state = json_subinterface.get('ipv4', {}).get('admin-state') + subinterface['ipv4'] = {'admin-state': bool(ipv4_admin_state)} + ipv4_address_list = json_subinterface.get('ipv4', {}).get('address', []) + addresses = [] + if ipv4_address_list: + for json_address in ipv4_address_list: + #LOGGER.info('json_address = {:s}'.format(json.dumps(json_address))) + address_ip_prefix = json_address.get('ip-prefix') + + if address_ip_prefix is not None: + addresses.append({'ip-prefix': str(address_ip_prefix)}) + subinterface['ipv4'] = {'address': addresses} + subinterface['vlan'] = {} + subinterface['vlan']['encap'] = {} + json_vlan_encap = json_interface.get('vlan', {}).get('encap', {}) + if json_vlan_encap: + if 'vlan' not in subinterface: + subinterface['vlan'] = {} + + if 'encap' not in subinterface['vlan']: + subinterface['vlan']['encap'] = {} + + subinterface['vlan']['encap']['untagged'] = json_vlan_encap + + + if len(subinterface) == 0: + continue + resource_key = '/interface[{:s}]/subinterface[{:s}]'.format(interface['name'], str(subinterface['index'])) + response.append((resource_key, subinterface)) + + + if len(interface) == 0: + continue + response.append(('/interface[{:s}]'.format(interface['name']), interface)) +# json_protocols = json_data.get('protocols', {}) +# json_bgp_list: List[Dict] = json_protocols.get('bgp', []) +# +# for json_bgp in json_bgp_list: +# json_afi_safi_list: List[Dict] = json_bgp.get('afi-safi', []) +# +# for json_afi_safi in json_afi_safi_list: +# interface['afisafiname'] = json_afi_safi.get('afi-safi-name', '') +# response.append((self.compose('/interfaces/interface', interface))) +# + return response diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/InterfaceCounter.py b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/InterfaceCounter.py new file mode 100644 index 0000000000000000000000000000000000000000..a45dc9e7f972445691143df15d6d56d079384fc4 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/InterfaceCounter.py @@ -0,0 +1,80 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging +from typing import Any, Dict, List, Tuple +from ._Handler import _Handler +from .Tools import dict_get_first + +LOGGER = logging.getLogger(__name__) + +class InterfaceCounterHandler(_Handler): + def get_resource_key(self) -> str: return '/interface/counters' + def get_path(self) -> str: return '/interfaces/interface/state/counters' + + def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: + LOGGER.info('[parse] json_data = {:s}'.format(json.dumps(json_data))) + json_interface_list : List[Dict] = json_data.get('interface', []) + + response = [] + for json_interface in json_interface_list: + LOGGER.info('[parse] json_interface = {:s}'.format(json.dumps(json_interface))) + + interface = {} + + NAME_FIELDS = ('name', 'openconfig-interface:name', 'oci:name') + interface_name = dict_get_first(json_interface, NAME_FIELDS) + if interface_name is None: continue + interface['name'] = interface_name + + STATE_FIELDS = ('state', 'openconfig-interface:state', 'oci:state') + json_state = dict_get_first(json_interface, STATE_FIELDS, default={}) + + COUNTERS_FIELDS = ('counters', 'openconfig-interface:counters', 'oci:counters') + json_counters = dict_get_first(json_state, COUNTERS_FIELDS, default={}) + + IN_PKTS_FIELDS = ('in-pkts', 'openconfig-interface:in-pkts', 'oci:in-pkts') + interface_in_pkts = dict_get_first(json_counters, IN_PKTS_FIELDS) + if interface_in_pkts is not None: interface['in-pkts'] = int(interface_in_pkts) + + IN_OCTETS_FIELDS = ('in-octets', 'openconfig-interface:in-octets', 'oci:in-octets') + interface_in_octets = dict_get_first(json_counters, IN_OCTETS_FIELDS) + if interface_in_octets is not None: interface['in-octets'] = int(interface_in_octets) + + IN_ERRORS_FIELDS = ('in-errors', 'openconfig-interface:in-errors', 'oci:in-errors') + interface_in_errors = dict_get_first(json_counters, IN_ERRORS_FIELDS) + if interface_in_errors is not None: interface['in-errors'] = int(interface_in_errors) + + OUT_OCTETS_FIELDS = ('out-octets', 'openconfig-interface:out-octets', 'oci:out-octets') + interface_out_octets = dict_get_first(json_counters, OUT_OCTETS_FIELDS) + if interface_out_octets is not None: interface['out-octets'] = int(interface_out_octets) + + OUT_PKTS_FIELDS = ('out-pkts', 'openconfig-interface:out-pkts', 'oci:out-pkts') + interface_out_pkts = dict_get_first(json_counters, OUT_PKTS_FIELDS) + if interface_out_pkts is not None: interface['out-pkts'] = int(interface_out_pkts) + + OUT_ERRORS_FIELDS = ('out-errors', 'openconfig-interface:out-errors', 'oci:out-errors') + interface_out_errors = dict_get_first(json_counters, OUT_ERRORS_FIELDS) + if interface_out_errors is not None: interface['out-errors'] = int(interface_out_errors) + + OUT_DISCARDS_FIELDS = ('out-discards', 'openconfig-interface:out-discards', 'oci:out-discards') + interface_out_discards = dict_get_first(json_counters, OUT_DISCARDS_FIELDS) + if interface_out_discards is not None: interface['out-discards'] = int(interface_out_discards) + + #LOGGER.info('[parse] interface = {:s}'.format(str(interface))) + + if len(interface) == 0: continue + response.append(('/interface[{:s}]'.format(interface['name']), interface)) + + return response diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstance.py b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstance.py new file mode 100644 index 0000000000000000000000000000000000000000..67c4913f83c7dfdcca9e32d2e46add2f3a75f139 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstance.py @@ -0,0 +1,550 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging +from typing import Any, Dict, List, Tuple +from ._Handler import _Handler + +LOGGER = logging.getLogger(__name__) + +class NetworkInstanceHandler(_Handler): + def get_resource_key(self) -> str: return '/network-instance' + def get_path(self) -> str: return '/srl_nokia-network-instance:network-instance' + + def compose(self, resource_key : str, resource_value : Dict, delete : bool = False) -> Tuple[str, str]: + if_name= str(resource_value['if_name']) + json_networkinstance = {} + + if delete: + PATH_TMPL = '/network-instance[name={:s}]' + str_path = PATH_TMPL.format(if_name) + str_data = json.dumps({}) + return str_path, str_data + + str_path = '/network-instance[name={:s}]'.format(if_name) + + if 'if_interface1' in resource_value: + if_interface1= str(resource_value['if_interface1']) + subif_interface_default_list=json_networkinstance.setdefault('interface',list()) + subif_interface1={'name':if_interface1} + subif_interface_default_list.append(subif_interface1) + + if 'if_interface2' in resource_value: + if_interface2= str(resource_value['if_interface2']) + subif_interface2={'name':if_interface2} + subif_interface_default_list.append(subif_interface2) + + if 'if_name' in resource_value: + json_networkinstance['name']=if_name + + if 'if_admin_state_bgp' in resource_value: + bool_admin_state = bool(resource_value['if_admin_state_bgp']) + str_admin_state = 'enable' if bool_admin_state else 'disable' + subif_protocol=json_networkinstance.setdefault('protocols',dict()) + subif_bgp=subif_protocol.setdefault('bgp',dict()) + subif_afisafi=subif_bgp.setdefault('afi-safi',list()) + subif_state = {'admin-state': str_admin_state} + + if 'if_afi_safi_name_bgp' in resource_value: + if_afi_safi_name_bgp = str(resource_value['if_afi_safi_name_bgp']) + subif_state['afi-safi-name'] = if_afi_safi_name_bgp + subif_afisafi.append(subif_state) + + + if 'if_autonomous_system_bgp' in resource_value: + if_autonomous_system_bgp = int(resource_value['if_autonomous_system_bgp']) + subif_bgp['autonomous-system']=if_autonomous_system_bgp + + + + if 'if_export_policy' in resource_value: + if_export_policy = str(resource_value['if_export_policy']) + subif_group1 = {'export-policy': if_export_policy} + subif_group=subif_bgp.setdefault('group',list()) + + + if 'if_group_name' in resource_value: + if_group_name = str(resource_value['if_group_name']) + subif_group1['group-name']=if_group_name + + + + if 'if_import_policy' in resource_value: + if_import_policy = str(resource_value['if_import_policy']) + subif_group1['import-policy']= if_import_policy + + if 'if_peer_as' in resource_value: + if_peer_as = int(resource_value['if_peer_as']) + subif_group1['peer-as']= if_peer_as + subif_group.append(subif_group1) + + if 'if_admin_state_group' in resource_value: + bool_admin_state = bool(resource_value['if_admin_state_group']) + str_admin_state = 'enable' if bool_admin_state else 'disable' + subif_as = {'admin-state': str_admin_state} + subif_dictonary={} + subif_group.append(subif_dictonary) + afi_safi_list=subif_dictonary.setdefault('afi-safi',list()) + + + + if 'if_afi_safi_name_group' in resource_value: + if_afi_safi_name_group = str(resource_value['if_afi_safi_name_group']) + subif_as['afi-safi-name']=if_afi_safi_name_group + afi_safi_list.append(subif_as) + + + if 'if_admin_state_group_2' in resource_value: + bool_admin_state = bool(resource_value['if_admin_state_group_2']) + str_admin_state_group2 = 'enable' if bool_admin_state else 'disable' + subif_dictonary2={} + afi_safi_list.append(subif_dictonary2) + subif_dictonary2['admin-state']=str_admin_state_group2 + + if 'if_afi_safi_name_group_2' in resource_value: + if_afi_safi_name_group_2 = str(resource_value['if_afi_safi_name_group_2']) + subif_dictonary2['afi-safi-name']=if_afi_safi_name_group_2 + + if 'if_export_policy_2' in resource_value: + if_export_policy_2 = str(resource_value['if_export_policy_2']) + subif_dictonary['export-policy']=if_export_policy_2 + + if 'if_group_name_2' in resource_value: + if_group_name_2 = str(resource_value['if_group_name_2']) + subif_dictonary['group-name']=if_group_name_2 + + if 'if_import_policy_2' in resource_value: + if_import_policy_2 = str(resource_value['if_import_policy_2']) + subif_dictonary['import-policy']=if_import_policy_2 + + if 'if_as_number' in resource_value: + if_as_number = int(resource_value['if_as_number']) + subif_dictonary['local-as'] = {} + subif_dictonary['local-as']['as-number']=if_as_number + + if 'if_peer_as_2' in resource_value: + if_peer_as_2 = int(resource_value['if_peer_as_2']) + subif_dictonary['peer-as']=if_peer_as_2 + + + if 'if_minimum_advertisement_interval' in resource_value: + if_minimum_advertisement_interval = int(resource_value['if_minimum_advertisement_interval']) + subif_dictonary['timers']={} + subif_dictonary['timers']['minimum-advertisement-interval']=if_minimum_advertisement_interval + + + + if 'if_admin_state_neighbor' in resource_value: + bool_admin_state = bool(resource_value['if_admin_state_neighbor']) + str_admin_state_n= 'enable' if bool_admin_state else 'disable' + subif_neighbor=subif_bgp.setdefault('neighbor',list()) + subif_state_n = {'admin-state': str_admin_state_n} + + + if 'if_peer_address_neighbor' in resource_value: + if_peer_address_neighbor = str(resource_value['if_peer_address_neighbor']) + subif_state_n['peer-address']=if_peer_address_neighbor + #subif_protocol=json_networkinstance.setdefault('protocols',dict()) + #subif_bgp=subif_protocol.setdefault('bgp',dict()) + #subif_neighbor=subif_bgp.setdefault('neighbor',list()) + + if 'if_peer_group_neighbor' in resource_value: + if_peer_group_neighbor = str(resource_value['if_peer_group_neighbor']) + subif_state_n['peer-group']=if_peer_group_neighbor + #subif_protocol=json_networkinstance.setdefault('protocols',dict()) + #subif_bgp=subif_protocol.setdefault('bgp',dict()) + #subif_neighbor=subif_bgp.setdefault('neighbor',list()) + + if 'if_local_address_neighbor' in resource_value: + if_local_address_neighbor = str(resource_value['if_local_address_neighbor']) + subif_state_n['transport']={} + subif_state_n['transport']['local-address']=if_local_address_neighbor + #subif_protocol=json_networkinstance.setdefault('protocols',dict()) + #subif_bgp=subif_protocol.setdefault('bgp',dict()) + #subif_neighbor=subif_bgp.setdefault('neighbor',list()) + #subif_transport={'transport':subif_lan} + subif_neighbor.append(subif_state_n) + + if 'if_peer_address_neighbor_2' in resource_value: + if_peer_address_neighbor_2 = str(resource_value['if_peer_address_neighbor_2']) + #subif_pan2= {'peer-address':if_peer_address_neighbor_2} + #subif_protocol=json_networkinstance.setdefault('protocols',dict()) + #subif_bgp=subif_protocol.setdefault('bgp',dict()) + #subif_neighbor=subif_bgp.setdefault('neighbor',list()) + subif_dicneighbor={} + subif_dicneighbor['peer-address']=if_peer_address_neighbor_2 + + + if 'if_peer_group_neighbor_2' in resource_value: + if_peer_group_neighbor_2 = str(resource_value['if_peer_group_neighbor_2']) + #subifpgn2 = {'peer-group':if_peer_group_neighbor_2} + # subif_protocol=json_networkinstance.setdefault('protocols',dict()) + #subif_bgp=subif_protocol.setdefault('bgp',dict()) + #subif_neighbor=subif_bgp.setdefault('neighbor',list()) + subif_dicneighbor['peer-group']=if_peer_group_neighbor_2 + subif_neighbor.append(subif_dicneighbor) + + + if 'if_router_id' in resource_value: + if_router_id = str(resource_value['if_router_id']) + #subif_protocol=json_networkinstance.setdefault('protocols',dict()) + #subif_bgp=subif_protocol.setdefault('bgp',dict()) + subif_bgp['router-id'] = if_router_id + + ###############VRF###############3 + + + if 'if_name' in resource_value and 'if_type' in resource_value: + if_name= str(resource_value['if_name']) + if_type=str(resource_value['if_type']) + json_networkinstance = {} + json_networkinstance['name']=if_name + json_networkinstance['type']=if_type + + + #if 'if_type' in resource_value: + # if_type=str(resource_value['if_type']) + # json_networkinstance['type']=if_type + + if 'if_admin_state_vrf' in resource_value: + bool_admin_state= bool(resource_value['if_admin_state_vrf']) + str_admin_state = 'enable' if bool_admin_state else 'disable' + json_networkinstance ['admin-state']=str_admin_state + + if 'if_interface1_name' in resource_value: + if_interface1_name= str(resource_value['if_interface1_name']) + if_interface1_list=json_networkinstance.setdefault('interface',list()) + subif_interface_name={'name': if_interface1_name} + if_interface1_list.append(subif_interface_name) + + if 'if_vxlaninterface_name' in resource_value: + if_vxlaninterface_name= str(resource_value['if_vxlaninterface_name']) + if_if_vxlaninterface_name_list=json_networkinstance.setdefault('vxlan-interface',list()) + subif_vxlaninterface_name={'name': if_vxlaninterface_name} + if_if_vxlaninterface_name_list.append(subif_vxlaninterface_name) + + + if 'if_bgp_evpn_instance_id' in resource_value: + if_bgp_evpn_instance_id = int(resource_value['if_bgp_evpn_instance_id']) + subif_protocol=json_networkinstance.setdefault('protocols',dict()) + subif_bgp_evpn=subif_protocol.setdefault('bgp-evpn',dict()) + subif_bgpinstance=subif_bgp_evpn.setdefault('bgp-instance',list()) + subif_dictonary3={} + subif_bgpinstance.append(subif_dictonary3) + subif_dictonary3['id']=if_bgp_evpn_instance_id + + + if 'if_bgp_evpn_instance_admin_state' in resource_value: + bool_admin_state = bool(resource_value['if_bgp_evpn_instance_admin_state']) + str_admin_state = 'enable' if bool_admin_state else 'disable' + subif_dictonary3['admin-state']=str_admin_state + + + if 'if_bgp_evpn_instance_vxlan_interface' in resource_value: + if_bgp_evpn_instance_vxlan_interface = str(resource_value['if_bgp_evpn_instance_vxlan_interface']) + subif_dictonary3['vxlan-interface']=if_bgp_evpn_instance_vxlan_interface + + if 'if_bgp_evpn_instance_evi' in resource_value: + if_bgp_evpn_instance_evi = int(resource_value['if_bgp_evpn_instance_evi']) + subif_dictonary3['evi']=if_bgp_evpn_instance_evi + + + if 'if_bgp_vpn_instance_id' in resource_value: + if_bgp_vpn_instance_id = int(resource_value['if_bgp_vpn_instance_id']) + subif_bgp_vpn=subif_protocol.setdefault('bgp-vpn',dict()) + subif_bgpinstance=subif_bgp_vpn.setdefault('bgp-instance',list()) + subif_dictonary4={} + subif_dictonary4['id']=if_bgp_vpn_instance_id + + + if 'if_bgp_vpn_instance_export_rt' in resource_value and 'if_bgp_vpn_instance_import_rt' in resource_value: + if_bgp_vpn_instance_export_rt = str(resource_value['if_bgp_vpn_instance_export_rt']) + if_bgp_vpn_instance_import_rt = str(resource_value['if_bgp_vpn_instance_import_rt']) + subif_dictonary4['route-target']={} + subif_dictonary4['route-target']['export-rt']=if_bgp_vpn_instance_export_rt + subif_dictonary4['route-target']['import-rt']=if_bgp_vpn_instance_import_rt + subif_bgpinstance.append(subif_dictonary4) + + #if 'if_bgp_vpn_instance_import_rt' in resource_value: + # if_bgp_vpn_instance_import_rt = str(resource_value['if_bgp_vpn_instance_import_rt']) + # subif_dictonary4['route-target']['import-rt']=if_bgp_vpn_instance_import_rt + # subif_bgpinstance.append(subif_dictonary4) + +######################################SPINE########################## + if 'if_interface1_spine' in resource_value: + if_interface1_spine= str(resource_value['if_interface1_spine']) + subif_interface_default_list=json_networkinstance.setdefault('interface',list()) + subif_interface1_spine={'name':if_interface1_spine} + subif_interface_default_list.append(subif_interface1_spine) + + if 'if_interface2_spine' in resource_value: + if_interface2_spine= str(resource_value['if_interface2_spine']) + subif_interface_default_list=json_networkinstance.setdefault('interface',list()) + subif_interface2_spine={'name':if_interface2_spine} + subif_interface_default_list.append(subif_interface2_spine) + + if 'if_interface3_spine' in resource_value: + if_interface3_spine= str(resource_value['if_interface3_spine']) + subif_interface_default_list=json_networkinstance.setdefault('interface',list()) + subif_interface3_spine={'name':if_interface3_spine} + subif_interface_default_list.append(subif_interface3_spine) + + if 'if_name' in resource_value: + json_networkinstance['name']=if_name + + if 'if_admin_state_spine' in resource_value: + bool_admin_state = bool(resource_value['if_admin_state_spine']) + str_admin_state = 'enable' if bool_admin_state else 'disable' + subif_protocol=json_networkinstance.setdefault('protocols',dict()) + subif_bgp=subif_protocol.setdefault('bgp',dict()) + subif_afisafi=subif_bgp.setdefault('afi-safi',list()) + subif_state = {'admin-state': str_admin_state} + + if 'if_afi_safi_name_bgp_spine' in resource_value: + if_afi_safi_name_bgp_spine = str(resource_value['if_afi_safi_name_bgp_spine']) + subif_state['afi-safi-name'] = if_afi_safi_name_bgp_spine + subif_afisafi.append(subif_state) + + + if 'if_autonomous_system_bgp_spine' in resource_value: + if_autonomous_system_bgp_spine = int(resource_value['if_autonomous_system_bgp_spine']) + subif_bgp['autonomous-system']=if_autonomous_system_bgp_spine + + + + if 'if_export_policy_spine' in resource_value: + if_export_policy_spine = str(resource_value['if_export_policy_spine']) + subif_group_spine = {'export-policy': if_export_policy_spine} + subif_group_spine_list=subif_bgp.setdefault('group',list()) + + + if 'if_group_name_spine' in resource_value: + if_group_name_spine = str(resource_value['if_group_name_spine']) + subif_group_spine['group-name']=if_group_name_spine + + + + if 'if_import_policy_spine' in resource_value: + if_import_policy_spine = str(resource_value['if_import_policy_spine']) + subif_group_spine['import-policy']= if_import_policy_spine + subif_group_spine_list.append(subif_group_spine) + + + if 'if_peer_address_neighbor_spine' in resource_value: + if_peer_address_neighbor_spine = str(resource_value['if_peer_address_neighbor_spine']) + subif_neighbor_spine=subif_bgp.setdefault('neighbor',list()) + subif_state_spine={'peer-address':if_peer_address_neighbor_spine} + + + if 'if_peeras_group_neighbor_spine' in resource_value: + if_peeras_group_neighbor_spine = int(resource_value['if_peeras_group_neighbor_spine']) + subif_state_spine['peer-as']=if_peeras_group_neighbor_spine + + if 'if_peer_group_neighbor_spine' in resource_value: + if_peer_group_neighbor_spine = str(resource_value['if_peer_group_neighbor_spine']) + subif_state_spine['peer-group']=if_peer_group_neighbor_spine + subif_neighbor_spine.append(subif_state_spine) +#######Neighbor2 + if 'if_peer_address2_neighbor_spine' in resource_value: + if_peer_address2_neighbor_spine = str(resource_value['if_peer_address2_neighbor_spine']) + subif_neighbor2_spine={} + subif_neighbor2_spine['peer-address']=if_peer_address2_neighbor_spine + + + if 'if_peeras_group_neighbor2_spine' in resource_value: + if_peeras_group_neighbor2_spine = int(resource_value['if_peeras_group_neighbor2_spine']) + subif_neighbor2_spine['peer-as']=if_peeras_group_neighbor2_spine + + if 'if_peer_group_neighbor2_spine' in resource_value: + if_peer_group_neighbor2_spine = str(resource_value['if_peer_group_neighbor2_spine']) + subif_neighbor2_spine['peer-group']=if_peer_group_neighbor2_spine + subif_neighbor_spine.append(subif_neighbor2_spine) + + if 'if_router_id_spine' in resource_value: + if_router_id_spine = str(resource_value['if_router_id_spine']) + subif_bgp['router-id'] = if_router_id_spine + + + return str_path, json.dumps(json_networkinstance) + def parse(self, json_data: Dict) -> List[Tuple[str, Dict[str, Any]]]: + response = [] + json_network_instance_list = json_data.get('srl_nokia-network-instance:network-instance', []) + + for json_network_instance in json_network_instance_list: + #LOGGER.info('json_networkinstance = {:s}'.format(json.dumps(json_network_instance))) + network_instance = {} + json_interface_list = json_network_instance.get('interface', []) + json_vxlan_list=json_network_instance.get('vxlan-interface',[]) + vxlaninterface_names = [] + for json_vxlan in json_vxlan_list: + #LOGGER.info('json_interface = {:s}'.format(json.dumps(json_interface))) + # LOGGER.info('json_interface.keys = {:s}'.format(str(json_interface.keys()))) + #interface = {} + vxlaninterface_name = json_vxlan.get('name') + + if vxlaninterface_names is not None: + vxlaninterface_names.append(str(vxlaninterface_name)) + else: + pass + interface_names = [] + for json_interface in json_interface_list: + #LOGGER.info('json_interface = {:s}'.format(json.dumps(json_interface))) + # LOGGER.info('json_interface.keys = {:s}'.format(str(json_interface.keys()))) + #interface = {} + interface_name = json_interface.get('name') + + if interface_name is not None: + interface_names.append(str(interface_name)) + + network_instance_name = json_network_instance.get('name') + if network_instance is not None: + network_instance['name'] = str(network_instance_name) + + network_instance_type = json_network_instance.get('type') + if network_instance_type is not None: + network_instance['type'] = str(network_instance_type) + + network_instance_adminstate = json_network_instance.get('admin-state') + if network_instance_adminstate is not None: + network_instance['admin-state'] = str(network_instance_adminstate) + + #LOGGER.info('json_network_instance.keys = {:s}'.format(str(json_network_instance.keys()))) + json_protocols = json_network_instance.get('protocols', {}) + json_bgp_evpn=json_protocols.get('bgp-evpn',{}) + json_bgp_evpn_instance=json_bgp_evpn.get('srl_nokia-bgp-evpn:bgp-instance',[]) + json_bgp_vpn_instance=json_protocols.get('srl_nokia-bgp-vpn:bgp-vpn',{}) + json_bgp_vpn_2=json_bgp_vpn_instance.get('bgp-instance',[]) + #LOGGER.info('json_protocols.keys = {:s}'.format(str(json_protocols.keys()))) + bgp_protocols = json_protocols.get('srl_nokia-bgp:bgp', {}) + #LOGGER.info('bgp_protocols.keys = {:s}'.format(str(bgp_protocols.keys()))) + afi_safi_list: List[Dict] = bgp_protocols.get('afi-safi', []) + #afi_safi_list = bgp_protocols.get('afi-safi', []) + lists = [] + if afi_safi_list is not None: + for afi_safi_entry in afi_safi_list: + #LOGGER.info('afi_safi_entry = {:s}'.format(json.dumps(afi_safi_entry))) + #afi_safi = {} + admin_state_afi = afi_safi_entry.get('admin-state') + afi_safi_name = afi_safi_entry.get('afi-safi-name') + + if admin_state_afi is not None and afi_safi_name is not None: + #afi_safi['admin-state'] = bool(admin_state_afi) + #afi_safi['afi-safi-name'] = bool(afi_safi_name) + lists.append({'admin-state': str(admin_state_afi), 'afi-safi-name': str(afi_safi_name)}) + if afi_safi_entry is not None: + network_instance['protocols'] = {} + network_instance['bgp'] = {} + #network_instance['protocols']['bgp']={'afi-safi': lists} + network_instance['protocols'] = {'bgp': {'afi-safi': afi_safi_entry}} + + + autonomous_system = bgp_protocols.get('autonomous-system') + #LOGGER.info('bgp_protocols = {:s}'.format(json.dumps(bgp_protocols))) + + bgp_protocols['autonomous-system'] = str(autonomous_system) + + group_list = bgp_protocols.get('group', []) + group_list1 = [] + afi_safi_list_group_2 = [] # Ensure initialization outside the loop + for group_1 in group_list: + # LOGGER.info('group = {:s}'.format(json.dumps(group_1))) + group = {} + export_policy = group_1.get('export-policy') + group_name = group_1.get('group-name') + import_policy = group_1.get('import-policy') + peer_as_number = group_1.get('peer-as') + localas = group_1.get('local-as').get('as-number') + timers = group_1.get('timers').get('minimum-advertisement-interval') + + group['export-policy'] = str(export_policy) + group['group-name'] = str(group_name) + group['import-policy'] = str(import_policy) + group['peer-as'] = int(peer_as_number) + group['local-as'] = {} + group['local-as']['as-number'] = localas + group['timers'] = {} + group['timers']['minimum-advertisement-interval'] = timers + group_list1.append(group) + afi_safi_list_2 = group_1.get('afi-safi', []) + for afi_safi_group_entry in afi_safi_list_2: + group2 = {} + admin_state_group = afi_safi_group_entry.get('admin-state') + afi_safi_name_group = afi_safi_group_entry.get('afi-safi-name') + if afi_safi_list_group_2: # Check if list is not empty + group2['admin-state'] = str(admin_state_group) + group2['afi-safi-name'] = str(afi_safi_name_group) + afi_safi_list_group_2.append(group2) + + neighbor_group_list = bgp_protocols.get('neighbor', []) + neighbor_list_inside=[] + #LOGGER.info('json_neighbor = {:s}'.format(json.dumps(json_interface))) + for neighbor_group in neighbor_group_list: + neighbor1 = {} + admin_state_neighbor = neighbor_group.get('admin-state') + peeraddress_neighbor = neighbor_group.get('peer-address') + peergroup_neighbor = neighbor_group.get('peer-group') + local_address_neighbor = neighbor_group.get('transport', {}).get('local-address') + neighbor1['admin-state'] = str(admin_state_neighbor) + neighbor1['peer-address'] = str(peeraddress_neighbor) + neighbor1['peer-group'] = str(peergroup_neighbor) + neighbor1['transport'] = {'local-address': str(local_address_neighbor)} + + neighbor2 = {} + peeraddress_neighbor_2 = neighbor_group.get('peer-address') + peergroup_neighbor_2 = neighbor_group.get('peer-group') + neighbor2['peer-address'] = str(peeraddress_neighbor_2) + neighbor2['peer-group'] = str(peergroup_neighbor_2) + + neighbor_list_inside.append((neighbor1)) + neighbor_list_inside.append(neighbor2) + + router_id = bgp_protocols.get('router-id') + + bgp_protocols['router-id'] = str(router_id) + + bgp_instance1_list=[] + for json_bgp_instance in json_bgp_evpn_instance: + instance1 = {} + id_evpn_bgp_instance = json_bgp_instance.get('id') + admin_state_evpn_bgp_instance = json_bgp_instance.get('admin-state') + vxlan_interface_evpn_bgp_instance = json_bgp_instance.get('vxlan-interface') + evi_evpn_bgp_instance = json_bgp_instance.get('evi', {}) + instance1['id'] = int(id_evpn_bgp_instance) + instance1['admin-state'] = str(admin_state_evpn_bgp_instance) + instance1['vxlan-interface'] = str(vxlan_interface_evpn_bgp_instance) + instance1['evi'] =int(evi_evpn_bgp_instance) + bgp_instance1_list.append(instance1) + bgp_instance2_list=[] + for json_bgp_instance2 in json_bgp_vpn_2: + #LOGGER.info('json_bgp_instance2 = {:s}'.format(json.dumps(json_bgp_instance2))) + instance2 = {} + id_vpn_bgp_instance = json_bgp_instance2.get('id') + export_target_evpn_bgp_instance = json_bgp_instance2.get('route-target',{}).get('export-rt') + import_target_evpn_bgp_instance = json_bgp_instance2.get('route-target',{}).get('import-rt') + instance2['id'] = int(id_vpn_bgp_instance) + instance2['route-target'] = {} + instance2['route-target']['export-rt'] =str(export_target_evpn_bgp_instance) + instance2['route-target']['import-rt'] =str(import_target_evpn_bgp_instance) + bgp_instance2_list.append(instance2) + + + + if len(network_instance) == 0: + continue + + #resource_key = '/network-instance[{:s}]'.format(network_instance_name) + #response.append((resource_key,vxlaninterface_names,network_instance_type,network_instance_adminstate, interface_names,network_instance_name,lists,autonomous_system,group_list1,afi_safi_list_group_2,neighbor_list_inside,router_id,bgp_instance1_list,bgp_instance2_list)) + resource_key = '/network-instance[{:s}]'.format(network_instance_name) + response.append((resource_key, network_instance)) + return response diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstanceInterface.py b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstanceInterface.py new file mode 100644 index 0000000000000000000000000000000000000000..03e3cb01aa880633640e32b5402502ed57bfea57 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstanceInterface.py @@ -0,0 +1,41 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging +from typing import Any, Dict, List, Tuple +from ._Handler import _Handler + +LOGGER = logging.getLogger(__name__) + +class NetworkInstanceInterfaceHandler(_Handler): + def get_resource_key(self) -> str: return '/network-instance/interface' + def get_path(self) -> str: return '/network-instance/interface' + + def compose(self, resource_key : str, resource_value : Dict, delete : bool = False) -> Tuple[str, str]: + ni_name = str(resource_value['name' ]) # default + if_name = str(resource_value['if_name' ]) # ethernet-1/49.0 + + + if delete: + PATH_TMPL = '/network-instances/network-instance[name={:s}]/interface[if_name={:s}]' + str_path = PATH_TMPL.format(ni_name,if_name) + str_data = json.dumps({}) + return str_path, str_data + + str_path = 'network-instance[name={:s}]/interface'.format(ni_name, if_name) + str_data = json.dumps({}) + + def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: + response = [] + return response diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstanceStaticRoute.py b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstanceStaticRoute.py new file mode 100644 index 0000000000000000000000000000000000000000..9d75e9ac66e023c8f7be44d892cb6eec647761eb --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstanceStaticRoute.py @@ -0,0 +1,61 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging +from typing import Any, Dict, List, Tuple +from ._Handler import _Handler + +LOGGER = logging.getLogger(__name__) + +class NetworkInstanceStaticRouteHandler(_Handler): + def get_resource_key(self) -> str: return '/network_instance/static_route' + def get_path(self) -> str: return '/network-instances/network-instance/static_route' + + def compose(self, resource_key : str, resource_value : Dict, delete : bool = False) -> Tuple[str, str]: + ni_name = str(resource_value['name' ]) # test-svc + prefix = str(resource_value['prefix' ]) # '172.0.1.0/24' + + identifier = 'STATIC' + name = 'static' + if delete: + PATH_TMPL = '/network-instances/network-instance[name={:s}]/protocols' + PATH_TMPL += '/protocol[identifier={:s}][name={:s}]/static-routes/static[prefix={:s}]' + str_path = PATH_TMPL.format(ni_name, identifier, name, prefix) + str_data = json.dumps({}) + return str_path, str_data + + next_hop = str(resource_value['next_hop' ]) # '172.0.0.1' + next_hop_index = int(resource_value.get('next_hop_index', 0)) # 0 + + PATH_TMPL = '/network-instances/network-instance[name={:s}]/protocols/protocol[identifier={:s}][name={:s}]' + str_path = PATH_TMPL.format(ni_name, identifier, name) + str_data = json.dumps({ + 'identifier': identifier, 'name': name, + 'config': {'identifier': identifier, 'name': name, 'enabled': True}, + 'static_routes': {'static': [{ + 'prefix': prefix, + 'config': {'prefix': prefix}, + 'next_hops': { + 'next-hop': [{ + 'index': next_hop_index, + 'config': {'index': next_hop_index, 'next_hop': next_hop} + }] + } + }]} + }) + return str_path, str_data + + def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: + response = [] + return response diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstanceVxlanInterface.py b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstanceVxlanInterface.py new file mode 100644 index 0000000000000000000000000000000000000000..288a0fddbf89ff73ade2e240bc27058c398329b9 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/NetworkInstanceVxlanInterface.py @@ -0,0 +1,41 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging +from typing import Any, Dict, List, Tuple +from ._Handler import _Handler + +LOGGER = logging.getLogger(__name__) + +class NetworkInstanceVxlanInterfacehandler(_Handler): + def get_resource_key(self) -> str: return '/network_instance/interface' + def get_path(self) -> str: return '/network-instance/interface' + + def compose(self, resource_key : str, resource_value : Dict, delete : bool = False) -> Tuple[str, str]: + ni_name = str(resource_value['name' ]) # vrf-1 + if_name = str(resource_value['if_name' ]) # vxlan1.1 + + + if delete: + PATH_TMPL = '/network-instances/network-instance[name={:s}]/interface[if_name={:s}]' + str_path = PATH_TMPL.format(ni_name,if_name) + str_data = json.dumps({}) + return str_path, str_data + + str_path = 'network-instance[name={:s}]/vxlan-interface'.format(ni_name, if_name) + str_data = json.dumps({}) + + def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: + response = [] + return response diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/Tools.py b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..30343ac28a46a0c1d24bcb66d07fa03fa377f9fa --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/Tools.py @@ -0,0 +1,30 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import re +from typing import Any, Dict, Iterable + +RE_REMOVE_FILTERS = re.compile(r'\[[^\]]+\]') +RE_REMOVE_NAMESPACES = re.compile(r'\/[a-zA-Z0-9\_\-]+:') + +def get_schema(resource_key : str): + resource_key = RE_REMOVE_FILTERS.sub('', resource_key) + resource_key = RE_REMOVE_NAMESPACES.sub('/', resource_key) + return resource_key + +def dict_get_first(d : Dict, field_names : Iterable[str], default=None) -> Any: + for field_name in field_names: + if field_name not in d: continue + return d[field_name] + return default diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/TunnelInterface.py b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/TunnelInterface.py new file mode 100644 index 0000000000000000000000000000000000000000..bbbd32de6d373fd919b9098bf0ecb6e658ae5f13 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/TunnelInterface.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging +from typing import Any, Dict, List, Tuple +from ._Handler import _Handler + +LOGGER = logging.getLogger(__name__) + +class TunnelInterfaceHandler(_Handler): + def get_resource_key(self) -> str: + return '/tunnel-interface' + + def get_path(self) -> str: + return '/srl_nokia-tunnel-interfaces:tunnel-interface' + #return '/tunnel-interface' + + def compose(self, resource_key: str, resource_value: Dict, delete: bool = False) -> Tuple[str, str]: + if_name = str(resource_value['if_name']) + + if delete: + PATH_TMPL = '/tunnel-interface[name={:s}]' + str_path = PATH_TMPL.format(if_name) + str_data = json.dumps({}) + return str_path, str_data + + + str_path = '/tunnel-interface[name={:s}]'.format(if_name) + + + if 'if_index' in resource_value: + if_index = str(resource_value['if_index']) + json_tunnel={} + subif_vxlaninterface = json_tunnel.setdefault('vxlan-interface', list()) + subif = {'index': if_index} + + if 'if_type_tunnel' in resource_value: + if_type_tunnel = str(resource_value['if_type_tunnel']) + subif['type'] = if_type_tunnel + + if 'if_vni_tunnel' in resource_value: + if_vni_tunnel = int(resource_value['if_vni_tunnel']) + subif['ingress']={} + subif['ingress']['vni'] = if_vni_tunnel + subif_vxlaninterface.append(subif) + + + return str_path, json.dumps(json_tunnel) + + def parse(self, json_data: Dict) -> List[Tuple[str, Dict[str, Any]]]: + response = [] + json_tunnel_list = json_data.get('srl_nokia-tunnel-interfaces:tunnel-interface', []) + for json_tunnel in json_tunnel_list: + tunnel_interface1 = {} + name = json_tunnel.get('name', {}) + #tunnel_interface1['name']=str(name) + json_vxlan_list = json_tunnel.get('vxlan-interface', []) + lists = tunnel_interface1.setdefault('vxlan-interface', []) + for json_vxlan1 in json_vxlan_list: + tunnel_interface2={} + index = json_vxlan1.get('index', {}) + type = json_vxlan1.get('type', {}) + ingress = json_vxlan1.get('ingress', {}).get('vni') + + tunnel_interface2['index'] = str(index) + tunnel_interface2['type'] = str(type) + tunnel_interface2['ingress'] = {} + tunnel_interface2['ingress']['vni'] = int(ingress) + + lists.append(tunnel_interface2) + + # if len(tunnel_interface1 ) == 0: + # continue + + resource_key = '/tunnel-interface[{:s}]'.format(name) + response.append((resource_key, tunnel_interface1 )) + + return response diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/_Handler.py b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/_Handler.py new file mode 100644 index 0000000000000000000000000000000000000000..d20c77b1165decce7ea07243beb782a6b749734b --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/_Handler.py @@ -0,0 +1,32 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Any, Dict, List, Tuple + +class _Handler: + def get_resource_key(self) -> str: + # Retrieve the TeraFlowSDN resource_key path schema used to point this handler + raise NotImplementedError() + + def get_path(self) -> str: + # Retrieve the OpenConfig path schema used to interrogate the device + raise NotImplementedError() + + def compose(self, resource_key : str, resource_value : Dict, delete : bool = False) -> Tuple[str, str]: + # Compose a Set/Delete message based on the resource_key/resource_value fields, and the delete flag + raise NotImplementedError() + + def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: + # Parse a Reply from the device and return a list of resource_key/resource_value pairs + raise NotImplementedError() diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/__init__.py b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6c8c4555926daa437b6b472ceb97db7ce54de810 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/__init__.py @@ -0,0 +1,148 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from typing import Dict, List, Optional, Tuple, Union + +from grpc import RpcContext +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES,RESOURCE_NETWORK_INSTANCE_VXLAN,RESOURCE_ROUTING_POLICY,RESOURCE_TUNNEL_INTERFACE +from ._Handler import _Handler +from .Component import ComponentHandler +from .Interface import InterfaceHandler +from .InterfaceCounter import InterfaceCounterHandler +from .NetworkInstance import NetworkInstanceHandler +from .NetworkInstanceInterface import NetworkInstanceInterfaceHandler +from .NetworkInstanceVxlanInterface import NetworkInstanceVxlanInterfacehandler +from .routingpolicy import routingpolicyhandler +from .TunnelInterface import TunnelInterfaceHandler +from .Tools import get_schema + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +comph = ComponentHandler() +ifaceh = InterfaceHandler() +ifctrh = InterfaceCounterHandler() +nih = NetworkInstanceHandler() +niifh = NetworkInstanceInterfaceHandler() +nivi = NetworkInstanceVxlanInterfacehandler() +rp = routingpolicyhandler() +ti = TunnelInterfaceHandler() + + +ALL_RESOURCE_KEYS = [ + RESOURCE_ENDPOINTS, + RESOURCE_INTERFACES, + RESOURCE_NETWORK_INSTANCES, + RESOURCE_NETWORK_INSTANCE_VXLAN, + RESOURCE_ROUTING_POLICY, + RESOURCE_TUNNEL_INTERFACE, +] + +RESOURCE_KEY_MAPPER = { + RESOURCE_ENDPOINTS : comph.get_resource_key(), + RESOURCE_INTERFACES : ifaceh.get_resource_key(), + RESOURCE_NETWORK_INSTANCES : nih.get_resource_key(), + RESOURCE_NETWORK_INSTANCE_VXLAN : nivi.get_resource_key(), + RESOURCE_ROUTING_POLICY : rp.get_resource_key(), + RESOURCE_TUNNEL_INTERFACE : ti.get_resource_key(), +} + +PATH_MAPPER = { + '/components' : comph.get_path(), + '/interface' : ifaceh.get_path(), + '/network-instance' : nih.get_path(), + '/network-instance/interface' : nivi.get_path(), + '/routing-policy' : rp.get_path(), + '/tunnel-interface' : ti.get_path(), + +} + +RESOURCE_KEY_TO_HANDLER = { + comph.get_resource_key() : comph, + ifaceh.get_resource_key() : ifaceh, + ifctrh.get_resource_key() : ifctrh, + nih.get_resource_key() : nih, + niifh.get_resource_key() : niifh, + nivi.get_resource_key() : nivi, + rp.get_resource_key() : rp, + ti.get_resource_key() :ti, + +} + +PATH_TO_HANDLER = { + comph.get_path() : comph, + ifaceh.get_path() : ifaceh, + ifctrh.get_path() : ifctrh, + nih.get_path() : nih, + niifh.get_path() : niifh, + nivi.get_path() : nivi, + rp.get_path() :rp, + ti.get_path() :ti, +} + +def get_handler( + resource_key: Optional[str] = None, path: Optional[str] = None, raise_if_not_found=True +) -> Optional[_Handler]: + if (resource_key is None) == (path is None): + MSG = 'Exactly one of resource_key({:s}) or path({:s}) must be specified' + raise Exception(MSG.format(str(resource_key), str(path))) # pylint: disable=broad-exception-raised + if resource_key is not None: + resource_key_schema = get_schema(resource_key) + resource_key_schema = RESOURCE_KEY_MAPPER.get(resource_key_schema, resource_key_schema) + handler = RESOURCE_KEY_TO_HANDLER.get(resource_key_schema) + if handler is None and raise_if_not_found: + MSG = 'Handler not found: resource_key={:s} resource_key_schema={:s}' + raise Exception(MSG.format(str(resource_key), str(resource_key_schema))) + elif path is not None: + path_schema = get_schema(path) + path_schema = PATH_MAPPER.get(path_schema, path_schema) + LOGGER.debug("Original path: %s, Schema path: %s", path, path_schema) + handler = PATH_TO_HANDLER.get(path_schema) + LOGGER.debug("Mapped path schema: %s", path_schema) + if handler is None and raise_if_not_found: + MSG = 'Handler not found: path={:s} path_schema={:s}' + LOGGER.error(MSG.format(str(path), str(path_schema))) + raise Exception(MSG.format(str(path), str(path_schema))) + LOGGER.debug("Handler found for path: %s", handler.get_path()) + return handler + + + +def get_path(resource_key: str) -> str: + handler = get_handler(resource_key=resource_key) + path = handler.get_path() + #LOGGER.debug("get_path: resource_key=%s, path=%s", resource_key, path) + return path + +def parse(resource_key: str, str_path: str, value: Union[Dict, List]): + #if str_path == '/': str_path = '/{:s}'.format(list(value.keys())[0]) + handler = get_handler(resource_key=resource_key) + #LOGGER.debug("parse: str_path=%s, value=%s", str_path, value) + return handler.parse(value) + +def compose(resource_key: str, resource_value: Union[Dict, List], delete: bool = False) -> Tuple[str, str]: + handler = get_handler(resource_key=resource_key) + #LOGGER.debug("compose: resource_key=%s, resource_value=%s, delete=%s", resource_key, resource_value, delete) + return handler.compose(resource_key, resource_value, delete=delete) + +#def get_path(resource_key : str) -> str: +# return get_handler(resource_key=resource_key).get_path() +# +#def parse(str_path : str, value : Union[Dict, List]): +# return get_handler(path=str_path).parse(value) +# +#def compose(resource_key : str, resource_value : Union[Dict, List], delete : bool = False) -> Tuple[str, str]: +# return get_handler(resource_key=resource_key).compose(resource_key, resource_value, delete=delete) diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/json_data = {.json b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/json_data = {.json new file mode 100644 index 0000000000000000000000000000000000000000..6fffde5a5178db7fe1f5c74d5dec8c08722718c4 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/json_data = {.json @@ -0,0 +1,2768 @@ + json_data = { + "features": [ + "aaa-spiffe-id", + "admin-user-roles", + "anycast-gw", + "arp-nd-datapath-programming", + "bgp-add-paths", + "bgp-afi-safi-policy", + "bgp-app-warm-restart", + "bgp-auth-password", + "bgp-cfg-afi-safi-list", + "bgp-graceful-restart-gaps", + "bgp-ipv6-next-hop-tunnel-resolution", + "bgp-local-as-container-iso-list", + "bgp-max-ecmp-hash-buckets", + "bgp-mtu-discovery", + "bgp-prefix-limit", + "bgp-restart-max-wait", + "bgp-rib-afi-safi-list", + "bgp-rib-afi-safi-route", + "bgp-single-hop-connected-check", + "bgp-unnumbered-peers", + "bridged", + "bt-evpn-vlan-aware-bundle-interop", + "cam-cammgr-thread-programming", + "cam-multithread-programming", + "cli-plugin-authorization", + "dac-link-training", + "dhcp-relay-fqdn", + "dot1p-classifier-rewrite", + "dot1q-vlan-ranges", + "dynamic-mcid", + "dynamic-tcam", + "event-handler", + "evpn", + "evpn-advertise-arp-nd-only-with-mac-table-entry", + "evpn-ifl-unequal-ecmp", + "evpn-mac-ip-adv-arp-nd-ext-comm", + "evpn-mgr-warm-restart", + "evpn-mh-ip-aliasing", + "evpn-mh-manual-alg", + "evpn-mh-pref-alg", + "evpn-mh-single-active", + "evpn-mh-virtual-es", + "factory-reset", + "fixed", + "future-23-10", + "future-23-7", + "gnmi-services", + "gnmi-union-replace", + "gnoi-healthz", + "ingress-subif-policing", + "interface-references", + "ip-acl-dscp-set", + "ip-qos-multifield", + "ipv4-unnumbered", + "ipv6", + "irb-interface", + "isis-level-database", + "isis-lsdb", + "isis-mi", + "isis-mt", + "isis-nsf", + "l2-mac-learn-mgr-warm-restart", + "l2-mac-mgr-warm-restart", + "l2-proxy-arp", + "l2-proxy-arp-nd-control-flood-on-evpn", + "l2-proxy-arp-nd-warm-restart", + "l2-proxy-nd", + "l2-static-mac-mgr-warm-restart", + "l2cp-transparency", + "l3-proxy-arp", + "l3-proxy-nd", + "lacp-fallback", + "lag", + "license", + "load-persistent-passwords-at-startup", + "mcid-mgr-warm-restart", + "mgmt-server-app-warm-restart", + "mirroring", + "mirroring-intf-stats", + "named-queues-and-named-fcs", + "packet-tracer", + "platform-7220-d2", + "qos-high-threshold-system-limit", + "ra-guard", + "reload-delay", + "route-leaking", + "routing-policy-bgp-med", + "routing-policy-named-statements", + "scheduler-policies", + "segment-routing-adjacency-sid", + "segment-routing-shared-sid", + "snmp-mib-bgp", + "snmp-mib-chassis", + "snmp-mib-interface", + "storm-control", + "subif-acl-policer", + "subif-policer", + "tools-force-pwd-change", + "trident3", + "unequal-ecmp", + "unified-forwarding-tables", + "virtual-ip-discovery", + "vlan-id-any", + "vlan-tpid", + "vxlan", + "vxlan-mgr-warm-restart", + "vxlan-stats", + "warm-reboot" + ], + "srl_nokia-configuration:configuration": { + "last-change": "2024-03-08T15:03:55.418Z", + "max-checkpoints": 10, + "max-candidates": 10, + "idle-timeout": 10080, + "auto-checkpoint": false, + "checkpoint": [ + { + "id": 0, + "name": "clab-initial", + "comment": "set by containerlab", + "created": "2024-03-08T15:03:57.451Z", + "version": "v23.10.1", + "tag": "v23.10.1-218-ga3fc1bea5a", + "username": "srlinux", + "size": "78425" + } + ], + "commit": [ + { + "id": 1, + "type": "shared", + "name": "default", + "status": "complete", + "username": "__internal__", + "started": "2024-03-08T15:03:47.557Z", + "ended": "2024-03-08T15:03:50.063Z" + }, + { + "id": 2, + "type": "shared", + "name": "default", + "status": "complete", + "username": "root", + "started": "2024-03-08T15:03:55.162Z", + "ended": "2024-03-08T15:03:55.418Z" + } + ] + }, + "srl_nokia-aaa:aaa": { + "authentication": { + "exit-on-reject": false, + "idle-timeout": 7200, + "authentication-method": [ + "local" + ], + "admin-user": { + "password": "$ar2$aOvsuj0ALlU=$r750fMa3ZEA/Di8dIfU2fQ==", + "last-successful-login": "2024-03-11T14:52:11.551Z" + }, + "linuxadmin-user": { + "password": "$6$Ni233gqiuJ9zarHl$ZKtMh/vEvlY7XpHSYSJVrFNpUDeM/dsfaxK6csljO5X3.ImsDn8yiOcPASsTNpa1r6XrVlzrpnlJKqYIK0gvO1" + }, + "session": [ + { + "id": 91, + "username": "admin", + "service-name": "srlinux-gnmi", + "authentication-method": "local", + "tty-name": "", + "remote-host": "", + "login-time": "2024-03-11T14:51:04.510Z" + }, + { + "id": 95, + "username": "admin", + "service-name": "srlinux-gnmi", + "authentication-method": "local", + "tty-name": "", + "remote-host": "", + "login-time": "2024-03-11T14:51:39.927Z" + }, + { + "id": 97, + "username": "admin", + "service-name": "srlinux-gnmi", + "authentication-method": "local", + "tty-name": "", + "remote-host": "", + "login-time": "2024-03-11T14:52:11.551Z" + }, + { + "id": 98, + "username": "admin", + "service-name": "srlinux-gnmi", + "authentication-method": "local", + "tty-name": "", + "remote-host": "", + "login-time": "2024-03-11T14:52:11.551Z" + } + ], + "password": { + "hash-method": "ar2", + "aging": 0, + "change-on-first-login": false, + "history": 0, + "require-ntp-sync": true, + "complexity-rules": { + "minimum-length": 1, + "maximum-length": 1023, + "minimum-lowercase": 0, + "minimum-uppercase": 0, + "minimum-numeric": 0, + "minimum-special-character": 0, + "allow-username": true + }, + "lockout-policy": { + "attempts": 0, + "time": 1, + "lockout": 15 + } + } + }, + "accounting": { + "accounting-method": [ + "local" + ] + }, + "server-group": [ + { + "name": "local", + "type": "srl_nokia-aaa-types:local", + "timeout": 10, + "priv-lvl-authorization": false + } + ] + }, + "srl_nokia-keychains:authentication": {}, + "srl_nokia-system-protocols:protocols": {}, + "srl_nokia-boot:boot": { + "autoboot": { + "oper-state": "inactive", + "timeout": 3600, + "attempts": 3, + "interface": "mgmt0", + "client-id": "serial" + } + }, + "srl_nokia-interfaces-l2cp:l2cp-transparency": { + "l2cp-statistics": { + "total-in-packets": "8617", + "total-in-discarded-packets": "0", + "total-in-tunneled-packets": "0", + "total-in-trap-to-cpu-packets": "8617", + "lldp": { + "in-tunneled-packets": "0", + "in-trap-to-cpu-packets": "8617" + }, + "lacp": { + "in-tunneled-packets": "0", + "in-trap-to-cpu-packets": "0" + }, + "xstp": { + "in-tunneled-packets": "0", + "in-trap-to-cpu-packets": "0" + }, + "dot1x": { + "in-tunneled-packets": "0", + "in-trap-to-cpu-packets": "0" + }, + "ptp": { + "in-tunneled-packets": "0", + "in-trap-to-cpu-packets": "0" + } + } + }, + "srl_nokia-lacp:lacp": {}, + "srl_nokia-lldp:lldp": { + "admin-state": "enable", + "hello-timer": "30", + "hold-multiplier": 4, + "system-name": "leaf1", + "system-description": "SRLinux-v23.10.1-218-ga3fc1bea5a leaf1 5.15.0-97-generic #107-Ubuntu SMP Wed Feb 7 13:26:48 UTC 2024", + "chassis-id": "1A:A2:00:FF:00:00", + "chassis-id-type": "MAC_ADDRESS", + "statistics": { + "frame-in": "8617", + "frame-out": "25850", + "frame-error-in": "0", + "frame-discard": "0", + "tlv-discard": "0", + "tlv-unknown": "0", + "tlv-accepted": "60319", + "entries-aged-out": "0" + }, + "interface": [ + { + "name": "ethernet-1/1", + "admin-state": "enable", + "oper-state": "up", + "statistics": { + "frame-in": "0", + "frame-out": "8616", + "frame-error-in": "0", + "frame-discard": "0", + "tlv-discard": "0", + "tlv-unknown": "0", + "frame-error-out": "0" + } + }, + { + "name": "ethernet-1/49", + "admin-state": "enable", + "oper-state": "up", + "statistics": { + "frame-in": "8617", + "frame-out": "8617", + "frame-error-in": "0", + "frame-discard": "0", + "tlv-discard": "0", + "tlv-unknown": "0", + "frame-error-out": "0" + }, + "neighbor": [ + { + "id": "1A:94:02:FF:00:00", + "first-message": "2024-03-08T15:03:55.946Z", + "last-update": "2024-03-11T14:51:42.350Z", + "system-name": "spine1", + "system-description": "SRLinux-v23.10.1-218-ga3fc1bea5a spine1 5.15.0-97-generic #107-Ubuntu SMP Wed Feb 7 13:26:48 UTC 2024", + "chassis-id": "1A:94:02:FF:00:00", + "chassis-id-type": "MAC_ADDRESS", + "port-id": "ethernet-1/1", + "port-id-type": "INTERFACE_NAME", + "port-description": "", + "capability": [ + { + "name": "srl_nokia-lldp-types:ROUTER", + "enabled": true + } + ] + } + ] + }, + { + "name": "mgmt0", + "admin-state": "enable", + "oper-state": "up", + "statistics": { + "frame-in": "0", + "frame-out": "8617", + "frame-error-in": "0", + "frame-discard": "0", + "tlv-discard": "0", + "tlv-unknown": "0", + "frame-error-out": "1" + } + } + ] + }, + "srl_nokia-mtu:mtu": { + "default-port-mtu": 9232, + "default-l2-mtu": 9232, + "default-ip-mtu": 1500, + "min-path-mtu": 552 + }, + "srl_nokia-system-name:name": { + "host-name": "leaf1" + }, + "srl_nokia-gnmi-server:gnmi-server": { + "admin-state": "enable", + "timeout": 7200, + "rate-limit": 65000, + "session-limit": 20, + "commit-confirmed-timeout": 0, + "commit-save": false, + "include-defaults-in-config-only-responses": false, + "trace-options": [ + "request", + "response", + "common" + ], + "network-instance": [ + { + "name": "mgmt", + "admin-state": "enable", + "oper-state": "up", + "use-authentication": true, + "tls-profile": "clab-profile", + "port": 57400, + "services": [ + "srl_nokia-gnmi-server:gnmi" + ], + "source-address": [ + "::" + ] + } + ], + "unix-socket": { + "admin-state": "enable", + "oper-state": "up", + "use-authentication": true, + "socket-path": "/opt/srlinux/var/run/sr_gnmi_server", + "services": [ + "srl_nokia-gnmi-server:gnmi", + "srl_nokia-gnmi-server:gnoi" + ] + } + }, + "srl_nokia-tls:tls": { + "server-profile": [ + { + "name": "clab-profile", + "key": "$aes1$ATCyNz1VYoUafG8=$Y1bnicVFVnHy/KlyTF4QYRwTJ5SVyEmPcZvKsx04lWIE+f3Mz1wI5LlEspzDmbM+OpscmPVeMKXpOZwKI7UM770QwG06lhpy9dNolQqAJpVYVKeFSObRzOy0qWyyuIBwDNTr7SfYlHB07ljhCredaUsEpNejN7cCc3xv2eQRPyua+NQhuI6Ms2M6voZkUoj14m3GiB9IUUqLaAEQpw0xcpXJ1zXeQwpK7oSN2d0ehzop1dGWWCi9bFdjk83UOj/w/gg5VAAmeDEeyR6aNJqa4oO/nqskggxfzvoWLkAojE3+/61+ccxWCL7BbEWeVVtkBTuL4fWAc5dVIqeH9BVODgXhCLNkyVcS4xBX1ObdIPs4+7Tmng91LHkC92N4MkECeThCUigJ/1qnlXA+ht9dK6sRZe85f6ltqWUXck87hCbtoucBLAZfXkKCTiaTLY5rgHRvMqAwiWSwelfhn0IFycxD+0UcdxaAR+6cIP3XBYeWSQWTCjFFFfOlFDX447npLkgXGTgag1id2ysZSxCZYuoUIVF79RdcZaTIruFpIyAcPz8d6qUqNg6d/TB5+a2fmR8zE9OqEFl3pYXqt93Q8Rsf9Cm79WClCEH7hqKn2wQO1B0VjNcCaLJoakaXLmkrhXPoUNHNjK3P5YiuNEsmPHl7umVuhJTbcJLl4rt+djYnfbwRxmtpnzvAbE+9AMv68CRjRBgmz4xq6fLzQrEPLwHOx6V1KRmQNpvfvfe4zbPmZ4fWcFXgTDOzRZJn1VTALvmE7Q2ixJgWp7Sn7aMzlvhh3J9LsienjVT8j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+s4/L1YxfE18V06ArbXR6nmwIDAQAB\no4GxMIGuMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYB\nBQUHAwEwDgYDVR0OBAcEBQECAwQGMB8GA1UdIwQYMBaAFPClEVv4DfVq7CaMZ7zj\nSro/N2/rMEwGA1UdEQRFMEOCBWxlYWYxghFjbGFiLWV2cG4wMS1sZWFmMYIPbGVh\nZjEuZXZwbjAxLmlvhwSsFBRmhxAgAQFyACAAIAAAAAAAAAACMA0GCSqGSIb3DQEB\nCwUAA4IBAQCOaBP6aAdWEx2aSrjfFIk46RxPulJOcwBgpBvLYRYYlbL6I5ky81Po\nUbP4NYyFjIvAqTH6mbkbIZ/qXbjdw0CylWHYdOlgKfGxUNZ9j/tCpWewjv5PkZtV\nIF9W/k2P9g+Gk77no0OR+wHGdEZfyPfQwTKNQU2YSGQJzj14gYJbYv9WsBnTTtwl\nZULNf89XTcEAXe15EYv90ItEzuCao6ky7ZzEElmtadxrDqSFVQJnfZYIxKftziRQ\nNpQ8eNAvN+ApAa+u6TYztULGzivX9hy/T7zDABnaPhdBsCUO14COOi7VY6ZeHMM1\nOCK0zX+xEhiPxqFW/IoU2DqPVekPU9s9\n-----END CERTIFICATE-----\n", + "authenticate-client": false, + "cipher-list": [ + "srl_nokia-tls:ecdhe-ecdsa-aes256-gcm-sha384", + "srl_nokia-tls:ecdhe-ecdsa-aes128-gcm-sha256", + "srl_nokia-tls:ecdhe-rsa-aes256-gcm-sha384", + "srl_nokia-tls:ecdhe-rsa-aes128-gcm-sha256" + ] + } + ] + }, + "srl_nokia-json-rpc:json-rpc-server": { + "admin-state": "enable", + "commit-confirmed-timeout": 0, + "network-instance": [ + { + "name": "mgmt", + "http": { + "admin-state": "enable", + "oper-state": "up", + "use-authentication": true, + "session-limit": 10, + "port": 80, + "source-address": [ + "::" + ] + }, + "https": { + "admin-state": "enable", + "oper-state": "up", + "use-authentication": true, + "session-limit": 10, + "port": 443, + "tls-profile": "clab-profile", + "source-address": [ + "::" + ] + } + } + ], + "unix-socket": { + "admin-state": "disable", + "oper-state": "down", + "use-authentication": true, + "socket-path": "" + } + }, + "srl_nokia-system-bridge-table:bridge-table": { + "mac-learning": { + "mac-relearn-only": false + }, + "mac-limit": { + "maximum-entries": 156000, + "warning-threshold-pct": 95 + }, + "statistics": { + "active-entries": "0", + "total-entries": "0", + "failed-entries": "0", + "mac-type": [ + { + "type": "static", + "active-entries": "0", + "total-entries": "0", + "failed-entries": "0" + }, + { + "type": "duplicate", + "active-entries": "0", + "total-entries": "0", + "failed-entries": "0" + }, + { + "type": "learnt", + "active-entries": "0", + "total-entries": "0", + "failed-entries": "0" + }, + { + "type": "irb-interface", + "active-entries": "0", + "total-entries": "0", + "failed-entries": "0" + }, + { + "type": "evpn", + "active-entries": "0", + "total-entries": "0", + "failed-entries": "0" + }, + { + "type": "evpn-static", + "active-entries": "0", + "total-entries": "0", + "failed-entries": "0" + }, + { + "type": "irb-interface-anycast", + "active-entries": "0", + "total-entries": "0", + "failed-entries": "0" + }, + { + "type": "proxy-anti-spoof", + "active-entries": "0", + "total-entries": "0", + "failed-entries": "0" + }, + { + "type": "reserved", + "active-entries": "0", + "total-entries": "0", + "failed-entries": "0" + }, + { + "type": "eth-cfm", + "active-entries": "0", + "total-entries": "0", + "failed-entries": "0" + } + ] + } + }, + "srl_nokia-dns:dns": { + "oper-state": "up", + "network-instance": "mgmt", + "server-list": [ + "84.88.62.194" + ] + }, + "srl_nokia-load-balancing:load-balancing": { + "hash-options": { + "hash-seed": 0, + "destination-address": true, + "destination-port": true, + "ipv6-flow-label": false, + "protocol": true, + "source-address": true, + "source-port": true, + "vlan": true, + "mpls-label-stack": false + } + }, + "srl_nokia-ntp:clock": { + "timezone": "UTC" + }, + "srl_nokia-snmp:snmp": { + "community": "$aes1$AWCxS35D1SWo6m8=$1ZTaOX6kE3OwF9Vuv+RQnQ==", + "network-instance": [ + { + "name": "mgmt", + "admin-state": "enable", + "oper-state": "up" + } + ] + }, + "srl_nokia-ssh:ssh-server": { + "host-key": { + "preserve": true + }, + "network-instance": [ + { + "name": "mgmt", + "admin-state": "enable", + "timeout": 0, + "rate-limit": 20, + "oper-state": "up", + "protocol-version": 2 + } + ] + }, + "srl_nokia-system-banner:banner": { + "login-banner": "................................................................\n: Welcome to Nokia SR Linux! :\n: Open Network OS for the NetOps era. :\n: :\n: This is a freely distributed official container image. :\n: Use it - Share it :\n: :\n: Get started: https://learn.srlinux.dev :\n: Container: https://go.srlinux.dev/container-image :\n: Docs: https://doc.srlinux.dev/23-10 :\n: Rel. notes: https://doc.srlinux.dev/rn23-10-1 :\n: YANG: https://yang.srlinux.dev/release/v23.10.1 :\n: Discord: https://go.srlinux.dev/discord :\n: Contact: https://go.srlinux.dev/contact-sales :\n................................................................\n" + }, + "srl_nokia-system-info:information": { + "description": "SRLinux-v23.10.1-218-ga3fc1bea5a 7220 IXR-D2 Copyright (c) 2000-2020 Nokia. Kernel 5.15.0-97-generic #107-Ubuntu SMP Wed Feb 7 13:26:48 UTC 2024", + "current-datetime": "2024-03-11T14:52:11.490Z", + "last-booted": "2024-03-08T15:03:49.013Z", + "version": "v23.10.1-218-ga3fc1bea5a" + }, + "srl_nokia-logging:logging": { + "subsystem-facility": "local6", + "use-fqdn": false, + "console": { + "format": "%TIMEGENERATED:::date-rfc3339% %HOSTNAME% %SYSLOGTAG%%MSG:::sp-if-no-1st-sp%%MSG:::drop-last-lf%\\n" + }, + "buffer": [ + { + "buffer-name": "messages", + "persist": 0, + "format": "%TIMEGENERATED:::date-rfc3339% %HOSTNAME% %SYSLOGTAG%%MSG:::sp-if-no-1st-sp%%MSG:::drop-last-lf%\\n", + "rotate": 3, + "size": "10000000", + "facility": [ + { + "facility-name": "local6", + "priority": { + "match-above": "informational" + } + } + ] + }, + { + "buffer-name": "system", + "persist": 0, + "format": "%TIMEGENERATED:::date-rfc3339% %HOSTNAME% %SYSLOGTAG%%MSG:::sp-if-no-1st-sp%%MSG:::drop-last-lf%\\n", + "rotate": 4, + "size": "10M", + "facility": [ + { + "facility-name": "auth", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "cron", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "daemon", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "ftp", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "kern", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "lpr", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "mail", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "news", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "syslog", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "user", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "uucp", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "local0", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "local1", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "local2", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "local3", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "local4", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "local5", + "priority": { + "match-above": "warning" + } + }, + { + "facility-name": "local7", + "priority": { + "match-above": "warning" + } + } + ] + } + ], + "file": [ + { + "file-name": "messages", + "directory": "/var/log/srlinux/file", + "format": "%TIMEGENERATED:::date-rfc3339% %HOSTNAME% %SYSLOGTAG%%MSG:::sp-if-no-1st-sp%%MSG:::drop-last-lf%\\n", + "rotate": 3, + "size": "10000000", + "facility": [ + { + "facility-name": "local6", + "priority": { + "match-above": "warning" + } + } + ] + } + ] + }, + "srl_nokia-system-multicast:multicast": { + "multicast-ids": { + "statistics": { + "maximum-ids": 16380, + "current-usage": "0", + "total-pending": "0", + "multicast-id-user-type": [ + { + "user": "mac-vrf", + "current-usage": "0", + "total-pending": "0" + }, + { + "user": "vxlan-interface", + "current-usage": "0", + "total-pending": "0" + }, + { + "user": "l2-proxy-arp-nd", + "current-usage": "0", + "total-pending": "0" + }, + { + "user": "mfib", + "current-usage": "0", + "total-pending": "0" + }, + { + "user": "mac-vrf-bgp-evpn", + "current-usage": "0", + "total-pending": "0" + } + ] + } + } + }, + "srl_nokia-app-mgmt:app-management": { + "application": [ + { + "name": "aaa_mgr", + "pid": 1492, + "state": "running", + "last-change": "2024-03-08T15:03:44.627Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_aaa_mgr", + "search-command": "./sr_aaa_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-aaa", + "srl_nokia-aaa-password", + "srl_nokia-aaa-types", + "srl_nokia-gnsi-authz" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "acl_mgr", + "pid": 1521, + "state": "running", + "last-change": "2024-03-08T15:03:44.627Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_acl_mgr", + "search-command": "./sr_acl_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-acl", + "srl_nokia-policy-forwarding", + "srl_nokia-packet-match-types", + "srl_nokia-acl-qos", + "srl_nokia-acl-policers" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "app_mgr", + "pid": 1385, + "state": "running", + "last-change": "2024-03-08T15:03:45.154Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_app_mgr", + "search-command": "./sr_app_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "restricted-operations": [ + "start", + "stop", + "restart", + "quit", + "kill" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-app-mgmt" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "arp_nd_mgr", + "pid": 1561, + "state": "running", + "last-change": "2024-03-08T15:03:44.627Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_arp_nd_mgr", + "search-command": "./sr_arp_nd_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-interfaces-nbr", + "srl_nokia-interfaces-nbr-virtual-ip-discovery", + "srl_nokia-interfaces-router-adv" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "bfd_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_bfd_mgr", + "search-command": "./sr_bfd_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-bfd", + "srl_nokia-micro-bfd" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "bgp_mgr", + "pid": 2595, + "state": "running", + "last-change": "2024-03-08T15:03:47.890Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_bgp_mgr", + "search-command": "./sr_bgp_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-bgp", + "srl_nokia-bgp-vpn", + "srl_nokia-rib-bgp", + "srl_nokia-system-network-instance-bgp-vpn", + "srl_nokia-system-protocols" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "chassis_mgr", + "pid": 1597, + "state": "running", + "last-change": "2024-03-08T15:03:44.627Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_chassis_mgr", + "search-command": "./sr_chassis_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "stop", + "quit", + "kill", + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-boot", + "srl_nokia-interfaces", + "srl_nokia-interfaces-bridge-table", + "srl_nokia-interfaces-ip-dhcp", + "srl_nokia-interfaces-l2cp", + "srl_nokia-interfaces-p4rt", + "srl_nokia-interfaces-vlans", + "srl_nokia-interfaces-vxdp", + "srl_nokia-if-ip", + "srl_nokia-if-mpls", + "srl_nokia-mtu", + "srl_nokia-packet-link-qual", + "srl_nokia-platform", + "srl_nokia-platform-acl", + "srl_nokia-platform-chassis", + "srl_nokia-platform-control", + "srl_nokia-platform-datapath-resources", + "srl_nokia-platform-fabric", + "srl_nokia-platform-fan", + "srl_nokia-platform-healthz", + "srl_nokia-platform-lc", + "srl_nokia-platform-linecard-fib", + "srl_nokia-platform-mtu", + "srl_nokia-platform-p4rt", + "srl_nokia-platform-pipeline-counters", + "srl_nokia-platform-psu", + "srl_nokia-platform-qos", + "srl_nokia-platform-resource-mgmt", + "srl_nokia-platform-resource-monitoring", + "srl_nokia-platform-redundancy", + "srl_nokia-platform-secure-boot", + "srl_nokia-platform-tcam", + "srl_nokia-platform-tpm", + "srl_nokia-platform-vxdp", + "srl_nokia-system-name" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "dev_mgr", + "pid": 1399, + "state": "running", + "last-change": "2024-03-08T15:03:42.344Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 1, + "failure-window": 800, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_device_mgr", + "search-command": "./sr_device_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "restricted-operations": [ + "kill", + "quit", + "reload", + "restart", + "start", + "stop" + ], + "statistics": { + "restart-count": 0 + }, + "yang": {} + }, + { + "name": "dhcp_client_mgr", + "pid": 1623, + "state": "running", + "last-change": "2024-03-08T15:03:44.627Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_dhcp_client_mgr", + "search-command": "./sr_dhcp_client_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "stop", + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": {} + }, + { + "name": "dhcp_relay_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_dhcp_relay_mgr", + "search-command": "./sr_dhcp_relay_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "stop", + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-interfaces-ip-dhcp-relay" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "dhcp_server_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_dhcp_server_mgr", + "search-command": "./sr_dhcp_server_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "stop", + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-dhcp-server", + "srl_nokia-interfaces-ip-dhcp-server" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "dnsmasq-mgmt", + "pid": 3936, + "state": "running", + "last-change": "2024-03-08T15:03:57.127Z", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/usr/sbin", + "launch-command": "LD_PRELOAD=\"\" ./dnsmasq --conf-file=/etc/dnsmasq.conf", + "search-command": "./dnsmasq --conf-file=/etc/dnsmasq.conf", + "version": "2.89", + "oom-score-adj": 0, + "statistics": { + "restart-count": 0 + }, + "yang": {} + }, + { + "name": "ethcfm_mgr", + "state": "waiting-for-config", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_ethcfm_mgr", + "search-command": "./sr_ethcfm_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-ethcfm", + "srl_nokia-oam-pm-ethcfm" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "event_mgr", + "state": "waiting-for-config", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_event_mgr", + "search-command": "./sr_event_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-event-handler" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "evpn_mgr", + "pid": 1645, + "state": "running", + "last-change": "2024-03-08T15:03:44.627Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_evpn_mgr", + "search-command": "./sr_evpn_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-mpls-services-evpn-label-management", + "srl_nokia-interfaces-nbr-evpn", + "srl_nokia-interfaces-ethernet-segment-association", + "srl_nokia-system-network-instance-bgp-evpn-ethernet-segments", + "srl_nokia-bgp-evpn-bgp-instance-mpls-vpws-destinations" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "fhs_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_fhs_mgr", + "search-command": "./sr_fhs_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-ra_guard" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "fib_mgr", + "pid": 1696, + "state": "running", + "last-change": "2024-03-08T15:03:44.628Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_fib_mgr", + "search-command": "./sr_fib_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-ip-route-tables", + "srl_nokia-mpls-route-tables", + "srl_nokia-tunnel-tables" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "gnmi_server", + "pid": 2671, + "state": "running", + "last-change": "2024-03-08T15:03:48.042Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_gnmi_server", + "search-command": "./sr_gnmi_server", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-gnmi-server" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "gribi_server", + "state": "waiting-for-config", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_gribi_server", + "search-command": "./sr_gribi_server", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-gribi-server" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "idb_server", + "pid": 1453, + "state": "running", + "last-change": "2024-03-08T15:03:42.502Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_idb_server", + "search-command": "./sr_idb_server", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "restricted-operations": [ + "start", + "stop", + "restart", + "quit", + "kill", + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": {} + }, + { + "name": "isis_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_isis_mgr", + "search-command": "./sr_isis_mgr", + "version": "", + "oom-score-adj": 0, + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-isis", + "srl_nokia-isis-lsdb", + "srl_nokia-isis-lsdb-types" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "json_rpc", + "pid": 3812, + "state": "running", + "last-change": "2024-03-08T15:03:55.335Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_json_rpc", + "search-command": "./sr_json_rpc", + "version": "", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-json-rpc" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "l2_mac_learn_mgr", + "pid": 1749, + "state": "running", + "last-change": "2024-03-08T15:03:44.628Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_l2_mac_learn_mgr", + "search-command": "./sr_l2_mac_learn_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-bridge-table-mac-learning-entries", + "srl_nokia-interfaces-bridge-table-mac-learning-entries" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "l2_mac_mgr", + "pid": 1800, + "state": "running", + "last-change": "2024-03-08T15:03:44.628Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_l2_mac_mgr", + "search-command": "./sr_l2_mac_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-bgp-evpn-bgp-instance-mpls-bridge-table-unicast-destinations", + "srl_nokia-bgp-evpn-bgp-instance-mpls-bridge-table-statistics", + "srl_nokia-bridge-table-mac-table", + "srl_nokia-bridge-table-mac-duplication-entries", + "srl_nokia-bridge-table-reserved-macs", + "srl_nokia-interfaces-bridge-table-mac-duplication-entries", + "srl_nokia-interfaces-bridge-table-mac-table", + "srl_nokia-interfaces-bridge-table-statistics", + "srl_nokia-system-bridge-table", + "srl_nokia-tunnel-interfaces-vxlan-interface-bridge-table", + "srl_nokia-tunnel-interfaces-vxlan-interface-bridge-table-unicast-destinations" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "l2_proxy_arp_nd_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_l2_proxy_arp_nd_mgr", + "search-command": "./sr_l2_proxy_arp_nd_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-bridge-table-proxy-arp-nd", + "srl_nokia-system-bridge-table-proxy-arp" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "l2_static_mac_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_l2_static_mac_mgr", + "search-command": "./sr_l2_static_mac_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-bridge-table-static-mac" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "label_mgr", + "state": "waiting-for-config", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_label_mgr", + "search-command": "./sr_label_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-mpls-label-management" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "lag_mgr", + "pid": 1866, + "state": "running", + "last-change": "2024-03-08T15:03:44.628Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_lag_mgr", + "search-command": "./sr_lag_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-interfaces-lag", + "srl_nokia-lacp" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "ldp_mgr", + "state": "waiting-for-config", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_ldp_mgr", + "search-command": "./sr_ldp_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-ldp" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "license_mgr", + "pid": 1905, + "state": "running", + "last-change": "2024-03-08T15:03:44.628Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_license_mgr", + "search-command": "./sr_license_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-license" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "linux_mgr", + "pid": 1943, + "state": "running", + "last-change": "2024-03-08T15:03:44.629Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_linux_mgr", + "search-command": "./sr_linux_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-dns", + "srl_nokia-ftp", + "srl_nokia-gnsi-certz", + "srl_nokia-keychains", + "srl_nokia-linux", + "srl_nokia-load-balancing", + "srl_nokia-network-instance-mtu", + "srl_nokia-ntp", + "srl_nokia-platform-cgroup", + "srl_nokia-platform-cpu", + "srl_nokia-platform-disk", + "srl_nokia-platform-memory", + "srl_nokia-sflow", + "srl_nokia-snmp", + "srl_nokia-ssh", + "srl_nokia-system-banner", + "srl_nokia-system-info", + "srl_nokia-tcp-udp", + "srl_nokia-timezone", + "srl_nokia-tls" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models", + "/opt/srlinux/models/openconfig" + ] + } + }, + { + "name": "lldp_mgr", + "pid": 3778, + "state": "running", + "last-change": "2024-03-08T15:03:55.306Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_lldp_mgr", + "search-command": "./sr_lldp_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-lldp", + "srl_nokia-lldp-types" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "log_mgr", + "pid": 1989, + "state": "running", + "last-change": "2024-03-08T15:03:44.629Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_log_mgr", + "search-command": "./sr_log_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-logging" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "macsec_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_macsec_mgr", + "search-command": "./sr_macsec_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-transport-security", + "srl_nokia-macsec" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models/transport-security" + ] + } + }, + { + "name": "mcid_mgr", + "pid": 2042, + "state": "running", + "last-change": "2024-03-08T15:03:44.637Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_mcid_mgr", + "search-command": "./sr_mcid_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-system-multicast", + "srl_nokia-bgp-evpn-bgp-instance-mpls-bridge-table-multicast-destinations", + "srl_nokia-tunnel-interfaces-vxlan-interface-bridge-table-multicast-destinations" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "mgmt_server", + "pid": 2085, + "state": "running", + "last-change": "2024-03-08T15:03:44.638Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_mgmt_server", + "search-command": "./sr_mgmt_server", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "start", + "stop", + "quit", + "kill", + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": {} + }, + { + "name": "mirror_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_mirror_mgr", + "search-command": "./sr_mirror_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-mirroring", + "srl_nokia-interfaces-local-mirror-destination" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "mpls_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_mpls_mgr", + "search-command": "./sr_mpls_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-mpls" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "mplsoam_mgr", + "pid": 2105, + "state": "running", + "last-change": "2024-03-08T15:03:44.638Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_mplsoam_mgr", + "search-command": "./sr_mplsoam_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "restricted-operations": [ + "stop", + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-lsp-ping-trace" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "net_inst_mgr", + "pid": 2152, + "state": "running", + "last-change": "2024-03-08T15:03:44.638Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_net_inst_mgr", + "search-command": "./sr_net_inst_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "stop", + "quit", + "kill", + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-bgp-evpn", + "srl_nokia-bgp-ipvpn", + "srl_nokia-bridge-table", + "srl_nokia-bridge-table-mac-duplication", + "srl_nokia-bridge-table-mac-learning", + "srl_nokia-bridge-table-mac-limit", + "srl_nokia-bridge-table-shg", + "srl_nokia-connection-point", + "srl_nokia-icmp", + "srl_nokia-mpls-services-network-instance-label-management", + "srl_nokia-network-instance", + "srl_nokia-system-network-instance" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "oam_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_oam_mgr", + "search-command": "./sr_oam_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-oam" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "oc_mgmt_server", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_oc_mgmt_server --yang-model-config /opt/srlinux/appmgr/oc_yang_config.conf", + "search-command": "./sr_oc_mgmt_server", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-openconfig" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "ospf_mgr", + "state": "waiting-for-config", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_ospf_mgr", + "search-command": "./sr_ospf_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-ospf" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "p4rt_server", + "state": "waiting-for-config", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_p4rt_server", + "search-command": "./sr_p4rt_server", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-p4rt-server" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "plcy_mgr", + "pid": 2645, + "state": "running", + "last-change": "2024-03-08T15:03:47.931Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_plcy_mgr", + "search-command": "./sr_plcy_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-routing-policy" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "qos_mgr", + "pid": 2677, + "state": "running", + "last-change": "2024-03-08T15:03:48.006Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_qos_mgr", + "search-command": "./sr_qos_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-qos", + "srl_nokia-qos-policers" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "radius_mgr", + "pid": 2192, + "state": "running", + "last-change": "2024-03-08T15:03:44.638Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_radius_mgr", + "search-command": "./sr_radius_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "statistics": { + "restart-count": 0 + }, + "yang": {} + }, + { + "name": "sdk_mgr", + "pid": 2222, + "state": "running", + "last-change": "2024-03-08T15:03:44.650Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_sdk_mgr", + "search-command": "./sr_sdk_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": {} + }, + { + "name": "segrt_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_segrt_mgr", + "search-command": "./sr_segrt_mgr", + "version": "", + "oom-score-adj": 0, + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-segment-routing" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "sflow_sample_mgr", + "pid": 2261, + "state": "running", + "last-change": "2024-03-08T15:03:44.650Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_sflow_sample_mgr", + "search-command": "./sr_sflow_sample_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": {} + }, + { + "name": "snmp_server-mgmt", + "pid": 3989, + "state": "running", + "last-change": "2024-03-08T15:03:57.132Z", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "LD_PRELOAD=\"\" ./sr_snmp_server -M -c mgmt udp:161,udp6:161", + "search-command": "./sr_snmp_server -M -c mgmt udp:161,udp6:161", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "statistics": { + "restart-count": 0 + }, + "yang": {} + }, + { + "name": "sshd-mgmt", + "pid": 3161, + "state": "running", + "last-change": "2024-03-08T15:03:52.112Z", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/usr/sbin", + "launch-command": "unset TZ; LD_PRELOAD=\"\" /usr/sbin/sshd -f /etc/ssh/sshd_config_mgmt", + "search-command": "sshd: /usr/sbin/sshd -f /etc/ssh/sshd_config_mgmt", + "version": "OpenSSH_9.2p1 Debian-2+deb12u1, OpenSSL 3.0.11 19 Sep 2023", + "oom-score-adj": 0, + "restricted-operations": [ + "stop", + "quit", + "kill" + ], + "statistics": { + "restart-count": 1 + }, + "yang": {} + }, + { + "name": "static_route_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_static_route_mgr", + "search-command": "./sr_static_route_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-static-routes", + "srl_nokia-aggregate-routes", + "srl_nokia-next-hop-groups" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "supportd", + "pid": 469, + "state": "running", + "last-change": "2024-03-08T15:03:41.996Z", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_supportd --server-mode", + "search-command": "./sr_supportd --server-mode", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": {} + }, + { + "name": "te_mgr", + "state": "waiting-for-config", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_te_mgr", + "search-command": "./sr_te_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-traffic-engineering" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "tepolicy_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_tepolicy_mgr", + "search-command": "./sr_tepolicy_mgr", + "version": "", + "oom-score-adj": 0, + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-te-policies", + "srl_nokia-maintenance-policies" + ], + "source-directories": [ + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models/common", + "/opt/srlinux/models/srl_nokia/models/interfaces", + "/opt/srlinux/models/srl_nokia/models/network-instance", + "/opt/srlinux/models/srl_nokia/models/system" + ] + } + }, + { + "name": "twamp_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "wait=60", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_twamp_mgr", + "search-command": "./sr_twamp_mgr", + "version": "", + "oom-score-adj": 0, + "restricted-operations": [ + "stop", + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-ippm-source-udp-pool", + "srl_nokia-link-measurement", + "srl_nokia-oam-pm-ip", + "srl_nokia-twamp", + "srl_nokia-stamp" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "vrrp_mgr", + "state": "waiting-for-config", + "author": "", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_vrrp_mgr", + "search-command": "./sr_vrrp_mgr", + "version": "", + "oom-score-adj": 0, + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-interfaces-ip-vrrp" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "vxlan_mgr", + "pid": 2710, + "state": "running", + "last-change": "2024-03-08T15:03:48.017Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 3, + "failure-window": 300, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "./sr_vxlan_mgr", + "search-command": "./sr_vxlan_mgr", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold", + "warm" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": { + "modules": [ + "srl_nokia-tunnel", + "srl_nokia-tunnel-interfaces", + "srl_nokia-tunnel-interfaces-vxlan-interface-bridge-table-unicast-es-destination-vteps", + "srl_nokia-vxlan-tunnel-vtep" + ], + "source-directories": [ + "/opt/srlinux/models/iana", + "/opt/srlinux/models/ietf", + "/opt/srlinux/models/srl_nokia/models" + ] + } + }, + { + "name": "xdp_lc_1", + "pid": 2331, + "state": "running", + "last-change": "2024-03-08T15:03:45.346Z", + "last-start-type": "cold", + "author": "Nokia", + "failure-threshold": 2, + "failure-window": 600, + "failure-action": "reboot", + "path": "/opt/srlinux/bin", + "launch-command": "exec -a sr_xdp_lc_1 ./sr_xdp_lc --slot_num 1 --complex_num 2", + "search-command": "sr_xdp_lc_1 --slot_num 1 --complex_num 2", + "version": "v23.10.1-218-ga3fc1bea5a", + "oom-score-adj": 0, + "supported-restart-types": [ + "cold" + ], + "restricted-operations": [ + "reload" + ], + "statistics": { + "restart-count": 0 + }, + "yang": {} + } + ] + } +} \ No newline at end of file diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/old_bgp_handler.txt b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/old_bgp_handler.txt new file mode 100644 index 0000000000000000000000000000000000000000..595a19788bce7ff0990346ef249ad3ce71f55efa --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/old_bgp_handler.txt @@ -0,0 +1,138 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# WARNING: this handler is work in progress. Use with care! + +import logging, json +from typing import Any, Dict, List, Tuple + +LOGGER = logging.getLogger(__name__) + +class NetworkInstanceHandler: + def get_resource_key(self) -> str: return '/network_instance' + def get_path(self) -> str: return '/network-instances/network-instance' + + def compose_set(self, resource_key : str, resource_value : Dict) -> Tuple[str, str]: + ni_name = str(resource_value['name']) # test-svc + ni_type = str(resource_value['type']) # L3VRF / + + if_name = str (resource_value['name' ]) # ethernet-1/1 + if_enabled = bool(resource_value.get('enabled' , True)) # True/False + sif_index = int (resource_value.get('sub_if_index' , 0 )) # 0 + sif_enabled = bool(resource_value.get('sub_if_enabled' , True)) # True/False + sif_ipv4_enabled = bool(resource_value.get('sub_if_ipv4_enabled', True)) # True/False + sif_ipv4_address = str (resource_value['sub_if_ipv4_address' ]) # 172.16.0.1 + sif_ipv4_prefix = int (resource_value['sub_if_ipv4_prefix' ]) # 24 + + str_path = '/interfaces/interface[name={:s}]'.format(if_name) + str_data = json.dumps({ + "name": if_name, + "config": {"name": if_name, "enabled": if_enabled}, + "subinterfaces": { + "subinterface": { + "index": sif_index, + "config": {"index": sif_index, "enabled": sif_enabled}, + "ipv4": { + "config": {"enabled": sif_ipv4_enabled}, + "addresses": { + "address": { + "ip": sif_ipv4_address, + "config": {"ip": sif_ipv4_address, "prefix_length": sif_ipv4_prefix}, + } + } + } + } + } + }) + return str_path, str_data + + + #oc_ni = openconfig_network_instance() + #ni = oc_ni.network_instances.network_instance.add(name=ni_name) + #ni.config.name = ni_name + + #ni_desc = resource_value.get('description') + #if ni_desc is not None: ni.config.description = ni_desc + + #if ni_type == 'L3VRF': + # ni.config.type = 'L3VRF' + # #ni_router_id = resource_value.get('router_id') + # #if ni_router_id is not None: ni.config.router_id = ni_router_id + + # proto_bgp = ni.protocols.protocol.add(identifier='BGP', name=ni_name) + # proto_bgp.config.identifier = 'BGP' + # proto_bgp.config.name = ni_name + # proto_bgp.config.enabled = True + # proto_bgp.bgp.global_.config.as_ = 65000 + # proto_bgp.bgp.global_.config.router_id = '172.0.0.1' + + # #ni.config.route_distinguisher = resource_value['route_distinguisher'] + #elif ni_type == 'L3VRF': + # pass + #else: + # raise NotImplementedError() + + #str_path = '/network-instances/network-instance[name={:s}]'.format(ni_name) + #str_data = pybindJSON.dumps(ni, mode='default') + + #str_path = '/network-instances/network-instance[name={:s}]/protocols/protocol[identifier=BGP][name=BGP]'.format(ni_name) + #str_data = json.dumps({ + # "identifier": "BGP", + # "name": "BGP", + # "config": {"identifier": "BGP", "name": "BGP", "enabled": True}, + # "bgp": {"global": {"config": {"as": 65000, "router-id": "5.5.5.5"}}} + #}) + + str_path = '/network-instances/network-instance[name=test-svc]' + str_data = json.dumps({ + "name": "test-svc", + "config": { + "name": "test-svc", + "type": "openconfig-network-instance-types:L3VRF" + }, + "protocols": { + "protocol": [ + { + "identifier": "DIRECTLY_CONNECTED", + "name": "DIRECTLY-CONNECTED", + "config": {"identifier": "DIRECTLY_CONNECTED", "name": "DIRECTLY-CONNECTED", "enabled": True}, + }, + { + "identifier": "STATIC", + "name": "static", + "config": {"identifier": "STATIC", "name": "static", "enabled": True}, + "static_routes": { + "static": [ + { + "prefix": "172.0.1.0/24", + "config": {"prefix": "172.0.1.0/24"}, + "next_hops": { + "next-hop": [{"index": 0, "config": {"index": 0, "next_hop": "172.0.0.1"}}] + } + } + ] + } + } + ] + }, + }) + + + #str_path = '/network-instances/network-instance[name={:s}]/protocols/protocol[identifier=DIRECTLY_CONNECTED][name=DIR]'.format(ni_name) + #str_data = json.dumps({ + # "identifier": "DIRECTLY_CONNECTED", + # "name": "DIR", + # "config": {"identifier": "DIRECTLY_CONNECTED", "name": "DIR", "enabled": True}, + #}) diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/handlers/routingpolicy.py b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/routingpolicy.py new file mode 100644 index 0000000000000000000000000000000000000000..05a08b3e410b681d80cb10feefd8a67f9894c265 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/handlers/routingpolicy.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from ast import Name +from email.policy import default +import json, logging +from typing import Any, Dict, List, Tuple +from ._Handler import _Handler +from .Tools import dict_get_first + +LOGGER = logging.getLogger(__name__) + +class routingpolicyhandler(_Handler): + def get_resource_key(self) -> str: + return '/routing-policy' + + def get_path(self) -> str: + return '/srl_nokia-routing-policy:routing-policy' + + def compose(self, resource_key: str, resource_value: Dict, delete: bool = False) -> Tuple[str, str]: + if delete: + #PATH_TMPL = '/routing-policy' + #str_path = PATH_TMPL.format() + str_path='/routing-policy' + str_data = json.dumps({}) + return str_path, str_data + + str_path='/routing-policy' + + #if 'if_name' in resource_value: + # if_name = str(resource_value['if_name']), + # json_routing={} + # subif_policy=json_routing.setdefault('policy',list()) + # subif_name = {'name':if_name} + # subif_policy.append(subif_name) + + # if 'if_policy_result' in resource_value: + # if_policy_result = str(resource_value['if_policy_result']), + # subif_defaultaction={'default-action':if_policy_result} + # subif_policy.append(subif_defaultaction) + if 'if_name' in resource_value: + if_name = str(resource_value['if_name']) + json_routing = { + 'policy': { + 'name': if_name, + 'default-action': { + 'policy-result': '' + } + } + } + + if 'if_policy_result' in resource_value: + if_policy_result = str(resource_value['if_policy_result']) + if 'policy' not in json_routing: + json_routing['policy'] = {} + json_routing['policy']['default-action'] = { + 'policy-result': if_policy_result + } + + + + + return str_path, json.dumps(json_routing) + def parse(self, json_data: Dict) -> List[Tuple[str, Dict[str, Any]]]: + response = [] + json_policy = json_data.get('policy', []) + lists = [] + for policy in json_policy: + policyy = {} + name = policy.get('name', {}) + default = policy.get('default-action', {}).get('policy-result',{}) + policyy['name'] = str(name) + policyy['default-action'] = {} + policyy['default-action']['policy-result'] = str(default) + lists.append(policyy) + + if len(lists) == 0: + continue + + resource_key = '/srl_nokia-routing-policy:routing-policy' + response.append((resource_key, lists)) + + return response + + diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/tools/Capabilities.py b/src/device/service/drivers/gnmi_nokia_srlinux/tools/Capabilities.py new file mode 100644 index 0000000000000000000000000000000000000000..b90bf3db887874d3c9015336cc105b3429c8e64e --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/tools/Capabilities.py @@ -0,0 +1,36 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Optional, Set, Union +from common.tools.grpc.Tools import grpc_message_to_json +from ..gnmi.gnmi_pb2 import CapabilityRequest # pylint: disable=no-name-in-module +from ..gnmi.gnmi_pb2_grpc import gNMIStub + +def get_supported_encodings( + stub : gNMIStub, username : str, password : str, timeout : Optional[int] = None +) -> Set[Union[str, int]]: + metadata = [('username', username), ('password', password)] + req = CapabilityRequest() + reply = stub.Capabilities(req, metadata=metadata, timeout=timeout) + + data = grpc_message_to_json(reply) + supported_encodings = { + supported_encoding + for supported_encoding in data.get('supported_encodings', []) + if isinstance(supported_encoding, str) + } + if len(supported_encodings) == 0: + # pylint: disable=broad-exception-raised + raise Exception('No supported encodings found') + return supported_encodings diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/tools/Channel.py b/src/device/service/drivers/gnmi_nokia_srlinux/tools/Channel.py new file mode 100644 index 0000000000000000000000000000000000000000..264dd032166117873702643e17acb344b408b194 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/tools/Channel.py @@ -0,0 +1,34 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import grpc, logging, ssl + +def get_grpc_channel(address : str, port : int, use_tls : bool, logger : logging.Logger) -> grpc.Channel: + endpoint = str(address) + ':' + str(port) + logger.info('Connecting gNMI {:s}...'.format(endpoint)) + if use_tls: + logger.debug('Getting server certificate...') + str_server_certificate = ssl.get_server_certificate((str(address), int(port))) + bytes_server_certificate = str_server_certificate.encode('UTF-8') + logger.debug('Using secure SSL channel...') + credentials = grpc.ssl_channel_credentials( + root_certificates=bytes_server_certificate, private_key=None, certificate_chain=None) + options = [ + #('grpc.ssl_target_name_override', options.altName,) + ] + channel = grpc.secure_channel(endpoint, credentials, options) + else: + logger.debug('Using insecure channel...') + channel = grpc.insecure_channel(endpoint) + return channel diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/tools/Path.py b/src/device/service/drivers/gnmi_nokia_srlinux/tools/Path.py new file mode 100644 index 0000000000000000000000000000000000000000..40ab28dc6bbaf8a65b667804dfe9285f36864e29 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/tools/Path.py @@ -0,0 +1,98 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import re +from typing import List +from ..gnmi.gnmi_pb2 import Path, PathElem + +RE_PATH_SPLIT = re.compile(r'/(?=(?:[^\[\]]|\[[^\[\]]+\])*$)') +RE_PATH_KEYS = re.compile(r'\[(.*?)\]') + +def path_from_string(path='/'): + if not path: return Path(elem=[]) + + if path[0] == '/': + if path[-1] == '/': + path_list = RE_PATH_SPLIT.split(path)[1:-1] + else: + path_list = RE_PATH_SPLIT.split(path)[1:] + else: + if path[-1] == '/': + path_list = RE_PATH_SPLIT.split(path)[:-1] + else: + path_list = RE_PATH_SPLIT.split(path) + + path = [] + for elem in path_list: + elem_name = elem.split('[', 1)[0] + elem_keys = RE_PATH_KEYS.findall(elem) + dict_keys = dict(x.split('=', 1) for x in elem_keys) + path.append(PathElem(name=elem_name, key=dict_keys)) + + return Path(elem=path) + +def path_to_string(path : Path) -> str: + path_parts = list() + for elem in path.elem: + kv_list = list() + for key in elem.key: + value = elem.key[key] + kv = '{:s}={:s}'.format(key, value) + kv_list.append(kv) + + path_part_name = elem.name + if len(kv_list) == 0: + path_parts.append(path_part_name) + else: + str_kv = ', '.join(kv_list) + path_part = '{:s}[{:s}]'.format(path_part_name, str_kv) + path_parts.append(path_part) + + str_path = '/{:s}'.format('/'.join(path_parts)) + return str_path + +def parse_xpath(xpath : str) -> str: + xpath = xpath.replace('//', '/') + xpath = xpath.replace('oci:interface[', 'interface[') + xpath = xpath.replace('/oci', '/openconfig-interfaces') + xpath = re.sub(r"\[oci:name='(.*?)'\]", r"[name=\1]", xpath) + # Eliminar el contador del final + xpath = '/'.join(xpath.split('/')[:-1]) + '/' + return xpath + +def split_resource_key(path): + pattern = r'/state/counters/(.*)' + match = re.search(pattern, path) + if match is None: return None + return match.group(1) + +def dict_to_xpath(d: dict) -> str: + xpath = '/' + for item in d['elem']: + name = item.get('name') + if name == 'interface': + key = item.get('key') + interface_name = key.get('name') + xpath += f"/oci:interface[oci:name='{interface_name}']" + else: + xpath += f"/{name}" + xpath = xpath.replace('openconfig-interfaces', 'oci') + return xpath + +def compose_path(base_path : str, path_filters : List[str] = []): + new_path = '' if base_path is None else str(base_path) + for path_filter in path_filters: + if path_filter == '': continue + new_path = '{:s}[{:s}]'.format(new_path, path_filter) + return new_path diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/tools/Subscriptions.py b/src/device/service/drivers/gnmi_nokia_srlinux/tools/Subscriptions.py new file mode 100644 index 0000000000000000000000000000000000000000..18b6445ae31c00495c4f3a84922c9c8d4198b3f7 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/tools/Subscriptions.py @@ -0,0 +1,47 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Collection of samples through NetConf is very slow and each request collects all the data. +# Populate a cache periodically (when first interface is interrogated). +# Evict data after some seconds, when data is considered as outdated + +import anytree +from typing import Any, List +from device.service.driver_api.AnyTreeTools import TreeNode, get_subnode, set_subnode_value + +class Subscriptions: + def __init__(self) -> None: + self.__resolver = anytree.Resolver(pathattr='name') + self.__subscriptions = TreeNode('.') + + def add( + self, resource_path : List[str], sampling_duration : float, sampling_interval : float, value : Any + ) -> None: + subscription_path = resource_path + ['{:.3f}:{:.3f}'.format(sampling_duration, sampling_interval)] + set_subnode_value(self.__resolver, self.__subscriptions, subscription_path, value) + + def get( + self, resource_path : List[str], sampling_duration : float, sampling_interval : float + ) -> TreeNode: + subscription_path = resource_path + ['{:.3f}:{:.3f}'.format(sampling_duration, sampling_interval)] + value = get_subnode(self.__resolver, self.__subscriptions, subscription_path) + return value + + def delete( + self, reference : TreeNode + ) -> None: + parent : TreeNode = reference.parent + children = list(parent.children) + children.remove(reference) + parent.children = tuple(children) diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/tools/Value.py b/src/device/service/drivers/gnmi_nokia_srlinux/tools/Value.py new file mode 100644 index 0000000000000000000000000000000000000000..4797930a17360d8a780e99ea9ac05c0e3a1f7abc --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/tools/Value.py @@ -0,0 +1,52 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import base64, json +from typing import Any +from ..gnmi.gnmi_pb2 import TypedValue + +def decode_value(value : TypedValue) -> Any: + encoding = value.WhichOneof('value') + if encoding == 'json_val': + value = value.json_val + #mdl, cls = self._classes[className] + #obj = json.loads(strObj) + #if isinstance(obj, (list,)): + # obj = map(lambda n: pybindJSON.loads(n, mdl, cls.__name__), obj) + # data = map(lambda n: json.loads(pybindJSON.dumps(n, mode='default')), obj) + #else: + # obj = pybindJSON.loads(obj, mdl, cls.__name__) + # data = json.loads(pybindJSON.dumps(obj, mode='default')) + raise NotImplementedError() + #return value + elif encoding == 'json_ietf_val': + value : str = value.json_ietf_val + try: + return json.loads(value) + except json.decoder.JSONDecodeError: + # Assume is Base64-encoded + b_b64_value = value.encode('UTF-8') + b_value = base64.b64decode(b_b64_value, validate=True) + value = b_value.decode('UTF-8') + return json.loads(value) + else: + MSG = 'Unsupported Encoding({:s}) in Value({:s})' + # pylint: disable=broad-exception-raised + raise Exception(MSG.format(str(encoding), str(value))) + +def value_exists(value) -> bool: + if value is None: return False + if isinstance(value, Exception): return False + if issubclass(type(value), Exception): return False + return True diff --git a/src/device/service/drivers/gnmi_nokia_srlinux/tools/__init__.py b/src/device/service/drivers/gnmi_nokia_srlinux/tools/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1549d9811aa5d1c193a44ad45d0d7773236c0612 --- /dev/null +++ b/src/device/service/drivers/gnmi_nokia_srlinux/tools/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/device/tests/descriptors/tfs-01-onboard-devices.json b/src/device/tests/descriptors/tfs-01-onboard-devices.json new file mode 100644 index 0000000000000000000000000000000000000000..a33126518dc48619d93447e8df265d4770bfffc5 --- /dev/null +++ b/src/device/tests/descriptors/tfs-01-onboard-devices.json @@ -0,0 +1,60 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "spine1"}}, "device_type": "packet-router", "device_drivers": [9], + "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.101"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "57400"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "protocol": "gnmi", "username": "admin", "password": "NokiaSrl1!", "use_tls": true + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "leaf1"}}, "device_type": "packet-router", "device_drivers": [9], + "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.102"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "57400"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "protocol": "gnmi", "username": "admin", "password": "NokiaSrl1!", "use_tls": true + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "leaf2"}}, "device_type": "packet-router", "device_drivers": [9], + "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.103"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "57400"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "protocol": "gnmi", "username": "admin", "password": "NokiaSrl1!", "use_tls": true + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "srv1"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "type": "copper"}, {"uuid": "int", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "srv2"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "type": "copper"}, {"uuid": "int", "type": "copper"} + ]}}} + ]} + } + ] +} diff --git a/src/device/tests/descriptors/tfs-02-onboard-links.json b/src/device/tests/descriptors/tfs-02-onboard-links.json new file mode 100644 index 0000000000000000000000000000000000000000..bdcc1638ba3821ab795d7287c82ae34c8d0a18c7 --- /dev/null +++ b/src/device/tests/descriptors/tfs-02-onboard-links.json @@ -0,0 +1,63 @@ +{ + "links": [ + { + "link_id": {"link_uuid": {"uuid": "leaf1/ethernet-1/49==spine1/ethernet-1/1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "leaf1"}}, "endpoint_uuid": {"uuid": "ethernet-1/49"}}, + {"device_id": {"device_uuid": {"uuid": "spine1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "spine1/ethernet-1/1==leaf1/ethernet-1/49"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "spine1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}, + {"device_id": {"device_uuid": {"uuid": "leaf1"}}, "endpoint_uuid": {"uuid": "ethernet-1/49"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "spine1/ethernet-1/2==leaf2/ethernet-1/49"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "spine1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}, + {"device_id": {"device_uuid": {"uuid": "leaf2"}}, "endpoint_uuid": {"uuid": "ethernet-1/49"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "leaf2/ethernet-1/2==spine1/ethernet-1/49"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "leaf2"}}, "endpoint_uuid": {"uuid": "ethernet-1/49"}}, + {"device_id": {"device_uuid": {"uuid": "spine1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "srv1/eth1==leaf1/ethernet-1/1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "srv1"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "leaf1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "leaf1/ethernet-1/1==srv1/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "leaf1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}, + {"device_id": {"device_uuid": {"uuid": "srv1"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "srv2/eth1==leaf2/ethernet-1/1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "srv2"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "leaf2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "leaf2/ethernet-1/1==srv2/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "leaf2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}, + {"device_id": {"device_uuid": {"uuid": "srv2"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + } + ] +} diff --git a/src/device/tests/descriptors/tfs-03-configure-evpn.json b/src/device/tests/descriptors/tfs-03-configure-evpn.json new file mode 100644 index 0000000000000000000000000000000000000000..76fd08a8e14ba15304d00d9ae09a64697c065c85 --- /dev/null +++ b/src/device/tests/descriptors/tfs-03-configure-evpn.json @@ -0,0 +1,235 @@ +{ + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "leaf1"}}, "device_type": "packet-router", "device_drivers": [9], + "device_operational_status": 2, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/interface[name=ethernet-1/49]", "resource_value": { + "if_name" : "ethernet-1/49", + "if_admin_state" : true, + "subif_index" : 0, + "subif_ipv4_admin_state":true, + "subif_ipv4_address" : "192.168.11.1", + "subif_ipv4_prefix" : "30" + }}}, + {"action": 1, "custom": {"resource_key": "/routing-policy", "resource_value": { + "if_name" : "all", + "if_policy_result": "accept" + }}} + + ,{"action": 1, "custom": {"resource_key": "/network-instance[name=default]", "resource_value": { + "if_name" : "default", + "if_interface1" : "ethernet-1/49.0", + "if_interface2" : "system0.0", + "if_admin_state_bgp" : true, + "if_afi_safi_name_bgp" : "ipv4-unicast", + "if_autonomous_system_bgp" : 101, + "if_export_policy" : "all", + "if_group_name" : "eBGP-underlay", + "if_import_policy" : "all", + "if_peer_as" : 201, + "if_admin_state_group" : true, + "if_afi_safi_name_group" : "evpn", + "if_admin_state_group_2" : false, + "if_afi_safi_name_group_2" : "ipv4-unicast", + "if_export_policy_2" : "all", + "if_group_name_2" : "iBGP-overlay", + "if_import_policy_2" : "all", + "if_as_number" : 100, + "if_peer_as_2" : 100, + "if_minimum_advertisement_interval" : 1, + "if_admin_state_neighbor" : true, + "if_peer_address_neighbor" : "10.0.0.2", + "if_peer_group_neighbor" : "iBGP-overlay", + "if_local_address_neighbor" : "10.0.0.1", + "if_peer_address_neighbor_2" : "192.168.11.2", + "if_peer_group_neighbor_2" : "eBGP-underlay", + "if_router_id" : "10.0.0.1" + + }}}, + + {"action": 1, "custom": {"resource_key": "/interface[name=system0]", "resource_value": { + "if_name" : "system0", + "if_admin_state" : true, + "subif_index" : 0, + "subif_ipv4_admin_state":true, + "subif_ipv4_address" : "10.0.0.1", + "subif_ipv4_prefix" : "32" + }}}, + + {"action": 1, "custom": {"resource_key": "/interface[name=ethernet-1/1]", "resource_value": { + "if_name" : "ethernet-1/1", + "if_vlan_tagging" : true, + "subif_index" : 0, + "subif_type" : "bridged", + "subif_vlan_admin_state" : true, + "subif_vlan_encap":"untagged" + }}}, + {"action": 1, "custom": {"resource_key": "/network-instance[name=vrf-1]", "resource_value": { + "if_name" : "vrf-1", + "if_type" : "mac-vrf", + "if_admin_state_vrf" : true, + "if_interface1_name" : "ethernet-1/1.0", + "if_vxlaninterface_name" : "vxlan1.1", + "if_bgp_evpn_instance_id":1, + "if_bgp_evpn_instance_admin_state":true, + "if_bgp_evpn_instance_vxlan_interface":"vxlan1.1", + "if_bgp_evpn_instance_evi":111, + "if_bgp_vpn_instance_id":1, + "if_bgp_vpn_instance_export_rt":"target:100:111", + "if_bgp_vpn_instance_import_rt":"target:100:111" + }}}, + {"action": 1, "custom": {"resource_key": "/tunnel-interface[name=vxlan1]", "resource_value": { + "if_name" : "vxlan1", + "if_index" : 1, + "if_type_tunnel" :"bridged", + "if_vni_tunnel" : 1 + }}} + + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "leaf2"}}, "device_type": "packet-router", "device_drivers": [9], + "device_operational_status": 2, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/interface[name=ethernet-1/49]", "resource_value": { + "if_name" : "ethernet-1/49", + "if_admin_state" : true, + "subif_index" : 0, + "subif_ipv4_admin_state":true, + "subif_ipv4_address" : "192.168.12.1", + "subif_ipv4_prefix" : "30" + }}}, + {"action": 1, "custom": {"resource_key": "/routing-policy", "resource_value": { + "if_name" : "all", + "if_policy_result": "accept" + }}} + + ,{"action": 1, "custom": {"resource_key": "/network-instance[name=default]", "resource_value": { + "if_name" : "default", + "if_interface1" : "ethernet-1/49.0", + "if_interface2" : "system0.0", + "if_admin_state_bgp" : true, + "if_afi_safi_name_bgp" : "ipv4-unicast", + "if_autonomous_system_bgp" : 102, + "if_export_policy" : "all", + "if_group_name" : "eBGP-underlay", + "if_import_policy" : "all", + "if_peer_as" : 201, + "if_admin_state_group" : true, + "if_afi_safi_name_group" : "evpn", + "if_admin_state_group_2" : false, + "if_afi_safi_name_group_2" : "ipv4-unicast", + "if_export_policy_2" : "all", + "if_group_name_2" : "iBGP-overlay", + "if_import_policy_2" : "all", + "if_as_number" : 100, + "if_peer_as_2" : 100, + "if_minimum_advertisement_interval" : 1, + "if_admin_state_neighbor" : true, + "if_peer_address_neighbor" : "10.0.0.1", + "if_peer_group_neighbor" : "iBGP-overlay", + "if_local_address_neighbor" : "10.0.0.2", + "if_peer_address_neighbor_2" : "192.168.12.2", + "if_peer_group_neighbor_2" : "eBGP-underlay", + "if_router_id" : "10.0.0.2" + + }}}, + + {"action": 1, "custom": {"resource_key": "/interface[name=system0]", "resource_value": { + "if_name" : "system0", + "if_admin_state" : true, + "subif_index" : 0, + "subif_ipv4_admin_state":true, + "subif_ipv4_address" : "10.0.0.2", + "subif_ipv4_prefix" : "32" + }}}, + + {"action": 1, "custom": {"resource_key": "/interface[name=ethernet-1/1]", "resource_value": { + "if_name" : "ethernet-1/1", + "if_vlan_tagging" : true, + "subif_index" : 0, + "subif_type" : "bridged", + "subif_vlan_admin_state" : true, + "subif_vlan_encap":"untagged" + }}}, + {"action": 1, "custom": {"resource_key": "/network-instance[name=vrf-1]", "resource_value": { + "if_name" : "vrf-1", + "if_type" : "mac-vrf", + "if_admin_state_vrf" : true, + "if_interface1_name" : "ethernet-1/1.0", + "if_vxlaninterface_name" : "vxlan1.1", + "if_bgp_evpn_instance_id":1, + "if_bgp_evpn_instance_admin_state":true, + "if_bgp_evpn_instance_vxlan_interface":"vxlan1.1", + "if_bgp_evpn_instance_evi":111, + "if_bgp_vpn_instance_id":1, + "if_bgp_vpn_instance_export_rt":"target:100:111", + "if_bgp_vpn_instance_import_rt":"target:100:111" + }}}, + {"action": 1, "custom": {"resource_key": "/tunnel-interface[name=vxlan1]", "resource_value": { + "if_name" : "vxlan1", + "if_index" : 1, + "if_type_tunnel" :"bridged", + "if_vni_tunnel" : 1 + }}} + + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "spine1"}}, "device_type": "packet-router", "device_drivers": [9], + "device_operational_status": 2, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/interface[name=ethernet-1/49]", "resource_value": { + "if_name" : "ethernet-1/1", + "if_admin_state" : true, + "subif_index" : 0, + "subif_ipv4_admin_state":true, + "subif_ipv4_address" : "192.168.11.2", + "subif_ipv4_prefix" : "30" + }}}, + {"action": 1, "custom": {"resource_key": "/interface[name=ethernet-1/49]", "resource_value": { + "if_name" : "ethernet-1/2", + "if_admin_state" : true, + "subif_index" : 0, + "subif_ipv4_admin_state":true, + "subif_ipv4_address" : "192.168.12.2", + "subif_ipv4_prefix" : "30" + }}}, + + {"action": 1, "custom": {"resource_key": "/network-instance[name=default]", "resource_value": { + "if_interface1_spine" : "ethernet-1/1.0", + "if_interface2_spine" : "ethernet-1/2.0", + "if_interface3_spine" : "system0.0", + "if_name" : "default", + "if_admin_state_spine" : true, + "if_afi_safi_name_bgp_spine" : "ipv4-unicast", + "if_autonomous_system_bgp_spine" : 201, + "if_export_policy_spine" : "all", + "if_group_name_spine" : "eBGP-underlay", + "if_import_policy_spine" : "all", + "if_peer_address_neighbor_spine" : "192.168.11.1", + "if_peeras_group_neighbor_spine" : 101, + "if_peer_group_neighbor_spine" : "eBGP-underlay", + "if_peer_address2_neighbor_spine" : "192.168.12.1", + "if_peeras_group_neighbor2_spine" : 102, + "if_peer_group_neighbor2_spine" : "eBGP-underlay", + "if_router_id_spine":"10.0.1.1" + }}}, + {"action": 1, "custom": {"resource_key": "/interface[name=ethernet-1/49]", "resource_value": { + "if_name" : "system0", + "if_admin_state" : true, + "subif_index" : 0, + "subif_ipv4_admin_state":true, + "subif_ipv4_address" : "10.0.1.1", + "subif_ipv4_prefix" : 32 + }}}, + + {"action": 1, "custom": {"resource_key": "/routing-policy", "resource_value": { + "if_name" : "all", + "if_policy_result": "accept" + }}} + + + + ]} + } + ] +} diff --git a/src/device/tests/information b/src/device/tests/information new file mode 100644 index 0000000000000000000000000000000000000000..8c0c328316642f59505f205751301b407a7465d5 --- /dev/null +++ b/src/device/tests/information @@ -0,0 +1,16 @@ +#first redeploy on /home/cttc/evpn01/deploy.sh +#Run the set scripts for the 2 leafs and spine together for setting the configurations +#Try to ping from server 1 to server 2 after redeploying and configuring +# server one is on 192.168.01 while server 2 ip is 192.168.0.2 +#when trying to ping the first time it fail to ping server 2 +#cancel and try again it will succesfully ping +#Hashtag the set commands and only keep the below which is concerned with the parse function + # resources_to_get_leaf1 = [RESOURCE_INTERFACES] + # LOGGER.info('resources_to_get = {:s}'.format(str(resources_to_get_leaf1))) + # results_getconfig_leaf1 = dev1_driver.GetConfig(resources_to_get_leaf1) + # LOGGER.info('results_getconfig = {:s}'.format(str(results_getconfig_leaf1))) + # except Exception as e: + # + # logging.exception("Exception occurred", exc_info=True) + +# After running so , therse is an error related to the path \ No newline at end of file diff --git a/src/device/tests/test_gnmi.py b/src/device/tests/test_gnmi.py deleted file mode 100644 index 50c9155822d5285fda5fc75777363c066ffb215a..0000000000000000000000000000000000000000 --- a/src/device/tests/test_gnmi.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging, os, sys, time -from typing import Dict, Tuple -os.environ['DEVICE_EMULATED_ONLY'] = 'YES' -from device.service.drivers.gnmi_openconfig.GnmiOpenConfigDriver import GnmiOpenConfigDriver # pylint: disable=wrong-import-position -#from device.service.driver_api._Driver import ( -# RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES, RESOURCE_ROUTING_POLICIES, RESOURCE_SERVICES -#) - -logging.basicConfig(level=logging.DEBUG) -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -# +---+---------------------------+--------------+---------------------------------+-------+---------+--------------------+--------------+ -# | # | Name | Container ID | Image | Kind | State | IPv4 Address | IPv6 Address | -# +---+---------------------------+--------------+---------------------------------+-------+---------+--------------------+--------------+ -# | 1 | clab-tfs-scenario-client1 | a8d48ec3265a | ghcr.io/hellt/network-multitool | linux | running | 172.100.100.201/24 | N/A | -# | 2 | clab-tfs-scenario-client2 | fc88436d2b32 | ghcr.io/hellt/network-multitool | linux | running | 172.100.100.202/24 | N/A | -# | 3 | clab-tfs-scenario-srl1 | b995b9bdadda | ghcr.io/nokia/srlinux | srl | running | 172.100.100.101/24 | N/A | -# | 4 | clab-tfs-scenario-srl2 | aacfc38cc376 | ghcr.io/nokia/srlinux | srl | running | 172.100.100.102/24 | N/A | -# +---+---------------------------+--------------+---------------------------------+-------+---------+--------------------+--------------+ - -def interface(if_name, sif_index, ipv4_address, ipv4_prefix, enabled) -> Tuple[str, Dict]: - str_path = '/interface[{:s}]'.format(if_name) - str_data = {'name': if_name, 'enabled': enabled, 'sub_if_index': sif_index, 'sub_if_enabled': enabled, - 'sub_if_ipv4_enabled': enabled, 'sub_if_ipv4_address': ipv4_address, 'sub_if_ipv4_prefix': ipv4_prefix} - return str_path, str_data - -def network_instance(ni_name, ni_type) -> Tuple[str, Dict]: - str_path = '/network_instance[{:s}]'.format(ni_name) - str_data = {'name': ni_name, 'type': ni_type} - return str_path, str_data - -def network_instance_static_route(ni_name, prefix, next_hop, next_hop_index=0) -> Tuple[str, Dict]: - str_path = '/network_instance[{:s}]/static_route[{:s}]'.format(ni_name, prefix) - str_data = {'name': ni_name, 'prefix': prefix, 'next_hop': next_hop, 'next_hop_index': next_hop_index} - return str_path, str_data - -def network_instance_interface(ni_name, if_name, sif_index) -> Tuple[str, Dict]: - str_path = '/network_instance[{:s}]/interface[{:s}.{:d}]'.format(ni_name, if_name, sif_index) - str_data = {'name': ni_name, 'if_name': if_name, 'sif_index': sif_index} - return str_path, str_data - -def main(): - driver_settings = { - 'protocol': 'gnmi', - 'username': 'admin', - 'password': 'NokiaSrl1!', - 'use_tls' : True, - } - driver = GnmiOpenConfigDriver('172.100.100.102', 57400, **driver_settings) - driver.Connect() - - #resources_to_get = [] - #resources_to_get = [RESOURCE_ENDPOINTS] - #resources_to_get = [RESOURCE_INTERFACES] - #resources_to_get = [RESOURCE_NETWORK_INSTANCES] - #resources_to_get = [RESOURCE_ROUTING_POLICIES] - #resources_to_get = [RESOURCE_SERVICES] - #LOGGER.info('resources_to_get = {:s}'.format(str(resources_to_get))) - #results_getconfig = driver.GetConfig(resources_to_get) - #LOGGER.info('results_getconfig = {:s}'.format(str(results_getconfig))) - - #resources_to_set = [ - # network_instance('test-svc', 'L3VRF'), - # - # interface('ethernet-1/1', 0, '172.16.0.1', 24, True), - # network_instance_interface('test-svc', 'ethernet-1/1', 0), - # - # interface('ethernet-1/2', 0, '172.0.0.1', 24, True), - # network_instance_interface('test-svc', 'ethernet-1/2', 0), - # - # network_instance_static_route('test-svc', '172.0.0.0/24', '172.16.0.2'), - # network_instance_static_route('test-svc', '172.2.0.0/24', '172.16.0.3'), - #] - #LOGGER.info('resources_to_set = {:s}'.format(str(resources_to_set))) - #results_setconfig = driver.SetConfig(resources_to_set) - #LOGGER.info('results_setconfig = {:s}'.format(str(results_setconfig))) - - resources_to_delete = [ - #network_instance_static_route('d35fc1d9', '172.0.0.0/24', '172.16.0.2'), - #network_instance_static_route('d35fc1d9', '172.2.0.0/24', '172.16.0.3'), - - #network_instance_interface('d35fc1d9', 'ethernet-1/1', 0), - #network_instance_interface('d35fc1d9', 'ethernet-1/2', 0), - - interface('ethernet-1/1', 0, '172.16.1.1', 24, True), - interface('ethernet-1/2', 0, '172.0.0.2', 24, True), - - network_instance('20f66fb5', 'L3VRF'), - ] - LOGGER.info('resources_to_delete = {:s}'.format(str(resources_to_delete))) - results_deleteconfig = driver.DeleteConfig(resources_to_delete) - LOGGER.info('results_deleteconfig = {:s}'.format(str(results_deleteconfig))) - - time.sleep(1) - - driver.Disconnect() - return 0 - -if __name__ == '__main__': - sys.exit(main()) diff --git a/src/device/tests/test_gnmi_nokia_srlinux-get-ifs.py b/src/device/tests/test_gnmi_nokia_srlinux-get-ifs.py new file mode 100644 index 0000000000000000000000000000000000000000..b9e1fda4266be023b527631cd42688112bbbf8e2 --- /dev/null +++ b/src/device/tests/test_gnmi_nokia_srlinux-get-ifs.py @@ -0,0 +1,41 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, os, time +os.environ['DEVICE_EMULATED_ONLY'] = 'YES' + +# pylint: disable=wrong-import-position +from device.service.drivers.gnmi_nokia_srlinux.GnmiNokiaSrLinuxDriver import GnmiNokiaSrLinuxDriver +from device.service.driver_api._Driver import RESOURCE_INTERFACES , RESOURCE_NETWORK_INSTANCES,RESOURCE_TUNNEL_INTERFACE,RESOURCE_ROUTING_POLICY,RESOURCE_ENDPOINTS + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_gnmi_nokia_srlinux(): + driver_settings_leaf1 = { + 'protocol': 'gnmi', + 'username': 'admin', + 'password': 'NokiaSrl1!', + 'use_tls': True, + } + dev1_driver = GnmiNokiaSrLinuxDriver('172.20.20.102', 57400, **driver_settings_leaf1) + dev1_driver.Connect() + #resources_to_get_leaf1 = [RESOURCE_INTERFACES,RESOURCE_NETWORK_INSTANCES,RESOURCE_TUNNEL_INTERFACE,RESOURCE_ROUTING_POLICY] + resources_to_get_leaf1 = [RESOURCE_NETWORK_INSTANCES] + LOGGER.info('resources_to_get = {:s}'.format(str(resources_to_get_leaf1))) + results_getconfig_leaf1 = dev1_driver.GetConfig(resources_to_get_leaf1) + LOGGER.info('results_getconfig = {:s}'.format(str(results_getconfig_leaf1))) + time.sleep(1) + dev1_driver.Disconnect() diff --git a/src/device/tests/test_gnmi_nokia_srlinux.py b/src/device/tests/test_gnmi_nokia_srlinux.py new file mode 100644 index 0000000000000000000000000000000000000000..e919de2c532bb66a0a58fca0f2f8b4551ff677bf --- /dev/null +++ b/src/device/tests/test_gnmi_nokia_srlinux.py @@ -0,0 +1,270 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, os, sys, time +from typing import Dict, Tuple +os.environ['DEVICE_EMULATED_ONLY'] = 'YES' +from device.service.drivers.gnmi_nokia_srlinux.GnmiNokiaSrLinuxDriver import GnmiNokiaSrLinuxDriver # pylint: disable=wrong-import-position +from device.service.driver_api._Driver import ( + RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES, RESOURCE_ROUTING_POLICIES, RESOURCE_SERVICES +) + + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + + +#+---+-----------------+----------+--------------------+--------------+---------------------------------+-------+---------+------------------+----------------------+ +#| # | Topo Path | Lab Name | Name | Container ID | Image | Kind | State | IPv4 Address | IPv6 Address | +#+---+-----------------+----------+--------------------+--------------+---------------------------------+-------+---------+------------------+----------------------+ +#| 1 | evpn01.clab.yml | evpn01 | clab-evpn01-leaf1 | 8e8e6611e681 | ghcr.io/nokia/srlinux:23.10.1 | srl | running | 172.20.20.102/24 | 2001:172:20:20::2/64 | +#| 2 | | | clab-evpn01-leaf2 | 26180fc54efe | ghcr.io/nokia/srlinux:23.10.1 | srl | running | 172.20.20.103/24 | 2001:172:20:20::3/64 | +#| 3 | | | clab-evpn01-spine1 | 981ef9d27d62 | ghcr.io/nokia/srlinux:23.10.1 | srl | running | 172.20.20.101/24 | 2001:172:20:20::4/64 | +#| 4 | | | clab-evpn01-srv1 | 9a730d7b6ac3 | ghcr.io/hellt/network-multitool | linux | running | 172.20.20.2/24 | 2001:172:20:20::5/64 | +#| 5 | | | clab-evpn01-srv2 | b90c423c4f23 | ghcr.io/hellt/network-multitool | linux | running | 172.20.20.3/24 | 2001:172:20:20::6/64 | +#+---+-----------------+----------+--------------------+--------------+---------------------------------+-------+---------+---- + +def interface(if_name,if_admin_state,subif_index,subif_ipv4_admin_state,subif_ipv4_address,subif_ipv4_prefix ) -> Tuple[str, Dict]: + str_path = f'/interface[name={if_name}]' + + str_data = { + 'if_name': if_name, + 'if_admin_state': if_admin_state, + 'subif_index': subif_index, + 'subif_ipv4_admin_state': subif_ipv4_admin_state, + 'subif_ipv4_address': subif_ipv4_address, + 'subif_ipv4_prefix': subif_ipv4_prefix, + } + + return str_path, str_data +def vlan_interface(if_name,if_vlan_tagging,subif_index,subif_type,subif_vlan_admin_state, subif_vlan_encap) -> Tuple[str, Dict]: + str_path = f'/interface[name={if_name}]' + str_data = { 'if_name':if_name, + 'if_vlan_tagging': if_vlan_tagging, + 'subif_index': subif_index, + 'subif_type': subif_type, + 'subif_vlan_admin_state': subif_vlan_admin_state, + 'subif_vlan_encap': subif_vlan_encap, + } + return str_path, str_data + + + +def routing_policy(if_name,if_policy_result) -> Tuple[str, Dict]: + str_path = f'/routing-policy' + str_data = {'if_name': if_name,'if_policy_result': if_policy_result} + return str_path, str_data + + +def network_instance_default(if_name,if_interface1,if_interface2,if_admin_state_bgp,if_afi_safi_name_bgp,if_autonomous_system_bgp,if_export_policy,if_group_name,if_import_policy,if_peer_as,if_admin_state_group,if_afi_safi_name_group,if_admin_state_group_2,if_afi_safi_name_group_2,if_export_policy_2,if_group_name_2,if_import_policy_2,if_as_number,if_peer_as_2,if_minimum_advertisement_interval,if_admin_state_neighbor,if_peer_address_neighbor,if_peer_group_neighbor,if_local_address_neighbor,if_peer_address_neighbor_2,if_peer_group_neighbor_2,if_router_id) -> Tuple[str, Dict]: + str_path = f'/network-instance[name={if_name}]' + str_data = { + 'if_name':if_name, + 'if_interface1':if_interface1, + 'if_interface2':if_interface2, + 'if_admin_state_bgp': if_admin_state_bgp, + 'if_afi_safi_name_bgp':if_afi_safi_name_bgp, + 'if_autonomous_system_bgp':if_autonomous_system_bgp, + 'if_export_policy': if_export_policy, + 'if_group_name': if_group_name, + 'if_import_policy':if_import_policy, + 'if_peer_as': if_peer_as, + 'if_admin_state_group': if_admin_state_group, + 'if_afi_safi_name_group': if_afi_safi_name_group, + 'if_admin_state_group_2': if_admin_state_group_2, + 'if_afi_safi_name_group_2': if_afi_safi_name_group_2, + 'if_export_policy_2': if_export_policy_2, + 'if_group_name_2': if_group_name_2, + 'if_import_policy_2': if_import_policy_2, + 'if_as_number': if_as_number, + 'if_peer_as_2': if_peer_as_2, + 'if_minimum_advertisement_interval':if_minimum_advertisement_interval, + 'if_admin_state_neighbor': if_admin_state_neighbor, + 'if_peer_address_neighbor': if_peer_address_neighbor, + 'if_peer_group_neighbor': if_peer_group_neighbor, + 'if_local_address_neighbor': if_local_address_neighbor, + 'if_peer_address_neighbor_2': if_peer_address_neighbor_2, + 'if_peer_group_neighbor_2':if_peer_group_neighbor_2, + 'if_router_id': if_router_id, + } + return str_path, str_data +def network_instance_vrf(if_name,if_type,if_admin_state_vrf,if_interface1_name,if_vxlaninterface_name,if_bgp_evpn_instance_id,if_bgp_evpn_instance_admin_state,if_bgp_evpn_instance_vxlan_interface,if_bgp_evpn_instance_evi,if_bgp_vpn_instance_id,if_bgp_vpn_instance_export_rt,if_bgp_vpn_instance_import_rt) -> Tuple[str, Dict]: + str_path = f'/network-instance[name={if_name}]' + str_data = {'if_name': if_name, + 'if_type': if_type, + 'if_admin_state_vrf':if_admin_state_vrf, + 'if_interface1_name':if_interface1_name, + 'if_vxlaninterface_name':if_vxlaninterface_name, + 'if_bgp_evpn_instance_id': if_bgp_evpn_instance_id, + 'if_bgp_evpn_instance_admin_state':if_bgp_evpn_instance_admin_state, + 'if_bgp_evpn_instance_vxlan_interface': if_bgp_evpn_instance_vxlan_interface, + 'if_bgp_evpn_instance_evi': if_bgp_evpn_instance_evi, + 'if_bgp_vpn_instance_id':if_bgp_vpn_instance_id, + 'if_bgp_vpn_instance_export_rt':if_bgp_vpn_instance_export_rt, + 'if_bgp_vpn_instance_import_rt':if_bgp_vpn_instance_import_rt } + + return str_path, str_data +def tunnel_interface(if_name, if_index,if_type_tunnel,if_vni_tunnel) -> Tuple[str, Dict]: + str_path = f'/tunnel-interface[name={if_name}]' + str_data = {'if_name':if_name, + 'if_index':if_index, + 'if_type_tunnel':if_type_tunnel, + 'if_vni_tunnel':if_vni_tunnel } + + return str_path, str_data + +def network_instance_interface(name,if_name)-> Tuple[str, Dict]: + str_path=f'/network-instance[name={name} /interface{if_name}' + str_data = {'name':name,'if_name':if_name} + return str_path, str_data + +def network_instance_Vxlaninterface(name,if_name)-> Tuple[str, Dict]: + str_path=f'/network-instance[name={name} /vxlan-interface{if_name}' + str_data = {'name':name,'if_name':if_name} + return str_path, str_data + +def network_instance_default_spine(if_interface1_spine,if_interface2_spine,if_interface3_spine,if_name,if_admin_state_spine,if_afi_safi_name_bgp_spine,if_autonomous_system_bgp_spine,if_export_policy_spine,if_group_name_spine,if_import_policy_spine,if_peer_address_neighbor_spine,if_peeras_group_neighbor_spine,if_peer_group_neighbor_spine,if_peer_address2_neighbor_spine,if_peeras_group_neighbor2_spine,if_peer_group_neighbor2_spine,if_router_id_spine)-> Tuple[str, Dict]: + str_path = f'/network-instance[name={if_name}]' + str_data = {'if_interface1_spine':if_interface1_spine, + 'if_interface2_spine':if_interface2_spine, + 'if_interface3_spine':if_interface3_spine, + 'if_name':if_name, + 'if_admin_state_spine':if_admin_state_spine, + 'if_afi_safi_name_bgp_spine':if_afi_safi_name_bgp_spine, + 'if_autonomous_system_bgp_spine':if_autonomous_system_bgp_spine, + 'if_export_policy_spine':if_export_policy_spine, + 'if_group_name_spine':if_group_name_spine, + 'if_import_policy_spine':if_import_policy_spine, + 'if_peer_address_neighbor_spine':if_peer_address_neighbor_spine, + 'if_peeras_group_neighbor_spine':if_peeras_group_neighbor_spine, + 'if_peer_group_neighbor_spine':if_peer_group_neighbor_spine, + 'if_peer_address2_neighbor_spine':if_peer_address2_neighbor_spine, + 'if_peeras_group_neighbor2_spine':if_peeras_group_neighbor2_spine, + 'if_peer_group_neighbor2_spine':if_peer_group_neighbor2_spine, + 'if_router_id_spine':if_router_id_spine} + return str_path, str_data + + +def test_gnmi_nokia_srlinux(): + #try: + driver_settings_leaf1 = { + 'protocol': 'gnmi', + 'username': 'admin', + 'password': 'NokiaSrl1!', + 'use_tls': True, + } + dev1_driver = GnmiNokiaSrLinuxDriver('172.20.20.102', 57400, **driver_settings_leaf1) + dev1_driver.Connect() + # resources_to_get_leaf1 = [RESOURCE_INTERFACES] + # LOGGER.info('resources_to_get = {:s}'.format(str(resources_to_get_leaf1))) + # results_getconfig_leaf1 = dev1_driver.GetConfig(resources_to_get_leaf1) + # LOGGER.info('results_getconfig = {:s}'.format(str(results_getconfig_leaf1))) + # except Exception as e: + # + # logging.exception("Exception occurred", exc_info=True) + resources_to_set_leaf1 = [ + ####LEAF1##### + interface('ethernet-1/49',True,0,True,'192.168.11.1','30'), + routing_policy('all','accept'), + network_instance_default('default','ethernet-1/49.0','system0.0',True,'ipv4-unicast',101,'all','eBGP-underlay','all',201,True,'evpn',False,'ipv4-unicast','all','iBGP-overlay','all',100,100,1,True,'10.0.0.2','iBGP-overlay','10.0.0.1','192.168.11.2','eBGP-underlay','10.0.0.1'), + interface('system0',True,0,True,'10.0.0.1','32'), + vlan_interface('ethernet-1/1',True,0,'bridged',True,'untagged'), + network_instance_vrf('vrf-1','mac-vrf',True,'ethernet-1/1.0','vxlan1.1',1,True,'vxlan1.1',111,1,'target:100:111','target:100:111'), + tunnel_interface('vxlan1', 1, 'bridged', 1), + ] + results_setconfig_leaf1 = dev1_driver.SetConfig(resources_to_set_leaf1) + LOGGER.info('Leaf 1 results_setconfig = {:s}'.format(str(results_setconfig_leaf1))) + + time.sleep(1) + dev1_driver.Disconnect() +######LEAF2############################## + driver_settings_leaf2 = { + 'protocol': 'gnmi', + 'username': 'admin', + 'password': 'NokiaSrl1!', + 'use_tls': True, + } + dev2_driver = GnmiNokiaSrLinuxDriver('172.20.20.103', 57400, **driver_settings_leaf2) + dev2_driver.Connect() + + resources_to_set_leaf2 = [ + interface('ethernet-1/49',True,0,True,'192.168.12.1','30'), + routing_policy('all','accept'), + network_instance_default('default','ethernet-1/49.0','system0.0',True,'ipv4-unicast',102,'all','eBGP-underlay','all',201,True,'evpn',False,'ipv4-unicast','all','iBGP-overlay','all',100,100,1,True,'10.0.0.1','iBGP-overlay','10.0.0.2','192.168.12.2','eBGP-underlay','10.0.0.2'), + interface('system0',True,0,True,'10.0.0.2','32'), + vlan_interface('ethernet-1/1',True,0,'bridged',True,'untagged'), + network_instance_vrf('vrf-1','mac-vrf',True,'ethernet-1/1.0','vxlan1.1',1,True,'vxlan1.1',111,1,'target:100:111','target:100:111'), + tunnel_interface('vxlan1', 1, 'bridged', 1), + + ] + results_setconfig_leaf2 = dev2_driver.SetConfig(resources_to_set_leaf2) + LOGGER.info('Leaf 2 results_setconfig = {:s}'.format(str(results_setconfig_leaf2))) + + time.sleep(1) + dev2_driver.Disconnect() +############SPINE############################################ + driver_settings_spine = { + 'protocol': 'gnmi', + 'username': 'admin', + 'password': 'NokiaSrl1!', + 'use_tls': True, + } + spine_driver = GnmiNokiaSrLinuxDriver('172.20.20.101', 57400, **driver_settings_spine) + spine_driver.Connect() + + resources_to_set_spine = [ + interface('ethernet-1/1',True,0,True,'192.168.11.2','30'), + interface('ethernet-1/2',True,0,True,'192.168.12.2','30'), + network_instance_default_spine('ethernet-1/1.0','ethernet-1/2.0','system0.0','default',True,'ipv4-unicast',201,'all','eBGP-underlay','all','192.168.11.1',101,'eBGP-underlay','192.168.12.1',102,'eBGP-underlay','10.0.1.1'), + interface('system0',True,0,True,'10.0.1.1',32), + routing_policy('all','accept'), + + ] + results_setconfig_spine = spine_driver.SetConfig(resources_to_set_spine) + LOGGER.info('Spine results_setconfig = {:s}'.format(str(results_setconfig_spine))) + + + time.sleep(1) + spine_driver.Disconnect() + + +# #results_setconfig = dev1_driver.SetConfig(resources_to_set) + #LOGGER.info('results_setconfig = {:s}'.format(str(results_setconfig))) + + #resources_to_get = [RESOURCE_INTERFACES] + #LOGGER.info('resources_to_get = {:s}'.format(str(resources_to_get))) + #results_getconfig = dev1_driver.GetConfig(resources_to_get) + #LOGGER.info('results_getconfig = {:s}'.format(str(results_getconfig))) + + #resources_to_delete = [ + # interface('ethernet-1/49', 0, '192.168.11.1', 30, True), + #routing_policy('all',True) + #] + + #LOGGER.info('resources_to_delete = {:s}'.format(str(resources_to_delete))) + #results_deleteconfig = dev1_driver.DeleteConfig(resources_to_delete) + #LOGGER.info('results_deleteconfig = {:s}'.format(str(results_deleteconfig))) + + #resources_to_get = [RESOURCE_INTERFACES] + #LOGGER.info('resources_to_get = {:s}'.format(str(resources_to_get))) + #results_getconfig = dev1_driver.GetConfig(resources_to_get) + #LOGGER.info('results_getconfig = {:s}'.format(str(results_getconfig))) + + #time.sleep(1) + #dev1_driver.Disconnect() + return 0 + + + diff --git a/src/service/service/service_handler_api/FilterFields.py b/src/service/service/service_handler_api/FilterFields.py index 430e25938601d522187046b0ebd4cad6971261bb..a8ec76f3abd1dd662f83c936595c4e7ea9ba5d88 100644 --- a/src/service/service/service_handler_api/FilterFields.py +++ b/src/service/service/service_handler_api/FilterFields.py @@ -37,6 +37,7 @@ DEVICE_DRIVER_VALUES = { DeviceDriverEnum.DEVICEDRIVER_XR, DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN, DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG, + DeviceDriverEnum.DEVICEDRIVER_GNMI_NOKIA_SRLINUX, } # Map allowed filter fields to allowed values per Filter field. If no restriction (free text) None is specified diff --git a/src/webui/service/device/forms.py b/src/webui/service/device/forms.py index bcd5804d32927763344d08371320fdde5f2fcab7..1520cc3deb21e8e26ea1440fffa40f9b6cbdea28 100644 --- a/src/webui/service/device/forms.py +++ b/src/webui/service/device/forms.py @@ -31,6 +31,7 @@ class AddDeviceForm(FlaskForm): device_drivers_xr = BooleanField('XR') device_drivers_ietf_l2vpn = BooleanField('IETF L2VPN') device_drivers_gnmi_openconfig = BooleanField('GNMI OPENCONFIG') + device_drivers_gnmi_nokia_srlinux = BooleanField('GNMI NOKIA SR LINUX') device_config_address = StringField('connect/address',default='127.0.0.1',validators=[DataRequired(), Length(min=5)]) device_config_port = StringField('connect/port',default='0',validators=[DataRequired(), Length(min=1)]) diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index 4459deeebd000642cfe235f4f46ebf65670ae2ee..7096a61ff4477595244e638b41c240504dcc9d95 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -125,6 +125,8 @@ def add(): device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_L2VPN) if form.device_drivers_gnmi_openconfig.data: device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG) + if form.device_drivers_gnmi_nokia_srlinux.data: + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_GNMI_NOKIA_SRLINUX) device_obj.device_drivers.extend(device_drivers) # pylint: disable=no-member try: diff --git a/src/webui/service/templates/device/add.html b/src/webui/service/templates/device/add.html index c115657aa08828849172345ca50caaeb4150fe0f..b4b913f51d5ea602d5fea388e2b8ea06c733c811 100644 --- a/src/webui/service/templates/device/add.html +++ b/src/webui/service/templates/device/add.html @@ -92,6 +92,8 @@ {{ form.device_drivers_xr }} {{ form.device_drivers_xr.label(class="col-sm-3 col-form-label") }} {{ form.device_drivers_ietf_l2vpn }} {{ form.device_drivers_ietf_l2vpn.label(class="col-sm-3 col-form-label") }} {{ form.device_drivers_gnmi_openconfig }} {{ form.device_drivers_gnmi_openconfig.label(class="col-sm-3 col-form-label") }} +
+ {{ form.device_drivers_gnmi_nokia_srlinux }} {{ form.device_drivers_gnmi_nokia_srlinux.label(class="col-sm-3 col-form-label") }} {% endif %}