Skip to content

Commit

Permalink
Merge branch 'vyos:current' into feature/dhcpv4-ddns
Browse files Browse the repository at this point in the history
  • Loading branch information
abukharov authored Dec 13, 2024
2 parents a9adfc5 + 4221687 commit a307562
Show file tree
Hide file tree
Showing 25 changed files with 291 additions and 165 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/package-smoketest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed for PR comments
BUILD_BY: [email protected]
DEBIAN_MIRROR: http://deb.debian.org/debian/
DEBIAN_SECURITY_MIRROR: http://deb.debian.org/debian-security
VYOS_MIRROR: https://packages.vyos.net/repositories/current/

jobs:
Expand Down Expand Up @@ -56,6 +57,7 @@ jobs:
--build-type release \
--custom-package vyos-1x-smoketest \
--debian-mirror $DEBIAN_MIRROR \
--debian-security-mirror $DEBIAN_SECURITY_MIRROR \
--version ${{ steps.version.outputs.build_version }} \
--vyos-mirror $VYOS_MIRROR \
generic
Expand Down
3 changes: 2 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* @vyos/reviewers
# Users from reviewers github team
* @dmbaturin @sarthurdev @jestabro @sever-sever @c-po @fett0 @nicolas-fort @zdc
4 changes: 3 additions & 1 deletion data/templates/accel-ppp/ipoe.config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ lua-file={{ lua_file }}
{% set relay = ',' ~ 'relay=' ~ iface_config.external_dhcp.dhcp_relay if iface_config.external_dhcp.dhcp_relay is vyos_defined else '' %}
{% set giaddr = ',' ~ 'giaddr=' ~ iface_config.external_dhcp.giaddr if iface_config.external_dhcp.giaddr is vyos_defined else '' %}
{% set username = ',' ~ 'username=lua:' ~ iface_config.lua_username if iface_config.lua_username is vyos_defined else '' %}
{{ tmp }},{{ shared }}mode={{ iface_config.mode | upper }},ifcfg=1,{{ range }}start=dhcpv4,ipv6=1{{ relay }}{{ giaddr }}{{ username }}
{% set start_map = {'dhcp': 'dhcpv4', 'unclassified-packet': 'up', 'auto': 'auto'} %}
{% set start = start_map[iface_config.start_session] %}
{{ tmp }},{{ shared }}mode={{ iface_config.mode | upper }},ifcfg=1,{{ range }}start={{ start }},ipv6=1{{ relay }}{{ giaddr }}{{ username }}
{% if iface_config.vlan_mon is vyos_defined %}
vlan-mon={{ iface }},{{ iface_config.vlan | join(',') }}
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions data/templates/chrony/chrony.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ binddevice {{ interface }}
{% endif %}
{% endif %}

