-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61ce040
commit c65ccb2
Showing
16 changed files
with
534 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
$ python gnmi_capabilities.py | ||
{'supported_models': [{'name': 'openconfig-if-ethernet', 'organization': 'OpenConfig working group', 'version': '2.8.1'}, {'name': 'ietf-interfaces', 'organization': 'IETF NETMOD (Network Modeling) Working Group', 'version': ''}, {'name': 'openconfig-qos-types', 'organization': 'OpenConfig working group', 'version': '0.2.1'}, {'name': 'arista-rpc-netconf', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'ietf-inet-types', 'organization': 'IETF NETMOD (NETCONF Data Modeling Language) Working Group', 'version': ''}, {'name': 'arista-aft-augments', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-bgp', 'organization': 'OpenConfig working group', 'version': '6.0.0'}, {'name': 'openconfig-system-logging', 'organization': 'OpenConfig working group', 'version': '0.3.1'}, {'name': 'openconfig-rib-bgp-types', 'organization': 'OpenConfig working group', 'version': '0.5.0'}, {'name': 'openconfig-mpls', 'organization': 'OpenConfig working group', 'version': '3.1.0'}, {'name': 'openconfig-aft', 'organization': 'OpenConfig working group', 'version': '0.4.1'}, {'name': 'arista-rpol-augments', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-if-aggregate', 'organization': 'OpenConfig working group', 'version': '2.4.3'}, {'name': 'arista-exp-eos-qos', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'arista-lldp-augments', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-messages', 'organization': 'OpenConfig working group', 'version': '0.0.1'}, {'name': 'arista-bgp-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-isis-augments', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-platform-cpu', 'organization': 'OpenConfig working group', 'version': '0.1.1'}, {'name': 'openconfig-yang-types', 'organization': 'OpenConfig working group', 'version': '0.2.1'}, {'name': 'arista-gnoi-cert', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-bfd-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-pim-augments', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-alarm-types', 'organization': 'OpenConfig working group', 'version': '0.2.1'}, {'name': 'openconfig-igmp', 'organization': 'OpenConfig working group', 'version': '0.2.0'}, {'name': 'openconfig-license', 'organization': 'OpenConfig working group', 'version': '0.2.0'}, {'name': 'openconfig-aaa', 'organization': 'OpenConfig working group', 'version': '0.4.3'}, {'name': 'openconfig-segment-routing', 'organization': 'OpenConfig working group', 'version': '0.3.0'}, {'name': 'arista-lacp-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-cli', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-if-ip', 'organization': 'OpenConfig working group', 'version': '3.0.0'}, {'name': 'openconfig-if-poe', 'organization': 'OpenConfig working group', 'version': '0.1.1'}, {'name': 'openconfig-pim', 'organization': 'OpenConfig working group', 'version': '0.2.0'}, {'name': 'openconfig-segment-routing-types', 'organization': 'OpenConfig working group', 'version': '0.2.0'}, {'name': 'arista-exp-eos-evpn', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-local-routing-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-system-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-hercules-platform', 'organization': 'OpenConfig Hercules Working Group', 'version': '0.2.0'}, {'name': 'openconfig-aft-types', 'organization': 'OpenConfig Working Group', 'version': '0.3.4'}, {'name': 'openconfig-local-routing', 'organization': 'OpenConfig working group', 'version': '1.1.0'}, {'name': 'openconfig-routing-policy', 'organization': 'OpenConfig working group', 'version': '3.1.1'}, {'name': 'arista-mpls-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-types', 'organization': 'OpenConfig working group', 'version': '0.6.0'}, {'name': 'arista-system-augments', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-ospf-policy', 'organization': 'OpenConfig working group', 'version': '0.1.3'}, {'name': 'openconfig-platform', 'organization': 'OpenConfig working group', 'version': '0.12.2'}, {'name': 'arista-rpol-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-bfd-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-qos', 'organization': 'OpenConfig working group', 'version': '0.2.3'}, {'name': 'openconfig-vlan-types', 'organization': 'OpenConfig working group', 'version': '3.1.0'}, {'name': 'openconfig-mpls-types', 'organization': 'OpenConfig working group', 'version': '3.2.0'}, {'name': 'arista-netinst-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'iana-if-type', 'organization': 'IANA', 'version': ''}, {'name': 'openconfig-isis-types', 'organization': 'OpenConfig working group', 'version': '0.4.2'}, {'name': 'arista-exp-eos-varp-net-inst', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-platform-port', 'organization': 'OpenConfig working group', 'version': '0.3.3'}, {'name': 'arista-exp-eos-vxlan-config', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-network-instance-l3', 'organization': 'OpenConfig working group', 'version': '0.11.1'}, {'name': 'arista-bgp-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-bgp-augments', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-hercules-interfaces', 'organization': 'OpenConfig Hercules Working Group', 'version': '0.2.0'}, {'name': 'openconfig-packet-match', 'organization': 'OpenConfig working group', 'version': '1.1.1'}, {'name': 'ietf-netconf-monitoring', 'organization': 'IETF NETCONF (Network Configuration) Working Group', 'version': ''}, {'name': 'arista-exp-eos-igmpsnooping', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'arista-intf-augments', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-pf-srte', 'organization': 'OpenConfig working group', 'version': '0.2.0'}, {'name': 'openconfig-aaa-types', 'organization': 'OpenConfig working group', 'version': '0.4.1'}, {'name': 'openconfig-system', 'organization': 'OpenConfig working group', 'version': '0.9.1'}, {'name': 'arista-routing-policy-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-lldp', 'organization': 'OpenConfig working group', 'version': '0.2.1'}, {'name': 'openconfig-platform-psu', 'organization': 'OpenConfig working group', 'version': '0.2.1'}, {'name': 'openconfig-srte-policy', 'organization': 'OpenConfig working group', 'version': '0.2.1'}, {'name': 'arista-srte-augments', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-network-instance-types', 'organization': 'OpenConfig working group', 'version': '0.8.2'}, {'name': 'openconfig-lacp', 'organization': 'OpenConfig working group', 'version': '1.1.1'}, {'name': 'openconfig-packet-match-types', 'organization': 'OpenConfig working group', 'version': '1.0.2'}, {'name': 'arista-interfaces-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-isis', 'organization': 'OpenConfig working group', 'version': '0.6.0'}, {'name': 'openconfig-ospf-types', 'organization': 'OpenConfig working group', 'version': '0.1.3'}, {'name': 'openconfig-system-terminal', 'organization': 'OpenConfig working group', 'version': '0.3.1'}, {'name': 'openconfig-lldp-types', 'organization': 'OpenConfig working group', 'version': '0.1.1'}, {'name': 'arista-lldp-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-pim-types', 'organization': 'OpenConfig working group', 'version': '0.1.1'}, {'name': 'openconfig-if-tunnel', 'organization': 'OpenConfig working group', 'version': '0.1.1'}, {'name': 'arista-system-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-exp-eos-vxlan', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-transport-types', 'organization': 'OpenConfig working group', 'version': '0.11.0'}, {'name': 'arista-vlan-deviations', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-platform-linecard', 'organization': 'OpenConfig working group', 'version': '0.1.2'}, {'name': 'arista-exp-eos-multicast', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-alarms', 'organization': 'OpenConfig working group', 'version': '0.3.2'}, {'name': 'openconfig-bgp-policy', 'organization': 'OpenConfig working group', 'version': '6.0.1'}, {'name': 'openconfig-inet-types', 'organization': 'OpenConfig working group', 'version': '0.3.3'}, {'name': 'ietf-yang-types', 'organization': 'IETF NETMOD (NETCONF Data Modeling Language) Working Group', 'version': ''}, {'name': 'openconfig-rib-bgp', 'organization': 'OpenConfig working group', 'version': '0.7.0'}, {'name': 'arista-exp-eos-qos-config', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'vlan-translation', 'organization': 'Arista Networks', 'version': ''}, {'name': 'arista-acl-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-mpls-ldp', 'organization': 'OpenConfig working group', 'version': '3.0.2'}, {'name': 'arista-eos-types', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-igmp-types', 'organization': 'OpenConfig working group', 'version': '0.1.1'}, {'name': 'openconfig-mpls-sr', 'organization': 'OpenConfig working group', 'version': '3.0.1'}, {'name': 'arista-exp-eos', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'arista-lldp-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-platform-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-exp-eos-l2protocolforwarding', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-relay-agent', 'organization': 'OpenConfig working group', 'version': '0.1.1'}, {'name': 'arista-exp-eos-mlag', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'arista-bfd-augments', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'arista-mpls-augments', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'arista-openflow-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-openflow', 'organization': 'OpenConfig working group', 'version': '0.1.2'}, {'name': 'openconfig-acl', 'organization': 'OpenConfig working group', 'version': '1.1.1'}, {'name': 'openconfig-interfaces', 'organization': 'OpenConfig working group', 'version': '2.4.3'}, {'name': 'openconfig-policy-types', 'organization': 'OpenConfig working group', 'version': '3.1.1'}, {'name': 'openconfig-system-management', 'organization': 'OpenConfig working group', 'version': '0.3.0'}, {'name': 'arista-isis-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-platform-fan', 'organization': 'OpenConfig working group', 'version': '0.1.1'}, {'name': 'arista-qos-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-bfd', 'organization': 'OpenConfig working group', 'version': '0.2.1'}, {'name': 'openconfig-ospfv2', 'organization': 'OpenConfig working group', 'version': '0.2.2'}, {'name': 'openconfig-hercules-qos', 'organization': 'OpenConfig Hercules Working Group', 'version': '0.1.0'}, {'name': 'arista-exp-eos-varp-intf', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-procmon', 'organization': 'OpenConfig working group', 'version': '0.4.0'}, {'name': 'openconfig-platform-transceiver', 'organization': 'OpenConfig working group', 'version': '0.7.1'}, {'name': 'openconfig-openflow-types', 'organization': 'OpenConfig working group', 'version': '0.1.2'}, {'name': 'arista-network-instance-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-extensions', 'organization': 'OpenConfig working group', 'version': ''}, {'name': 'arista-intf-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-messages-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-exp-eos-qos-acl-config', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'ietf-netconf', 'organization': 'IETF NETCONF (Network Configuration) Working Group', 'version': ''}, {'name': 'openconfig-bgp-types', 'organization': 'OpenConfig working group', 'version': '5.2.0'}, {'name': 'openconfig-platform-types', 'organization': 'OpenConfig working group', 'version': '1.0.0'}, {'name': 'arista-vlan-augments', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-mpls-rsvp', 'organization': 'OpenConfig working group', 'version': '3.0.2'}, {'name': 'arista-lacp-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-qos-augments', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-acl-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'openconfig-vlan', 'organization': 'OpenConfig working group', 'version': '3.2.0'}, {'name': 'openconfig-policy-forwarding', 'organization': 'OpenConfig working group', 'version': '0.2.1'}, {'name': 'openconfig-isis-lsdb-types', 'organization': 'OpenConfig working group', 'version': '0.4.2'}, {'name': 'arista-srte-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-local-routing-notsupported-deviations', 'organization': 'Arista Networks, Inc.', 'version': ''}, {'name': 'arista-relay-agent-deviations', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-if-types', 'organization': 'OpenConfig working group', 'version': '0.2.1'}, {'name': 'arista-lacp-augments', 'organization': 'Arista Networks <http://arista.com/>', 'version': ''}, {'name': 'openconfig-network-instance', 'organization': 'OpenConfig working group', 'version': '0.14.0'}], 'supported_encodings': [0, 4, 3], 'gnmi_version': '0.7.0'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env python | ||
#(c)2020, karneliuk.com | ||
|
||
# Modules | ||
from pygnmi.client import gNMIclient | ||
|
||
# Variables | ||
host = ('fd17:625c:f037:2::100',6030) | ||
|
||
# Body | ||
if __name__ == '__main__': | ||
with gNMIclient(target=host, username='aaa', password='aaa', insecure=True) as gc: | ||
response = gc.capabilities() | ||
|
||
print(response) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
$ python gnmi_get.py | ||
{'notification': [{'timestamp': 0}, {'timestamp': 0, 'update': [{'path': 'interfaces/interface[name=Ethernet1]', 'json_ietf_val': {'openconfig-interfaces:config': {'description': 'pygnmi-controlled', 'enabled': True, 'arista-intf-augments:load-interval': 300, 'loopback-mode': False, 'mtu': 0, 'name': 'Ethernet1', 'openconfig-vlan:tpid': 'openconfig-vlan-types:TPID_0X8100', 'type': 'iana-if-type:ethernetCsmacd'}, 'openconfig-if-ethernet:ethernet': {'config': {'arista-intf-augments:fec-encoding': {'disabled': False, 'fire-code': False, 'reed-solomon': False, 'reed-solomon544': False}, 'openconfig-hercules-interfaces:forwarding-viable': True, 'mac-address': '00:00:00:00:00:00', 'port-speed': 'SPEED_UNKNOWN', 'arista-intf-augments:sfp-1000base-t': False}, 'arista-intf-augments:pfc': {'priorities': {'priority': [{'index': 0, 'state': {'in-frames': '0', 'index': 0, 'out-frames': '0'}}, {'index': 1, 'state': {'in-frames': '0', 'index': 1, 'out-frames': '0'}}, {'index': 2, 'state': {'in-frames': '0', 'index': 2, 'out-frames': '0'}}, {'index': 3, 'state': {'in-frames': '0', 'index': 3, 'out-frames': '0'}}, {'index': 4, 'state': {'in-frames': '0', 'index': 4, 'out-frames': '0'}}, {'index': 5, 'state': {'in-frames': '0', 'index': 5, 'out-frames': '0'}}, {'index': 6, 'state': {'in-frames': '0', 'index': 6, 'out-frames': '0'}}, {'index': 7, 'state': {'in-frames': '0', 'index': 7, 'out-frames': '0'}}]}}, 'state': {'auto-negotiate': False, 'counters': {'in-crc-errors': '0', 'in-fragment-frames': '0', 'in-jabber-frames': '0', 'in-mac-control-frames': '0', 'in-mac-pause-frames': '0', 'in-oversize-frames': '0', 'out-mac-control-frames': '0', 'out-mac-pause-frames': '0'}, 'duplex-mode': 'FULL', 'enable-flow-control': False, 'openconfig-hercules-interfaces:forwarding-viable': True, 'hw-mac-address': '08:00:27:04:eb:42', 'mac-address': '08:00:27:04:eb:42', 'negotiated-port-speed': 'SPEED_UNKNOWN', 'port-speed': 'SPEED_UNKNOWN', 'arista-intf-augments:supported-speeds': ['SPEED_40GB', 'SPEED_25GB', 'SPEED_10MB', 'SPEED_100GB_2LANE', 'SPEED_100MB', 'SPEED_50GB_1LANE', 'SPEED_50GB', 'SPEED_200GB_4LANE', 'SPEED_10GB', 'SPEED_5GB', 'SPEED_1GB', 'SPEED_100GB', 'SPEED_2500MB', 'SPEED_200GB_8LANE', 'SPEED_400GB']}}, 'openconfig-interfaces:hold-time': {'config': {'down': 0, 'up': 0}, 'state': {'down': 0, 'up': 0}}, 'openconfig-interfaces:name': 'Ethernet1', 'openconfig-interfaces:state': {'admin-status': 'UP', 'counters': {'in-broadcast-pkts': '0', 'in-discards': '0', 'in-errors': '0', 'in-fcs-errors': '0', 'in-multicast-pkts': '0', 'in-octets': '0', 'in-unicast-pkts': '0', 'out-broadcast-pkts': '0', 'out-discards': '0', 'out-errors': '0', 'out-multicast-pkts': '87', 'out-octets': '10345', 'out-unicast-pkts': '0'}, 'description': 'pygnmi-controlled', 'enabled': True, 'openconfig-platform-port:hardware-port': 'Port1', 'ifindex': 1, 'arista-intf-augments:inactive': False, 'last-change': '1605736734320210176', 'loopback-mode': False, 'mtu': 0, 'name': 'Ethernet1', 'oper-status': 'UP', 'openconfig-vlan:tpid': 'openconfig-vlan-types:TPID_0X8100', 'type': 'iana-if-type:ethernetCsmacd'}, 'openconfig-interfaces:subinterfaces': {'subinterface': [{'config': {'description': 'pygnmi-controlled', 'enabled': True, 'index': 0}, 'index': 0, 'openconfig-if-ip:ipv4': {'addresses': {'address': [{'config': {'arista-intf-augments:addr-type': 'PRIMARY', 'ip': '10.1.2.0', 'prefix-length': 31}, 'ip': '10.1.2.0', 'state': {'arista-intf-augments:addr-type': 'PRIMARY', 'ip': '10.1.2.0', 'origin': 'STATIC', 'prefix-length': 31}}]}, 'config': {'dhcp-client': False, 'enabled': True, 'mtu': 1500}, 'state': {'dhcp-client': False, 'enabled': True, 'mtu': 1500}, 'unnumbered': {'config': {'enabled': False}, 'interface-ref': {'config': {}, 'state': {}}, 'state': {'enabled': False}}}, 'openconfig-if-ip:ipv6': {'config': {'dhcp-client': False, 'enabled': False, 'mtu': 1500}, 'state': {'dhcp-client': False, 'enabled': False, 'mtu': 1500}}, 'state': {'counters': {'in-fcs-errors': '0'}, 'description': 'pygnmi-controlled', 'enabled': True, 'index': 0}}]}}}]}]} |
Oops, something went wrong.