From c25c40dfa96dfeb022b203280c607c1f1835417b Mon Sep 17 00:00:00 2001 From: Robert Göhler Date: Sun, 24 Jan 2021 22:14:00 +0100 Subject: Migrate new file structure to crux (#435) * order workflows and add submodule * rename gitmodules file * delete docs/.gitignore * add vyos custom linter * correct __pycache__ in gitignore * add test-coverage.py * move draw.io folder * arrange changelog, install history and about * arrange: firewall * arrange: highavailability * arrange: loadbalancing * arrange: nat * arrange: services * sort configexamples and configuration interfaces * wireles: rename wireless * rearrange: Protocols and Policy * rearrange: Firewall and Zone Policy * rearrange: Interfaces * rearrange: Interfaces * rearrange: dynamic DNS * hostinfo: add page to index * rearrange: appendix * venv: add Pipfile * rearrange: contributing * index: remove debugging * rearrange: fix all figure and refs * rearrange: commandtree * fix: cli, openvpn, install headline level * protocols: change headline * firewall: move mss clamping * ip: separate ipv4 and ipv6 * arp: move to static page * igmp: rename multicast page * Update to year 2021 --- docs/.gitignore | 1 - docs/_ext/test-coverage.py | 351 ++++++ docs/_include/draw.io/pbr_example_1.drawio | 1 + docs/_include/draw.io/vpn_s2s_ikev2.drawio | 1 + docs/about.rst | 27 - docs/appendix/commandtree/configmode.rst | 524 --------- docs/appendix/commandtree/index.rst | 17 - docs/appendix/commandtree/operationmode.rst | 444 -------- docs/appendix/examples/azure-vpn-bgp.rst | 128 --- docs/appendix/examples/azure-vpn-dual-bgp.rst | 155 --- docs/appendix/examples/bgp-ipv6-unnumbered.rst | 171 --- .../examples/dhcp-relay-through-gre-bridge.rst | 77 -- docs/appendix/examples/dmvpn.rst | 106 -- docs/appendix/examples/index.rst | 20 - docs/appendix/examples/ospf-unnumbered.rst | 125 -- docs/appendix/examples/tunnelbroker-ipv6.rst | 151 --- docs/appendix/examples/wan-load-balancing.rst | 170 --- docs/appendix/examples/zone-policy.rst | 379 ------- docs/appendix/migrate-from-vyatta.rst | 164 --- docs/appendix/releasenotes.rst | 358 ------ docs/appendix/troubleshooting.rst | 385 ------- docs/appendix/vyos-on-baremetal.rst | 380 ------- docs/appendix/vyos-on-gns3.rst | 175 --- docs/appendix/vyos-on-vmware.rst | 32 - docs/automation/command-scripting.rst | 126 +++ docs/automation/index.rst | 15 + docs/changelog/1.2.1.rst | 52 + docs/changelog/1.2.2.rst | 46 + docs/changelog/1.2.3.rst | 62 + docs/changelog/1.2.4.rst | 77 ++ docs/changelog/1.2.5.rst | 70 ++ docs/changelog/1.2.6.rst | 106 ++ docs/changelog/index.rst | 18 + docs/cli.rst | 743 +++++++++++- docs/commandscripting.rst | 126 --- docs/commandtree/configmode.rst | 524 +++++++++ docs/commandtree/index.rst | 17 + docs/commandtree/operationmode.rst | 444 ++++++++ docs/conf.py | 2 +- docs/configexamples/azure-vpn-bgp.rst | 128 +++ docs/configexamples/azure-vpn-dual-bgp.rst | 155 +++ docs/configexamples/bgp-ipv6-unnumbered.rst | 171 +++ .../dhcp-relay-through-gre-bridge.rst | 77 ++ docs/configexamples/dmvpn.rst | 106 ++ docs/configexamples/index.rst | 19 + docs/configexamples/ospf-unnumbered.rst | 125 ++ docs/configexamples/tunnelbroker-ipv6.rst | 151 +++ docs/configexamples/wan-load-balancing.rst | 170 +++ docs/configexamples/zone-policy.rst | 379 +++++++ docs/configuration-overview.rst | 730 ------------ docs/configuration/firewall/index.rst | 258 +++++ docs/configuration/highavailability/index.rst | 158 +++ docs/configuration/index.rst | 22 + docs/configuration/interfaces/bonding.rst | 75 ++ docs/configuration/interfaces/bridge.rst | 104 ++ docs/configuration/interfaces/dummy.rst | 21 + docs/configuration/interfaces/ethernet.rst | 263 +++++ docs/configuration/interfaces/index.rst | 199 ++++ docs/configuration/interfaces/l2tpv3.rst | 119 ++ docs/configuration/interfaces/openvpn.rst | 468 ++++++++ docs/configuration/interfaces/tunnel.rst | 237 ++++ docs/configuration/interfaces/vxlan.rst | 305 +++++ docs/configuration/interfaces/wireguard.rst | 148 +++ docs/configuration/interfaces/wireless.rst | 55 + docs/configuration/loadbalancing/index.rst | 263 +++++ docs/configuration/nat/index.rst | 475 ++++++++ docs/configuration/policy/index.rst | 160 +++ docs/configuration/protocols/bgp.rst | 144 +++ docs/configuration/protocols/igmp.rst | 246 ++++ docs/configuration/protocols/index.rst | 18 + docs/configuration/protocols/ospf.rst | 139 +++ docs/configuration/protocols/rip.rst | 22 + docs/configuration/protocols/static.rst | 66 ++ docs/configuration/service/broadcast-relay.rst | 53 + docs/configuration/service/conntrack-sync.rst | 178 +++ docs/configuration/service/dhcp-relay.rst | 165 +++ docs/configuration/service/dhcp-server.rst | 444 ++++++++ docs/configuration/service/dns.rst | 226 ++++ docs/configuration/service/index.rst | 21 + docs/configuration/service/lldp.rst | 97 ++ docs/configuration/service/mdns.rst | 30 + docs/configuration/service/pppoe-server.rst | 217 ++++ docs/configuration/service/references.rst | 15 + docs/configuration/service/snmp.rst | 245 ++++ docs/configuration/service/ssh.rst | 150 +++ docs/configuration/service/tftp-server.rst | 42 + docs/configuration/service/webproxy.rst | 152 +++ docs/configuration/system/console.rst | 17 + docs/configuration/system/eventhandler.rst | 48 + docs/configuration/system/flow-accounting.rst | 81 ++ docs/configuration/system/host-information.rst | 175 +++ docs/configuration/system/index.rst | 24 + docs/configuration/system/ip.rst | 75 ++ docs/configuration/system/ipv6.rst | 202 ++++ docs/configuration/system/login.rst | 129 +++ docs/configuration/system/name-server.rst | 68 ++ docs/configuration/system/ntp.rst | 19 + docs/configuration/system/syslog.rst | 224 ++++ docs/configuration/system/task-scheduler.rst | 60 + docs/configuration/system/time-zone.rst | 11 + docs/configuration/trafficpolicy/index.rst | 1197 ++++++++++++++++++++ docs/configuration/vpn/dmvpn.rst | 420 +++++++ docs/configuration/vpn/index.rst | 17 + docs/configuration/vpn/ipsec.rst | 190 ++++ docs/configuration/vpn/l2tp.rst | 131 +++ docs/configuration/vpn/pptp.rst | 47 + docs/configuration/vpn/references.rst | 10 + docs/configuration/vpn/site2site_ipsec.rst | 299 +++++ docs/configuration/zonepolicy/index.rst | 9 + docs/contributing/documentation.rst | 175 --- docs/contributing/index.rst | 13 + docs/contributing/issues-features.rst | 72 ++ docs/contributing/issues_features.rst | 72 -- docs/copyright.rst | 19 + docs/documentation.rst | 175 +++ docs/draw.io/pbr_example_1.drawio | 1 - docs/draw.io/vpn_s2s_ikev2.drawio | 1 - docs/firewall.rst | 202 ---- docs/high-availability.rst | 158 --- docs/history.rst | 45 - docs/image-mgmt.rst | 193 ---- docs/index.rst | 90 +- docs/install.rst | 514 --------- docs/installation/cloud/index.rst | 9 + docs/installation/image.rst | 115 ++ docs/installation/index.rst | 17 + docs/installation/install.rst | 514 +++++++++ docs/installation/migrate-from-vyatta.rst | 164 +++ docs/installation/update.rst | 79 ++ docs/installation/virtual/gns3.rst | 175 +++ docs/installation/virtual/index.rst | 9 + docs/installation/virtual/vmware.rst | 32 + docs/installation/vyos-on-baremetal.rst | 380 +++++++ docs/interfaces/addresses.rst | 178 --- docs/interfaces/bonding.rst | 75 -- docs/interfaces/bridging.rst | 104 -- docs/interfaces/dummy.rst | 21 - docs/interfaces/ethernet.rst | 72 -- docs/interfaces/index.rst | 63 -- docs/interfaces/l2tpv3.rst | 119 -- docs/interfaces/pppoe.rst | 82 -- docs/interfaces/qinq.rst | 58 - docs/interfaces/tunnel.rst | 237 ---- docs/interfaces/vlan.rst | 47 - docs/interfaces/vxlan.rst | 305 ----- docs/interfaces/wireless.rst | 55 - docs/introducing/about.rst | 27 + docs/introducing/history.rst | 47 + docs/load-balancing.rst | 263 ----- docs/nat.rst | 475 -------- docs/operation/boot-options.rst | 56 + docs/operation/index.rst | 9 + docs/qos.rst | 1197 -------------------- docs/routing/arp.rst | 34 - docs/routing/bgp.rst | 144 --- docs/routing/index.rst | 22 - docs/routing/ip-commands.rst | 281 ----- docs/routing/mss-clamp.rst | 64 -- docs/routing/multicast.rst | 246 ---- docs/routing/ospf.rst | 139 --- docs/routing/pbr.rst | 98 -- docs/routing/rip.rst | 22 - docs/routing/routing-policy.rst | 59 - docs/routing/static.rst | 30 - docs/services/conntrack.rst | 178 --- docs/services/dhcp-relay.rst | 165 --- docs/services/dhcp.rst | 138 --- docs/services/dhcpv6.rst | 305 ----- docs/services/dns-forwarding.rst | 72 -- docs/services/dynamic-dns.rst | 152 --- docs/services/index.rst | 27 - docs/services/ipoe-server.rst | 129 --- docs/services/lldp.rst | 97 -- docs/services/mdns-repeater.rst | 30 - docs/services/pppoe-server.rst | 217 ---- docs/services/references.rst | 15 - docs/services/snmp.rst | 245 ---- docs/services/ssh.rst | 150 --- docs/services/tftp.rst | 42 - docs/services/udp-broadcast-relay.rst | 53 - docs/services/webproxy.rst | 152 --- docs/system/boot-options.rst | 56 - docs/system/eventhandler.rst | 48 - docs/system/flowaccounting.rst | 81 -- docs/system/host-information.rst | 175 --- docs/system/index.rst | 25 - docs/system/login-users.rst | 129 --- docs/system/ntp.rst | 19 - docs/system/proxy.rst | 28 - docs/system/serialconsole.rst | 17 - docs/system/syslog.rst | 224 ---- docs/system/system-dns.rst | 68 -- docs/system/task-scheduler.rst | 60 - docs/system/time-zone.rst | 11 - docs/troubleshooting/index.rst | 459 ++++++++ docs/vpn/dmvpn.rst | 420 ------- docs/vpn/gre-ipsec.rst | 190 ---- docs/vpn/index.rst | 19 - docs/vpn/l2tp.rst | 131 --- docs/vpn/openvpn.rst | 467 -------- docs/vpn/pptp.rst | 47 - docs/vpn/references.rst | 10 - docs/vpn/site2site_ipsec.rst | 299 ----- docs/vpn/wireguard.rst | 148 --- 204 files changed, 15980 insertions(+), 15605 deletions(-) delete mode 100644 docs/.gitignore create mode 100644 docs/_ext/test-coverage.py create mode 100644 docs/_include/draw.io/pbr_example_1.drawio create mode 100644 docs/_include/draw.io/vpn_s2s_ikev2.drawio delete mode 100644 docs/about.rst delete mode 100644 docs/appendix/commandtree/configmode.rst delete mode 100644 docs/appendix/commandtree/index.rst delete mode 100644 docs/appendix/commandtree/operationmode.rst delete mode 100644 docs/appendix/examples/azure-vpn-bgp.rst delete mode 100644 docs/appendix/examples/azure-vpn-dual-bgp.rst delete mode 100644 docs/appendix/examples/bgp-ipv6-unnumbered.rst delete mode 100644 docs/appendix/examples/dhcp-relay-through-gre-bridge.rst delete mode 100644 docs/appendix/examples/dmvpn.rst delete mode 100644 docs/appendix/examples/index.rst delete mode 100644 docs/appendix/examples/ospf-unnumbered.rst delete mode 100644 docs/appendix/examples/tunnelbroker-ipv6.rst delete mode 100644 docs/appendix/examples/wan-load-balancing.rst delete mode 100644 docs/appendix/examples/zone-policy.rst delete mode 100644 docs/appendix/migrate-from-vyatta.rst delete mode 100644 docs/appendix/releasenotes.rst delete mode 100644 docs/appendix/troubleshooting.rst delete mode 100644 docs/appendix/vyos-on-baremetal.rst delete mode 100644 docs/appendix/vyos-on-gns3.rst delete mode 100644 docs/appendix/vyos-on-vmware.rst create mode 100644 docs/automation/command-scripting.rst create mode 100644 docs/automation/index.rst create mode 100644 docs/changelog/1.2.1.rst create mode 100644 docs/changelog/1.2.2.rst create mode 100644 docs/changelog/1.2.3.rst create mode 100644 docs/changelog/1.2.4.rst create mode 100644 docs/changelog/1.2.5.rst create mode 100644 docs/changelog/1.2.6.rst create mode 100644 docs/changelog/index.rst delete mode 100644 docs/commandscripting.rst create mode 100644 docs/commandtree/configmode.rst create mode 100644 docs/commandtree/index.rst create mode 100644 docs/commandtree/operationmode.rst create mode 100644 docs/configexamples/azure-vpn-bgp.rst create mode 100644 docs/configexamples/azure-vpn-dual-bgp.rst create mode 100644 docs/configexamples/bgp-ipv6-unnumbered.rst create mode 100644 docs/configexamples/dhcp-relay-through-gre-bridge.rst create mode 100644 docs/configexamples/dmvpn.rst create mode 100644 docs/configexamples/index.rst create mode 100644 docs/configexamples/ospf-unnumbered.rst create mode 100644 docs/configexamples/tunnelbroker-ipv6.rst create mode 100644 docs/configexamples/wan-load-balancing.rst create mode 100644 docs/configexamples/zone-policy.rst delete mode 100644 docs/configuration-overview.rst create mode 100644 docs/configuration/firewall/index.rst create mode 100644 docs/configuration/highavailability/index.rst create mode 100644 docs/configuration/index.rst create mode 100644 docs/configuration/interfaces/bonding.rst create mode 100644 docs/configuration/interfaces/bridge.rst create mode 100644 docs/configuration/interfaces/dummy.rst create mode 100644 docs/configuration/interfaces/ethernet.rst create mode 100644 docs/configuration/interfaces/index.rst create mode 100644 docs/configuration/interfaces/l2tpv3.rst create mode 100644 docs/configuration/interfaces/openvpn.rst create mode 100644 docs/configuration/interfaces/tunnel.rst create mode 100644 docs/configuration/interfaces/vxlan.rst create mode 100644 docs/configuration/interfaces/wireguard.rst create mode 100644 docs/configuration/interfaces/wireless.rst create mode 100644 docs/configuration/loadbalancing/index.rst create mode 100644 docs/configuration/nat/index.rst create mode 100644 docs/configuration/policy/index.rst create mode 100644 docs/configuration/protocols/bgp.rst create mode 100644 docs/configuration/protocols/igmp.rst create mode 100644 docs/configuration/protocols/index.rst create mode 100644 docs/configuration/protocols/ospf.rst create mode 100644 docs/configuration/protocols/rip.rst create mode 100644 docs/configuration/protocols/static.rst create mode 100644 docs/configuration/service/broadcast-relay.rst create mode 100644 docs/configuration/service/conntrack-sync.rst create mode 100644 docs/configuration/service/dhcp-relay.rst create mode 100644 docs/configuration/service/dhcp-server.rst create mode 100644 docs/configuration/service/dns.rst create mode 100644 docs/configuration/service/index.rst create mode 100644 docs/configuration/service/lldp.rst create mode 100644 docs/configuration/service/mdns.rst create mode 100644 docs/configuration/service/pppoe-server.rst create mode 100644 docs/configuration/service/references.rst create mode 100644 docs/configuration/service/snmp.rst create mode 100644 docs/configuration/service/ssh.rst create mode 100644 docs/configuration/service/tftp-server.rst create mode 100644 docs/configuration/service/webproxy.rst create mode 100644 docs/configuration/system/console.rst create mode 100644 docs/configuration/system/eventhandler.rst create mode 100644 docs/configuration/system/flow-accounting.rst create mode 100644 docs/configuration/system/host-information.rst create mode 100644 docs/configuration/system/index.rst create mode 100644 docs/configuration/system/ip.rst create mode 100644 docs/configuration/system/ipv6.rst create mode 100644 docs/configuration/system/login.rst create mode 100644 docs/configuration/system/name-server.rst create mode 100644 docs/configuration/system/ntp.rst create mode 100644 docs/configuration/system/syslog.rst create mode 100644 docs/configuration/system/task-scheduler.rst create mode 100644 docs/configuration/system/time-zone.rst create mode 100644 docs/configuration/trafficpolicy/index.rst create mode 100644 docs/configuration/vpn/dmvpn.rst create mode 100644 docs/configuration/vpn/index.rst create mode 100644 docs/configuration/vpn/ipsec.rst create mode 100644 docs/configuration/vpn/l2tp.rst create mode 100644 docs/configuration/vpn/pptp.rst create mode 100644 docs/configuration/vpn/references.rst create mode 100644 docs/configuration/vpn/site2site_ipsec.rst create mode 100644 docs/configuration/zonepolicy/index.rst delete mode 100644 docs/contributing/documentation.rst create mode 100644 docs/contributing/index.rst create mode 100644 docs/contributing/issues-features.rst delete mode 100644 docs/contributing/issues_features.rst create mode 100644 docs/copyright.rst create mode 100644 docs/documentation.rst delete mode 100644 docs/draw.io/pbr_example_1.drawio delete mode 100644 docs/draw.io/vpn_s2s_ikev2.drawio delete mode 100644 docs/firewall.rst delete mode 100644 docs/high-availability.rst delete mode 100644 docs/history.rst delete mode 100644 docs/image-mgmt.rst delete mode 100644 docs/install.rst create mode 100644 docs/installation/cloud/index.rst create mode 100644 docs/installation/image.rst create mode 100644 docs/installation/index.rst create mode 100644 docs/installation/install.rst create mode 100644 docs/installation/migrate-from-vyatta.rst create mode 100644 docs/installation/update.rst create mode 100644 docs/installation/virtual/gns3.rst create mode 100644 docs/installation/virtual/index.rst create mode 100644 docs/installation/virtual/vmware.rst create mode 100644 docs/installation/vyos-on-baremetal.rst delete mode 100644 docs/interfaces/addresses.rst delete mode 100644 docs/interfaces/bonding.rst delete mode 100644 docs/interfaces/bridging.rst delete mode 100644 docs/interfaces/dummy.rst delete mode 100644 docs/interfaces/ethernet.rst delete mode 100644 docs/interfaces/index.rst delete mode 100644 docs/interfaces/l2tpv3.rst delete mode 100644 docs/interfaces/pppoe.rst delete mode 100644 docs/interfaces/qinq.rst delete mode 100644 docs/interfaces/tunnel.rst delete mode 100644 docs/interfaces/vlan.rst delete mode 100644 docs/interfaces/vxlan.rst delete mode 100644 docs/interfaces/wireless.rst create mode 100644 docs/introducing/about.rst create mode 100644 docs/introducing/history.rst delete mode 100644 docs/load-balancing.rst delete mode 100644 docs/nat.rst create mode 100644 docs/operation/boot-options.rst create mode 100644 docs/operation/index.rst delete mode 100644 docs/qos.rst delete mode 100644 docs/routing/arp.rst delete mode 100644 docs/routing/bgp.rst delete mode 100644 docs/routing/index.rst delete mode 100644 docs/routing/ip-commands.rst delete mode 100644 docs/routing/mss-clamp.rst delete mode 100644 docs/routing/multicast.rst delete mode 100644 docs/routing/ospf.rst delete mode 100644 docs/routing/pbr.rst delete mode 100644 docs/routing/rip.rst delete mode 100644 docs/routing/routing-policy.rst delete mode 100644 docs/routing/static.rst delete mode 100644 docs/services/conntrack.rst delete mode 100644 docs/services/dhcp-relay.rst delete mode 100644 docs/services/dhcp.rst delete mode 100644 docs/services/dhcpv6.rst delete mode 100644 docs/services/dns-forwarding.rst delete mode 100644 docs/services/dynamic-dns.rst delete mode 100644 docs/services/index.rst delete mode 100644 docs/services/ipoe-server.rst delete mode 100644 docs/services/lldp.rst delete mode 100644 docs/services/mdns-repeater.rst delete mode 100644 docs/services/pppoe-server.rst delete mode 100644 docs/services/references.rst delete mode 100644 docs/services/snmp.rst delete mode 100644 docs/services/ssh.rst delete mode 100644 docs/services/tftp.rst delete mode 100644 docs/services/udp-broadcast-relay.rst delete mode 100644 docs/services/webproxy.rst delete mode 100644 docs/system/boot-options.rst delete mode 100644 docs/system/eventhandler.rst delete mode 100644 docs/system/flowaccounting.rst delete mode 100644 docs/system/host-information.rst delete mode 100644 docs/system/index.rst delete mode 100644 docs/system/login-users.rst delete mode 100644 docs/system/ntp.rst delete mode 100644 docs/system/proxy.rst delete mode 100644 docs/system/serialconsole.rst delete mode 100644 docs/system/syslog.rst delete mode 100644 docs/system/system-dns.rst delete mode 100644 docs/system/task-scheduler.rst delete mode 100644 docs/system/time-zone.rst create mode 100644 docs/troubleshooting/index.rst delete mode 100644 docs/vpn/dmvpn.rst delete mode 100644 docs/vpn/gre-ipsec.rst delete mode 100644 docs/vpn/index.rst delete mode 100644 docs/vpn/l2tp.rst delete mode 100644 docs/vpn/openvpn.rst delete mode 100644 docs/vpn/pptp.rst delete mode 100644 docs/vpn/references.rst delete mode 100644 docs/vpn/site2site_ipsec.rst delete mode 100644 docs/vpn/wireguard.rst (limited to 'docs') diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 69fa449d..00000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_build/ diff --git a/docs/_ext/test-coverage.py b/docs/_ext/test-coverage.py new file mode 100644 index 00000000..70714d6b --- /dev/null +++ b/docs/_ext/test-coverage.py @@ -0,0 +1,351 @@ +''' +generate json with all commands from xml for vyos documentation coverage + +''' + + +import sys +import os +import json +import re +import logging + +from io import BytesIO +from lxml import etree as ET +import shutil + +default_constraint_err_msg = "Invalid value" +validator_dir = "" + + +input_data = [ + { + "kind": "cfgcmd", + "input_dir": "_include/vyos-1x/interface-definitions/", + "schema_file": "_include/vyos-1x/schema/interface_definition.rng", + "files": [] + }, + { + "kind": "opcmd", + "input_dir": "_include/vyos-1x/op-mode-definitions/", + "schema_file": "_include/vyos-1x/schema/op-mode-definition.rng", + "files": [] + } +] + +node_data = { + 'cfgcmd': {}, + 'opcmd': {}, +} + +def get_properties(p): + props = {} + props['valueless'] = False + + try: + if p.find("valueless") is not None: + props['valueless'] = True + except: + pass + + if p is None: + return props + + # Get the help string + try: + props["help"] = p.find("help").text + except: + pass + + # Get value help strings + try: + vhe = p.findall("valueHelp") + vh = [] + for v in vhe: + vh.append( (v.find("format").text, v.find("description").text) ) + props["val_help"] = vh + except: + props["val_help"] = [] + + # Get the constraint statements + error_msg = default_constraint_err_msg + # Get the error message if it's there + try: + error_msg = p.find("constraintErrorMessage").text + except: + pass + + + vce = p.find("constraint") + vc = [] + if vce is not None: + # The old backend doesn't support multiple validators in OR mode + # so we emulate it + + regexes = [] + regex_elements = vce.findall("regex") + if regex_elements is not None: + regexes = list(map(lambda e: e.text.strip(), regex_elements)) + if "" in regexes: + print("Warning: empty regex, node will be accepting any value") + + validator_elements = vce.findall("validator") + validators = [] + if validator_elements is not None: + for v in validator_elements: + v_name = os.path.join(validator_dir, v.get("name")) + + # XXX: lxml returns None for empty arguments + v_argument = None + try: + v_argument = v.get("argument") + except: + pass + if v_argument is None: + v_argument = "" + + validators.append("{0} {1}".format(v_name, v_argument)) + + + regex_args = " ".join(map(lambda s: "--regex \\\'{0}\\\'".format(s), regexes)) + validator_args = " ".join(map(lambda s: "--exec \\\"{0}\\\"".format(s), validators)) + validator_script = '${vyos_libexec_dir}/validate-value.py' + validator_string = "exec \"{0} {1} {2} --value \\\'$VAR(@)\\\'\"; \"{3}\"".format(validator_script, regex_args, validator_args, error_msg) + + props["constraint"] = validator_string + + # Get the completion help strings + try: + che = p.findall("completionHelp") + ch = "" + for c in che: + scripts = c.findall("script") + paths = c.findall("path") + lists = c.findall("list") + + # Current backend doesn't support multiple allowed: tags + # so we get to emulate it + comp_exprs = [] + for i in lists: + comp_exprs.append("echo \"{0}\"".format(i.text)) + for i in paths: + comp_exprs.append("/bin/cli-shell-api listNodes {0}".format(i.text)) + for i in scripts: + comp_exprs.append("sh -c \"{0}\"".format(i.text)) + comp_help = " && ".join(comp_exprs) + props["comp_help"] = comp_help + except: + props["comp_help"] = [] + + # Get priority + try: + props["priority"] = p.find("priority").text + except: + pass + + # Get "multi" + if p.find("multi") is not None: + props["multi"] = True + + # Get "valueless" + if p.find("valueless") is not None: + props["valueless"] = True + + return props + +def process_node(n, f): + + props_elem = n.find("properties") + children = n.find("children") + command = n.find("command") + children_nodes = [] + owner = n.get("owner") + node_type = n.tag + + name = n.get("name") + props = get_properties(props_elem) + + if node_type != "node": + if "valueless" not in props.keys(): + props["type"] = "txt" + if node_type == "tagNode": + props["tag"] = "True" + + if node_type == "node" and children is not None: + inner_nodes = children.iterfind("*") + index_child = 0 + for inner_n in inner_nodes: + children_nodes.append(process_node(inner_n, f)) + index_child = index_child + 1 + + if node_type == "tagNode" and children is not None: + inner_nodes = children.iterfind("*") + index_child = 0 + for inner_n in inner_nodes: + children_nodes.append(process_node(inner_n, f)) + index_child = index_child + 1 + else: + # This is a leaf node + pass + + if command is not None: + test_command = True + else: + test_command = False + node = { + 'name': name, + 'type': node_type, + 'children': children_nodes, + 'props': props, + 'command': test_command, + 'filename': f + } + return node + + + +def create_commands(data, parent_list=[], level=0): + result = [] + command = { + 'name': [], + 'help': None, + 'tag_help': [], + 'level': level, + 'no_childs': False, + 'filename': None + } + command['filename'] = data['filename'] + command['name'].extend(parent_list) + command['name'].append(data['name']) + + if data['type'] == 'tagNode': + command['name'].append("<" + data['name'] + ">") + + if 'val_help' in data['props'].keys(): + for val_help in data['props']['val_help']: + command['tag_help'].append(val_help) + + if len(data['children']) == 0: + command['no_childs'] = True + + if data['command']: + command['no_childs'] = True + + try: + help_text = data['props']['help'] + command['help'] = re.sub(r"[\n\t]*", "", help_text) + + except: + command['help'] = "" + + command['valueless'] = data['props']['valueless'] + + if 'children' in data.keys(): + children_bool = True + for child in data['children']: + result.extend(create_commands(child, command['name'], level + 1)) + + if command['no_childs']: + result.append(command) + + + + return result + + +def include_file(line, input_dir): + string = "" + if "#include 7VrbcqM4EP0aP4ZCgLk8xkk8u1UzW97K7FyepmRQsGoEYoUc2/P1K4G4CLBNJo7j2rLzAGpJrVafPq2WnYl9l2w/MJitPtEIkYllRtuJfT+xLMtzTPGQkl0pCQKnFMQMR6UINIJH/AspoZoXr3GEcm0gp5RwnOnCkKYpCrkmg4zRjT7siRJ91QzGqCd4DCHpS7/iiK+UFJhm0/EHwvFKLe1PVccShj9jRtepWm9i2U/Fp+xOYKVLjc9XMKKblsh+mNh3jFJeviXbO0Skbyu3lfPme3pruxlK+ZgJn4MU/ArY39bX3eKfT37yffHh8w2wSzXPkKxRtQ+XCIWzCD9Lq/lOecr9dy1NnXG05TeQ4Did2LdiBEFPXDxET+H+lN/kBciyD9jZtpkp3mL1LFbIM5h2ZcuuQGoctGPUUn8+LkClSbimVKYvIMS9RYVsyDghLryiS9/HUa/zCwgswzSAMcI5YxxhaZZYK54Q8QZE3zNiHAu2fYRLRBY0xxxT4Y/7JeWcJmKActB9KMIYMSEgcuSsJtcdJZQVait6NUpv1VxOM+klzujPmsRWLWlpME3fnEsEnjAhQ5prkspBEcxXKFIN0ZPJ7SXbWCZCA9PcM7DISrkRErqOaj9I49B2L0lBTX2RUhFNEGc7MURNuAkCv5yj0qkTlM1NKzf5SrZqpSVgqbQLVT6Ma91NThAvKi28JEU4r04RrLDzgnOEdZwG58kRJ/bUKZKEZYzwzjVJnDNJeO6lJQnLHUgSHcBRJAov1cxRnIjdPjSiGUqjW1nPSZgJzHMcCmErSNAW82+t9+/S58ZUte63CoKisVMNGa0tBGf2fO66fWSjKfIjZygWXHdmzee9uLFrIOWmDsMofEDXLEQHvBcMw92Csyo622hWMoYI5PhZN2MIYbXCguIiK1TR5HeiyfV94VZNS7kDNbFdY/Z0TXVdoK+LQxYj3tMlsIe71rBMDsgPmd1Zyp0GaqnR1gnz9CnipbSjYUKNxyvIEZyNHOb/jxzWu5LD87wqgOs48w3fbj6/SxXPORtVukv1qPI2cQ+s43HfPTFDnIfUEIe6OOdz9dRDXTtwO7Fq2q4feEOx2hzevQLgaPUxXEkUhUf75G9qgpAmkqA1y+YwwUT6/gtiEUyhEqsvQ4B1qruDr0eq5Vcwt9li+85AZVCVCyevDGxwPAhkEZft9YD65gcuq+Hmiz3jAZ0AU98Z8AzwBxIJqDLJ6WumnmO+fLz9C9RX8iUbLvH3lfMbZbUs6FPKEkiGS3rg+obA2xD7msuCcE8R38Fos8IcPWawyNUbwVWdlSPZoLMPjOOHM1CLT+Vfj+gpTVE1WZkO9hJ4FOUOxPTBM+nMsTR0Rx+VaQU4WZFrf8A0+pEhhrMVYpDkRtYpMS4j754cM6XGcbUEMXCj8vw+oN5b4TniOnXF8xCeUx3P6TvjaY8ohd78FARmtb9LOgb7l6PiGDTPcwz612Pw9yl4/Gp25liqflS85s0Xg3aZ5yAYcXu4AnoRB6FoNj9ml18hNP8xYD/8Bw== \ No newline at end of file diff --git a/docs/_include/draw.io/vpn_s2s_ikev2.drawio b/docs/_include/draw.io/vpn_s2s_ikev2.drawio new file mode 100644 index 00000000..b240c191 --- /dev/null +++ b/docs/_include/draw.io/vpn_s2s_ikev2.drawio @@ -0,0 +1 @@ +7Zrdk6I4EMD/Gh+lSMLn4zgz7j7cVk3V1H3svWxFiJhaIB7EUfevv4QEIYCje6eOW4XzIOmQTtL5ddP0OEGP2e5TgderLywm6QTa8W6CniYQIoCA+JKSvZJA2/WVJClorGSgEbzSH0QLbS3d0JiUxo2csZTTtSmMWJ6TiBsyXBRsa962ZKk56xonpCd4jXDal/5JY77SUmDbTcdnQpOVnjpwdccCR9+Tgm1yPd8EomX1Ud0ZrnXp+8sVjtm2JULPE/RYMMbVVbZ7JKk0bm02NW5+pPew7oLk/JwBv/tf4d9PP749rV+/8DAihK2iqRwg1bzhdEPqfVSr5fvaQtUeidQCJmi2XVFOXtc4kr1bAYWQrXiW6m6tjhSc7I4uFBy2L7giLCO82Itb9ICp43pqjGZqilytZNuckOM4SrZqHQ6qccSaiuSgvbGMuNDG+RlDgTs0FLADdHeWOsNQwhXW8jLbJTKqWBEtI2YJ83FSlPrbtFaMy1VlWVs0ljRNH1nKikobspEXhL6Ql7xg30mrR/tj3VP7tzDpTBqeiijwG16Q9IWVlFOWi74F45xlrRseUprIDs7kATZHLBdycGnZiFhGo3qFLOdznNFUnssfpIhxjrVYR0AAL8aA65gMwNDtMYCCAQZAEF7LW0YGbsmAg+4PATQicEsEfMe3XBOCAKCPhsA5DQGJRTqmmyVJMrHh50Y0I3n8ILM80ZuznJg4kB3lf0lbi62r1ldteXn9tGs39q0zabExQ/O55/Vpil0SxM4QTZ43g/N5jyakJ3ohBRXGk+SqyXNhSLXI6rCrdrVMK6ybzUqr1r7d6uuL51SeQtVS5pQ2fB8cYXK2KSJy+rnNcZEQfsqx+yC2IKsz5DZjtawgKeb0zVzuEHd6hhdGxUYazgMPWQFqPp30B3qmRrVrraSdHPf0hu/p9UPf8lof15xF2aw3iwAX71u3reUN5bubOxLHjy+7O8LxT4zwbfDuCHGh1t14/eGU/3sgcMdA0AoEQXDPgQD+EoHA8aDhsHbHZcWbutVx07ODAfKBBfruXqt2PTAQKy4dDKADf9K1nbqmclPXBkOZnpeK454txEXCKzqVQPqc4fXePxtWd0zLKid6EDeAYL1rOmstwIcWCCzRbYmNzqFTqxUNpdmcTYhbK+iEG5FrcTOImA6ug0w7GmgR1qlgJDyrSlC7OWJG47iKWUMlADN1vETq13sGuHY/+weO2/fFujR1+RrAUOJ3FSYs6I4YqAd7FwOvrvu0a0H+LSkYeupfhwIZ+UYI4DSEdvc1EDWiDwPBG8PBrUlw7LsLB/4YDm4MAewWBg9l/w+DILh5tgjHbLH9bhPeXbYYHkXi/xHwxmkTCBZF98DLNc6PK9/qnUv1OSsynA4gZlvyT25f+tWBI6W5h5dJXYewE/8uPLPibJYiwOSsGrQz6VU9lq78O4q5HKyXDgaQVkXyS9AK7O7LdwgGshlYv/0blQZ0JV5rR/hlgUUjsNcCtle1Ce2PpvUK7+LQGcK3qHYzPmWrUlwv8Rp8CxsokF7tMQuv8Do+DEJKliMH+vnldP9FNZSBXwYD0Wx+TqbKu82P9tDzvw== \ No newline at end of file diff --git a/docs/about.rst b/docs/about.rst deleted file mode 100644 index 383c95eb..00000000 --- a/docs/about.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. _about: - -##### -About -##### - -VyOS is an open source network operating system based on Debian GNU/Linux. - -VyOS provides a free routing platform that competes directly with other -commercially available solutions from well known network providers. Because -VyOS is run on standard amd64, i586 and ARM systems, it can be used -as a router and firewall platform for cloud deployments. - -We use multiple live versions of our manual hosted thankfully by -https://readthedocs.org. We will provide one version of the manual for every -VyOS major version starting with VyOS 1.2 which will receive Long-term support -(LTS). - -The manual version is selected/specified by its Git branch name. You can -switch between versions of the documentation by selecting the appropriate -branch on the bottom left corner. - -VyOS CLI syntax may change between major (and sometimes minor) versions. Please -always refer to the documentation matching your current, running installation. -If a change in the CLI is required, VyOS will ship a so called migration script -which will take care of adjusting the syntax. No action needs to be taken by -you. diff --git a/docs/appendix/commandtree/configmode.rst b/docs/appendix/commandtree/configmode.rst deleted file mode 100644 index d4148c22..00000000 --- a/docs/appendix/commandtree/configmode.rst +++ /dev/null @@ -1,524 +0,0 @@ -.. _commandtree_configmode: - -Configuration mode ------------------- - -.. code-block:: none - - confirm Confirm prior commit-confirm - comment Add comment to this configuration element - commit Commit the current set of changes - commit-confirm Commit the current set of changes with 'confirm' required - compare Compare configuration revisions - copy Copy a configuration element - delete Delete a configuration element - discard Discard uncommitted changes - edit Edit a sub-element - exit Exit from this configuration level - load Load configuration from a file and replace running configuration - loadkey Load user SSH key from a file - merge Load configuration from a file and merge running configuration - rename Rename a configuration element - rollback Rollback to a prior config revision (requires reboot) - run Run an operational-mode command - save Save configuration to a file - set Set the value of a parameter or create a new element - show Show the configuration (default values may be suppressed) - - -Confirm -^^^^^^^ - -The ``confirm`` command confirms the prior ``commit-confirm``. - -Comment -^^^^^^^ - -The ``comment`` commands allow you to insert a comment above the current configuration section. -The command cannot be used at the top of the configuration hierarchy, only on subsections. Comments needs to be commited, just like other config changes. - -To add a comment to a section, while being already at the proper section level: - -.. code-block:: none - - [edit
] - vyos@vyos# comment "Type Comment Here" - -To add a comment directly to a section, from the top or a higher section: - -.. code-block:: none - - [edit] - vyos@vyos# comment
"Type Comment Here" - -To remove a comment, add a blank comment to overwrite: - -.. code-block:: none - - [edit
] - vyos@vyos# comment "" - -Examples -******** - -To add a comment to the "interfaces" section: - -.. code-block:: none - - [edit] - vyos@vyos# edit interfaces - [edit interfaces] - vyos@vyos# comment "Here is a comment" - [edit interfaces] - vyos@vyos# commit - -The comment would then appear like this: - -.. code-block:: none - - [edit] - vyos@vyos# show - /* Here is a comment */ - interfaces { - ethernet eth0 { - [...] - - -An important thing to note is that since the comment is added on top of the section, it will not appear if the ``show
`` command is used. With the above example, the ``show interfaces`` command would return starting after the "interfaces {" line, hiding the comment: - -.. code-block:: none - - [edit] - vyos@vyos# show interfaces - ethernet eth0 { - [...] - - -To add a comment to the interfaces section from the top: - -.. code-block:: none - - [edit] - vyos@vyos# comment interfaces "test" - - -The comment can be added to any node that already exists, even if it's multiple levels lower: - -.. code-block:: none - - [edit] - vyos@vyos# comment interfaces ethernet eth0 vif 222 address "Far down comment" - - -Commit -^^^^^^ - -The ``commit`` command commits the proposed changes to the configuration file. -Every changes done in the configuration session is only applied when the configuration is committed. To view the changes that will be applied, use the show command. -To discard the changes without committing, use the ``discard`` command. The ``commit`` command doesn't save the configuration, you need to manually use the ``save`` command. - -The confirm keyword can be added, see ``commit-confirm``. A comment can be entered, it will appear in the commit log. - -.. code-block:: none - - [edit] - vyos@vyos# commit - Possible completions: - Commit working configuration - comment Comment for commit log - -Commit-confirm -^^^^^^^^^^^^^^ - -The ``commit-confirm`` command commits the proposed changes to the configuration file and starts a timer. -If the ``confirm`` command is not entered before the timer expiration, the configuration will be rolled back and VyOS will reboot. -The default timer value is 10 minutes, but a custom value can be entered. - -.. code-block:: none - - [edit] - vyos@vyos# commit-confirm - Possible completions: - Commit, rollback/reboot in 10 minutes if no confirm - Commit, rollback/reboot in N minutes if no confirm - comment Comment for commit log - - -Compare -^^^^^^^ - -VyOS maintains backups of previous configurations. To compare configuration revisions in configuration mode, use the compare command: - -.. code-block:: none - - [edit] - vyos@vyos# compare - Possible completions: - Compare working & active configurations - saved Compare working & saved configurations - Compare working with revision N - Compare revision N with M - - Revisions: - 0 2019-03-20 20:57:22 root by boot-config-loader - 1 2019-03-15 20:00:04 root by boot-config-loader - 2 2019-03-05 01:58:39 vyos by cli - 3 2019-03-05 01:54:59 vyos by cli - 4 2019-03-05 01:53:08 vyos by cli - 5 2019-03-05 01:52:21 vyos by cli - 6 2019-02-24 21:01:24 root by boot-config-loader - 7 2019-02-21 22:00:12 vyos by cli - 8 2019-02-21 21:56:49 vyos by cli - - -Copy -^^^^ - -The ``copy`` command allows you to copy a configuration object. - -Copy the configuration entrys from a firewall name WAN rule 1 to rule 2. - -.. code-block:: none - - [edit firewall name WAN] - vyos@vyos# show - rule 1 { - action accept - source { - address 10.1.0.0/24 - } - } - [edit firewall name WAN] - vyos@vyos# copy rule 1 to rule 2 - [edit firewall name WAN] - vyos@vyos# show - rule 1 { - action accept - source { - address 10.1.0.0/24 - } - } - +rule 2 { - + action accept - + source { - + address 10.1.0.0/24 - + } - +} - -Delete -^^^^^^ - -The ``delte`` command is to delete a configuration entry. - -This Example delete the hole ``service tftp-server`` section. - -.. code-block:: none - - delete service tftp-server - -Discard -^^^^^^^ - -The ``discard`` command removes all pending configuration changes. - -.. code-block:: none - - [edit] - vyos@vyos# discard - - Changes have been discarded - -Edit -^^^^ - -The ``edit`` command allows you to navigate down into the configuration tree. -To get back to an upper level, use the ``up`` command or use the ``top`` command to get back to the upper most level. -The ``[edit]`` text displays where the user is located in the configuration tree. - -.. code-block:: none - - [edit] - vyos@vyos# edit interfaces - [edit interfaces] - vyos@vyos# edit ethernet eth0 - [edit interfaces ethernet eth0] - -Exit -^^^^ - -The ``exit`` command exits the current configuration mode. If the current configuration level isn't the top-most, then the configuration level is put back to the top-most level. -If the configuration level is at the top-most level, then it exits the configuration mode and returns to operational mode. -The ``exit`` command cannot be used if uncommitted changes exists in the configuration file. To exit with uncommitted changes, you either need to use the ``exit discard`` command or you need to commit the changes before exiting. -The ``exit`` command doesn't save the configuration, only the ``save`` command does. A warning will be given when exiting with unsaved changes. Using the ``exit`` command in operational mode will logout the session. - - -Exiting from a configuration level: - - -.. code-block:: none - - [edit interfaces ethernet eth0] - vyos@vyos# exit - [edit] - vyos@vyos# - -Exiting from configuration mode: - -.. code-block:: none - - [edit] - vyos@vyos# exit - exit - vyos@vyos:~$ - -Exiting from operational mode: - -.. code-block:: none - - vyos@vyos:~$ exit - logout - -Error message when trying to exit with uncommitted changes: - -.. code-block:: none - - vyos@vyos# exit - Cannot exit: configuration modified. - Use 'exit discard' to discard the changes and exit. - [edit] - vyos@vyos# - - -Warning message when exiting with unsaved changes: - -.. code-block:: none - - [edit] - vyos@vyos# exit - Warning: configuration changes have not been saved. - exit - vyos@vyos:~$ - -Load -^^^^ - -The ``load`` command load a configuration from a local or remote file. You have to be use ``commit`` to make the change active - -.. code-block:: none - - Load from system config file - Load from file on local machine - scp://:@/ Load from file on remote machine - sftp://:@/ Load from file on remote machine - ftp://:@/ Load from file on remote machine - http:/// Load from file on remote machine - https:/// Load from file on remote machine - tftp:/// Load from file on remote machine - - -.. code-block:: none - - [edit] - vyos@vyos# load - Loading configuration from '/config/config.boot'... - - Load complete. Use 'commit' to make changes active. - - -Loadkey -^^^^^^^^ - -Copies the content of a public key to the ~/.ssh/authorized_keys file. - -.. code-block:: none - - loadkey [tab] - - Load from file on local machine - scp://@/ Load from file on remote machine - sftp://@/ Load from file on remote machine - ftp://@/ Load from file on remote machine - http:/// Load from file on remote machine - tftp:/// Load from file on remote machine - -Merge -^^^^^ - -The ``merge`` command merge the config from a local or remote file with the running config. - -In the example below exist a ``default-firewall.config`` file with some common firewall rules you saved earlier. - -.. code-block:: none - - [edit] - vyos@vyos# show firewall - Configuration under specified path is empty - [edit] - vyos@vyos# merge default-firewall.config - Loading configuration from '/config/default-firewall.config'... - - Merge complete. Use 'commit' to make changes active. - [edit] - vyos@vyos# - - vyos@vyos# show firewall - +all-ping enable - +broadcast-ping disable - +config-trap disable - +ipv6-receive-redirects disable - +ipv6-src-route disable - +ip-src-route disable - +log-martians enable - +name WAN { - + default-action drop - + rule 1 { - + action accept - + source { - + address 10.1.0.0/24 - + } - + } - + rule 2 { - + action accept - + source { - + address 10.1.0.0/24 - + } - ...... - - -Rename -^^^^^^ - -The ``rename`` command allows you to rename or move a configuration object. - -See here how to move the configuration entrys from vlanid 3 to 2 - -.. code-block:: none - - [edit interfaces ethernet eth1] - vyos@vyos# show - duplex auto - hw-id 08:00:27:81:c6:59 - smp-affinity auto - speed auto - vif 3 { - address 10.4.4.4/32 - } - [edit interfaces ethernet eth1] - vyos@vyos# rename vif 3 to vif 2 - [edit interfaces ethernet eth1] - vyos@vyos# show - duplex auto - hw-id 08:00:27:81:c6:59 - smp-affinity auto - speed auto - +vif 2 { - + address 10.4.4.4/32 - +} - -vif 3 { - - address 10.4.4.4/32 - -} - [edit interfaces ethernet eth1] - vyos@vyos# - - -Rollback -^^^^^^^^ - -You can ``rollback`` configuration using the rollback command, however this command will currently trigger a system reboot. -Use the compare command to verify the configuration you want to rollback to. - -.. code-block:: none - - vyos@vyos# compare 1 - [edit system] - >host-name vyos-1 - [edit] - vyos@vyos# rollback 1 - Proceed with reboot? [confirm][y] - - Broadcast message from root@vyos-1 (pts/0) (Tue Dec 17 21:07:45 2018): - - The system is going down for reboot NOW! - [edit] - vyos@vyos# - -Run -^^^ - -The ``run`` command allows you to execute any operational mode commands without exiting the configuration session. - -.. code-block:: none - - [edit] - vyos@vyos# run show interfaces - Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down - Interface IP Address S/L Description - --------- ---------- --- ----------- - eth0 10.1.1.1/24 u/u - - -Save -^^^^ - -The ``save`` command saves the current configuration to non-volatile storage. VyOS also supports saving and loading configuration remotely using SCP, FTP, or TFTP. - -.. code-block:: none - - Save to system config file - Save to file on local machine - scp://:@/ Save to file on remote machine - sftp://:@/ Save to file on remote machine - ftp://:@/ Save to file on remote machine - tftp:/// Save to file on remote machine - -Set -^^^ - -The ``set`` command create all configuration entrys - -.. code-block:: none - - [edit] - vyos@vyos# set protocols static route 0.0.0.0/0 next-hop 192.168.1.1 - -Show -^^^^ - -The ``show`` command in the configuration mode displays the configuration and show uncommitted changes. - -Show the hole config, the address and description of eth1 is moving to vlan 2 if you commit the changes. - -.. code-block:: none - - [edit] - vyos@vyos# show - interfaces { - dummy dum0 { - address 10.3.3.3/24 - } - ethernet eth0 { - address dhcp - duplex auto - hw-id 08:00:27:2b:c0:0b - smp-affinity auto - speed auto - } - ethernet eth1 { - - address 10.1.1.1/32 - - description "MGMT Interface" - duplex auto - hw-id 08:00:27:81:c6:59 - smp-affinity auto - speed auto - + vif 2 { - + address 10.1.1.1/32 - + description "MGMT Interface" - + } - } - loopback lo { - } - } - service { - ssh { - port 22 - ...... \ No newline at end of file diff --git a/docs/appendix/commandtree/index.rst b/docs/appendix/commandtree/index.rst deleted file mode 100644 index c3bca008..00000000 --- a/docs/appendix/commandtree/index.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. _commandtree: - -Command tree -============ - -See the the full Command tree in Operational mode and Configuration mode - - - -.. toctree:: - :maxdepth: 2 - :hidden: - - - operationmode - configmode - diff --git a/docs/appendix/commandtree/operationmode.rst b/docs/appendix/commandtree/operationmode.rst deleted file mode 100644 index 8092f248..00000000 --- a/docs/appendix/commandtree/operationmode.rst +++ /dev/null @@ -1,444 +0,0 @@ -.. _commandtree_operationmode: - -Operational mode ----------------- - -Operational mode allows for commands to perform operational system tasks and view system and service status. -After this is the first view after the login. -Please see :ref:`cli` for navigation in the CLI - - -.. code-block:: none - - - vyos@vyos:~$ [tab] - Possible completions: - add Add an object to a service - clear Clear system information - clone Clone an object - configure Enter configure mode - connect Establish a connection - copy Copy an object - delete Delete an object - disconnect Take down a connection - force Force an operation - format Format a device - generate Generate an object - install Install a new system - monitor Monitor system information - ping Send IPv4 or IPv6 ICMP (Internet Control Message Protocol) echo requests - poweroff Poweroff the system - reboot Reboot the system - release Release specified variable - rename Rename an object - renew Renew specified variable - reset Reset a service - restart Restart a service - set Set operational options - show Show system information - telnet Telnet to a node - traceroute Track network path to node - update Update data for a service - - -Add -^^^ - -.. code-block:: none - - raid Add a RAID set element - system Add an item to a system facility - -Clear -^^^^^ - -.. code-block:: none - - console Clear screen - firewall Clear firewall statistics - flow-accounting Clear flow accounting - interfaces Clear interface information - ip Clear Internet Protocol (IP) statistics or status - ipv6 Clear Internet Protocol (IPv6) statistics or status - nat Clear network address translation (NAT) tables - policy Clear policy statistics - - -Clone -^^^^^ -The ``clone`` command allows you to clone a configuration from a system image to another one, or from the running config to another system image. -To clone the running config to a system image: - -.. code-block:: none - - clone system config from running - -To clone from system image A to system image B: - -.. code-block:: none - - clone system config from - - -Configure -^^^^^^^^^ - -The ``configure`` command allows you to enter configuration mode. - -.. code-block:: none - - vyos@vyos:~$ configure - [edit] - vyos@vyos# - - -Connect -^^^^^^^ - -The ``connect`` command allows you to bring up a connection oriented interface, like a pppoe interface. - -.. code-block:: none - - connect interface - -Copy -^^^^ - -The ``copy`` command allows you to copy a file to your running config or over images. - -It can look like this example: - -.. code-block:: none - - vyos@vyos:~$ copy file [tab] - Possible completions: - http://:@/ - Copy files from specified source - scp://:@/ - ftp://:@/ - tftp:/// - 1.2.0://config/ - 1.2.0-rolling+201902251818://config/ - 1.2.0-rolling+201902201040://config/ - 1.2.0-rolling+201902080337://config/ - 1.2.0-H4://config/ - running://config/ - - -To copy from file A to file B: - -.. code-block:: none - - copy to - - -Delete -^^^^^^ - -.. code-block:: none - - conntrack Delete Conntrack entries - file Delete files in a particular image - log Delete a log file - raid Remove a RAID set element - system Delete system objects - - -Disconnect -^^^^^^^^^^ - -The ``disconnect`` command allows you to take down a connection oriented interface, like a pppoe interface. - -.. code-block:: none - - disconnect interface - -Force -^^^^^ - -.. code-block:: none - - arp Send gratuitous ARP request or reply - cluster Force a cluster state transition - - -Format -^^^^^^ - -The ``format`` command allows you to format a disk the same way as another one. - -.. code-block:: none - - format disk like - -Generate -^^^^^^^^ - -.. code-block:: none - - openvpn OpenVPN key generation tool - ssh-server-key - Regenerate the host SSH keys and restart the SSH server - tech-support Generate tech-support archive - vpn VPN key generation utility - wireguard wireguard key generation utility - -Install -^^^^^^^ - -The ``install`` command allows you to install the system image on the disk. - -.. code-block:: none - - install image - - -Monitor -^^^^^^^ - -``monitor`` can be used to continually view what is happening on the router. - -.. code-block:: none - - bandwidth Monitor interface bandwidth in real time - bandwidth-test - Initiate or wait for bandwidth test - cluster Monitor clustering service - command Monitor an operational mode command (refreshes every 2 seconds) - conntrack-sync - Monitor conntrack-sync - content-inspection - Monitor Content-Inspection - dhcp Monitor Dynamic Host Control Protocol (DHCP) - dns Monitor a Domain Name Service (DNS) daemon - firewall Monitor Firewall - https Monitor the Secure Hypertext Transfer Protocol (HTTPS) service - lldp Monitor Link Layer Discovery Protocol (LLDP) daemon - log Monitor last lines of messages file - nat Monitor network address translation (NAT) - openvpn Monitor OpenVPN - protocol Monitor routing protocols - snmp Monitor Simple Network Management Protocol (SNMP) daemon - stop-all Stop all current background monitoring processes - traceroute Monitor the path to a destination in realtime - traffic Monitor traffic dumps - vpn Monitor VPN - vrrp Monitor Virtual Router Redundancy Protocol (VRRP) - webproxy Monitor Webproxy service - - -Ping -^^^^ - -The ``ping`` command allows you to send an ICMP-EchoRequest packet and display the ICMP-EchoReply received. - -.. code-block:: none - - Send Internet Control Message Protocol (ICMP) echo request - - - - -Poweroff -^^^^^^^^ - -The ``poweroff`` command allows you to properly shut down the VyOS instance. Without any modifier, the command is executed immediately. - -.. code-block:: none - - Execute the current command - at Poweroff at a specific time - cancel Cancel a pending poweroff - in Poweroff in X minutes - now Poweroff the system without confirmation - -Reboot -^^^^^^ -The ``reboot`` command allows you to properly restart the VyOS instance. Without any modifier, the command is executed immediately. - -.. code-block:: none - - Execute the current command - at Poweroff at a specific time - cancel Cancel a pending poweroff - in Poweroff in X minutes - now Poweroff the system without confirmation - -Release -^^^^^^^ - -The ``release`` command allows you to release a DHCP or DHCPv6 lease. - -.. code-block:: none - - vyos@vyos:~$ release dhcp interface - vyos@vyos:~$ release dhcpv6 interface - - -Rename -^^^^^^ - -The ``rename`` command allows you to rename a system image. - -.. code-block:: none - - rename system image - - -Renew -^^^^^ - -The ``renew`` command allows you to renew a DHCP or DHCPv6 lease. - -.. code-block:: none - - vyos@vyos:~$ renew dhcp interface - vyos@vyos:~$ renew dhcpv6 interface - -Reset -^^^^^ - -.. code-block:: none - - conntrack Reset all currently tracked connections - conntrack-sync - Reset connection syncing parameters - dns Reset a DNS service state - firewall reset a firewall group - ip Reset Internet Protocol (IP) parameters - ipv6 Reset Internet Protocol version 6 (IPv6) parameters - nhrp Clear/Purge NHRP entries - openvpn Reset OpenVPN - terminal Reset terminal - vpn Reset Virtual Private Network (VPN) information - -Restart -^^^^^^^ - -.. code-block:: none - - cluster Restart cluster node - conntrack-sync - Restart connection tracking synchronization service - dhcp Restart DHCP processes - dhcpv6 Restart DHCPv6 processes - dns Restart a DNS service - flow-accounting - Restart flow-accounting service - https Restart https server - vpn Restart IPsec VPN - vrrp Restart the VRRP (Virtual Router Redundancy Protocol) process - wan-load-balance - Restart WAN load balancing - webproxy Restart webproxy service - -Set -^^^ - -.. code-block:: none - -