summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Moser <mail@renemoser.net>2018-09-26 09:03:16 +0200
committerGitHub <noreply@github.com>2018-09-26 09:03:16 +0200
commit7f92a8c94c7242ed4e0821796db25ea553edfe8e (patch)
treee3aa1d90d5decb03dae7f1090b67aa3944e6a5f3
parentc09b785a663f3bc6bd481d67b48e3a95a945f9aa (diff)
downloadansible-7f92a8c94c7242ed4e0821796db25ea553edfe8e.tar.gz
cs_staticnat: fix sanity (#46037)
-rw-r--r--lib/ansible/modules/cloud/cloudstack/cs_staticnat.py38
-rw-r--r--test/sanity/validate-modules/ignore.txt1
2 files changed, 11 insertions, 28 deletions
diff --git a/lib/ansible/modules/cloud/cloudstack/cs_staticnat.py b/lib/ansible/modules/cloud/cloudstack/cs_staticnat.py
index b7911b6189..59a93d11a8 100644
--- a/lib/ansible/modules/cloud/cloudstack/cs_staticnat.py
+++ b/lib/ansible/modules/cloud/cloudstack/cs_staticnat.py
@@ -1,22 +1,8 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
-# (c) 2015, René Moser <mail@renemoser.net>
-#
-# This file is part of Ansible
-#
-# Ansible is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Ansible is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
+# Copyright (c) 2015, René Moser <mail@renemoser.net>
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'],
@@ -29,7 +15,7 @@ module: cs_staticnat
short_description: Manages static NATs on Apache CloudStack based clouds.
description:
- Create, update and remove static NATs.
-version_added: '2.0'
+version_added: "2.0"
author: "René Moser (@resmo)"
options:
ip_address:
@@ -39,12 +25,10 @@ options:
vm:
description:
- Name of virtual machine which we make the static NAT for.
- - Required if C(state=present).
+ - Required if I(state=present).
vm_guest_ip:
description:
- VM guest NIC secondary IP address for the static NAT.
- type: bool
- default: 'no'
network:
description:
- Network the IP address is related to.
@@ -56,8 +40,8 @@ options:
state:
description:
- State of the static NAT.
- default: 'present'
- choices: [ 'present', 'absent' ]
+ default: present
+ choices: [ present, absent ]
domain:
description:
- Domain the static NAT is related to.
@@ -75,19 +59,19 @@ options:
description:
- Poll async jobs until job has finished.
type: bool
- default: 'yes'
+ default: yes
extends_documentation_fragment: cloudstack
'''
EXAMPLES = '''
-# create a static NAT: 1.2.3.4 -> web01
-- local_action:
+- name: Create a static NAT for IP 1.2.3.4 to web01
+ local_action:
module: cs_staticnat
ip_address: 1.2.3.4
vm: web01
-# remove a static NAT
-- local_action:
+- name: Remove a static NAT
+ local_action:
module: cs_staticnat
ip_address: 1.2.3.4
state: absent
diff --git a/test/sanity/validate-modules/ignore.txt b/test/sanity/validate-modules/ignore.txt
index 4e38db5d2f..0ea99c0984 100644
--- a/test/sanity/validate-modules/ignore.txt
+++ b/test/sanity/validate-modules/ignore.txt
@@ -167,7 +167,6 @@ lib/ansible/modules/cloud/cloudstack/cs_service_offering.py E322
lib/ansible/modules/cloud/cloudstack/cs_service_offering.py E323
lib/ansible/modules/cloud/cloudstack/cs_service_offering.py E325
lib/ansible/modules/cloud/cloudstack/cs_service_offering.py E326
-lib/ansible/modules/cloud/cloudstack/cs_staticnat.py E324
lib/ansible/modules/cloud/cloudstack/cs_storage_pool.py E322
lib/ansible/modules/cloud/cloudstack/cs_storage_pool.py E325
lib/ansible/modules/cloud/cloudstack/cs_storage_pool.py E326