summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGomathiselviS <gomathiselvi@gmail.com>2022-03-09 20:20:40 -0500
committerGitHub <noreply@github.com>2022-03-10 01:20:40 +0000
commit87c5dcb6a147738d2b1ea60993018822a5baf21e (patch)
treedb52c89beb42a4eb3242d059c79dbf3dcc6c3140
parent8208b02f6f5d5956ccd8d28fdf925cf580011712 (diff)
downloadvyos.vyos-87c5dcb6a147738d2b1ea60993018822a5baf21e.tar.gz
vyos.vyos-87c5dcb6a147738d2b1ea60993018822a5baf21e.zip
Change preconfig hostname in integration test (#243)
Change preconfig hostname in integration test SUMMARY ISSUE TYPE Bugfix Pull Request Docs Pull Request Feature Pull Request New Module Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: None <None>
-rw-r--r--changelogs/fragments/change_host_name.yml3
-rw-r--r--docs/vyos.vyos.vyos_cliconf.rst2
-rw-r--r--plugins/cliconf/vyos.py5
-rw-r--r--tests/integration/targets/vyos_hostname/tests/cli/_populate_config.yaml2
-rw-r--r--tests/integration/targets/vyos_hostname/tests/cli/_remove_config.yaml8
-rw-r--r--tests/integration/targets/vyos_hostname/vars/main.yaml2
6 files changed, 12 insertions, 10 deletions
diff --git a/changelogs/fragments/change_host_name.yml b/changelogs/fragments/change_host_name.yml
new file mode 100644
index 0000000..3c73965
--- /dev/null
+++ b/changelogs/fragments/change_host_name.yml
@@ -0,0 +1,3 @@
+---
+minor_changes:
+ - Change preconfig hostname from vyos to vyosuser
diff --git a/docs/vyos.vyos.vyos_cliconf.rst b/docs/vyos.vyos.vyos_cliconf.rst
index 508a661..9ad60af 100644
--- a/docs/vyos.vyos.vyos_cliconf.rst
+++ b/docs/vyos.vyos.vyos_cliconf.rst
@@ -72,7 +72,7 @@ Status
Authors
~~~~~~~
-- Ansible Networking Team
+- Ansible Networking Team (@ansible-network)
.. hint::
diff --git a/plugins/cliconf/vyos.py b/plugins/cliconf/vyos.py
index 339aed9..b100ce0 100644
--- a/plugins/cliconf/vyos.py
+++ b/plugins/cliconf/vyos.py
@@ -1,4 +1,3 @@
-#
# (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
@@ -21,8 +20,8 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = """
-author: Ansible Networking Team
-cliconf: vyos
+author: Ansible Networking Team (@ansible-network)
+name: vyos
short_description: Use vyos cliconf to run command on VyOS platform
description:
- This vyos plugin provides low level abstraction apis for sending and receiving CLI
diff --git a/tests/integration/targets/vyos_hostname/tests/cli/_populate_config.yaml b/tests/integration/targets/vyos_hostname/tests/cli/_populate_config.yaml
index 4d33289..b8cb5f4 100644
--- a/tests/integration/targets/vyos_hostname/tests/cli/_populate_config.yaml
+++ b/tests/integration/targets/vyos_hostname/tests/cli/_populate_config.yaml
@@ -2,7 +2,7 @@
- name: setup
vyos.vyos.vyos_config:
lines:
- - set system host-name 'vyos'
+ - set system host-name 'vyosuser'
ignore_errors: true
vars:
ansible_connection: ansible.netcommon.network_cli
diff --git a/tests/integration/targets/vyos_hostname/tests/cli/_remove_config.yaml b/tests/integration/targets/vyos_hostname/tests/cli/_remove_config.yaml
index 229c79c..9850e2f 100644
--- a/tests/integration/targets/vyos_hostname/tests/cli/_remove_config.yaml
+++ b/tests/integration/targets/vyos_hostname/tests/cli/_remove_config.yaml
@@ -1,8 +1,8 @@
---
-- name: Remove pre-existing hostname config
- vyos.vyos.vyos_hostname:
- config:
- state: deleted
+- name: Delete Hostname vyosuser
+ vyos.vyos.vyos_config:
+ lines:
+ - delete system host-name 'vyosuser'
ignore_errors: true
vars:
ansible_connection: ansible.netcommon.network_cli
diff --git a/tests/integration/targets/vyos_hostname/vars/main.yaml b/tests/integration/targets/vyos_hostname/vars/main.yaml
index a6b4986..615da43 100644
--- a/tests/integration/targets/vyos_hostname/vars/main.yaml
+++ b/tests/integration/targets/vyos_hostname/vars/main.yaml
@@ -8,5 +8,5 @@ merged:
deleted:
commands:
- - delete system host-name vyos
+ - delete system host-name vyosuser
after: {}