Comments (3)
The short output comes from ietf-interfaces
here which also starts with /interfaces/interface/...
and is imported by OC interfaces (but not implemented by the router).
Depending which modules gNMIc encounters first/second, you will get different results.
The way around it is to use the --exclude
flag, add --exclude ietf-interfaces
just like the example here: https://gnmic.openconfig.net/cmd/generate/#openconfig
from gnmic.
This is a simple case of not including the name in the path:
[test@arch-1 yang]$ gnmic generate --file files/ --dir modules/ --path /interfaces/interface[name=Ethernet0]/
- statistics:
discontinuity-time: []
in-broadcast-pkts: []
in-discards: []
in-errors: []
in-multicast-pkts: []
in-octets: []
in-unicast-pkts: []
in-unknown-protos: []
out-broadcast-pkts: []
out-discards: []
out-errors: []
out-multicast-pkts: []
out-octets: []
out-unicast-pkts: []
[test@arch-1 yang]$
from gnmic.
The same command will generate different results however:
[test@arch-1 yang]$ gnmic generate --file files/ --dir modules/ --path /interfaces/interface[name=Ethernet0]/
- aggregation:
config:
fallback: []
fast-rate: []
graceful-shutdown-mode: []
lag-type: []
min-links: []
system-mac: []
reason-events:
reason-event:
- state:
event: []
reason: []
timestamp: []
state:
fallback: []
fast-rate: []
graceful-shutdown-mode: []
lag-speed: []
lag-type: []
member: []
min-links: []
reason: []
system-mac: []
switched-vlan:
config:
access-vlan: []
interface-mode: []
native-vlan: []
trunk-vlans: []
state:
access-vlan: []
interface-mode: []
native-vlan: []
trunk-vlans: []
config:
description: []
enabled:
- "true"
loopback-mode:
- "false"
mtu: []
name: []
tpid:
- oc-vlan-types:TPID_0X8100
type: []
dhcpv4-snooping-trust:
config:
dhcpv4-snooping-trust: []
state:
dhcpv4-snooping-trust: []
dhcpv6-snooping-trust:
config:
dhcpv6-snooping-trust: []
state:
dhcpv6-snooping-trust: []
ethernet:
config:
advertised-speed: []
aggregate-id: []
auto-negotiate:
- "true"
diag-mode: []
duplex-mode: []
enable-flow-control:
- "false"
fec-mode: []
high-wattage-optics-enable:
- "true"
mac-address: []
port-fec: []
port-speed: []
standalone-link-training:
- "false"
unreliable-los: []
debugcounter-drops:
drop-counters:
- state:
counter0-name: []
counter0-value: []
counter1-name: []
counter1-value: []
counter2-name: []
counter2-value: []
counter3-name: []
counter3-value: []
counter4-name: []
counter4-value: []
counter5-name: []
counter5-value: []
counter6-name: []
counter6-value: []
counter7-name: []
counter7-value: []
phy-mon-counters:
phy-counters:
- state:
last-change: []
last-nz-count: []
phy-counter: []
phy-mon-status:
phy-mon-fields:
- state:
last-change: []
last-status: []
phy-mon-field: []
poe:
config:
detection-mode: []
disconnect-type: []
enabled:
- "true"
four-pair-mode: []
high-power-mode: []
power-classification-mode: []
power-limit: []
power-limit-type: []
power-pairs: []
powerup-mode: []
priority: []
use-spare-pair: []
state:
counters:
absent-counter: []
invalid-signature-counter: []
overload-counter: []
power-denied-counter: []
short-counter: []
detection-mode: []
diagnostics:
temperature: []
disconnect-type: []
enabled:
- "true"
fault-code: []
four-pair-mode: []
high-power-mode: []
output-current: []
output-voltage: []
power-class: []
power-class-requested: []
power-classification-mode: []
power-limit: []
power-limit-type: []
power-pairs: []
power-used: []
powerup-mode: []
priority: []
status: []
use-spare-pair: []
reason-events:
reason-event:
- state:
event: []
reason: []
timestamp: []
state:
advertised-speed: []
aggregate-id: []
auto-negotiate:
- "true"
counters:
in-crc-errors: []
in-distribution:
in-frames-64-octets: []
in-frames-65-127-octets: []
in-frames-128-255-octets: []
in-frames-256-511-octets: []
in-frames-512-1023-octets: []
in-frames-1024-1518-octets: []
in-frames-1519-2047-octets: []
in-frames-2048-4095-octets: []
in-frames-4096-9216-octets: []
in-frames-9217-16383-octets: []
in-fragment-frames: []
in-jabber-frames: []
in-oversize-frames: []
in-undersize-frames: []
out-distribution:
out-frames-64-octets: []
out-frames-65-127-octets: []
out-frames-128-255-octets: []
out-frames-256-511-octets: []
out-frames-512-1023-octets: []
out-frames-1024-1518-octets: []
out-frames-1519-2047-octets: []
out-frames-2048-4095-octets: []
out-frames-4096-9216-octets: []
out-frames-9217-16383-octets: []
out-oversize-frames: []
diag-mode: []
duplex-mode: []
fec-mode: []
high-wattage-optics-enable:
- "true"
link-training-status: []
negotiated-duplex-mode: []
negotiated-port-speed: []
oper-advertised-speed: []
oper-fec: []
oper-unreliable-los: []
port-fec: []
port-speed: []
reason: []
remote-advertised-speed: []
standalone-link-training:
- "false"
supported-features: []
unreliable-los: []
storm-control:
storm-control-list:
- config:
ifname: []
kbps: []
storm-type: []
state:
ifname: []
kbps: []
storm-type: []
switched-vlan:
config:
access-vlan: []
interface-mode: []
trunk-vlans: []
state:
access-vlan: []
interface-mode: []
native-vlan: []
trunk-vlans: []
mapped-vlans:
mapped-vlan:
- config:
vlan-id: []
egress-mapping:
config:
mapped-vlan-priority: []
vlan-stack-action: []
state:
mapped-vlan-priority: []
vlan-stack-action: []
ingress-mapping:
config:
mapped-vlan-priority: []
vlan-stack-action: []
state:
mapped-vlan-priority: []
vlan-stack-action: []
match:
double-tagged:
config:
inner-vlan-id: []
outer-vlan-id: []
state:
inner-vlan-id: []
outer-vlan-id: []
single-tagged:
config:
vlan-ids: []
state:
vlan-ids: []
state:
vlan-id: []
nat-zone:
config:
nat-zone: []
state:
nat-zone: []
routed-vlan:
config:
vlan: []
ipv4:
addresses:
address:
- config:
ip: []
prefix-length: []
secondary: []
state:
ip: []
origin: []
prefix-length: []
secondary: []
vrrp:
vrrp-group:
- config:
advertisement-interval:
- "100"
preempt:
- "true"
priority:
- "100"
use-v2-checksum: []
version: []
virtual-address: []
virtual-router-id: []
state:
advertisement-interval:
- "100"
current-priority: []
preempt:
- "true"
priority:
- "100"
status: []
use-v2-checksum: []
version: []
virtual-address: []
virtual-router-id: []
vrrp-track:
vrrp-track-interface:
- config:
priority-increment: []
track-intf: []
state:
priority-increment: []
track-intf: []
config:
dhcp-client:
- "false"
enabled:
- "true"
mtu: []
neighbors:
neighbor:
- config:
ip: []
link-layer-address: []
state:
ip: []
link-layer-address: []
origin: []
remote: []
ospfv2:
if-addresses:
- config:
address: []
area-id: []
authentication-key: []
authentication-key-encrypted: []
authentication-type: []
dead-interval: []
dead-interval-minimal: []
hello-interval: []
hello-multiplier: []
metric: []
mtu-ignore: []
network-type: []
priority: []
retransmission-interval: []
transmit-delay: []
enable-bfd:
config:
bfd-profile: []
enabled: []
state:
bfd-profile: []
enabled: []
md-authentications:
md-authentication:
- config:
authentication-key-encrypted: []
authentication-key-id: []
authentication-md5-key: []
state:
authentication-key-encrypted: []
authentication-key-id: []
authentication-md5-key: []
state:
address: []
area-id: []
authentication-key: []
authentication-key-encrypted: []
authentication-type: []
dead-interval: []
dead-interval-minimal: []
hello-interval: []
hello-multiplier: []
metric: []
mtu-ignore: []
network-type: []
priority: []
retransmission-interval: []
transmit-delay: []
proxy-arp:
config:
mode:
- DISABLE
state:
mode:
- DISABLE
sag-ipv4:
config:
static-anycast-gateway: []
state:
static-anycast-gateway: []
state:
counters:
in-bits-per-second: []
in-discarded-pkts: []
in-error-pkts: []
in-forwarded-octets: []
in-forwarded-pkts: []
in-octets: []
in-octets-per-second: []
in-pkts: []
in-pkts-per-second: []
in-utilization: []
out-bits-per-second: []
out-discarded-pkts: []
out-error-pkts: []
out-forwarded-octets: []
out-forwarded-pkts: []
out-octets: []
out-octets-per-second: []
out-pkts: []
out-pkts-per-second: []
out-utilization: []
dhcp-client:
- "false"
enabled:
- "true"
mtu: []
unnumbered:
config: {}
interface-ref:
config:
interface: []
subinterface: []
state:
interface: []
subinterface: []
state: {}
ipv6:
addresses:
address:
- config:
ip: []
prefix-length: []
state:
ip: []
origin: []
prefix-length: []
status: []
vrrp:
vrrp-group:
- config:
advertisement-interval:
- "100"
preempt:
- "true"
priority:
- "100"
virtual-address: []
virtual-router-id: []
state:
advertisement-interval:
- "100"
current-priority: []
preempt:
- "true"
priority:
- "100"
status: []
version: []
virtual-address: []
virtual-router-id: []
vrrp-track:
vrrp-track-interface:
- config:
priority-increment: []
track-intf: []
state:
priority-increment: []
track-intf: []
config:
dhcp-client:
- "false"
dup-addr-detect-transmits:
- "1"
enabled:
- "true"
mtu: []
neighbors:
neighbor:
- config:
ip: []
link-layer-address: []
state:
ip: []
is-router: []
link-layer-address: []
neighbor-state: []
origin: []
remote: []
router-advertisement:
config:
adv-interval-option: []
home-agent-config: []
home-agent-lifetime: []
home-agent-preference: []
interval: []
lifetime: []
managed-config: []
mtu: []
other-config: []
ra-fast-retrans: []
ra-hop-limit: []
ra-interval-msec: []
ra-retrans-interval: []
reachable-time: []
router-preference: []
suppress: []
dns-search-names:
dns-search-name:
- config:
dnssl-name: []
valid-lifetime: []
state:
dnssl-name: []
valid-lifetime: []
ra-prefixes:
ra-prefix:
- config:
no-autoconfig: []
off-link: []
preferred-lifetime: []
prefix: []
router-address: []
valid-lifetime: []
state:
no-autoconfig: []
off-link: []
preferred-lifetime: []
prefix: []
router-address: []
valid-lifetime: []
rdnss-addresses:
rdnss-address:
- config:
address: []
valid-lifetime: []
state:
address: []
valid-lifetime: []
state:
adv-interval-option: []
home-agent-config: []
home-agent-lifetime: []
home-agent-preference: []
interval: []
lifetime: []
managed-config: []
mtu: []
other-config: []
ra-fast-retrans: []
ra-hop-limit: []
ra-interval-msec: []
ra-pkt-rcvd: []
ra-pkt-sent: []
ra-retrans-interval: []
reachable-time: []
router-preference: []
suppress: []
sag-ipv6:
config:
static-anycast-gateway: []
state:
static-anycast-gateway: []
state:
counters:
in-bits-per-second: []
in-discarded-pkts: []
in-error-pkts: []
in-forwarded-octets: []
in-forwarded-pkts: []
in-octets: []
in-octets-per-second: []
in-pkts: []
in-pkts-per-second: []
in-utilization: []
out-bits-per-second: []
out-discarded-pkts: []
out-error-pkts: []
out-forwarded-octets: []
out-forwarded-pkts: []
out-octets: []
out-octets-per-second: []
out-pkts: []
out-pkts-per-second: []
out-utilization: []
dhcp-client:
- "false"
dup-addr-detect-transmits:
- "1"
enabled:
- "true"
mtu: []
unnumbered:
config:
enabled:
- "false"
interface-ref:
config:
interface: []
subinterface: []
state:
interface: []
subinterface: []
state:
enabled:
- "false"
state:
vlan: []
state:
admin-status: []
counters:
carrier-transitions: []
in-bits-per-second: []
in-broadcast-pkts: []
in-discards: []
in-errors: []
in-fcs-errors: []
in-multicast-pkts: []
in-octets: []
in-octets-per-second: []
in-pkts: []
in-pkts-per-second: []
in-unicast-pkts: []
in-unknown-protos: []
in-utilization: []
last-clear: []
out-bits-per-second: []
out-broadcast-pkts: []
out-discards: []
out-errors: []
out-multicast-pkts: []
out-octets: []
out-octets-per-second: []
out-pkts: []
out-pkts-per-second: []
out-unicast-pkts: []
out-utilization: []
description: []
enabled:
- "true"
hardware-port: []
last-change: []
loopback-mode:
- "false"
mac-address: []
mtu: []
name: []
oper-status: []
physical-channel: []
rate-interval: []
tpid:
- oc-vlan-types:TPID_0X8100
transceiver: []
subinterfaces:
subinterface:
- config:
description: []
enabled:
- "true"
index:
- "0"
mtu: []
ipv4:
addresses:
address:
- config:
gw-addr: []
ip: []
prefix-length: []
secondary: []
state:
gw-addr: []
ip: []
origin: []
prefix-length: []
secondary: []
vrrp:
vrrp-group:
- config:
advertisement-interval:
- "100"
preempt:
- "true"
priority:
- "100"
use-v2-checksum: []
version: []
virtual-address: []
virtual-router-id: []
state:
advertisement-interval:
- "100"
current-priority: []
preempt:
- "true"
priority:
- "100"
status: []
use-v2-checksum: []
version: []
virtual-address: []
virtual-router-id: []
vrrp-track:
vrrp-track-interface:
- config:
priority-increment: []
track-intf: []
state:
priority-increment: []
track-intf: []
igmp:
config:
enabled:
- "false"
interface-id: []
last-member-query-count: []
last-member-query-interval: []
query-interval: []
query-max-response-time: []
version: []
joins:
join:
- config:
mcastgrpaddr: []
srcaddr: []
state:
mcastgrpaddr: []
srcaddr: []
state:
enabled:
- "false"
filter-prefixes: []
interface-id: []
last-member-query-count: []
last-member-query-interval: []
query-interval: []
query-max-response-time: []
version: []
neighbors:
neighbor:
- config:
ip: []
link-layer-address: []
state:
ip: []
link-layer-address: []
origin: []
remote: []
ospfv2:
if-addresses:
- config:
address: []
area-id: []
authentication-key: []
authentication-key-encrypted: []
authentication-type: []
dead-interval: []
dead-interval-minimal: []
hello-interval: []
hello-multiplier: []
metric: []
mtu-ignore: []
network-type: []
priority: []
retransmission-interval: []
transmit-delay: []
enable-bfd:
config:
bfd-profile: []
enabled: []
state:
bfd-profile: []
enabled: []
md-authentications:
md-authentication:
- config:
authentication-key-encrypted: []
authentication-key-id: []
authentication-md5-key: []
state:
authentication-key-encrypted: []
authentication-key-id: []
authentication-md5-key: []
state:
address: []
area-id: []
authentication-key: []
authentication-key-encrypted: []
authentication-type: []
dead-interval: []
dead-interval-minimal: []
hello-interval: []
hello-multiplier: []
metric: []
mtu-ignore: []
network-type: []
priority: []
retransmission-interval: []
transmit-delay: []
sag-ipv4:
config:
static-anycast-gateway: []
state:
static-anycast-gateway: []
state:
counters:
in-bits-per-second: []
in-discarded-pkts: []
in-error-pkts: []
in-forwarded-octets: []
in-forwarded-pkts: []
in-octets: []
in-octets-per-second: []
in-pkts: []
in-pkts-per-second: []
in-utilization: []
out-bits-per-second: []
out-discarded-pkts: []
out-error-pkts: []
out-forwarded-octets: []
out-forwarded-pkts: []
out-octets: []
out-octets-per-second: []
out-pkts: []
out-pkts-per-second: []
out-utilization: []
dhcp-client:
- "false"
enabled:
- "true"
mtu: []
unnumbered:
config: {}
interface-ref:
config:
interface: []
subinterface: []
state:
interface: []
subinterface: []
state: {}
ipv6:
addresses:
address:
- config:
gw-addr: []
ip: []
prefix-length: []
state:
gw-addr: []
ip: []
origin: []
prefix-length: []
status: []
vrrp:
vrrp-group:
- config:
advertisement-interval:
- "100"
preempt:
- "true"
priority:
- "100"
virtual-address: []
virtual-router-id: []
state:
advertisement-interval:
- "100"
current-priority: []
preempt:
- "true"
priority:
- "100"
status: []
version: []
virtual-address: []
virtual-router-id: []
vrrp-track:
vrrp-track-interface:
- config:
priority-increment: []
track-intf: []
state:
priority-increment: []
track-intf: []
config:
enabled:
- "false"
neighbors:
neighbor:
- config:
ip: []
link-layer-address: []
state:
ip: []
link-layer-address: []
origin: []
remote: []
router-advertisement:
config:
adv-interval-option: []
home-agent-config: []
home-agent-lifetime: []
home-agent-preference: []
interval: []
lifetime: []
managed-config: []
mtu: []
other-config: []
ra-fast-retrans: []
ra-hop-limit: []
ra-interval-msec: []
ra-retrans-interval: []
reachable-time: []
router-preference: []
suppress: []
dns-search-names:
dns-search-name:
- config:
dnssl-name: []
valid-lifetime: []
state:
dnssl-name: []
valid-lifetime: []
ra-prefixes:
ra-prefix:
- config:
no-autoconfig: []
off-link: []
preferred-lifetime: []
prefix: []
router-address: []
valid-lifetime: []
state:
no-autoconfig: []
off-link: []
preferred-lifetime: []
prefix: []
router-address: []
valid-lifetime: []
rdnss-addresses:
rdnss-address:
- config:
address: []
valid-lifetime: []
state:
address: []
valid-lifetime: []
state:
adv-interval-option: []
home-agent-config: []
home-agent-lifetime: []
home-agent-preference: []
interval: []
lifetime: []
managed-config: []
mtu: []
other-config: []
ra-fast-retrans: []
ra-hop-limit: []
ra-interval-msec: []
ra-pkt-rcvd: []
ra-pkt-sent: []
ra-retrans-interval: []
reachable-time: []
router-preference: []
suppress: []
sag-ipv6:
config:
static-anycast-gateway: []
state:
static-anycast-gateway: []
state:
counters:
in-bits-per-second: []
in-discarded-pkts: []
in-error-pkts: []
in-forwarded-octets: []
in-forwarded-pkts: []
in-octets: []
in-octets-per-second: []
in-pkts: []
in-pkts-per-second: []
in-utilization: []
out-bits-per-second: []
out-discarded-pkts: []
out-error-pkts: []
out-forwarded-octets: []
out-forwarded-pkts: []
out-octets: []
out-octets-per-second: []
out-pkts: []
out-pkts-per-second: []
out-utilization: []
dhcp-client:
- "false"
dup-addr-detect-transmits:
- "1"
enabled:
- "true"
mtu: []
state:
admin-status: []
counters:
carrier-transitions: []
in-broadcast-pkts: []
in-discards: []
in-errors: []
in-fcs-errors: []
in-multicast-pkts: []
in-octets: []
in-pkts: []
in-unicast-pkts: []
in-unknown-protos: []
last-clear: []
out-broadcast-pkts: []
out-discards: []
out-errors: []
out-multicast-pkts: []
out-octets: []
out-pkts: []
out-unicast-pkts: []
description: []
enabled:
- "true"
ifindex: []
index:
- "0"
last-change: []
logical: []
mac-address: []
mtu: []
name: []
oper-status: []
rate-interval: []
vlan:
config:
vlan-id: []
state:
vlan-id: []
vxlan-if:
config:
dscp: []
external-intf: []
external-ip: []
primary-intf: []
primary-ip: []
qos-mode: []
source-vtep-intf: []
source-vtep-ip: []
state:
dscp: []
external-intf: []
external-ip: []
primary-intf: []
primary-ip: []
qos-mode: []
source-vtep-intf: []
source-vtep-ip: []
[test@arch-1 yang]$ gnmic generate --file files/ --dir modules/ --path /interfaces/interface[name=Ethernet0]/
- statistics:
discontinuity-time: []
in-broadcast-pkts: []
in-discards: []
in-errors: []
in-multicast-pkts: []
in-octets: []
in-unicast-pkts: []
in-unknown-protos: []
out-broadcast-pkts: []
out-discards: []
out-errors: []
out-multicast-pkts: []
out-octets: []
out-unicast-pkts: []
[test@arch-1 yang]$
from gnmic.
Related Issues (20)
- gnmic 0.35.1 - failed to create a gRPC client for target XXX: context deadline exceeded HOT 10
- Query about gnmi proto version HOT 4
- Slow changing metrics are not published to prometheus output HOT 2
- JQ filtering inconsistency? HOT 1
- Getting response for single subscription when multiple subscriptions are requested through config file with ONCE mode HOT 6
- Session reestablishment issues HOT 5
- Request for Example Configuration for PaloAlto & PAN-OS Environments
- Latest version fails to connect to local Unix socket HOT 1
- K8s Clustering Leader Receives Context Deadline Error on Target HOT 5
- gRPC working fine even if we pass server certificate instead of root CA in --tls-ca parameter. HOT 6
- My Prometheus is unable to scrape any telemetry data from gNMIc although gNMIc is collecting data from the target and exposing it on port 9273. HOT 4
- debug mode outputs password HOT 1
- My Prometheus is unable to scrape any telemetry data from gnmic for BGP operational state although gnmic is collecting data from the target and exposing it on port 9273. HOT 2
- Event Processor Not Applying Transformation as Expected HOT 6
- Question about deleted paths HOT 4
- GET intermittently failing with TLS13(DeadlineExceeded desc = context deadline exceeded) HOT 2
- .
- Unable to integrate Juniper Routers with gnmic HOT 9
- Broken Connection Event/Alert HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gnmic.