This repository has been archived by the owner on May 15, 2019. It is now read-only.
-
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.
Merge pull request #26 from napalm-automation/get_state
Get state
- Loading branch information
Showing
14 changed files
with
8,378 additions
and
44 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
221 changes: 221 additions & 0 deletions
221
napalm_yang/mappings/junos/parsers/state/openconfig-interfaces/interfaces.yaml
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,221 @@ | ||
--- | ||
metadata: | ||
parser: XMLParser | ||
execute: | ||
- method: _rpc | ||
args: | ||
get: "<get-interface-information><extensive/></get-interface-information>" | ||
|
||
interfaces: | ||
_parse: not_implemented | ||
interface: | ||
_parse: | ||
mode: xpath | ||
xpath: "physical-interface" | ||
key: name | ||
from: "{{ bookmarks.interfaces.0 }}" | ||
config: | ||
_parse: unnecessary | ||
hold_time: | ||
_parse: not_implemented | ||
config: | ||
_parse: unnecessary | ||
state: | ||
_parse: not_implemented | ||
down: | ||
_parse: not_implemented | ||
up: | ||
_parse: not_implemented | ||
state: | ||
_parse: not_implemented | ||
admin_status: | ||
_parse: | ||
mode: map | ||
xpath: "admin-status" | ||
from: "{{ bookmarks['parent'] }}" | ||
map: | ||
up: UP | ||
down: DOWN | ||
description: | ||
_parse: | ||
mode: xpath | ||
xpath: "description" | ||
from: "{{ bookmarks['parent'] }}" | ||
enabled: | ||
_parse: | ||
mode: map | ||
xpath: "admin-status" | ||
from: "{{ bookmarks['parent'] }}" | ||
map: | ||
up: true | ||
down: false | ||
ifindex: | ||
_parse: | ||
mode: xpath | ||
xpath: "snmp-index" | ||
from: "{{ bookmarks['parent'] }}" | ||
last_change: | ||
_parse: | ||
mode: xpath | ||
xpath: "interface-flapped" | ||
attribute: "seconds" | ||
from: "{{ bookmarks['parent'] }}" | ||
mtu: | ||
_parse: | ||
mode: xpath | ||
xpath: "mtu" | ||
regexp: "(?P<value>\\d+)" # Someone thought mixing strings and ints was a good idea | ||
from: "{{ bookmarks['parent'] }}" | ||
name: | ||
_parse: unnecessary | ||
oper_status: | ||
_parse: | ||
mode: map | ||
xpath: "oper-status" | ||
from: "{{ bookmarks['parent'] }}" | ||
map: | ||
up: UP | ||
down: DOWN | ||
type: | ||
_parse: | ||
mode: map | ||
xpath: "if-type" | ||
from: "{{ bookmarks['parent'] }}" | ||
map: | ||
GRE: tunnel | ||
IPIP: tunnel | ||
Logical-tunnel: tunnel | ||
Multicast-GRE: tunnel | ||
Secure-Tunnel: tunnel | ||
Ethernet: ethernetCsmacd | ||
Loopback: softwareLoopback | ||
VLAN: l2vlan | ||
Adaptive-Services: null | ||
Software-Pseudo: null | ||
PIMD: null | ||
PIME: null | ||
PPPoE: null | ||
counters: | ||
_parse: not_implemented | ||
in_broadcast_pkts: | ||
_parse: | ||
mode: xpath | ||
xpath: "ethernet-mac-statistics/input-broadcasts" | ||
from: "{{ bookmarks['parent'] }}" | ||
in_discards: | ||
_parse: | ||
mode: xpath | ||
xpath: "input-error-list/input-discards" | ||
from: "{{ bookmarks['parent'] }}" | ||
in_errors: | ||
_parse: | ||
mode: xpath | ||
xpath: "input-error-list/input-errors" | ||
from: "{{ bookmarks['parent'] }}" | ||
in_multicast_pkts: | ||
_parse: | ||
mode: xpath | ||
xpath: "ethernet-mac-statistics/input-multicasts" | ||
from: "{{ bookmarks['parent'] }}" | ||
in_octets: | ||
_parse: not_implemented | ||
in_unicast_pkts: | ||
_parse: | ||
mode: xpath | ||
xpath: "ethernet-mac-statistics/input-unicasts" | ||
from: "{{ bookmarks['parent'] }}" | ||
in_unknown_protos: | ||
_parse: not_implemented | ||
last_clear: | ||
_parse: not_implemented | ||
out_broadcast_pkts: | ||
_parse: | ||
mode: xpath | ||
xpath: "ethernet-mac-statistics/output-broadcasts" | ||
from: "{{ bookmarks['parent'] }}" | ||
out_discards: | ||
_parse: not_implemented | ||
out_errors: | ||
_parse: | ||
mode: xpath | ||
xpath: "output-error-list/output-errors" | ||
from: "{{ bookmarks['parent'] }}" | ||
out_multicast_pkts: | ||
_parse: | ||
mode: xpath | ||
xpath: "ethernet-mac-statistics/output-multicasts" | ||
from: "{{ bookmarks['parent'] }}" | ||
out_octets: | ||
_parse: not_implemented | ||
out_unicast_pkts: | ||
_parse: | ||
mode: xpath | ||
xpath: "ethernet-mac-statistics/output-unicasts" | ||
from: "{{ bookmarks['parent'] }}" | ||
subinterfaces: | ||
_parse: unnecessary | ||
subinterface: | ||
_parse: | ||
mode: xpath | ||
xpath: "logical-interface" | ||
from: "{{ bookmarks['parent'] }}" | ||
index: | ||
_parse: unnecessary | ||
config: | ||
_parse: unnecessary | ||
state: | ||
_parse: not_implemented | ||
index: | ||
_parse: not_implemented | ||
description: | ||
_parse: | ||
mode: xpath | ||
xpath: "description" | ||
from: "{{ bookmarks['parent'] }}" | ||
enabled: | ||
_parse: not_implemented | ||
admin_status: | ||
_parse: not_implemented | ||
ifindex: | ||
_parse: | ||
mode: xpath | ||
xpath: "snmp-index" | ||
from: "{{ bookmarks['parent'] }}" | ||
last_change: | ||
_parse: not_implemented | ||
name: | ||
_parse: | ||
mode: value | ||
value: "{{ subinterface_key }}" | ||
oper_status: | ||
_parse: not_implemented | ||
counters: | ||
_parse: not_implemented | ||
in_broadcast_pkts: | ||
_parse: not_implemented | ||
in_discards: | ||
_parse: not_implemented | ||
in_errors: | ||
_parse: not_implemented | ||
in_multicast_pkts: | ||
_parse: not_implemented | ||
in_octets: | ||
_parse: not_implemented | ||
in_unicast_pkts: | ||
_parse: not_implemented | ||
in_unknown_protos: | ||
_parse: not_implemented | ||
last_clear: | ||
_parse: not_implemented | ||
out_broadcast_pkts: | ||
_parse: not_implemented | ||
out_discards: | ||
_parse: not_implemented | ||
out_errors: | ||
_parse: not_implemented | ||
out_multicast_pkts: | ||
_parse: not_implemented | ||
out_octets: | ||
_parse: not_implemented | ||
out_unicast_pkts: | ||
_parse: not_implemented |
Oops, something went wrong.