summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_snmp_server
diff options
context:
space:
mode:
authorNilashish Chakraborty <nilashishchakraborty8@gmail.com>2024-06-25 14:54:01 +0530
committerGitHub <noreply@github.com>2024-06-25 14:54:01 +0530
commitb872b6f21d14ff10c221d84217eb568318e9ad8b (patch)
tree0aacdea877a7e2b209735cd0f7c0b9d62a9446f7 /tests/integration/targets/vyos_snmp_server
parent37baff3d4d547911bec1387218edfd477ca79062 (diff)
downloadvyos.vyos-b872b6f21d14ff10c221d84217eb568318e9ad8b.tar.gz
vyos.vyos-b872b6f21d14ff10c221d84217eb568318e9ad8b.zip
`vyos.vyos` is no longer deprecated! 🎉 (#348)
* Remove deprecation notice for vyos.vyos Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Add changelog Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * fix review comments Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * chore: auto fixes from pre-commit.com hooks --------- Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'tests/integration/targets/vyos_snmp_server')
-rw-r--r--tests/integration/targets/vyos_snmp_server/tests/cli/deleted.yaml4
-rw-r--r--tests/integration/targets/vyos_snmp_server/tests/cli/empty_config.yaml6
-rw-r--r--tests/integration/targets/vyos_snmp_server/tests/cli/gathered.yaml3
-rw-r--r--tests/integration/targets/vyos_snmp_server/tests/cli/merged.yaml29
-rw-r--r--tests/integration/targets/vyos_snmp_server/tests/cli/overridden.yaml33
-rw-r--r--tests/integration/targets/vyos_snmp_server/tests/cli/parsed.yaml4
-rw-r--r--tests/integration/targets/vyos_snmp_server/tests/cli/rendered.yaml25
-rw-r--r--tests/integration/targets/vyos_snmp_server/tests/cli/replaced.yaml33
-rw-r--r--tests/integration/targets/vyos_snmp_server/vars/main.yaml91
9 files changed, 105 insertions, 123 deletions
diff --git a/tests/integration/targets/vyos_snmp_server/tests/cli/deleted.yaml b/tests/integration/targets/vyos_snmp_server/tests/cli/deleted.yaml
index 8cd2c8a6..e6ac9b9f 100644
--- a/tests/integration/targets/vyos_snmp_server/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_snmp_server/tests/cli/deleted.yaml
@@ -24,9 +24,7 @@
that:
- result.after == {}
- - name:
- Delete the existing configuration with the provided running configuration
- (IDEMPOTENT)
+ - name: Delete the existing configuration with the provided running configuration (IDEMPOTENT)
register: result
vyos.vyos.vyos_snmp_server: *id001
diff --git a/tests/integration/targets/vyos_snmp_server/tests/cli/empty_config.yaml b/tests/integration/targets/vyos_snmp_server/tests/cli/empty_config.yaml
index 558b53f0..e213efde 100644
--- a/tests/integration/targets/vyos_snmp_server/tests/cli/empty_config.yaml
+++ b/tests/integration/targets/vyos_snmp_server/tests/cli/empty_config.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_snmp_server empty_config integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_snmp_server empty_config integration tests on connection={{ ansible_connection }}
- name: Merged with empty config should give appropriate error message
register: result
@@ -45,8 +44,7 @@
- assert:
that:
- - result.msg == 'value of running_config parameter must not be empty for state
- parsed'
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
- name: Rendered with empty config should give appropriate error message
register: result
diff --git a/tests/integration/targets/vyos_snmp_server/tests/cli/gathered.yaml b/tests/integration/targets/vyos_snmp_server/tests/cli/gathered.yaml
index 7cdf3c42..60bddee4 100644
--- a/tests/integration/targets/vyos_snmp_server/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_snmp_server/tests/cli/gathered.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_snmp_server gathered integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_snmp_server gathered integration tests on connection={{ ansible_connection }}
- include_tasks: _remove_config.yaml
diff --git a/tests/integration/targets/vyos_snmp_server/tests/cli/merged.yaml b/tests/integration/targets/vyos_snmp_server/tests/cli/merged.yaml
index 06627b0a..7f8139d0 100644
--- a/tests/integration/targets/vyos_snmp_server/tests/cli/merged.yaml
+++ b/tests/integration/targets/vyos_snmp_server/tests/cli/merged.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_snmp_server merged integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_snmp_server merged integration tests on connection={{ ansible_connection }}
- include_tasks: _remove_config.yaml
@@ -11,24 +10,24 @@
vyos.vyos.vyos_snmp_server: &id001
config:
communities:
- - name: "switches"
- authorization_type: "rw"
- - name: "bridges"
- clients: ["1.1.1.1", "12.1.1.10"]
- contact: "admin2@ex.com"
+ - name: switches
+ authorization_type: rw
+ - name: bridges
+ clients: [1.1.1.1, 12.1.1.10]
+ contact: admin2@ex.com
listen_addresses:
- - address: "20.1.1.1"
- - address: "100.1.2.1"
+ - address: 20.1.1.1
+ - address: 100.1.2.1
port: 33
snmp_v3:
users:
- user: adminuser
authentication:
- plaintext_key: "abc1234567"
- type: "sha"
+ plaintext_key: abc1234567
+ type: sha
privacy:
- plaintext_key: "abc1234567"
- type: "aes"
+ plaintext_key: abc1234567
+ type: aes
state: merged
- vyos.vyos.vyos_facts:
@@ -47,9 +46,7 @@
that:
- result.before == {}
- - name:
- Merge the provided configuration with the existing running configuration
- (IDEMPOTENT)
+ - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
register: result
vyos.vyos.vyos_snmp_server: *id001
diff --git a/tests/integration/targets/vyos_snmp_server/tests/cli/overridden.yaml b/tests/integration/targets/vyos_snmp_server/tests/cli/overridden.yaml
index b1d65652..2dc6edae 100644
--- a/tests/integration/targets/vyos_snmp_server/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_snmp_server/tests/cli/overridden.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_snmp_server overridden integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_snmp_server overridden integration tests on connection={{ ansible_connection }}
- include_tasks: _remove_config.yaml
@@ -13,31 +12,31 @@
vyos.vyos.vyos_snmp_server: &id001
config:
communities:
- - name: "bridges"
- networks: ["1.1.1.0/24", "12.1.1.0/24"]
- location: "RDU"
+ - name: bridges
+ networks: [1.1.1.0/24, 12.1.1.0/24]
+ location: RDU
listen_addresses:
- - address: "100.1.2.1"
+ - address: 100.1.2.1
port: 33
snmp_v3:
users:
- user: adminuser
engine_id: "33"
authentication:
- plaintext_key: "abc1234567"
- type: "sha"
+ plaintext_key: abc1234567
+ type: sha
privacy:
- plaintext_key: "abc1234567"
- type: "aes"
+ plaintext_key: abc1234567
+ type: aes
- user: guestuser2
authentication:
- plaintext_key: "opq1234567"
- type: "sha"
+ plaintext_key: opq1234567
+ type: sha
privacy:
- plaintext_key: "opq1234567"
- type: "aes"
+ plaintext_key: opq1234567
+ type: aes
views:
- - view: "default"
+ - view: default
oid: 1
state: overridden
@@ -50,9 +49,7 @@
- result.after == ansible_facts['network_resources']['snmp_server']
- result.commands|length == 13
- - name:
- Override the existing configuration with the provided running configuration
- (IDEMPOTENT)
+ - name: Override the existing configuration with the provided running configuration (IDEMPOTENT)
register: result
vyos.vyos.vyos_snmp_server: *id001
diff --git a/tests/integration/targets/vyos_snmp_server/tests/cli/parsed.yaml b/tests/integration/targets/vyos_snmp_server/tests/cli/parsed.yaml
index 4ecc1ac5..bd1b1c30 100644
--- a/tests/integration/targets/vyos_snmp_server/tests/cli/parsed.yaml
+++ b/tests/integration/targets/vyos_snmp_server/tests/cli/parsed.yaml
@@ -1,8 +1,6 @@
---
- debug:
- msg:
- START vyos_snmp_server parsed integration tests on connection={{ ansible_connection
- }}
+ msg: START vyos_snmp_server parsed integration tests on connection={{ ansible_connection }}
- name: Provide the running configuration for parsing (config to be parsed)
register: result
diff --git a/tests/integration/targets/vyos_snmp_server/tests/cli/rendered.yaml b/tests/integration/targets/vyos_snmp_server/tests/cli/rendered.yaml
index e2388276..f3d92546 100644
--- a/tests/integration/targets/vyos_snmp_server/tests/cli/rendered.yaml
+++ b/tests/integration/targets/vyos_snmp_server/tests/cli/rendered.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_snmp_server rendered integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_snmp_server rendered integration tests on connection={{ ansible_connection }}
- include_tasks: _remove_config.yaml
@@ -11,24 +10,24 @@
vyos.vyos.vyos_snmp_server:
config:
communities:
- - name: "switches"
- authorization_type: "rw"
- - name: "bridges"
- clients: ["1.1.1.1", "12.1.1.10"]
- contact: "admin2@ex.com"
+ - name: switches
+ authorization_type: rw
+ - name: bridges
+ clients: [1.1.1.1, 12.1.1.10]
+ contact: admin2@ex.com
listen_addresses:
- - address: "20.1.1.1"
- - address: "100.1.2.1"
+ - address: 20.1.1.1
+ - address: 100.1.2.1
port: 33
snmp_v3:
users:
- user: adminuser
authentication:
- plaintext_key: "abc1234567"
- type: "sha"
+ plaintext_key: abc1234567
+ type: sha
privacy:
- plaintext_key: "abc1234567"
- type: "aes"
+ plaintext_key: abc1234567
+ type: aes
state: rendered
- assert:
diff --git a/tests/integration/targets/vyos_snmp_server/tests/cli/replaced.yaml b/tests/integration/targets/vyos_snmp_server/tests/cli/replaced.yaml
index 2bfcaf6b..3b759922 100644
--- a/tests/integration/targets/vyos_snmp_server/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_snmp_server/tests/cli/replaced.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_snmp_server replaced integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_snmp_server replaced integration tests on connection={{ ansible_connection }}
- include_tasks: _remove_config.yaml
@@ -13,31 +12,31 @@
vyos.vyos.vyos_snmp_server: &id001
config:
communities:
- - name: "bridges"
- networks: ["1.1.1.0/24", "12.1.1.0/24"]
- location: "RDU"
+ - name: bridges
+ networks: [1.1.1.0/24, 12.1.1.0/24]
+ location: RDU
listen_addresses:
- - address: "100.1.2.1"
+ - address: 100.1.2.1
port: 33
snmp_v3:
users:
- user: adminuser
engine_id: "33"
authentication:
- plaintext_key: "abc1234567"
- type: "sha"
+ plaintext_key: abc1234567
+ type: sha
privacy:
- plaintext_key: "abc1234567"
- type: "aes"
+ plaintext_key: abc1234567
+ type: aes
- user: guestuser2
authentication:
- plaintext_key: "opq1234567"
- type: "sha"
+ plaintext_key: opq1234567
+ type: sha
privacy:
- plaintext_key: "opq1234567"
- type: "aes"
+ plaintext_key: opq1234567
+ type: aes
views:
- - view: "default"
+ - view: default
oid: 1
state: replaced
@@ -50,9 +49,7 @@
- result.after == ansible_facts['network_resources']['snmp_server']
- result.commands|length == 13
- - name:
- Replace the existing configuration with the provided running configuration
- (IDEMPOTENT)
+ - name: Replace the existing configuration with the provided running configuration (IDEMPOTENT)
register: result
vyos.vyos.vyos_snmp_server: *id001
diff --git a/tests/integration/targets/vyos_snmp_server/vars/main.yaml b/tests/integration/targets/vyos_snmp_server/vars/main.yaml
index 060421b4..3034390f 100644
--- a/tests/integration/targets/vyos_snmp_server/vars/main.yaml
+++ b/tests/integration/targets/vyos_snmp_server/vars/main.yaml
@@ -17,23 +17,23 @@ merged:
- clients:
- 1.1.1.1
- 12.1.1.10
- name: "bridges"
- - authorization_type: "rw"
- name: "switches"
- contact: "admin2@ex.com"
+ name: bridges
+ - authorization_type: rw
+ name: switches
+ contact: admin2@ex.com
listen_addresses:
- - address: "100.1.2.1"
+ - address: 100.1.2.1
port: 33
- - address: "20.1.1.1"
+ - address: 20.1.1.1
snmp_v3:
users:
- authentication:
- plaintext_key: "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
- type: "sha"
+ plaintext_key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
+ type: sha
privacy:
- plaintext_key: "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
- type: "aes"
- user: "adminuser"
+ plaintext_key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
+ type: aes
+ user: adminuser
overridden:
commands:
@@ -53,74 +53,73 @@ overridden:
after:
communities:
- - name: "bridges"
+ - name: bridges
networks:
- - "1.1.1.0/24"
- - "12.1.1.0/24"
- - name: "switches"
+ - 1.1.1.0/24
+ - 12.1.1.0/24
+ - name: switches
listen_addresses:
- - address: "100.1.2.1"
+ - address: 100.1.2.1
port: 33
- location: "RDU, NC"
+ location: RDU, NC
snmp_v3:
users:
- authentication:
- plaintext_key: "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
- type: "sha"
+ plaintext_key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
+ type: sha
privacy:
- plaintext_key: "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
- type: "aes"
- user: "adminuser"
+ plaintext_key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
+ type: aes
+ user: adminuser
- authentication:
- plaintext_key: "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
- type: "sha"
+ plaintext_key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
+ type: sha
privacy:
- plaintext_key: "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
- type: "aes"
- user: "guestuser2"
+ plaintext_key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
+ type: aes
+ user: guestuser2
views:
- oid: 1
- view: "default"
+ view: default
deleted:
commands:
- delete service snmp
after: {}
-
parsed:
after:
communities:
- - authorization_type: "ro"
+ - authorization_type: ro
clients:
- 203.0.113.10
- 203.0.113.20
- name: "routers"
+ name: routers
networks:
- 192.0.2.0/24
- 2001::/64
- contact: "admin@example.com"
+ contact: admin@example.com
listen_addresses:
- - address: "172.16.254.36"
+ - address: 172.16.254.36
port: 161
- - address: "2001::1"
- location: "UK, London"
+ - address: 2001::1
+ location: UK, London
snmp_v3:
engine_id: "000000000000000000000002"
groups:
- - group: "default"
- mode: "ro"
- view: "default"
+ - group: default
+ mode: ro
+ view: default
users:
- authentication:
- plaintext_key: "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
- type: "sha"
- group: "default"
+ plaintext_key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
+ type: sha
+ group: default
privacy:
- plaintext_key: "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
- type: "aes"
- user: "vyos"
+ plaintext_key: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
+ type: aes
+ user: vyos
views:
- oid: "1"
- view: "default"
+ view: default
trap_target:
- address: "203.0.113.10"
+ address: 203.0.113.10