{% if ptp.timestamp.interface is vyos_defined %}
{% if timestamp.interface is vyos_defined %}
# Enable hardware timestamping on the specified interfaces
{% for iface, iface_config in ptp.timestamp.interface.items() %}
{% for iface, iface_config in timestamp.interface.items() %}
{% if iface == "all" %}
{% set iface = "*" %}
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions interface-definitions/container.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
</properties>
<defaultValue>64</defaultValue>
</leafNode>
#include <include/name-server-ipv4-ipv6.xml.i>
<tagNode name="network">
<properties>
<help>Attach user defined network to container</help>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<help>Distance for installed default route</help>
<valueHelp>
<format>u32:1-255</format>
<description>Distance for the default route from DHCP server</description>
<description>Distance for the default route received from the server</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 1-255"/>
Expand Down
3 changes: 3 additions & 0 deletions interface-definitions/interfaces_pppoe.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
#include <include/interface/dial-on-demand.xml.i>
#include <include/interface/no-default-route.xml.i>
#include <include/interface/default-route-distance.xml.i>
<leafNode name="default-route-distance">
<defaultValue>1</defaultValue>
</leafNode>
#include <include/interface/dhcpv6-options.xml.i>
#include <include/generic-description.xml.i>
#include <include/interface/disable.xml.i>
Expand Down
8 changes: 7 additions & 1 deletion interface-definitions/pki.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
<multi/>
</properties>
</leafNode>
<leafNode name="system-install">
<properties>
<help>Install into CA certificate store on router</help>
<valueless/>
</properties>
</leafNode>
#include <include/pki/cli-revoke.xml.i>
</children>
</tagNode>
Expand Down Expand Up @@ -74,7 +80,7 @@
</constraint>
</properties>
</leafNode>
#include <include/listen-address-ipv4-single.xml.i>
#include <include/listen-address-single.xml.i>
<leafNode name="rsa-key-size">
<properties>
<help>Size of the RSA key</help>
Expand Down
24 changes: 24 additions & 0 deletions interface-definitions/service_ipoe-server.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,30 @@
</properties>
<defaultValue>shared</defaultValue>
</leafNode>
<leafNode name="start-session">
<properties>
<help>Start session options</help>
<completionHelp>
<list>auto dhcp unclassified-packet</list>
</completionHelp>
<valueHelp>
<format>auto</format>
<description>Start session with username as the interface name</description>
</valueHelp>
<valueHelp>
<format>dhcp</format>
<description>Start session on DHCPv4 Discover</description>
</valueHelp>
<valueHelp>
<format>unclassified-packet</format>
<description>Start session on unclassified-packet</description>
</valueHelp>
<constraint>
<regex>(auto|dhcp|unclassified-packet)</regex>
</constraint>
</properties>
<defaultValue>dhcp</defaultValue>
</leafNode>
<leafNode name="client-subnet">
<properties>
<help>Client address pool</help>
Expand Down
96 changes: 48 additions & 48 deletions interface-definitions/service_ntp.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,72 +13,72 @@
#include <include/generic-interface.xml.i>
#include <include/listen-address.xml.i>
#include <include/interface/vrf.xml.i>
<node name="ptp">
<node name="timestamp">
<properties>
<help>Enable Precision Time Protocol (PTP) transport</help>
<help>Enable timestamping of packets in the NIC hardware</help>
</properties>
<children>
#include <include/port-number.xml.i>
<leafNode name="port">
<defaultValue>319</defaultValue>
</leafNode>
<node name="timestamp">
<tagNode name="interface">
<properties>
<help>Enable timestamping of packets in the NIC hardware</help>
<help>Interface to enable timestamping on</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces</script>
<list>all</list>
</completionHelp>
<valueHelp>
<format>all</format>
<description>Select all interfaces</description>
</valueHelp>
<valueHelp>
<format>txt</format>
<description>Interface name</description>
</valueHelp>
<constraint>
#include <include/constraint/interface-name.xml.i>
<regex>all</regex>
</constraint>
</properties>
<children>
<tagNode name="interface">
<leafNode name="receive-filter">
<properties>
<help>Interface to enable timestamping on</help>
<help>Selects which inbound packets are timestamped by the NIC</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces</script>
<list>all</list>
<list>all ntp ptp none</list>
</completionHelp>
<valueHelp>
<format>all</format>
<description>Select all interfaces</description>
<description>All packets are timestamped</description>
</valueHelp>
<valueHelp>
<format>txt</format>
<description>Interface name</description>
<format>ntp</format>
<description>Only NTP packets are timestamped</description>
</valueHelp>
<valueHelp>
<format>ptp</format>
<description>Only PTP or NTP packets using the PTP transport are timestamped</description>
</valueHelp>
<valueHelp>
<format>none</format>
<description>No packet is timestamped</description>
</valueHelp>
<constraint>
#include <include/constraint/interface-name.xml.i>
<regex>all</regex>
<regex>(all|ntp|ptp|none)</regex>
</constraint>
</properties>
<children>
<leafNode name="receive-filter">
<properties>
<help>Selects which inbound packets are timestamped by the NIC</help>
<completionHelp>
<list>all ntp ptp none</list>
</completionHelp>
<valueHelp>
<format>all</format>
<description>All packets are timestamped</description>
</valueHelp>
<valueHelp>
<format>ntp</format>
<description>Only NTP packets are timestamped</description>
</valueHelp>
<valueHelp>
<format>ptp</format>
<description>Only PTP or NTP packets using the PTP transport are timestamped</description>
</valueHelp>
<valueHelp>
<format>none</format>
<description>No packet is timestamped</description>
</valueHelp>
<constraint>
<regex>(all|ntp|ptp|none)</regex>
</constraint>
</properties>
</leafNode>
</children>
</tagNode>
</leafNode>
</children>
</node>
</tagNode>
</children>
</node>
<node name="ptp">
<properties>
<help>Enable Precision Time Protocol (PTP) transport</help>
</properties>
<children>
#include <include/port-number.xml.i>
<leafNode name="port">
<defaultValue>319</defaultValue>
</leafNode>
</children>
</node>
<leafNode name="leap-second">
Expand Down
2 changes: 1 addition & 1 deletion op-mode-definitions/show-bridge.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<properties>
<help>Display bridge interface nexthop-group</help>
</properties>
<command>${vyos_op_scripts_dir}/bridge.py show_detail --nexthop_group --interface=$3</command>
<command>${vyos_op_scripts_dir}/bridge.py show_detail --nexthop-group --interface=$3</command>
</leafNode>
</children>
</tagNode>
Expand Down
62 changes: 59 additions & 3 deletions op-mode-definitions/show-monitoring.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,68 @@
<interfaceDefinition>
<node name="show">
<children>
<leafNode name="monitoring">
<node name="monitoring">
<properties>
<help>Show currently monitored services</help>
</properties>
<command>vtysh -c "show debugging"</command>
</leafNode>
<children>
<node name="frr">
<properties>
<help>Show currently monitored FRR services</help>
</properties>
<command>vtysh -c "show debugging"</command>
<children>
<node name="zebra">
<properties>
<help>Show Zebra routing information</help>
</properties>
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh "show ${@:4}"</command>
<children>
<node name="client">
<properties>
<help>Client information</help>
</properties>
<children>
<node name="summary">
<properties>
<help>Brief summary</help>
</properties>
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh "show ${@:4}"</command>
</node>
</children>
</node>
<node name="dplane">
<properties>
<help>Zebra dataplane information</help>
</properties>
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh "show ${@:4}"</command>
</node>
<node name="router">
<properties>
<help>Zebra router information</help>
</properties>
<children>
<node name="table">
<properties>
<help>Zebra routing table information</help>
</properties>
<children>
<node name="summary">
<properties>
<help>Summary information</help>
</properties>
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh "show ${@:4}"</command>
</node>
</children>
</node>
</children>
</node>
</children>
</node>
</children>
</node>
</children>
</node>
</children>
</node>
</interfaceDefinition>
54 changes: 0 additions & 54 deletions op-mode-definitions/show-zebra.xml.in

This file was deleted.

6 changes: 3 additions & 3 deletions python/vyos/configtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,15 +469,15 @@ def mask_inclusive(left, right, libpath=LIBPATH):

return tree

def reference_tree_to_json(from_dir, to_file, libpath=LIBPATH):
def reference_tree_to_json(from_dir, to_file, internal_cache="", libpath=LIBPATH):
try:
__lib = cdll.LoadLibrary(libpath)
__reference_tree_to_json = __lib.reference_tree_to_json
__reference_tree_to_json.argtypes = [c_char_p, c_char_p]
__reference_tree_to_json.argtypes = [c_char_p, c_char_p, c_char_p]
__get_error = __lib.get_error
__get_error.argtypes = []
__get_error.restype = c_char_p
res = __reference_tree_to_json(from_dir.encode(), to_file.encode())
res = __reference_tree_to_json(internal_cache.encode(), from_dir.encode(), to_file.encode())
except Exception as e:
raise ConfigTreeError(e)
if res == 1:
Expand Down
Loading

0 comments on commit a307562

Please sign in to comment.