iproutejs 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +245 -0
- package/lib/commands/address/add.interfaces.d.ts +94 -0
- package/lib/commands/address/add.interfaces.js +3 -0
- package/lib/commands/address/add.interfaces.js.map +1 -0
- package/lib/commands/address/add.schema.d.ts +3 -0
- package/lib/commands/address/add.schema.js +121 -0
- package/lib/commands/address/add.schema.js.map +1 -0
- package/lib/commands/address/delete.interfaces.d.ts +56 -0
- package/lib/commands/address/delete.interfaces.js +3 -0
- package/lib/commands/address/delete.interfaces.js.map +1 -0
- package/lib/commands/address/delete.schema.d.ts +3 -0
- package/lib/commands/address/delete.schema.js +64 -0
- package/lib/commands/address/delete.schema.js.map +1 -0
- package/lib/commands/address/flush.interfaces.d.ts +89 -0
- package/lib/commands/address/flush.interfaces.js +3 -0
- package/lib/commands/address/flush.interfaces.js.map +1 -0
- package/lib/commands/address/flush.schema.d.ts +3 -0
- package/lib/commands/address/flush.schema.js +165 -0
- package/lib/commands/address/flush.schema.js.map +1 -0
- package/lib/commands/address/show.interfaces.d.ts +166 -0
- package/lib/commands/address/show.interfaces.js +3 -0
- package/lib/commands/address/show.interfaces.js.map +1 -0
- package/lib/commands/address/show.schema.d.ts +3 -0
- package/lib/commands/address/show.schema.js +176 -0
- package/lib/commands/address/show.schema.js.map +1 -0
- package/lib/commands/address.constants.d.ts +33 -0
- package/lib/commands/address.constants.js +39 -0
- package/lib/commands/address.constants.js.map +1 -0
- package/lib/commands/address.d.ts +179 -0
- package/lib/commands/address.js +265 -0
- package/lib/commands/address.js.map +1 -0
- package/lib/commands/addrlabel/add.interfaces.d.ts +12 -0
- package/lib/commands/addrlabel/add.interfaces.js +3 -0
- package/lib/commands/addrlabel/add.interfaces.js.map +1 -0
- package/lib/commands/addrlabel/add.schema.d.ts +3 -0
- package/lib/commands/addrlabel/add.schema.js +26 -0
- package/lib/commands/addrlabel/add.schema.js.map +1 -0
- package/lib/commands/addrlabel/del.interfaces.d.ts +6 -0
- package/lib/commands/addrlabel/del.interfaces.js +3 -0
- package/lib/commands/addrlabel/del.interfaces.js.map +1 -0
- package/lib/commands/addrlabel/del.schema.d.ts +3 -0
- package/lib/commands/addrlabel/del.schema.js +27 -0
- package/lib/commands/addrlabel/del.schema.js.map +1 -0
- package/lib/commands/addrlabel/list.interfaces.d.ts +9 -0
- package/lib/commands/addrlabel/list.interfaces.js +3 -0
- package/lib/commands/addrlabel/list.interfaces.js.map +1 -0
- package/lib/commands/addrlabel.d.ts +104 -0
- package/lib/commands/addrlabel.js +149 -0
- package/lib/commands/addrlabel.js.map +1 -0
- package/lib/commands/batch.d.ts +60 -0
- package/lib/commands/batch.js +90 -0
- package/lib/commands/batch.js.map +1 -0
- package/lib/commands/link/add.interfaces.d.ts +122 -0
- package/lib/commands/link/add.interfaces.js +4 -0
- package/lib/commands/link/add.interfaces.js.map +1 -0
- package/lib/commands/link/add.schema.d.ts +4 -0
- package/lib/commands/link/add.schema.js +172 -0
- package/lib/commands/link/add.schema.js.map +1 -0
- package/lib/commands/link/delete.interfaces.d.ts +22 -0
- package/lib/commands/link/delete.interfaces.js +3 -0
- package/lib/commands/link/delete.interfaces.js.map +1 -0
- package/lib/commands/link/delete.schema.d.ts +3 -0
- package/lib/commands/link/delete.schema.js +29 -0
- package/lib/commands/link/delete.schema.js.map +1 -0
- package/lib/commands/link/extended-virtual-link-types/bond-slave.interfaces.d.ts +8 -0
- package/lib/commands/link/extended-virtual-link-types/bond-slave.interfaces.js +3 -0
- package/lib/commands/link/extended-virtual-link-types/bond-slave.interfaces.js.map +1 -0
- package/lib/commands/link/extended-virtual-link-types/bond-slave.schema.d.ts +3 -0
- package/lib/commands/link/extended-virtual-link-types/bond-slave.schema.js +16 -0
- package/lib/commands/link/extended-virtual-link-types/bond-slave.schema.js.map +1 -0
- package/lib/commands/link/extended-virtual-link-types/bridge-slave.interfaces.d.ts +77 -0
- package/lib/commands/link/extended-virtual-link-types/bridge-slave.interfaces.js +3 -0
- package/lib/commands/link/extended-virtual-link-types/bridge-slave.interfaces.js.map +1 -0
- package/lib/commands/link/extended-virtual-link-types/bridge-slave.schema.d.ts +3 -0
- package/lib/commands/link/extended-virtual-link-types/bridge-slave.schema.js +126 -0
- package/lib/commands/link/extended-virtual-link-types/bridge-slave.schema.js.map +1 -0
- package/lib/commands/link/set.interfaces.d.ts +271 -0
- package/lib/commands/link/set.interfaces.js +4 -0
- package/lib/commands/link/set.interfaces.js.map +1 -0
- package/lib/commands/link/set.schema.d.ts +5 -0
- package/lib/commands/link/set.schema.js +284 -0
- package/lib/commands/link/set.schema.js.map +1 -0
- package/lib/commands/link/show.interfaces.d.ts +116 -0
- package/lib/commands/link/show.interfaces.js +3 -0
- package/lib/commands/link/show.interfaces.js.map +1 -0
- package/lib/commands/link/show.schema.d.ts +3 -0
- package/lib/commands/link/show.schema.js +43 -0
- package/lib/commands/link/show.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/bareup.interfaces.d.ts +30 -0
- package/lib/commands/link/virtual-link-types/bareup.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/bareup.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/bareup.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/bareup.schema.js +43 -0
- package/lib/commands/link/virtual-link-types/bareup.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/bridge.interfaces.d.ts +140 -0
- package/lib/commands/link/virtual-link-types/bridge.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/bridge.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/bridge.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/bridge.schema.js +186 -0
- package/lib/commands/link/virtual-link-types/bridge.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/can.interfaces.d.ts +71 -0
- package/lib/commands/link/virtual-link-types/can.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/can.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/can.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/can.schema.js +141 -0
- package/lib/commands/link/virtual-link-types/can.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/erspan-ip6erspan.interfaces.d.ts +58 -0
- package/lib/commands/link/virtual-link-types/erspan-ip6erspan.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/erspan-ip6erspan.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/erspan-ip6erspan.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/erspan-ip6erspan.schema.js +64 -0
- package/lib/commands/link/virtual-link-types/erspan-ip6erspan.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/geneve.interfaces.d.ts +54 -0
- package/lib/commands/link/virtual-link-types/geneve.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/geneve.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/geneve.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/geneve.schema.js +93 -0
- package/lib/commands/link/virtual-link-types/geneve.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/gre-gretap.interfaces.d.ts +106 -0
- package/lib/commands/link/virtual-link-types/gre-gretap.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/gre-gretap.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/gre-gretap.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/gre-gretap.schema.js +208 -0
- package/lib/commands/link/virtual-link-types/gre-gretap.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/hsr.interfaces.d.ts +20 -0
- package/lib/commands/link/virtual-link-types/hsr.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/hsr.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/hsr.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/hsr.schema.js +36 -0
- package/lib/commands/link/virtual-link-types/hsr.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/ip6gre-ip6gretap.interfaces.d.ts +80 -0
- package/lib/commands/link/virtual-link-types/ip6gre-ip6gretap.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/ip6gre-ip6gretap.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/ip6gre-ip6gretap.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/ip6gre-ip6gretap.schema.js +170 -0
- package/lib/commands/link/virtual-link-types/ip6gre-ip6gretap.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/ipip-sit.interfaces.d.ts +51 -0
- package/lib/commands/link/virtual-link-types/ipip-sit.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/ipip-sit.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/ipip-sit.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/ipip-sit.schema.js +74 -0
- package/lib/commands/link/virtual-link-types/ipip-sit.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/ipoib.interfaces.d.ts +11 -0
- package/lib/commands/link/virtual-link-types/ipoib.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/ipoib.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/ipoib.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/ipoib.schema.js +22 -0
- package/lib/commands/link/virtual-link-types/ipoib.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/macsec.interfaces.d.ts +44 -0
- package/lib/commands/link/virtual-link-types/macsec.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/macsec.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/macsec.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/macsec.schema.js +87 -0
- package/lib/commands/link/virtual-link-types/macsec.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/macvlan-macvtap.interfaces.d.ts +59 -0
- package/lib/commands/link/virtual-link-types/macvlan-macvtap.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/macvlan-macvtap.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/macvlan-macvtap.schema.d.ts +4 -0
- package/lib/commands/link/virtual-link-types/macvlan-macvtap.schema.js +60 -0
- package/lib/commands/link/virtual-link-types/macvlan-macvtap.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/rmnet.interfaces.d.ts +8 -0
- package/lib/commands/link/virtual-link-types/rmnet.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/rmnet.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/rmnet.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/rmnet.schema.js +16 -0
- package/lib/commands/link/virtual-link-types/rmnet.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/veth-vxcan.interfaces.d.ts +8 -0
- package/lib/commands/link/virtual-link-types/veth-vxcan.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/veth-vxcan.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/veth-vxcan.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/veth-vxcan.schema.js +16 -0
- package/lib/commands/link/virtual-link-types/veth-vxcan.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/vlan.interfaces.d.ts +36 -0
- package/lib/commands/link/virtual-link-types/vlan.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/vlan.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/vlan.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/vlan.schema.js +65 -0
- package/lib/commands/link/virtual-link-types/vlan.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/vrf.interfaces.d.ts +8 -0
- package/lib/commands/link/virtual-link-types/vrf.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/vrf.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/vrf.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/vrf.schema.js +16 -0
- package/lib/commands/link/virtual-link-types/vrf.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/vxlan.interfaces.d.ts +127 -0
- package/lib/commands/link/virtual-link-types/vxlan.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/vxlan.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/vxlan.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/vxlan.schema.js +176 -0
- package/lib/commands/link/virtual-link-types/vxlan.schema.js.map +1 -0
- package/lib/commands/link/virtual-link-types/xfrm.interfaces.d.ts +16 -0
- package/lib/commands/link/virtual-link-types/xfrm.interfaces.js +3 -0
- package/lib/commands/link/virtual-link-types/xfrm.interfaces.js.map +1 -0
- package/lib/commands/link/virtual-link-types/xfrm.schema.d.ts +3 -0
- package/lib/commands/link/virtual-link-types/xfrm.schema.js +21 -0
- package/lib/commands/link/virtual-link-types/xfrm.schema.js.map +1 -0
- package/lib/commands/link/xdp-options/object.interfaces.d.ts +36 -0
- package/lib/commands/link/xdp-options/object.interfaces.js +3 -0
- package/lib/commands/link/xdp-options/object.interfaces.js.map +1 -0
- package/lib/commands/link/xdp-options/object.schema.d.ts +3 -0
- package/lib/commands/link/xdp-options/object.schema.js +25 -0
- package/lib/commands/link/xdp-options/object.schema.js.map +1 -0
- package/lib/commands/link/xdp-options/off.interfaces.d.ts +8 -0
- package/lib/commands/link/xdp-options/off.interfaces.js +3 -0
- package/lib/commands/link/xdp-options/off.interfaces.js.map +1 -0
- package/lib/commands/link/xdp-options/off.schema.d.ts +3 -0
- package/lib/commands/link/xdp-options/off.schema.js +15 -0
- package/lib/commands/link/xdp-options/off.schema.js.map +1 -0
- package/lib/commands/link/xdp-options/pinned.interfaces.d.ts +13 -0
- package/lib/commands/link/xdp-options/pinned.interfaces.js +3 -0
- package/lib/commands/link/xdp-options/pinned.interfaces.js.map +1 -0
- package/lib/commands/link/xdp-options/pinned.schema.d.ts +3 -0
- package/lib/commands/link/xdp-options/pinned.schema.js +15 -0
- package/lib/commands/link/xdp-options/pinned.schema.js.map +1 -0
- package/lib/commands/link.constants.d.ts +425 -0
- package/lib/commands/link.constants.js +366 -0
- package/lib/commands/link.constants.js.map +1 -0
- package/lib/commands/link.d.ts +113 -0
- package/lib/commands/link.js +159 -0
- package/lib/commands/link.js.map +1 -0
- package/lib/commands/maddress/add.interfaces.d.ts +10 -0
- package/lib/commands/maddress/add.interfaces.js +3 -0
- package/lib/commands/maddress/add.interfaces.js.map +1 -0
- package/lib/commands/maddress/add.schema.d.ts +3 -0
- package/lib/commands/maddress/add.schema.js +22 -0
- package/lib/commands/maddress/add.schema.js.map +1 -0
- package/lib/commands/maddress/show.interfaces.d.ts +25 -0
- package/lib/commands/maddress/show.interfaces.js +3 -0
- package/lib/commands/maddress/show.interfaces.js.map +1 -0
- package/lib/commands/maddress/show.schema.d.ts +3 -0
- package/lib/commands/maddress/show.schema.js +17 -0
- package/lib/commands/maddress/show.schema.js.map +1 -0
- package/lib/commands/maddress.d.ts +82 -0
- package/lib/commands/maddress.js +121 -0
- package/lib/commands/maddress.js.map +1 -0
- package/lib/commands/monitor/monitor.interfaces.d.ts +24 -0
- package/lib/commands/monitor/monitor.interfaces.js +3 -0
- package/lib/commands/monitor/monitor.interfaces.js.map +1 -0
- package/lib/commands/monitor/monitor.schema.d.ts +3 -0
- package/lib/commands/monitor/monitor.schema.js +33 -0
- package/lib/commands/monitor/monitor.schema.js.map +1 -0
- package/lib/commands/monitor.constants.d.ts +17 -0
- package/lib/commands/monitor.constants.js +22 -0
- package/lib/commands/monitor.constants.js.map +1 -0
- package/lib/commands/monitor.d.ts +52 -0
- package/lib/commands/monitor.js +75 -0
- package/lib/commands/monitor.js.map +1 -0
- package/lib/commands/mroute/show.interfaces.d.ts +26 -0
- package/lib/commands/mroute/show.interfaces.js +3 -0
- package/lib/commands/mroute/show.interfaces.js.map +1 -0
- package/lib/commands/mroute/show.schema.d.ts +3 -0
- package/lib/commands/mroute/show.schema.js +44 -0
- package/lib/commands/mroute/show.schema.js.map +1 -0
- package/lib/commands/mroute.d.ts +29 -0
- package/lib/commands/mroute.js +53 -0
- package/lib/commands/mroute.js.map +1 -0
- package/lib/commands/neighbour/add.interfaces.d.ts +34 -0
- package/lib/commands/neighbour/add.interfaces.js +3 -0
- package/lib/commands/neighbour/add.interfaces.js.map +1 -0
- package/lib/commands/neighbour/add.schema.d.ts +3 -0
- package/lib/commands/neighbour/add.schema.js +49 -0
- package/lib/commands/neighbour/add.schema.js.map +1 -0
- package/lib/commands/neighbour/del.interfaces.d.ts +23 -0
- package/lib/commands/neighbour/del.interfaces.js +3 -0
- package/lib/commands/neighbour/del.interfaces.js.map +1 -0
- package/lib/commands/neighbour/del.schema.d.ts +3 -0
- package/lib/commands/neighbour/del.schema.js +37 -0
- package/lib/commands/neighbour/del.schema.js.map +1 -0
- package/lib/commands/neighbour/get.interfaces.d.ts +12 -0
- package/lib/commands/neighbour/get.interfaces.js +3 -0
- package/lib/commands/neighbour/get.interfaces.js.map +1 -0
- package/lib/commands/neighbour/get.schema.d.ts +3 -0
- package/lib/commands/neighbour/get.schema.js +26 -0
- package/lib/commands/neighbour/get.schema.js.map +1 -0
- package/lib/commands/neighbour/show.interfaces.d.ts +37 -0
- package/lib/commands/neighbour/show.interfaces.js +3 -0
- package/lib/commands/neighbour/show.interfaces.js.map +1 -0
- package/lib/commands/neighbour/show.schema.d.ts +3 -0
- package/lib/commands/neighbour/show.schema.js +39 -0
- package/lib/commands/neighbour/show.schema.js.map +1 -0
- package/lib/commands/neighbour.constants.d.ts +34 -0
- package/lib/commands/neighbour.constants.js +39 -0
- package/lib/commands/neighbour.constants.js.map +1 -0
- package/lib/commands/neighbour.d.ts +169 -0
- package/lib/commands/neighbour.js +238 -0
- package/lib/commands/neighbour.js.map +1 -0
- package/lib/commands/ntable/change.interfaces.d.ts +42 -0
- package/lib/commands/ntable/change.interfaces.js +3 -0
- package/lib/commands/ntable/change.interfaces.js.map +1 -0
- package/lib/commands/ntable/change.schema.d.ts +3 -0
- package/lib/commands/ntable/change.schema.js +101 -0
- package/lib/commands/ntable/change.schema.js.map +1 -0
- package/lib/commands/ntable/show.interfaces.d.ts +59 -0
- package/lib/commands/ntable/show.interfaces.js +3 -0
- package/lib/commands/ntable/show.interfaces.js.map +1 -0
- package/lib/commands/ntable/show.schema.d.ts +3 -0
- package/lib/commands/ntable/show.schema.js +22 -0
- package/lib/commands/ntable/show.schema.js.map +1 -0
- package/lib/commands/ntable.d.ts +43 -0
- package/lib/commands/ntable.js +75 -0
- package/lib/commands/ntable.js.map +1 -0
- package/lib/commands/route/add.interfaces.d.ts +261 -0
- package/lib/commands/route/add.interfaces.js +4 -0
- package/lib/commands/route/add.interfaces.js.map +1 -0
- package/lib/commands/route/add.schema.d.ts +3 -0
- package/lib/commands/route/add.schema.js +366 -0
- package/lib/commands/route/add.schema.js.map +1 -0
- package/lib/commands/route/encap-types/bpf.interfaces.d.ts +14 -0
- package/lib/commands/route/encap-types/bpf.interfaces.js +3 -0
- package/lib/commands/route/encap-types/bpf.interfaces.js.map +1 -0
- package/lib/commands/route/encap-types/bpf.schema.d.ts +3 -0
- package/lib/commands/route/encap-types/bpf.schema.js +31 -0
- package/lib/commands/route/encap-types/bpf.schema.js.map +1 -0
- package/lib/commands/route/encap-types/ioam6.interfaces.d.ts +19 -0
- package/lib/commands/route/encap-types/ioam6.interfaces.js +3 -0
- package/lib/commands/route/encap-types/ioam6.interfaces.js.map +1 -0
- package/lib/commands/route/encap-types/ioam6.schema.d.ts +3 -0
- package/lib/commands/route/encap-types/ioam6.schema.js +30 -0
- package/lib/commands/route/encap-types/ioam6.schema.js.map +1 -0
- package/lib/commands/route/encap-types/ip.interfaces.d.ts +17 -0
- package/lib/commands/route/encap-types/ip.interfaces.js +3 -0
- package/lib/commands/route/encap-types/ip.interfaces.js.map +1 -0
- package/lib/commands/route/encap-types/ip.schema.d.ts +3 -0
- package/lib/commands/route/encap-types/ip.schema.js +48 -0
- package/lib/commands/route/encap-types/ip.schema.js.map +1 -0
- package/lib/commands/route/encap-types/mpls.interfaces.d.ts +11 -0
- package/lib/commands/route/encap-types/mpls.interfaces.js +3 -0
- package/lib/commands/route/encap-types/mpls.interfaces.js.map +1 -0
- package/lib/commands/route/encap-types/mpls.schema.d.ts +3 -0
- package/lib/commands/route/encap-types/mpls.schema.js +46 -0
- package/lib/commands/route/encap-types/mpls.schema.js.map +1 -0
- package/lib/commands/route/encap-types/seg6.interfaces.d.ts +20 -0
- package/lib/commands/route/encap-types/seg6.interfaces.js +3 -0
- package/lib/commands/route/encap-types/seg6.interfaces.js.map +1 -0
- package/lib/commands/route/encap-types/seg6.schema.d.ts +3 -0
- package/lib/commands/route/encap-types/seg6.schema.js +38 -0
- package/lib/commands/route/encap-types/seg6.schema.js.map +1 -0
- package/lib/commands/route/encap-types/seg6local.interfaces.d.ts +76 -0
- package/lib/commands/route/encap-types/seg6local.interfaces.js +3 -0
- package/lib/commands/route/encap-types/seg6local.interfaces.js.map +1 -0
- package/lib/commands/route/encap-types/seg6local.schema.d.ts +6 -0
- package/lib/commands/route/encap-types/seg6local.schema.js +181 -0
- package/lib/commands/route/encap-types/seg6local.schema.js.map +1 -0
- package/lib/commands/route/get.interfaces.d.ts +37 -0
- package/lib/commands/route/get.interfaces.js +3 -0
- package/lib/commands/route/get.interfaces.js.map +1 -0
- package/lib/commands/route/get.schema.d.ts +3 -0
- package/lib/commands/route/get.schema.js +86 -0
- package/lib/commands/route/get.schema.js.map +1 -0
- package/lib/commands/route/show.constants.d.ts +105 -0
- package/lib/commands/route/show.constants.js +112 -0
- package/lib/commands/route/show.constants.js.map +1 -0
- package/lib/commands/route/show.interfaces.d.ts +96 -0
- package/lib/commands/route/show.interfaces.js +3 -0
- package/lib/commands/route/show.interfaces.js.map +1 -0
- package/lib/commands/route/show.schema.d.ts +3 -0
- package/lib/commands/route/show.schema.js +161 -0
- package/lib/commands/route/show.schema.js.map +1 -0
- package/lib/commands/route.constants.d.ts +129 -0
- package/lib/commands/route.constants.js +136 -0
- package/lib/commands/route.constants.js.map +1 -0
- package/lib/commands/route.d.ts +268 -0
- package/lib/commands/route.js +362 -0
- package/lib/commands/route.js.map +1 -0
- package/lib/commands/rule/add.interfaces.d.ts +41 -0
- package/lib/commands/rule/add.interfaces.js +3 -0
- package/lib/commands/rule/add.interfaces.js.map +1 -0
- package/lib/commands/rule/add.schema.d.ts +3 -0
- package/lib/commands/rule/add.schema.js +182 -0
- package/lib/commands/rule/add.schema.js.map +1 -0
- package/lib/commands/rule/show.interfaces.d.ts +86 -0
- package/lib/commands/rule/show.interfaces.js +3 -0
- package/lib/commands/rule/show.interfaces.js.map +1 -0
- package/lib/commands/rule/show.schema.d.ts +3 -0
- package/lib/commands/rule/show.schema.js +157 -0
- package/lib/commands/rule/show.schema.js.map +1 -0
- package/lib/commands/rule.constants.d.ts +34 -0
- package/lib/commands/rule.constants.js +40 -0
- package/lib/commands/rule.constants.js.map +1 -0
- package/lib/commands/rule.d.ts +143 -0
- package/lib/commands/rule.js +205 -0
- package/lib/commands/rule.js.map +1 -0
- package/lib/commands/tunnel/6rd.interfaces.d.ts +17 -0
- package/lib/commands/tunnel/6rd.interfaces.js +3 -0
- package/lib/commands/tunnel/6rd.interfaces.js.map +1 -0
- package/lib/commands/tunnel/6rd.schema.d.ts +3 -0
- package/lib/commands/tunnel/6rd.schema.js +33 -0
- package/lib/commands/tunnel/6rd.schema.js.map +1 -0
- package/lib/commands/tunnel/add.interfaces.d.ts +124 -0
- package/lib/commands/tunnel/add.interfaces.js +3 -0
- package/lib/commands/tunnel/add.interfaces.js.map +1 -0
- package/lib/commands/tunnel/add.schema.d.ts +3 -0
- package/lib/commands/tunnel/add.schema.js +213 -0
- package/lib/commands/tunnel/add.schema.js.map +1 -0
- package/lib/commands/tunnel/prl.interfaces.d.ts +17 -0
- package/lib/commands/tunnel/prl.interfaces.js +3 -0
- package/lib/commands/tunnel/prl.interfaces.js.map +1 -0
- package/lib/commands/tunnel/prl.schema.d.ts +3 -0
- package/lib/commands/tunnel/prl.schema.js +34 -0
- package/lib/commands/tunnel/prl.schema.js.map +1 -0
- package/lib/commands/tunnel.constants.d.ts +23 -0
- package/lib/commands/tunnel.constants.js +24 -0
- package/lib/commands/tunnel.constants.js.map +1 -0
- package/lib/commands/tunnel.d.ts +151 -0
- package/lib/commands/tunnel.js +210 -0
- package/lib/commands/tunnel.js.map +1 -0
- package/lib/commands/tuntap/add.interfaces.d.ts +25 -0
- package/lib/commands/tuntap/add.interfaces.js +3 -0
- package/lib/commands/tuntap/add.interfaces.js.map +1 -0
- package/lib/commands/tuntap/add.schema.d.ts +3 -0
- package/lib/commands/tuntap/add.schema.js +77 -0
- package/lib/commands/tuntap/add.schema.js.map +1 -0
- package/lib/commands/tuntap/show.interfaces.d.ts +17 -0
- package/lib/commands/tuntap/show.interfaces.js +3 -0
- package/lib/commands/tuntap/show.interfaces.js.map +1 -0
- package/lib/commands/tuntap/show.schema.d.ts +3 -0
- package/lib/commands/tuntap/show.schema.js +80 -0
- package/lib/commands/tuntap/show.schema.js.map +1 -0
- package/lib/commands/tuntap.constants.d.ts +8 -0
- package/lib/commands/tuntap.constants.js +13 -0
- package/lib/commands/tuntap.constants.js.map +1 -0
- package/lib/commands/tuntap.d.ts +83 -0
- package/lib/commands/tuntap.js +121 -0
- package/lib/commands/tuntap.js.map +1 -0
- package/lib/common/classes/command-with-filepath.d.ts +16 -0
- package/lib/common/classes/command-with-filepath.js +53 -0
- package/lib/common/classes/command-with-filepath.js.map +1 -0
- package/lib/common/classes/command-with-redirect-from-filepath-and-returned-data.d.ts +15 -0
- package/lib/common/classes/command-with-redirect-from-filepath-and-returned-data.js +45 -0
- package/lib/common/classes/command-with-redirect-from-filepath-and-returned-data.js.map +1 -0
- package/lib/common/classes/command-with-redirect-from-filepath.d.ts +16 -0
- package/lib/common/classes/command-with-redirect-from-filepath.js +53 -0
- package/lib/common/classes/command-with-redirect-from-filepath.js.map +1 -0
- package/lib/common/classes/command-with-redirect-to-filepath.d.ts +16 -0
- package/lib/common/classes/command-with-redirect-to-filepath.js +53 -0
- package/lib/common/classes/command-with-redirect-to-filepath.js.map +1 -0
- package/lib/common/classes/command-with-returned-data.d.ts +15 -0
- package/lib/common/classes/command-with-returned-data.js +45 -0
- package/lib/common/classes/command-with-returned-data.js.map +1 -0
- package/lib/common/classes/command-with-stdin.d.ts +16 -0
- package/lib/common/classes/command-with-stdin.js +53 -0
- package/lib/common/classes/command-with-stdin.js.map +1 -0
- package/lib/common/classes/command.d.ts +26 -0
- package/lib/common/classes/command.js +144 -0
- package/lib/common/classes/command.js.map +1 -0
- package/lib/common/classes/monitor-command.d.ts +30 -0
- package/lib/common/classes/monitor-command.js +108 -0
- package/lib/common/classes/monitor-command.js.map +1 -0
- package/lib/common/constants/attribute-values.d.ts +33 -0
- package/lib/common/constants/attribute-values.js +41 -0
- package/lib/common/constants/attribute-values.js.map +1 -0
- package/lib/common/constants/regexes.d.ts +34 -0
- package/lib/common/constants/regexes.js +38 -0
- package/lib/common/constants/regexes.js.map +1 -0
- package/lib/common/constants/schemas.d.ts +52 -0
- package/lib/common/constants/schemas.js +296 -0
- package/lib/common/constants/schemas.js.map +1 -0
- package/lib/common/constants/tests.d.ts +4 -0
- package/lib/common/constants/tests.js +9 -0
- package/lib/common/constants/tests.js.map +1 -0
- package/lib/common/errors/command.d.ts +11 -0
- package/lib/common/errors/command.js +20 -0
- package/lib/common/errors/command.js.map +1 -0
- package/lib/common/errors/parameters.d.ts +16 -0
- package/lib/common/errors/parameters.js +21 -0
- package/lib/common/errors/parameters.js.map +1 -0
- package/lib/common/interfaces/common.d.ts +115 -0
- package/lib/common/interfaces/common.js +3 -0
- package/lib/common/interfaces/common.js.map +1 -0
- package/lib/common/interfaces/monitor.d.ts +17 -0
- package/lib/common/interfaces/monitor.js +3 -0
- package/lib/common/interfaces/monitor.js.map +1 -0
- package/lib/common/interfaces/tests.d.ts +33 -0
- package/lib/common/interfaces/tests.js +3 -0
- package/lib/common/interfaces/tests.js.map +1 -0
- package/lib/common/misc.d.ts +4 -0
- package/lib/common/misc.js +18 -0
- package/lib/common/misc.js.map +1 -0
- package/lib/common/parse-output.d.ts +14 -0
- package/lib/common/parse-output.js +51 -0
- package/lib/common/parse-output.js.map +1 -0
- package/lib/common/validator.d.ts +3 -0
- package/lib/common/validator.js +45 -0
- package/lib/common/validator.js.map +1 -0
- package/lib/index.d.ts +400 -0
- package/lib/index.js +189 -0
- package/lib/index.js.map +1 -0
- package/lib/utils/index.d.ts +33 -0
- package/lib/utils/index.js +40 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/ip-forwarding.constants.d.ts +21 -0
- package/lib/utils/ip-forwarding.constants.js +27 -0
- package/lib/utils/ip-forwarding.constants.js.map +1 -0
- package/lib/utils/ip-forwarding.d.ts +103 -0
- package/lib/utils/ip-forwarding.js +149 -0
- package/lib/utils/ip-forwarding.js.map +1 -0
- package/lib/utils/routing-tables.constants.d.ts +7 -0
- package/lib/utils/routing-tables.constants.js +11 -0
- package/lib/utils/routing-tables.constants.js.map +1 -0
- package/lib/utils/routing-tables.d.ts +134 -0
- package/lib/utils/routing-tables.interfaces.d.ts +16 -0
- package/lib/utils/routing-tables.interfaces.js +3 -0
- package/lib/utils/routing-tables.interfaces.js.map +1 -0
- package/lib/utils/routing-tables.js +243 -0
- package/lib/utils/routing-tables.js.map +1 -0
- package/lib/utils/routing-tables.schemas.d.ts +3 -0
- package/lib/utils/routing-tables.schemas.js +22 -0
- package/lib/utils/routing-tables.schemas.js.map +1 -0
- package/package.json +92 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { JSONSchemaType } from 'ajv';
|
|
2
|
+
import { Empty, FilePathRequiredGlobalOption, GlobalOptions, StdinRequiredGlobalOption } from '../interfaces/common';
|
|
3
|
+
import { ComplexIpCommandTestOptions } from '../interfaces/tests';
|
|
4
|
+
/**
|
|
5
|
+
* Schema ids.
|
|
6
|
+
*
|
|
7
|
+
* @category Constants
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare enum SchemaIds {
|
|
11
|
+
Empty = "#empty-schema",
|
|
12
|
+
GlobalOptions = "#global-options",
|
|
13
|
+
FilePathGlobalOption = "#global-options-file-path",
|
|
14
|
+
StdinGlobalOption = "#global-options-stdin",
|
|
15
|
+
ComplexIpCommandTestOptions = "#complex-ip-command-test-options",
|
|
16
|
+
RoutingTablesOptions = "#routing-tables-options",
|
|
17
|
+
LinkAdd = "#link-add",
|
|
18
|
+
LinkDelete = "#link-delete",
|
|
19
|
+
LinkShow = "#link-show",
|
|
20
|
+
LinkSet = "#link-set",
|
|
21
|
+
AddressAdd = "#address-add",
|
|
22
|
+
AddressDelete = "#address-delete",
|
|
23
|
+
AddressFlush = "#address-flush",
|
|
24
|
+
AddressShow = "#address-show",
|
|
25
|
+
RuleAdd = "#rule-add",
|
|
26
|
+
RuleShow = "#rule-show",
|
|
27
|
+
RouteShow = "#route-show",
|
|
28
|
+
RouteGet = "#route-get",
|
|
29
|
+
RouteAdd = "#route-add",
|
|
30
|
+
Monitor = "#monitor",
|
|
31
|
+
AddrlabelAdd = "#addrlabel-add",
|
|
32
|
+
AddrlabelDel = "#addrlabel-del",
|
|
33
|
+
NeighbourAdd = "#neighbour-add",
|
|
34
|
+
NeighbourDel = "#neighbour-del",
|
|
35
|
+
NeighbourShow = "#neighbour-show",
|
|
36
|
+
NeighbourGet = "#neighbour-get",
|
|
37
|
+
NtableShow = "#ntable-show",
|
|
38
|
+
NtableChange = "#ntable-change",
|
|
39
|
+
TunnelAdd = "#tunnel-add",
|
|
40
|
+
Tunnel6rd = "#tunnel-6rd",
|
|
41
|
+
TunnelPrl = "#tunnel-prl",
|
|
42
|
+
TunTapAdd = "#tuntap-add",
|
|
43
|
+
TunTapShow = "#tuntap-show",
|
|
44
|
+
MaddressAdd = "#maddress-add",
|
|
45
|
+
MaddressShow = "#maddress-show",
|
|
46
|
+
MrouteShow = "#mroute-show"
|
|
47
|
+
}
|
|
48
|
+
export declare const GlobalOptionsSchema: JSONSchemaType<GlobalOptions>;
|
|
49
|
+
export declare const FilePathGlobalOptionSchema: JSONSchemaType<FilePathRequiredGlobalOption>;
|
|
50
|
+
export declare const StdinGlobalOptionSchema: JSONSchemaType<StdinRequiredGlobalOption>;
|
|
51
|
+
export declare const EmptySchema: JSONSchemaType<Empty>;
|
|
52
|
+
export declare const IpCommandTestOptionsSchema: JSONSchemaType<ComplexIpCommandTestOptions>;
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IpCommandTestOptionsSchema = exports.EmptySchema = exports.StdinGlobalOptionSchema = exports.FilePathGlobalOptionSchema = exports.GlobalOptionsSchema = exports.SchemaIds = void 0;
|
|
4
|
+
const tests_1 = require("./tests");
|
|
5
|
+
/**
|
|
6
|
+
* Schema ids.
|
|
7
|
+
*
|
|
8
|
+
* @category Constants
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
var SchemaIds;
|
|
12
|
+
(function (SchemaIds) {
|
|
13
|
+
SchemaIds["Empty"] = "#empty-schema";
|
|
14
|
+
SchemaIds["GlobalOptions"] = "#global-options";
|
|
15
|
+
SchemaIds["FilePathGlobalOption"] = "#global-options-file-path";
|
|
16
|
+
SchemaIds["StdinGlobalOption"] = "#global-options-stdin";
|
|
17
|
+
SchemaIds["ComplexIpCommandTestOptions"] = "#complex-ip-command-test-options";
|
|
18
|
+
SchemaIds["RoutingTablesOptions"] = "#routing-tables-options";
|
|
19
|
+
SchemaIds["LinkAdd"] = "#link-add";
|
|
20
|
+
SchemaIds["LinkDelete"] = "#link-delete";
|
|
21
|
+
SchemaIds["LinkShow"] = "#link-show";
|
|
22
|
+
SchemaIds["LinkSet"] = "#link-set";
|
|
23
|
+
SchemaIds["AddressAdd"] = "#address-add";
|
|
24
|
+
SchemaIds["AddressDelete"] = "#address-delete";
|
|
25
|
+
SchemaIds["AddressFlush"] = "#address-flush";
|
|
26
|
+
SchemaIds["AddressShow"] = "#address-show";
|
|
27
|
+
SchemaIds["RuleAdd"] = "#rule-add";
|
|
28
|
+
SchemaIds["RuleShow"] = "#rule-show";
|
|
29
|
+
SchemaIds["RouteShow"] = "#route-show";
|
|
30
|
+
SchemaIds["RouteGet"] = "#route-get";
|
|
31
|
+
SchemaIds["RouteAdd"] = "#route-add";
|
|
32
|
+
SchemaIds["Monitor"] = "#monitor";
|
|
33
|
+
SchemaIds["AddrlabelAdd"] = "#addrlabel-add";
|
|
34
|
+
SchemaIds["AddrlabelDel"] = "#addrlabel-del";
|
|
35
|
+
SchemaIds["NeighbourAdd"] = "#neighbour-add";
|
|
36
|
+
SchemaIds["NeighbourDel"] = "#neighbour-del";
|
|
37
|
+
SchemaIds["NeighbourShow"] = "#neighbour-show";
|
|
38
|
+
SchemaIds["NeighbourGet"] = "#neighbour-get";
|
|
39
|
+
SchemaIds["NtableShow"] = "#ntable-show";
|
|
40
|
+
SchemaIds["NtableChange"] = "#ntable-change";
|
|
41
|
+
SchemaIds["TunnelAdd"] = "#tunnel-add";
|
|
42
|
+
SchemaIds["Tunnel6rd"] = "#tunnel-6rd";
|
|
43
|
+
SchemaIds["TunnelPrl"] = "#tunnel-prl";
|
|
44
|
+
SchemaIds["TunTapAdd"] = "#tuntap-add";
|
|
45
|
+
SchemaIds["TunTapShow"] = "#tuntap-show";
|
|
46
|
+
SchemaIds["MaddressAdd"] = "#maddress-add";
|
|
47
|
+
SchemaIds["MaddressShow"] = "#maddress-show";
|
|
48
|
+
SchemaIds["MrouteShow"] = "#mroute-show";
|
|
49
|
+
})(SchemaIds || (exports.SchemaIds = SchemaIds = {}));
|
|
50
|
+
exports.GlobalOptionsSchema = {
|
|
51
|
+
$id: SchemaIds.GlobalOptions,
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {
|
|
54
|
+
sudo: {
|
|
55
|
+
type: 'boolean',
|
|
56
|
+
default: false,
|
|
57
|
+
nullable: true
|
|
58
|
+
},
|
|
59
|
+
dryRun: {
|
|
60
|
+
type: 'boolean',
|
|
61
|
+
default: false,
|
|
62
|
+
nullable: true
|
|
63
|
+
},
|
|
64
|
+
filePath: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
format: 'filepath',
|
|
67
|
+
nullable: true
|
|
68
|
+
},
|
|
69
|
+
stdin: {
|
|
70
|
+
type: 'string',
|
|
71
|
+
minLength: 1,
|
|
72
|
+
nullable: true
|
|
73
|
+
},
|
|
74
|
+
'-4': {
|
|
75
|
+
type: 'boolean',
|
|
76
|
+
enum: [true],
|
|
77
|
+
nullable: true
|
|
78
|
+
},
|
|
79
|
+
'-6': {
|
|
80
|
+
type: 'boolean',
|
|
81
|
+
enum: [true],
|
|
82
|
+
nullable: true
|
|
83
|
+
},
|
|
84
|
+
'-B': {
|
|
85
|
+
type: 'boolean',
|
|
86
|
+
enum: [true],
|
|
87
|
+
nullable: true
|
|
88
|
+
},
|
|
89
|
+
'-M': {
|
|
90
|
+
type: 'boolean',
|
|
91
|
+
enum: [true],
|
|
92
|
+
nullable: true
|
|
93
|
+
},
|
|
94
|
+
'-0': {
|
|
95
|
+
type: 'boolean',
|
|
96
|
+
enum: [true],
|
|
97
|
+
nullable: true
|
|
98
|
+
},
|
|
99
|
+
'-oneline': {
|
|
100
|
+
type: 'boolean',
|
|
101
|
+
enum: [true],
|
|
102
|
+
nullable: true
|
|
103
|
+
},
|
|
104
|
+
'-details': {
|
|
105
|
+
type: 'boolean',
|
|
106
|
+
enum: [true],
|
|
107
|
+
nullable: true
|
|
108
|
+
},
|
|
109
|
+
'-statistics': {
|
|
110
|
+
type: 'boolean',
|
|
111
|
+
enum: [true],
|
|
112
|
+
nullable: true
|
|
113
|
+
},
|
|
114
|
+
'-json': {
|
|
115
|
+
type: 'boolean',
|
|
116
|
+
enum: [true],
|
|
117
|
+
nullable: true
|
|
118
|
+
},
|
|
119
|
+
'-tshort': {
|
|
120
|
+
type: 'boolean',
|
|
121
|
+
enum: [true],
|
|
122
|
+
nullable: true
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
exports.FilePathGlobalOptionSchema = {
|
|
127
|
+
$id: SchemaIds.FilePathGlobalOption,
|
|
128
|
+
type: 'object',
|
|
129
|
+
required: ['filePath'],
|
|
130
|
+
additionalProperties: true,
|
|
131
|
+
properties: {
|
|
132
|
+
filePath: {
|
|
133
|
+
type: 'string',
|
|
134
|
+
format: 'filepath'
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
exports.StdinGlobalOptionSchema = {
|
|
139
|
+
$id: SchemaIds.StdinGlobalOption,
|
|
140
|
+
type: 'object',
|
|
141
|
+
required: ['stdin'],
|
|
142
|
+
additionalProperties: true,
|
|
143
|
+
properties: {
|
|
144
|
+
stdin: {
|
|
145
|
+
type: 'string',
|
|
146
|
+
minLength: 1
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
exports.EmptySchema = {
|
|
151
|
+
$id: SchemaIds.Empty,
|
|
152
|
+
type: 'object',
|
|
153
|
+
required: [],
|
|
154
|
+
additionalProperties: false,
|
|
155
|
+
properties: {}
|
|
156
|
+
};
|
|
157
|
+
exports.IpCommandTestOptionsSchema = {
|
|
158
|
+
$id: SchemaIds.ComplexIpCommandTestOptions,
|
|
159
|
+
type: 'object',
|
|
160
|
+
required: [
|
|
161
|
+
'aString',
|
|
162
|
+
'aNumber',
|
|
163
|
+
'anEnum',
|
|
164
|
+
'aFlag',
|
|
165
|
+
'noaFlag',
|
|
166
|
+
'aTuple',
|
|
167
|
+
'anArray',
|
|
168
|
+
'nestedInvisibleKey'
|
|
169
|
+
],
|
|
170
|
+
properties: {
|
|
171
|
+
aString: {
|
|
172
|
+
type: 'string'
|
|
173
|
+
},
|
|
174
|
+
aNumber: {
|
|
175
|
+
type: 'number',
|
|
176
|
+
minimum: 0
|
|
177
|
+
},
|
|
178
|
+
anEnum: {
|
|
179
|
+
type: 'string',
|
|
180
|
+
enum: Object.values(tests_1.TestEnum)
|
|
181
|
+
},
|
|
182
|
+
aFlag: {
|
|
183
|
+
type: 'boolean'
|
|
184
|
+
},
|
|
185
|
+
noaFlag: {
|
|
186
|
+
type: 'boolean'
|
|
187
|
+
},
|
|
188
|
+
number: {
|
|
189
|
+
type: 'number',
|
|
190
|
+
keyless: true,
|
|
191
|
+
nullable: true
|
|
192
|
+
},
|
|
193
|
+
aTuple: {
|
|
194
|
+
type: 'array',
|
|
195
|
+
items: [
|
|
196
|
+
{
|
|
197
|
+
type: 'number',
|
|
198
|
+
minimum: 0
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
type: 'number',
|
|
202
|
+
minimum: 0
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
minItems: 2,
|
|
206
|
+
maxItems: 2
|
|
207
|
+
},
|
|
208
|
+
anArray: {
|
|
209
|
+
type: 'array',
|
|
210
|
+
items: {
|
|
211
|
+
type: 'object',
|
|
212
|
+
required: ['aNumber'],
|
|
213
|
+
properties: {
|
|
214
|
+
aNumber: {
|
|
215
|
+
type: 'number'
|
|
216
|
+
},
|
|
217
|
+
aStringWithDefaultValue: {
|
|
218
|
+
type: 'string',
|
|
219
|
+
default: 'default-value',
|
|
220
|
+
nullable: true
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
nestedInvisibleKey: {
|
|
226
|
+
type: 'object',
|
|
227
|
+
keyless: true,
|
|
228
|
+
required: [
|
|
229
|
+
'aString',
|
|
230
|
+
'aNumber',
|
|
231
|
+
'anEnum',
|
|
232
|
+
'aFlag',
|
|
233
|
+
'noaFlag',
|
|
234
|
+
'aTuple',
|
|
235
|
+
'anArray'
|
|
236
|
+
],
|
|
237
|
+
properties: {
|
|
238
|
+
aString: {
|
|
239
|
+
type: 'string'
|
|
240
|
+
},
|
|
241
|
+
aNumber: {
|
|
242
|
+
type: 'number',
|
|
243
|
+
minimum: 0
|
|
244
|
+
},
|
|
245
|
+
anEnum: {
|
|
246
|
+
type: 'string',
|
|
247
|
+
enum: Object.values(tests_1.TestEnum)
|
|
248
|
+
},
|
|
249
|
+
aFlag: {
|
|
250
|
+
type: 'boolean'
|
|
251
|
+
},
|
|
252
|
+
noaFlag: {
|
|
253
|
+
type: 'boolean'
|
|
254
|
+
},
|
|
255
|
+
number: {
|
|
256
|
+
type: 'number',
|
|
257
|
+
keyless: true,
|
|
258
|
+
nullable: true
|
|
259
|
+
},
|
|
260
|
+
aTuple: {
|
|
261
|
+
type: 'array',
|
|
262
|
+
items: [
|
|
263
|
+
{
|
|
264
|
+
type: 'number',
|
|
265
|
+
minimum: 0
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
type: 'number',
|
|
269
|
+
minimum: 0
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
minItems: 2,
|
|
273
|
+
maxItems: 2
|
|
274
|
+
},
|
|
275
|
+
anArray: {
|
|
276
|
+
type: 'array',
|
|
277
|
+
items: {
|
|
278
|
+
type: 'object',
|
|
279
|
+
required: ['aNumber'],
|
|
280
|
+
properties: {
|
|
281
|
+
aNumber: {
|
|
282
|
+
type: 'number'
|
|
283
|
+
},
|
|
284
|
+
aStringWithDefaultValue: {
|
|
285
|
+
type: 'string',
|
|
286
|
+
default: 'default-value',
|
|
287
|
+
nullable: true
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/common/constants/schemas.ts"],"names":[],"mappings":";;;AAKA,mCAAmC;AAEnC;;;;;GAKG;AACH,IAAY,SAmDX;AAnDD,WAAY,SAAS;IACnB,oCAA6C,CAAA;IAE7C,8CAA+C,CAAA;IAC/C,+DAAyD,CAAA;IACzD,wDAAqD,CAAA;IAC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B,OAAO,EAAE,CAAC;yBACX;wBACD;4BACE,IAAI,EAAK,QAAQ;4BACjB,OAAO,EAAE,CAAC;yBACX;qBACF;oBACD,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,CAAC;iBACZ;gBACD,OAAO,EAAE;oBACP,IAAI,EAAG,OAAO;oBACd,KAAK,EAAE;wBACL,IAAI,EAAQ,QAAQ;wBACpB,QAAQ,EAAI,CAAC,SAAS,CAAC;wBACvB,UAAU,EAAE;4BACV,OAAO,EAAkB;gCACvB,IAAI,EAAE,QAAQ;6BACf;4BACD,uBAAuB,EAAE;gCACvB,IAAI,EAAM,QAAQ;gCAClB,OAAO,EAAG,eAAe;gCACzB,QAAQ,EAAE,IAAI;6BACf;yBACF;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TestEnum = void 0;
|
|
4
|
+
var TestEnum;
|
|
5
|
+
(function (TestEnum) {
|
|
6
|
+
TestEnum["ValueA"] = "value-a";
|
|
7
|
+
TestEnum["ValueB"] = "value-b";
|
|
8
|
+
})(TestEnum || (exports.TestEnum = TestEnum = {}));
|
|
9
|
+
//# sourceMappingURL=tests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tests.js","sourceRoot":"","sources":["../../../src/common/constants/tests.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,8BAAkB,CAAA;IAClB,8BAAkB,CAAA;AACpB,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error class to be used when the command throws an error.
|
|
3
|
+
* @category Errors
|
|
4
|
+
*/
|
|
5
|
+
export declare class CommandError extends Error {
|
|
6
|
+
/** Code to identify the error in `catch` clauses. */
|
|
7
|
+
code: string;
|
|
8
|
+
/** Command line that triggered the command error. */
|
|
9
|
+
cmd: string;
|
|
10
|
+
constructor(message: string, cmd: string);
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommandError = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Error class to be used when the command throws an error.
|
|
6
|
+
* @category Errors
|
|
7
|
+
*/
|
|
8
|
+
class CommandError extends Error {
|
|
9
|
+
constructor(message, cmd) {
|
|
10
|
+
// 'Error' breaks prototype chain here.
|
|
11
|
+
super(message);
|
|
12
|
+
/** Code to identify the error in `catch` clauses. */
|
|
13
|
+
this.code = 'ERR_COMMAND_ERRORED';
|
|
14
|
+
// Fixing the break.
|
|
15
|
+
Object.setPrototypeOf(this, CommandError.prototype);
|
|
16
|
+
this.cmd = cmd;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.CommandError = CommandError;
|
|
20
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/common/errors/command.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAa,YAAa,SAAQ,KAAK;IAOrC,YAAY,OAAe,EAAE,GAAW;QACtC,uCAAuC;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QARjB,qDAAqD;QACrD,SAAI,GAAG,qBAAqB,CAAC;QAQ3B,oBAAoB;QACpB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;QAEpD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;CACF;AAfD,oCAeC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ErrorObject } from 'ajv';
|
|
2
|
+
/**
|
|
3
|
+
* Error class to be used when the provided options are invalid.
|
|
4
|
+
* @category Errors
|
|
5
|
+
*/
|
|
6
|
+
export declare class ParametersError extends Error {
|
|
7
|
+
/** Code to identify the error in `catch` clauses. */
|
|
8
|
+
code: string;
|
|
9
|
+
/**
|
|
10
|
+
* Detailed introspection on the encountered errors, useful to know exactly
|
|
11
|
+
* what failed in the options.
|
|
12
|
+
*/
|
|
13
|
+
errors?: ErrorObject[] | null;
|
|
14
|
+
static message: string;
|
|
15
|
+
constructor(message: string, errors?: ErrorObject[] | null);
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParametersError = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Error class to be used when the provided options are invalid.
|
|
6
|
+
* @category Errors
|
|
7
|
+
*/
|
|
8
|
+
class ParametersError extends Error {
|
|
9
|
+
constructor(message, errors) {
|
|
10
|
+
// 'Error' breaks prototype chain here.
|
|
11
|
+
super(message);
|
|
12
|
+
/** Code to identify the error in `catch` clauses. */
|
|
13
|
+
this.code = 'ERR_INVALID_PARAMETERS';
|
|
14
|
+
// Fixing the break.
|
|
15
|
+
Object.setPrototypeOf(this, ParametersError.prototype);
|
|
16
|
+
this.errors = errors;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ParametersError = ParametersError;
|
|
20
|
+
ParametersError.message = 'Invalid parameters. Catch `e.errors` for details.';
|
|
21
|
+
//# sourceMappingURL=parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../src/common/errors/parameters.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,eAAgB,SAAQ,KAAK;IAYxC,YAAY,OAAe,EAAE,MAA6B;QACxD,uCAAuC;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QAbjB,qDAAqD;QACrD,SAAI,GAAG,wBAAwB,CAAC;QAa9B,oBAAoB;QACpB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;QAEvD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;;AAnBH,0CAoBC;AAVQ,uBAAO,GAAW,mDAAmD,AAA9D,CAA+D"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global options for all commands.
|
|
3
|
+
* @category Interfaces
|
|
4
|
+
*/
|
|
5
|
+
export interface GlobalOptions {
|
|
6
|
+
/** @hidden */
|
|
7
|
+
[index: string]: boolean | string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* When provided, will prepend the command with `sudo`, which effectively instructs
|
|
10
|
+
* the OS to execute the command with elevated privileges.
|
|
11
|
+
*/
|
|
12
|
+
sudo?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* If set, the command won't be executed, just the command line will be built.
|
|
15
|
+
* Useful for debugging since the command will return a Command class, which provides access
|
|
16
|
+
* to Command.cmdToExec for debugging.
|
|
17
|
+
*/
|
|
18
|
+
dryRun?: boolean;
|
|
19
|
+
/** Required for certain commands that need a file path to create a file or consume it. */
|
|
20
|
+
filePath?: string;
|
|
21
|
+
/** Required for certain commands that need `stdin` input. */
|
|
22
|
+
stdin?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Shortcut for `-family inet`.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Specifies the protocol family to use.
|
|
28
|
+
*/
|
|
29
|
+
'-4'?: true;
|
|
30
|
+
/**
|
|
31
|
+
* Shortcut for `-family inet6`.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Specifies the protocol family to use.
|
|
35
|
+
*/
|
|
36
|
+
'-6'?: true;
|
|
37
|
+
/**
|
|
38
|
+
* Shortcut for `-family bridge`.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Specifies the protocol family to use.
|
|
42
|
+
*/
|
|
43
|
+
'-B'?: true;
|
|
44
|
+
/**
|
|
45
|
+
* Shortcut for `-family mpls`.
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* Specifies the protocol family to use.
|
|
49
|
+
*/
|
|
50
|
+
'-M'?: true;
|
|
51
|
+
/**
|
|
52
|
+
* Shortcut for `-family link`.
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* Specifies the protocol family to use.
|
|
56
|
+
*/
|
|
57
|
+
'-0'?: true;
|
|
58
|
+
/**
|
|
59
|
+
* Output more detailed information.
|
|
60
|
+
* @hidden
|
|
61
|
+
*/
|
|
62
|
+
'-details'?: true;
|
|
63
|
+
/**
|
|
64
|
+
* Output more information.
|
|
65
|
+
* @hidden
|
|
66
|
+
*/
|
|
67
|
+
'-statistics'?: true;
|
|
68
|
+
/**
|
|
69
|
+
* Output results in JavaScript Object Notation (JSON).
|
|
70
|
+
* @hidden
|
|
71
|
+
*/
|
|
72
|
+
'-json'?: true;
|
|
73
|
+
/**
|
|
74
|
+
* Used in `ip monitor`.
|
|
75
|
+
* Prints short timestamp before the event message on the same line in format:
|
|
76
|
+
* `[<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>] <EVENT>`
|
|
77
|
+
* @hidden
|
|
78
|
+
*/
|
|
79
|
+
'-tshort'?: true;
|
|
80
|
+
/**
|
|
81
|
+
* Output each record on a single line, replacing line feeds with the '\' character.
|
|
82
|
+
* This is convenient when you want to count records with `wc(1)` or to `grep(1)` the output.
|
|
83
|
+
* Used in `ip monitor`.
|
|
84
|
+
* Prints short timestamp before the event message on the same line in format:
|
|
85
|
+
* `[<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>] <EVENT>`
|
|
86
|
+
* @hidden
|
|
87
|
+
*/
|
|
88
|
+
'-oneline'?: true;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* An empty interface.
|
|
92
|
+
* @category Interfaces
|
|
93
|
+
*/
|
|
94
|
+
export interface Empty {
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Global options with required file path.
|
|
98
|
+
* @category Interfaces
|
|
99
|
+
*/
|
|
100
|
+
export type FilePathRequiredGlobalOption = Required<Pick<GlobalOptions, 'filePath'>>;
|
|
101
|
+
/**
|
|
102
|
+
* Global options with required file path.
|
|
103
|
+
* @category Interfaces
|
|
104
|
+
*/
|
|
105
|
+
export type GlobalOptionsWithRequiredFilePath = GlobalOptions & FilePathRequiredGlobalOption;
|
|
106
|
+
/**
|
|
107
|
+
* Global options with required stdin.
|
|
108
|
+
* @category Interfaces
|
|
109
|
+
*/
|
|
110
|
+
export type StdinRequiredGlobalOption = Required<Pick<GlobalOptions, 'stdin'>>;
|
|
111
|
+
/**
|
|
112
|
+
* Global options with required stdin.
|
|
113
|
+
* @category Interfaces
|
|
114
|
+
*/
|
|
115
|
+
export type GlobalOptionsWithRequiredStdin = GlobalOptions & StdinRequiredGlobalOption;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/common/interfaces/common.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MonitorObjects } from '../../commands/monitor.constants';
|
|
2
|
+
/**
|
|
3
|
+
* The returned data emitted from {@link monitor}
|
|
4
|
+
* @category Interfaces
|
|
5
|
+
*/
|
|
6
|
+
export interface MonitorEmittedData {
|
|
7
|
+
/** The event timestamp in the format `<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>`. */
|
|
8
|
+
timestamp: string;
|
|
9
|
+
/** The namespace which the event originated from. */
|
|
10
|
+
nsid: string;
|
|
11
|
+
/** The object that caused the update. */
|
|
12
|
+
object: MonitorObjects;
|
|
13
|
+
/** The lines that `ip monitor` gave to `stdout` when an update came, parsed in interesting lines. */
|
|
14
|
+
lines: string[];
|
|
15
|
+
/** The original line emitted by the command. */
|
|
16
|
+
originalLine: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monitor.js","sourceRoot":"","sources":["../../../src/common/interfaces/monitor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TestEnum } from '../constants/tests';
|
|
2
|
+
import { GlobalOptions } from './common';
|
|
3
|
+
export interface ComplexIpCommandTestOptions extends ComplexIpCommandTestArgsOptions {
|
|
4
|
+
nestedInvisibleKey: ComplexIpCommandTestArgsOptions;
|
|
5
|
+
}
|
|
6
|
+
export interface ComplexIpCommandTestArgsOptions {
|
|
7
|
+
aString: string;
|
|
8
|
+
aNumber: number;
|
|
9
|
+
anEnum: TestEnum;
|
|
10
|
+
aFlag: boolean;
|
|
11
|
+
noaFlag: boolean;
|
|
12
|
+
number?: number;
|
|
13
|
+
aTuple: [number, number];
|
|
14
|
+
anArray: Array<{
|
|
15
|
+
aNumber: number;
|
|
16
|
+
aStringWithDefaultValue?: string;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
export interface TestFixture<T_Options, T_GlobalOptions = GlobalOptions> {
|
|
20
|
+
description: string;
|
|
21
|
+
options: T_Options;
|
|
22
|
+
globalOptions?: T_GlobalOptions;
|
|
23
|
+
expectedCmd: Array<number | string>;
|
|
24
|
+
expectedCmdToExec: string;
|
|
25
|
+
}
|
|
26
|
+
export interface TestDefinition {
|
|
27
|
+
[index: string]: Array<{
|
|
28
|
+
operator: string;
|
|
29
|
+
testBattery: TestFixture<any>[];
|
|
30
|
+
method: Function;
|
|
31
|
+
skipOptions?: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tests.js","sourceRoot":"","sources":["../../../src/common/interfaces/tests.ts"],"names":[],"mappings":""}
|