Skip to content

Commit

Permalink
wireless: T6320: Merge remote-tracking branch 'upstream/current' into T…
Browse files Browse the repository at this point in the history
  • Loading branch information
alainlamar committed Jun 27, 2024
2 parents baed164 + 7d91768 commit 815d559
Show file tree
Hide file tree
Showing 296 changed files with 11,757 additions and 11,569 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/package-smoketest.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: VyOS ISO integration Test

on:
pull_request:
pull_request_target:
branches:
- current
- circinus

permissions:
pull-requests: write
contents: read

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed for PR comments

jobs:
build:
runs-on: ubuntu-24.04
Expand All @@ -26,9 +33,7 @@ jobs:
- name: Clone vyos-1x source code
uses: actions/checkout@v4
with:
repository: vyos/vyos-1x
path: packages/vyos-1x
fetch-tags: true # required for Debian package version
- name: Build vyos-1x package
run: |
cd packages/vyos-1x; dpkg-buildpackage -uc -us -tc -b
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ data/component-versions.json
# vyos-1x XML cache
python/vyos/xml_ref/cache.py
python/vyos/xml_ref/pkg_cache/*_cache.py
# autogenerated vyos-configd JSON definition
data/configd-include.json

# We do not use pip
Pipfile
Expand Down
19 changes: 6 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,7 @@ vyshim:
$(MAKE) -C $(SHIM_DIR)

.PHONY: all
all: clean interface_definitions op_mode_definitions check test j2lint vyshim check_migration_scripts_executable

.PHONY: check
.ONESHELL:
check:
@echo "Checking which CLI scripts are not enabled to work with vyos-configd..."
@for file in `ls src/conf_mode -I__pycache__`
do
if ! grep -q $$file data/configd-include.json; then
echo "* $$file"
fi
done
all: clean interface_definitions op_mode_definitions test j2lint vyshim generate-configd-include-json

.PHONY: clean
clean:
Expand All @@ -99,7 +88,7 @@ clean:
$(MAKE) -C $(SHIM_DIR) clean

.PHONY: test
test:
test: generate-configd-include-json
set -e; python3 -m compileall -q -x '/vmware-tools/scripts/, /ppp/' .
PYTHONPATH=python/ python3 -m "nose" --with-xunit src --with-coverage --cover-erase --cover-xml --cover-package src/conf_mode,src/op_mode,src/completion,src/helpers,src/validators,src/tests --verbose

Expand Down Expand Up @@ -127,6 +116,10 @@ unused-imports:
deb:
dpkg-buildpackage -uc -us -tc -b

.PHONY: generate-configd-include-json
generate-configd-include-json:
@scripts/generate-configd-include-json.py

.PHONY: schema
schema:
trang -I rnc -O rng schema/interface_definition.rnc schema/interface_definition.rng
Expand Down
115 changes: 0 additions & 115 deletions data/configd-include.json

This file was deleted.

6 changes: 6 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ Build-Depends:
python3-xmltodict,
# For running tests
python3-coverage,
python3-hurry.filesize,
python3-netaddr,
python3-netifaces,
python3-nose,
python3-jinja2,
python3-paramiko,
python3-passlib,
python3-psutil,
python3-requests,
python3-setuptools,
python3-tabulate,
python3-zmq,
quilt,
whois
Standards-Version: 3.9.6
Expand Down
29 changes: 1 addition & 28 deletions op-mode-definitions/generate_firewall_rule-resequence.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,7 @@
<help>Firewall</help>
</properties>
<children>
<node name="rule-resequence">
<properties>
<help>Resequence the firewall rules</help>
</properties>
<command>${vyos_op_scripts_dir}/generate_firewall_rule-resequence.py</command>
<children>
<tagNode name="start">
<properties>
<help>Set the first sequence number</help>
<completionHelp>
<list>1-1000</list>
</completionHelp>
</properties>
<command>${vyos_op_scripts_dir}/generate_firewall_rule-resequence.py --start $5</command>
<children>
<tagNode name="step">
<properties>
<help>Step between rules</help>
<completionHelp>
<list>1-1000</list>
</completionHelp>
</properties>
<command>${vyos_op_scripts_dir}/generate_firewall_rule-resequence.py --start $5 --step $7</command>
</tagNode>
</children>
</tagNode>
</children>
</node>
#include <include/rule-resequence.xml.i>
</children>
</node>
</children>
Expand Down
15 changes: 15 additions & 0 deletions op-mode-definitions/generate_nat64_rule-resequence.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<interfaceDefinition>
<node name="generate">
<children>
<node name="nat64">
<properties>
<help>Network Address Translation (NAT64)</help>
</properties>
<children>
#include <include/rule-resequence.xml.i>
</children>
</node>
</children>
</node>
</interfaceDefinition>
15 changes: 15 additions & 0 deletions op-mode-definitions/generate_nat66_rule-resequence.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<interfaceDefinition>
<node name="generate">
<children>
<node name="nat66">
<properties>
<help>Network Prefix Translation (NAT66/NPTv6)</help>
</properties>
<children>
#include <include/rule-resequence.xml.i>
</children>
</node>
</children>
</node>
</interfaceDefinition>
15 changes: 15 additions & 0 deletions op-mode-definitions/generate_nat_rule-resequence.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<interfaceDefinition>
<node name="generate">
<children>
<node name="nat">
<properties>
<help>Network Address Translation (NAT)</help>
</properties>
<children>
#include <include/rule-resequence.xml.i>
</children>
</node>
</children>
</node>
</interfaceDefinition>
30 changes: 30 additions & 0 deletions op-mode-definitions/include/rule-resequence.xml.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- included start from show-nht.xml.i -->
<node name="rule-resequence">
<properties>
<help>Resequence rules</help>
</properties>
<command>${vyos_op_scripts_dir}/generate_service_rule-resequence.py --service $2</command>
<children>
<tagNode name="start">
<properties>
<help>Set the first sequence number</help>
<completionHelp>
<list>1-1000</list>
</completionHelp>
</properties>
<command>${vyos_op_scripts_dir}/generate_service_rule-resequence.py --service $2 --start $5</command>
<children>
<tagNode name="step">
<properties>
<help>Step between rules</help>
<completionHelp>
<list>1-1000</list>
</completionHelp>
</properties>
<command>${vyos_op_scripts_dir}/generate_service_rule-resequence.py --service $2 --start $5 --step $7</command>
</tagNode>
</children>
</tagNode>
</children>
</node>
<!-- included end -->
7 changes: 7 additions & 0 deletions python/vyos/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,10 @@ def __init__(self, message):
message = fill(message, width=72)
# Call the base class constructor with the parameters it needs
super().__init__(message)

class MigrationError(Exception):
def __init__(self, message):
# Reformat the message and trim it to 72 characters in length
message = fill(message, width=72)
# Call the base class constructor with the parameters it needs
super().__init__(message)
Loading

0 comments on commit 815d559

Please sign in to comment.