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,104 @@
|
|
|
1
|
+
import Command from '../common/classes/command';
|
|
2
|
+
import { Empty, GlobalOptions } from '../common/interfaces/common';
|
|
3
|
+
import { AddrlabelAddOptions } from './addrlabel/add.interfaces';
|
|
4
|
+
import { AddrlabelInfo } from './addrlabel/list.interfaces';
|
|
5
|
+
import { AddrlabelDelOptions } from './addrlabel/del.interfaces';
|
|
6
|
+
/**
|
|
7
|
+
* Add an address label entry to the kernel.
|
|
8
|
+
*
|
|
9
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
10
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
11
|
+
*
|
|
12
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
13
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
*
|
|
17
|
+
* Import module
|
|
18
|
+
* ```
|
|
19
|
+
* import { addrlabel } from 'iproutejs';
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* Add an address label
|
|
23
|
+
* ```
|
|
24
|
+
* await addrlabel.add({
|
|
25
|
+
* prefix: '2001:db8::/32',
|
|
26
|
+
* label: 100,
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function add(options: AddrlabelAddOptions, globalOptions?: GlobalOptions): Promise<Command<AddrlabelAddOptions>>;
|
|
31
|
+
/**
|
|
32
|
+
* Delete an address label.
|
|
33
|
+
*
|
|
34
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
35
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
36
|
+
*
|
|
37
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
38
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
*
|
|
42
|
+
* Import module
|
|
43
|
+
* ```
|
|
44
|
+
* import { addrlabel } from 'iproutejs';
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* Delete an address label
|
|
48
|
+
* ```
|
|
49
|
+
* await addrlabel.del({
|
|
50
|
+
* prefix: '2001:db8::/32'
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare function del(options: AddrlabelDelOptions, globalOptions?: GlobalOptions): Promise<Command<AddrlabelDelOptions>>;
|
|
55
|
+
/**
|
|
56
|
+
* Delete all the address labels in the kernel.
|
|
57
|
+
* This does not restore any default settings.
|
|
58
|
+
*
|
|
59
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
62
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
*
|
|
66
|
+
* Import module
|
|
67
|
+
* ```
|
|
68
|
+
* import { addrlabel } from 'iproutejs';
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* Flush address labels
|
|
72
|
+
* ```
|
|
73
|
+
* await addrlabel.flush();
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export declare function flush(globalOptions?: GlobalOptions): Promise<Command<Empty>>;
|
|
77
|
+
/**
|
|
78
|
+
* List the current address label entries in the kernel.
|
|
79
|
+
*
|
|
80
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
83
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
*
|
|
87
|
+
* Import module
|
|
88
|
+
* ```
|
|
89
|
+
* import { addrlabel } from 'iproutejs';
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* Show all address labels
|
|
93
|
+
* ```
|
|
94
|
+
* const labels = await addrlabel.list();
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export declare function list(globalOptions?: GlobalOptions): Promise<Command<Empty> | AddrlabelInfo[]>;
|
|
98
|
+
declare const _default: {
|
|
99
|
+
add: typeof add;
|
|
100
|
+
del: typeof del;
|
|
101
|
+
flush: typeof flush;
|
|
102
|
+
list: typeof list;
|
|
103
|
+
};
|
|
104
|
+
export default _default;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.list = exports.flush = exports.del = exports.add = void 0;
|
|
16
|
+
const command_with_returned_data_1 = __importDefault(require("../common/classes/command-with-returned-data"));
|
|
17
|
+
const command_1 = __importDefault(require("../common/classes/command"));
|
|
18
|
+
const schemas_1 = require("../common/constants/schemas");
|
|
19
|
+
const add_schema_1 = require("./addrlabel/add.schema");
|
|
20
|
+
const del_schema_1 = require("./addrlabel/del.schema");
|
|
21
|
+
/**
|
|
22
|
+
* Add an address label entry to the kernel.
|
|
23
|
+
*
|
|
24
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
25
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
26
|
+
*
|
|
27
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
28
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
*
|
|
32
|
+
* Import module
|
|
33
|
+
* ```
|
|
34
|
+
* import { addrlabel } from 'iproutejs';
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* Add an address label
|
|
38
|
+
* ```
|
|
39
|
+
* await addrlabel.add({
|
|
40
|
+
* prefix: '2001:db8::/32',
|
|
41
|
+
* label: 100,
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
function add(options, globalOptions = {}) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const cmd = ['ip', 'addrlabel', 'add'];
|
|
48
|
+
const ipCmd = new command_1.default(schemas_1.SchemaIds.AddrlabelAdd, add_schema_1.AddrlabelAddSchema, options, globalOptions, cmd);
|
|
49
|
+
return yield ipCmd.exec();
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
exports.add = add;
|
|
53
|
+
/**
|
|
54
|
+
* Delete an address label.
|
|
55
|
+
*
|
|
56
|
+
* @param options - Parameters options to be passed down to `ip`.
|
|
57
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
60
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
*
|
|
64
|
+
* Import module
|
|
65
|
+
* ```
|
|
66
|
+
* import { addrlabel } from 'iproutejs';
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* Delete an address label
|
|
70
|
+
* ```
|
|
71
|
+
* await addrlabel.del({
|
|
72
|
+
* prefix: '2001:db8::/32'
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
function del(options, globalOptions = {}) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
const cmd = ['ip', 'addrlabel', 'del'];
|
|
79
|
+
const ipCmd = new command_1.default(schemas_1.SchemaIds.AddrlabelDel, del_schema_1.AddrlabelDelSchema, options, globalOptions, cmd);
|
|
80
|
+
return yield ipCmd.exec();
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
exports.del = del;
|
|
84
|
+
/**
|
|
85
|
+
* Delete all the address labels in the kernel.
|
|
86
|
+
* This does not restore any default settings.
|
|
87
|
+
*
|
|
88
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
91
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
*
|
|
95
|
+
* Import module
|
|
96
|
+
* ```
|
|
97
|
+
* import { addrlabel } from 'iproutejs';
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* Flush address labels
|
|
101
|
+
* ```
|
|
102
|
+
* await addrlabel.flush();
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
function flush(globalOptions = {}) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
const cmd = ['ip', 'addrlabel', 'flush'];
|
|
108
|
+
const ipCmd = new command_1.default(schemas_1.SchemaIds.Empty, schemas_1.EmptySchema, {}, globalOptions, cmd);
|
|
109
|
+
return yield ipCmd.exec();
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
exports.flush = flush;
|
|
113
|
+
/**
|
|
114
|
+
* List the current address label entries in the kernel.
|
|
115
|
+
*
|
|
116
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
117
|
+
*
|
|
118
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
119
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
*
|
|
123
|
+
* Import module
|
|
124
|
+
* ```
|
|
125
|
+
* import { addrlabel } from 'iproutejs';
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* Show all address labels
|
|
129
|
+
* ```
|
|
130
|
+
* const labels = await addrlabel.list();
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
function list(globalOptions = {}) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
const cmd = ['ip', 'addrlabel', 'list'];
|
|
136
|
+
const ipCmd = new command_with_returned_data_1.default(schemas_1.SchemaIds.Empty, schemas_1.EmptySchema, {}, Object.assign(Object.assign({}, globalOptions), {
|
|
137
|
+
// Overrides for a better show.
|
|
138
|
+
'-details': true, '-statistics': true, '-json': true }), cmd);
|
|
139
|
+
return yield ipCmd.exec();
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
exports.list = list;
|
|
143
|
+
exports.default = {
|
|
144
|
+
add,
|
|
145
|
+
del,
|
|
146
|
+
flush,
|
|
147
|
+
list
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=addrlabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addrlabel.js","sourceRoot":"","sources":["../../src/commands/addrlabel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8GAAmF;AACnF,wEAAgD;AAChD,yDAAqE;AAQrE,uDAA4D;AAG5D,uDAA4D;AAE5D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAsB,GAAG,CAAC,OAA4B,EAC5B,gBAA+B,EAAE;;QAEzD,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QAEvC,MAAM,KAAK,GAAG,IAAI,iBAAO,CACvB,mBAAS,CAAC,YAAY,EACtB,+BAAkB,EAClB,OAAO,EACP,aAAa,EACb,GAAG,CAAC,CAAC;QAEP,OAAO,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;CAAA;AAbD,kBAaC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAsB,GAAG,CAAC,OAA4B,EAC5B,gBAA+B,EAAE;;QAEzD,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;QAEvC,MAAM,KAAK,GAAG,IAAI,iBAAO,CACvB,mBAAS,CAAC,YAAY,EACtB,+BAAkB,EAClB,OAAO,EACP,aAAa,EACb,GAAG,CAAC,CAAC;QAEP,OAAO,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;CAAA;AAbD,kBAaC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAsB,KAAK,CAAC,gBAA+B,EAAE;;QAC3D,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;QAEzC,MAAM,KAAK,GAAG,IAAI,iBAAO,CACvB,mBAAS,CAAC,KAAK,EACf,qBAAW,EACX,EAAE,EACF,aAAa,EACb,GAAG,CAAC,CAAC;QAEP,OAAO,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;CAAA;AAXD,sBAWC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAsB,IAAI,CAAC,gBAA+B,EAAE;;QAE1D,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;QAExC,MAAM,KAAK,GAAG,IAAI,oCAAuB,CACvC,mBAAS,CAAC,KAAK,EACf,qBAAW,EACX,EAAE,kCAEG,aAAa;YAChB,+BAA+B;YAC/B,UAAU,EAAK,IAAI,EACnB,aAAa,EAAE,IAAI,EACnB,OAAO,EAAQ,IAAI,KAErB,GAAG,CAAC,CAAC;QAEP,OAAO,MAAM,KAAK,CAAC,IAAI,EAAmB,CAAC;IAC7C,CAAC;CAAA;AAlBD,oBAkBC;AAED,kBAAe;IACb,GAAG;IACH,GAAG;IACH,KAAK;IACL,IAAI;CACL,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import Command from '../common/classes/command';
|
|
2
|
+
import { Empty, GlobalOptionsWithRequiredFilePath, GlobalOptionsWithRequiredStdin } from '../common/interfaces/common';
|
|
3
|
+
/**
|
|
4
|
+
* Read commands from provided file and invoke them.
|
|
5
|
+
* First failure will cause termination of `ip`.
|
|
6
|
+
*
|
|
7
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
8
|
+
*
|
|
9
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
10
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
*
|
|
14
|
+
* Import module
|
|
15
|
+
* ```
|
|
16
|
+
* import { batch } from 'iproutejs';
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Executes batch commands from a file
|
|
20
|
+
* ```
|
|
21
|
+
* await batch.fromFile({
|
|
22
|
+
* filePath: '/tmp/filepath'
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function fromFile(globalOptions: GlobalOptionsWithRequiredFilePath): Promise<Command<Empty>>;
|
|
27
|
+
/**
|
|
28
|
+
* Read commands from standard input and invoke them.
|
|
29
|
+
* First failure will cause termination of `ip`.
|
|
30
|
+
*
|
|
31
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
32
|
+
*
|
|
33
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
34
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
*
|
|
38
|
+
* Import module
|
|
39
|
+
* ```
|
|
40
|
+
* import { batch } from 'iproutejs';
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* Executes batch commands from stdin
|
|
44
|
+
* ```
|
|
45
|
+
* await batch.fromStdin({
|
|
46
|
+
* stdin: [
|
|
47
|
+
* 'address add local 127.0.1.4/32 dev lo',
|
|
48
|
+
* 'address add local 127.0.1.5/32 dev lo',
|
|
49
|
+
* 'address add local 127.0.1.6/32 dev lo',
|
|
50
|
+
* 'address add local 127.0.1.7/32 dev lo'
|
|
51
|
+
* ].join('\n')
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function fromStdin(globalOptions: GlobalOptionsWithRequiredStdin): Promise<Command<Empty>>;
|
|
56
|
+
declare const _default: {
|
|
57
|
+
fromFile: typeof fromFile;
|
|
58
|
+
fromStdin: typeof fromStdin;
|
|
59
|
+
};
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.fromStdin = exports.fromFile = void 0;
|
|
16
|
+
const command_with_filepath_1 = __importDefault(require("../common/classes/command-with-filepath"));
|
|
17
|
+
const command_with_stdin_1 = __importDefault(require("../common/classes/command-with-stdin"));
|
|
18
|
+
const schemas_1 = require("../common/constants/schemas");
|
|
19
|
+
/**
|
|
20
|
+
* Read commands from provided file and invoke them.
|
|
21
|
+
* First failure will cause termination of `ip`.
|
|
22
|
+
*
|
|
23
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
24
|
+
*
|
|
25
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
26
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
*
|
|
30
|
+
* Import module
|
|
31
|
+
* ```
|
|
32
|
+
* import { batch } from 'iproutejs';
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* Executes batch commands from a file
|
|
36
|
+
* ```
|
|
37
|
+
* await batch.fromFile({
|
|
38
|
+
* filePath: '/tmp/filepath'
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
function fromFile(globalOptions) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
const cmd = ['ip', '-batch'];
|
|
45
|
+
const ipCmd = new command_with_filepath_1.default(schemas_1.SchemaIds.Empty, schemas_1.EmptySchema, {}, globalOptions, cmd);
|
|
46
|
+
return yield ipCmd.exec();
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
exports.fromFile = fromFile;
|
|
50
|
+
/**
|
|
51
|
+
* Read commands from standard input and invoke them.
|
|
52
|
+
* First failure will cause termination of `ip`.
|
|
53
|
+
*
|
|
54
|
+
* @param globalOptions - Global parameters options that affects the command execution.
|
|
55
|
+
*
|
|
56
|
+
* @throws {@link ParametersError} - Throws when passed parameters are invalid.
|
|
57
|
+
* @throws {@link CommandError} - Throws when the executed command fails.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
*
|
|
61
|
+
* Import module
|
|
62
|
+
* ```
|
|
63
|
+
* import { batch } from 'iproutejs';
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* Executes batch commands from stdin
|
|
67
|
+
* ```
|
|
68
|
+
* await batch.fromStdin({
|
|
69
|
+
* stdin: [
|
|
70
|
+
* 'address add local 127.0.1.4/32 dev lo',
|
|
71
|
+
* 'address add local 127.0.1.5/32 dev lo',
|
|
72
|
+
* 'address add local 127.0.1.6/32 dev lo',
|
|
73
|
+
* 'address add local 127.0.1.7/32 dev lo'
|
|
74
|
+
* ].join('\n')
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
function fromStdin(globalOptions) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
const cmd = ['ip', '-batch'];
|
|
81
|
+
const ipCmd = new command_with_stdin_1.default(schemas_1.SchemaIds.Empty, schemas_1.EmptySchema, {}, globalOptions, cmd);
|
|
82
|
+
return yield ipCmd.exec();
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
exports.fromStdin = fromStdin;
|
|
86
|
+
exports.default = {
|
|
87
|
+
fromFile,
|
|
88
|
+
fromStdin
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=batch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../src/commands/batch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oGAA0E;AAE1E,8FAAoE;AAEpE,yDAA8F;AAQ9F;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAsB,QAAQ,CAAC,aAAgD;;QAC7E,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAE7B,MAAM,KAAK,GAAG,IAAI,+BAAmB,CACnC,mBAAS,CAAC,KAAK,EACf,qBAAW,EACX,EAAE,EACF,aAAa,EACb,GAAG,CAAC,CAAC;QAEP,OAAO,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;CAAA;AAXD,4BAWC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,SAAsB,SAAS,CAAC,aAA6C;;QAC3E,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAE7B,MAAM,KAAK,GAAG,IAAI,4BAAgB,CAChC,mBAAS,CAAC,KAAK,EACf,qBAAW,EACX,EAAE,EACF,aAAa,EACb,GAAG,CAAC,CAAC;QAEP,OAAO,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;CAAA;AAXD,8BAWC;AAED,kBAAe;IACb,QAAQ;IACR,SAAS;CACV,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { ExtendedLinkTypes, LinkTypes } from '../link.constants';
|
|
2
|
+
import { SetLinkBondSlaveTypeArgs } from './extended-virtual-link-types/bond-slave.interfaces';
|
|
3
|
+
import { SetLinkBridgeSlaveTypeArgs } from './extended-virtual-link-types/bridge-slave.interfaces';
|
|
4
|
+
import { AddLinkBareudpTypeArgs } from './virtual-link-types/bareup.interfaces';
|
|
5
|
+
import { AddLinkBridgeTypeArgs } from './virtual-link-types/bridge.interfaces';
|
|
6
|
+
import { AddLinkErspanIp6erspanTypeArgs } from './virtual-link-types/erspan-ip6erspan.interfaces';
|
|
7
|
+
import { AddLinkGeneveTypeArgs } from './virtual-link-types/geneve.interfaces';
|
|
8
|
+
import { AddLinkGreGretapTypeArgs } from './virtual-link-types/gre-gretap.interfaces';
|
|
9
|
+
import { AddLinkHsrTypeArgs } from './virtual-link-types/hsr.interfaces';
|
|
10
|
+
import { AddLinkIp6GreIp6gretapTypeArgs } from './virtual-link-types/ip6gre-ip6gretap.interfaces';
|
|
11
|
+
import { AddLinkIpipSitTypeArgs } from './virtual-link-types/ipip-sit.interfaces';
|
|
12
|
+
import { AddLinkIpoibTypeArgs } from './virtual-link-types/ipoib.interfaces';
|
|
13
|
+
import { AddLinkMacsecTypeArgs } from './virtual-link-types/macsec.interfaces';
|
|
14
|
+
import { AddLinkMacvlanMacvtapTypeArgs, SetLinkMacvlanMacvtapTypeArgs } from './virtual-link-types/macvlan-macvtap.interfaces';
|
|
15
|
+
import { AddLinkRmnetTypeArgs } from './virtual-link-types/rmnet.interfaces';
|
|
16
|
+
import { AddLinkVethVxcanTypeArgs } from './virtual-link-types/veth-vxcan.interfaces';
|
|
17
|
+
import { AddLinkVlanTypeArgs } from './virtual-link-types/vlan.interfaces';
|
|
18
|
+
import { AddLinkVrfTypeArgs } from './virtual-link-types/vrf.interfaces';
|
|
19
|
+
import { AddLinkVxlanTypeArgs } from './virtual-link-types/vxlan.interfaces';
|
|
20
|
+
import { AddLinkXfrmTypeArgs } from './virtual-link-types/xfrm.interfaces';
|
|
21
|
+
import { AddLinkCanTypeArgs } from './virtual-link-types/can.interfaces';
|
|
22
|
+
/**
|
|
23
|
+
* Link add options.
|
|
24
|
+
* @category Interfaces
|
|
25
|
+
*/
|
|
26
|
+
export interface LinkAddOptions {
|
|
27
|
+
/** Specifies the physical device to act operate on. */
|
|
28
|
+
link?: string;
|
|
29
|
+
/** Specifies the name of the new virtual device. */
|
|
30
|
+
name: string;
|
|
31
|
+
/** The transmit queue length of the device. */
|
|
32
|
+
txqueuelen?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Specifies the device Link Layer Address (LLADDR) parameter,
|
|
35
|
+
* commonly known as mac address.
|
|
36
|
+
*/
|
|
37
|
+
address?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Specifies the device Link Layer Address (LLADDR) broadcast,
|
|
40
|
+
* for the already specified mac address.
|
|
41
|
+
*/
|
|
42
|
+
broadcast?: string;
|
|
43
|
+
/** Specifies the Maximum Transmission Unit (mtu). */
|
|
44
|
+
mtu?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Specifies the desired index of the new virtual device.
|
|
47
|
+
* The link creation fails, if the index is busy.
|
|
48
|
+
*/
|
|
49
|
+
index?: number;
|
|
50
|
+
/** Specifies the number of transmit queues for new device. */
|
|
51
|
+
numtxqueues?: number;
|
|
52
|
+
/** Specifies the number of receive queues for new device. */
|
|
53
|
+
numrxqueues?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Specifies the recommended maximum size of a Generic Segment Offload
|
|
56
|
+
* packet the new device should accept.
|
|
57
|
+
*/
|
|
58
|
+
gso_max_size?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Specifies the recommended maximum number of a Generic Segment
|
|
61
|
+
* Offload segments the new device should accept.
|
|
62
|
+
*/
|
|
63
|
+
gso_max_segs?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Specifies the type of the new device.
|
|
66
|
+
* @see {@link LinkTypes}
|
|
67
|
+
*/
|
|
68
|
+
type: {
|
|
69
|
+
[key in LinkTypes]?: LinkTypesMappings[key];
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Link types mappings.
|
|
74
|
+
* @category Interfaces
|
|
75
|
+
*/
|
|
76
|
+
export interface LinkTypesMappings {
|
|
77
|
+
[LinkTypes.Vlan]: AddLinkVlanTypeArgs;
|
|
78
|
+
[LinkTypes.Vxlan]: AddLinkVxlanTypeArgs;
|
|
79
|
+
[LinkTypes.Veth]: AddLinkVethVxcanTypeArgs;
|
|
80
|
+
[LinkTypes.Vxcan]: AddLinkVethVxcanTypeArgs;
|
|
81
|
+
[LinkTypes.Can]: AddLinkCanTypeArgs;
|
|
82
|
+
[LinkTypes.Ipip]: AddLinkIpipSitTypeArgs;
|
|
83
|
+
[LinkTypes.Sit]: AddLinkIpipSitTypeArgs;
|
|
84
|
+
[LinkTypes.Gre]: AddLinkGreGretapTypeArgs;
|
|
85
|
+
[LinkTypes.Gretap]: AddLinkGreGretapTypeArgs;
|
|
86
|
+
[LinkTypes.Ip6gre]: AddLinkIp6GreIp6gretapTypeArgs;
|
|
87
|
+
[LinkTypes.Ip6gretap]: AddLinkIp6GreIp6gretapTypeArgs;
|
|
88
|
+
[LinkTypes.Ipoib]: AddLinkIpoibTypeArgs;
|
|
89
|
+
[LinkTypes.Erspan]: AddLinkErspanIp6erspanTypeArgs;
|
|
90
|
+
[LinkTypes.Ip6erspan]: AddLinkErspanIp6erspanTypeArgs;
|
|
91
|
+
[LinkTypes.Geneve]: AddLinkGeneveTypeArgs;
|
|
92
|
+
[LinkTypes.Bareudp]: AddLinkBareudpTypeArgs;
|
|
93
|
+
[LinkTypes.Macvlan]: AddLinkMacvlanMacvtapTypeArgs;
|
|
94
|
+
[LinkTypes.Macvtap]: AddLinkMacvlanMacvtapTypeArgs;
|
|
95
|
+
[LinkTypes.Hsr]: AddLinkHsrTypeArgs;
|
|
96
|
+
[LinkTypes.Vrf]: AddLinkVrfTypeArgs;
|
|
97
|
+
[LinkTypes.Rmnet]: AddLinkRmnetTypeArgs;
|
|
98
|
+
[LinkTypes.Xfrm]: AddLinkXfrmTypeArgs;
|
|
99
|
+
[LinkTypes.Bridge]: AddLinkBridgeTypeArgs;
|
|
100
|
+
[LinkTypes.Macsec]: AddLinkMacsecTypeArgs;
|
|
101
|
+
[LinkTypes.Bond]: true;
|
|
102
|
+
[LinkTypes.Dummy]: true;
|
|
103
|
+
[LinkTypes.Ifb]: true;
|
|
104
|
+
[LinkTypes.Vcan]: true;
|
|
105
|
+
[LinkTypes.Ip6tnl]: true;
|
|
106
|
+
[LinkTypes.Vti]: true;
|
|
107
|
+
[LinkTypes.Nlmon]: true;
|
|
108
|
+
[LinkTypes.Ipvlan]: true;
|
|
109
|
+
[LinkTypes.Ipvtap]: true;
|
|
110
|
+
[LinkTypes.Lowpan]: true;
|
|
111
|
+
[LinkTypes.Netdevsim]: true;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Extended link types mappings.
|
|
115
|
+
* @category Interfaces
|
|
116
|
+
*/
|
|
117
|
+
export type ExtendedLinkTypesMappings = LinkTypesMappings & {
|
|
118
|
+
[ExtendedLinkTypes.BridgeSlave]: SetLinkBridgeSlaveTypeArgs;
|
|
119
|
+
[ExtendedLinkTypes.BondSlave]: SetLinkBondSlaveTypeArgs;
|
|
120
|
+
/** @override */
|
|
121
|
+
[LinkTypes.Macsec]: SetLinkMacvlanMacvtapTypeArgs;
|
|
122
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.interfaces.js","sourceRoot":"","sources":["../../../src/commands/link/add.interfaces.ts"],"names":[],"mappings":";;AAAA,sDAAiE"}
|