summaryrefslogtreecommitdiff
path: root/tests/unit/fixtures
diff options
context:
space:
mode:
authoromnom62 <omnom62@outlook.com>2026-05-27 21:38:51 +1000
committeromnom62 <omnom62@outlook.com>2026-05-27 21:38:51 +1000
commitaeedc73003ddcf84bbf5c2880f982b6d4925e0c9 (patch)
treeb2bf9705e2fe6db7dbaa51afc5fd60ca0f7878da /tests/unit/fixtures
parent5a6f6976b49fd5ca8e964b2342493bc5ceee85d5 (diff)
downloadrest.vyos-aeedc73003ddcf84bbf5c2880f982b6d4925e0c9.tar.gz
rest.vyos-aeedc73003ddcf84bbf5c2880f982b6d4925e0c9.zip
Test framework
Diffstat (limited to 'tests/unit/fixtures')
-rw-r--r--tests/unit/fixtures/lldp_global_running.json10
-rw-r--r--tests/unit/fixtures/logging_global_running.json42
-rw-r--r--tests/unit/fixtures/ntp_global_running.json17
-rw-r--r--tests/unit/fixtures/prefix_lists_running.json44
-rw-r--r--tests/unit/fixtures/route_maps_running.json31
-rw-r--r--tests/unit/fixtures/snmp_server_running.json35
6 files changed, 179 insertions, 0 deletions
diff --git a/tests/unit/fixtures/lldp_global_running.json b/tests/unit/fixtures/lldp_global_running.json
new file mode 100644
index 0000000..fdd6aa4
--- /dev/null
+++ b/tests/unit/fixtures/lldp_global_running.json
@@ -0,0 +1,10 @@
+{
+ "management-address": {
+ "192.0.2.17": {}
+ },
+ "snmp": {},
+ "legacy-protocols": {
+ "cdp": {},
+ "sonmp": {}
+ }
+}
diff --git a/tests/unit/fixtures/logging_global_running.json b/tests/unit/fixtures/logging_global_running.json
new file mode 100644
index 0000000..557408d
--- /dev/null
+++ b/tests/unit/fixtures/logging_global_running.json
@@ -0,0 +1,42 @@
+{
+ "console": {
+ "facility": {
+ "all": {},
+ "local7": { "level": "err" }
+ }
+ },
+ "file": {
+ "logFile": {
+ "archive": { "file": "2" },
+ "facility": {
+ "local6": { "level": "emerg" }
+ }
+ }
+ },
+ "global": {
+ "archive": { "file": "2", "size": "111" },
+ "facility": {
+ "cron": { "level": "debug" },
+ "all": { "level": "info" },
+ "local7": { "level": "debug" }
+ },
+ "marker": { "interval": "111" },
+ "preserve-fqdn": {}
+ },
+ "host": {
+ "172.16.0.1": {
+ "facility": {
+ "local7": { "level": "all" },
+ "all": { "protocol": "udp" }
+ },
+ "port": "223"
+ }
+ },
+ "user": {
+ "vyos": {
+ "facility": {
+ "local7": { "level": "debug" }
+ }
+ }
+ }
+}
diff --git a/tests/unit/fixtures/ntp_global_running.json b/tests/unit/fixtures/ntp_global_running.json
new file mode 100644
index 0000000..95a9ff8
--- /dev/null
+++ b/tests/unit/fixtures/ntp_global_running.json
@@ -0,0 +1,17 @@
+{
+ "allow-client": {
+ "address": {
+ "10.6.6.0/24": {}
+ }
+ },
+ "listen-address": {
+ "10.1.3.1": {}
+ },
+ "server": {
+ "time1.vyos.net": {},
+ "time2.vyos.net": {},
+ "203.0.113.0": {
+ "prefer": {}
+ }
+ }
+}
diff --git a/tests/unit/fixtures/prefix_lists_running.json b/tests/unit/fixtures/prefix_lists_running.json
new file mode 100644
index 0000000..2a6ecd3
--- /dev/null
+++ b/tests/unit/fixtures/prefix_lists_running.json
@@ -0,0 +1,44 @@
+{
+ "prefix-list": {
+ "AnsibleIPv4PrefixList": {
+ "description": "PL configured by ansible",
+ "rule": {
+ "2": {
+ "action": "permit",
+ "prefix": "92.168.10.0/26",
+ "le": "32",
+ "description": "Rule 2 given by ansible"
+ },
+ "3": {
+ "action": "deny",
+ "prefix": "72.168.2.0/24",
+ "ge": "26",
+ "description": "Rule 3"
+ }
+ }
+ }
+ },
+ "prefix-list6": {
+ "AllowIPv6Prefix": {
+ "description": "Configured by ansible for allowing IPv6 networks",
+ "rule": {
+ "5": {
+ "action": "permit",
+ "prefix": "2001:db8:8000::/35",
+ "le": "37",
+ "description": "Permit rule"
+ }
+ }
+ },
+ "DenyIPv6Prefix": {
+ "description": "Configured by ansible for disallowing IPv6 networks",
+ "rule": {
+ "8": {
+ "action": "deny",
+ "prefix": "2001:db8:2000::/35",
+ "le": "37"
+ }
+ }
+ }
+ }
+}
diff --git a/tests/unit/fixtures/route_maps_running.json b/tests/unit/fixtures/route_maps_running.json
new file mode 100644
index 0000000..acf733b
--- /dev/null
+++ b/tests/unit/fixtures/route_maps_running.json
@@ -0,0 +1,31 @@
+{
+ "route-map": {
+ "RM-TEST-EXPORT-POLICY": {
+ "rule": {
+ "10": {
+ "action": "permit",
+ "match": { "peer": "192.0.2.32" },
+ "set": {
+ "aggregator": { "as": "100" },
+ "as-path": { "exclude": "111" },
+ "metric": "5"
+ }
+ }
+ }
+ },
+ "rm1": {
+ "rule": {
+ "10": {
+ "action": "permit",
+ "match": { "peer": "192.0.2.32" },
+ "set": {
+ "aggregator": { "as": "100" },
+ "as-path": { "exclude": "111" },
+ "large-community": { "none": {} },
+ "metric": "5"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/tests/unit/fixtures/snmp_server_running.json b/tests/unit/fixtures/snmp_server_running.json
new file mode 100644
index 0000000..7acc59f
--- /dev/null
+++ b/tests/unit/fixtures/snmp_server_running.json
@@ -0,0 +1,35 @@
+{
+ "community": {
+ "switches": { "authorization": "rw" },
+ "bridges": {
+ "client": ["1.1.1.1", "12.1.1.10"]
+ }
+ },
+ "contact": "admin@example.com",
+ "listen-address": {
+ "20.1.1.1": {},
+ "100.1.2.1": { "port": "33" }
+ },
+ "v3": {
+ "engineid": "000000000000000000000002",
+ "group": {
+ "default": { "mode": "ro", "view": "default" }
+ },
+ "user": {
+ "admin_user": {
+ "auth": {
+ "encrypted-password": "abc123",
+ "type": "sha"
+ },
+ "privacy": {
+ "encrypted-password": "abc123",
+ "type": "aes"
+ },
+ "group": "default"
+ }
+ },
+ "view": {
+ "default": { "oid": { "1": {} } }
+ }
+ }
+}