```json { "switch-device": { "type": "hpe", "name": "NOM_Switch" }, "openconfig-system:system": { "state": [ { "hostname": "NOM_Switch", "login-banner": [ "Message de", "Connexion" ], "motd-banner": [ "Message de", "Connexion" ], "current-datetime": "", "up-time": "1 weeks, 1 days, 1 hours, 1 minutes", "software-version": "Version 1 Release 1" } ], "aaa": { "authentication": { "users": { "user": [ { "username": "user", "config": { "username": "user", "password-hashed": "hash", "role": "role", "openconfig-system-ext:allowed-services": [ "http" ] } } ] } } }, "processes": { "process": [ { "pid": 1, // int de l'id du master "state": { "pid": 1, // int de l'id du master "args": [ "cpu process master", "liste des éléments", "process master", "liste des éléments" ] } } ] }, "messages": { "state": { "message": [ { "msg": "log" //string de tous les logs } ] } }, "ssh-server": { "enabled": true, "config": { "enabled": true, "openconfig-system-ext:access-permissible": "1" } }, "cpus": { "cpu": [ { "index": 1, // int de l'id du master "state": { "index": 1, // int de l'id du master "instant": 0, // % CPU utilization in 5 secs "min": 0, // % CPU utilization in 1 min "max": 0 // % CPU utilization in 5 mins } } ] }, "ntp": { "config": { "enabled": true, "ntp-source-address": "interface name" }, "servers": { "server": [ { "address": "ip", "config": { "address": "ip", "prefer": true } } ] }, "peers": { "peer": [ { "address": "ip", "config": { "address": "ip", "prefer": true } } ] } } }, "openconfig-lldp:lldp": { "config": { "enabled": true } }, "openconfig-relay-agent:relay-agent": { "dhcp": { "config": { "enable-relay-agent": true } } }, "ietf-snmp:snmp": { "ietf-snmp:snmp": { "engine": { "version": { "v1": true, "v2c": true, "v3": true }, "engine-id": "id" }, "community": [ { "index": 0, "text-name": "mail@contact", "context": "Contact: NOM Location: NOM" // Format Contact: NOM Location: NOM } ], "usm": { "local": { "user": [ { "name": "NOM UTILISATEUR", "auth": { "md5": { "key": "" //REDACTED si authentication mode } }, "priv": { "aes": { "key": "" //REDACTED si privacy mode } } } ] } }, "vacm": { "group": [ { "name": "NOM GROUPE", "access": [ { "security-model": "", //V1, v2, v3 "notify-view": "", "source-context": "", //id acl "read-view": "All", "write-view": "All", "notify-view": "All" } ] } ], "view": [ //mib view { "name": "All", "include": [ "iso" ], "exclude": [] } ] }, "target": [ // target host { "name": "NOM TARGET", "udp": { "ip": "ip" }, "target-params": "NOM PARAM" } ], "target-params": [ // target param { "name": "NOM PARAM", "usm": { "user-name": "NOM TARGET", "security-level": "auth-priv" } } ] } }, "openconfig-interfaces:interfaces": { "interface": [ { "name": "NOM INTERFACE", "config": { "name": "NOM INTERFACE", "type": "" // iana-if-type:ieee8023adLag si Bridge-Aggregation sinon null }, "state": { "name": "NOM INTERFACE", "admin-status": "", //UP ou DOWN "oper-status": "", // UP ou DOWN ou null "description": "", // Format "Jumbo: True/False;Description: ...;Media: ...;Hardware: type de lien;Raw: config de l'interface dans current-configuration;Counters Cleared: date; "mtu": null, "counters": { "in-octets": null, "in-pkts": null, "in-unicast-pkts": null, "in-broadcast-pkts": null, "in-multicast-pkts": null, "in-pauses-pkts": null, "in-drops": null, "in-errors": null, "out-octets": null, "out-pkts": null, "out-unicast-pkts": null, "out-broadcast-pkts": null, "out-multicast-pkts": null, "out-pauses-pkts": null, "out-drops": null, "out-errors": [ { "type": "output errors", "count": 0 }, { "type": "underruns", "count": 0 }, { "type": "buffer failures", "count": 0 }, { "type": "aborts", "count": 0 }, { "type": "deferred", "count": 0 }, { "type": "collisions", "count": 0 }, { "type": "late collisions", "count": 0 }, { "type": "lost carrier", "count": 0 }, { "type": "no carrier", "count": 0 } ] }, "openconfig-if-aggregate-ext:load-sharing-type": "Shar" }, "ethernet": { "name": "Bridge-Aggregation1", "state": { "enable-flow-control": null, "duplex-mode": "unknown-duplex", "port-speed": null }, "switched-vlan": { "state": { "interface-mode": "", //ACCESS ou TRUNK "native-vlan": 1, // PVID "access-vlan": 1, // si ACCESS: PVID "trunk-vlans": [ // si TRUNK "vlan_passing", 1, "vlan_permitted", 1 ] } } }, "subinterfaces": { "subinterface": [ { "index": 0, //toujours 0 "config": { "index": 0 //toujours 0 }, "state": { "index": 0 //toujours 0 }, "oc-ip:ipv4": { "oc-ip:neighbors": { // table arp "oc-ip:neighbor": [ { "ip": "IP", "config": { "ip": "IP", "link-layer-address": "MAC" }, "state": { "ip": "IP", "link-layer-address": "MAC", "origin": "DYNAMIC", "openconfig-if-ip-ext:aging": "", "openconfig-if-ip-ext:vlan": "" } } ] }, "addresses": { // Internet address "address": [ { "ip": "IP", "state": { "ip": "IP", "prefix-length": 255 // Masque } } ] } } } ] }, "openconfig-if-aggregate:aggregation": { "state": { "lag-type": "Static", //Static ou Dynamic "member": [ "Local", "texte", "Remote", "texte" ] } } } ] }, "openconfig-network-instance:network-instances": { "network-instance": [ { "name": "default", "fdb": { "mac-table": { // table mac "entries": { "entry": [ { "mac-address": "MAC", "vlan": "1", "config": { "mac-address": "MAC", "vlan": "1" }, "state": { "mac-address": "MAC", "vlan": "1", "age": "Y", //aging "entry-type": "Learned" // State }, "interface": { "interface-ref": { "config": { "interface": "NOM INTERFACE" } } } } ] } } }, "protocols": { //table de routage "protocol": [ { "identifier": "", // oc-pol-types:RIP, oc-pol-types:DIRECT, oc-pol-types:STATIC, oc-pol-types:IPV4 "name": "", //RIP, DIRECT, STATIC, IPV4 "static-routes": { "static": [ { "prefix": "CIDR", "config": { "prefix": "CIDR" }, "next-hops": { "next-hop": [ { "index": 0, "config": { "next-hop": "IP", "metric": 0, "preference": 0 }, "interface-ref": { "config": { "interface": "INTERFACE" } } } ] } } ] } } ] }, "tables": { //table FIB "table": [ { "protocol": "oc-pol-types:IPV4", "address-family": "oc-types:IPV4", "ipv4": { "routes": { "route": [ { "prefix": "CIDR", "state": { "prefix": "CIDR", "active": true, "_custom_flags": "" //FLAG }, "next-hops": { "next-hop": [ { "index": 0, "state": { "next-hop": "IP", "pushed-mpls-label-stack": [] }, "interface-ref": { "state": { "interface": "INTERFACE" } } } ] } } ] } } } ] } } ] }, "openconfig-vlan:vlans": { "vlan": [ { "vlan-id": 1, "config": { "vlan-id": 1, "name": "" //NAME }, "state": { "name": "" //DESCRIPTION } } ] }, "openconfig-acl:acl": { "acl-sets": { "acl-set": [ { "name": "1", //numéro ACL "type": "", //basic ou advanced "config": { "name": "1", //numéro ACL "type": "", //basic ou advanced "description": "" }, "acl-entries": { "acl-entry": [ { "sequence-id": 1, "config": { "sequence-id": 1, "forwarding-action": "" //ACCEPT ou DROP }, "ipv4": { "config": { "protocol": "", //IP_TCP, UP_UDP, IP_PIM "source-address": "IP", "source-address-prefix-set": "MASQUE", "destination-address": "IP", "destination-address-prefix-set": "MASQUE" } } } ] } } ] } }, "openconfig-platform:components": { "component": [ { "name": "CHASSIS", "config": { "name": "CHASSIS" }, "state": { "name": "CHASSIS", "type": "oc-platform-types:CHASSIS", "model-name": "" } }, { "name": "OS", "config": { "name": "OS" }, "state": { "name": "OS", "type": "oc-platform-types:OPERATING_SYSTEM", "description": "", //Format "Boot-image: ..." "software-version": "Version 1 Release 1" } }, { "name": "Switch 1", "config": { "name": "Switch 1" }, "state": { "name": "Switch 1", "type": "oc-platform-types:LINECARD", "id": 1, "description": "", //Format "Patch version: ..." "hardware-version": "", // release version "software-version": "", //Format "CURRENT: ... | MAIN: ... | BACKUP: ..." "model-name": "", //board type "last-reboot-reason": "", "redundant-role": "", //Standby ou Master "memory": { "available": 1, "utilized": 1 } }, "properties": { "property": [ { "name": "irf-priority", "state": { "name": "irf-priority", "value": "1" //priority } }, { "name": "irf-link-1", "state": { "name": "irf-link-1", "value": "Neighbor: 2 | State: UP" } }, { "name": "irf-link-2", "state": { "name": "irf-link-2", "value": "Neighbor: 3 | State: UP" } }, { "name": "irf-config-port1", "state": { "name": "irf-config-port1", "value": "Ten-GigabitEthernet1/0/1, Ten-GigabitEthernet1/0/2" } }, { "name": "irf-config-port2", "state": { "name": "irf-config-port2", "value": "Ten-GigabitEthernet1/0/3, Ten-GigabitEthernet1/0/4" } } ] } }, { "name": "CPU 1", "config": { "name": "CPU 1" }, "state": { "name": "CPU 1", "type": "oc-platform-types:LINECARD", "description": "", //DEVICE NAME "mfg-name": "", // VENDOR NAME "mfg-date": "", // MANUFACTURING DATE "serial-no": "", //SN "part-no": "", //PRODUCT NUMBER "base-mac-address": "MAC" } }, { "name": "FAN 1", "config": { "name": "FAN 1" }, "state": { "name": "FAN 1", "type": "oc-platform-types:FAN", "description": "", //DEVICE NAME "mfg-name": "", // VENDOR NAME "mfg-date": "", // MANUFACTURING DATE "serial-no": "", //SN "parent": "CPU 1", "oper-status": "" //STATE }, "openconfig-platform-fan:fan": { "state": { "oc-fan:airflow-direction": "", "oc-fan:prefer-airflow-direction": "" } } }, { "name": "POWER 1", "config": { "name": "POWER 1" }, "state": { "name": "POWER 1", "type": "oc-platform-types:POWER_SUPPLY", "description": "", //DEVICE NAME "mfg-name": "", // VENDOR NAME "mfg-date": "", // MANUFACTURING DATE "serial-no": "", //SN "parent": "CPU 1", "oper-status": "" //STATE }, "openconfig-platform-psu:power-supply": { "state": { "oc-platform-psu:mode": "" } } }, { "name": "hotspot 1", "config": { "name": "hotspot 1" }, "state": { "name": "hotspot 1", "type": "oc-platform-types:SENSOR", "parent": 1, //SLOT "temperature": { "instant": "1" } } }, { //transceiver diagnostic et interface "name": "INTERFACE NAME", "config": { "name": "INTERFACE NAME" }, "state": { "name": "INTERFACE NAME", "type": "oc-platform-types:TRANSCEIVER", "present": "", //PRESENT ou null "form-factor": "", //TRANSCEIVER TYPE "connector-type": "", "vendor": "", "part-no": "", //PRODUCT NUMBER/ORDERING NAME "temperature": { "instant": 1 } }, "properties": { "property": [ { "name": "wavelength", "state": { "name": "wavelength", "value": "1" } } ] }, "oc-transceiver:transceiver": { "state": { "supply-voltage": { "instant": 1 //VOLTAGE }, "output-power": { "instant": 1 //TX }, "input-power": { "instant": 1 //RX }, "laser-bias-current": { "instant": 1 //BIAS } } } } ] }, "openconfig-spanning-tree:stp": { "global": { "state": { "enabled-protocol": [ "oc-stp-types:RSTP" ], "bpdu-guard": false } }, "interfaces": { "interface": [ { "name": "INTERFACE NAME", "state": { "hello-time": "", "name": "INTERFACE NAME", "edge-port": "", "bpdu-mst": "", "rapid-transition": "", //True ou False "num-vlans": 1 } } ] }, "rstp": { "state": { "hello-time": "", "bridge-priority": "0", "bridge-address": "MAC", "designated-root-address": "MAC", "root-port": "0", "topology-changes": 1, "last-topology-change": "DATE" }, "interfaces": { "interface": [ { "name": "INTERFACE NAME", "state": { "name": "INTERFACE NAME", "port-num": 1, "protocol": "", //Enabled ou Disabled "role": "", "port-state": "", //UP ou DOWN "counters": { "state": { "bpdu-sent": 1, "bpdu-received": 1 } } } } ] } } } } ```