Skip to content

Commit 0d68f41

Browse files
authored
Merge pull request #12 from justjais/metaclass_add
Fix validate deprecation and pep8 errors
2 parents 8a4087c + 8c3f64c commit 0d68f41

File tree

6 files changed

+14
-5
lines changed

6 files changed

+14
-5
lines changed

plugins/modules/_checkpoint_access_rule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
name:
4343
description:
4444
- Name of the access rule.
45+
required: true
4546
type: str
4647
layer:
4748
description:
4849
- Layer to attach the access rule to.
49-
required: true
5050
type: str
5151
position:
5252
description:

plugins/modules/_checkpoint_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def get_session(module, connection):
8989

9090
def main():
9191
argument_spec = dict(
92-
uid=dict(type="str", default=None),
92+
uid=dict(type="str", required=True),
9393
state=dict(
9494
type="str", default="published", choices=["published", "discarded"]
9595
),

plugins/modules/checkpoint_object_facts.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@
4040
description:
4141
- UID of the object. If UID is not provided, it will do a full search which can
4242
be filtered with the filter argument.
43+
type: str
4344
object_filter:
4445
description:
4546
- Filter expression for search. It accepts AND/OR logical operators and performs
4647
a textual and IP address search. To search only by IP address, set ip_only argument
4748
to True. which can be filtered with the filter argument.
49+
type: str
4850
ip_only:
4951
description:
5052
- Filter only by IP address.

plugins/modules/checkpoint_task_facts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def get_task(module, connection):
7575

7676

7777
def main():
78-
argument_spec = dict(task_id=dict(type="str"))
78+
argument_spec = dict(task_id=dict(type="str", required=True))
7979

8080
module = AnsibleModule(argument_spec=argument_spec)
8181
connection = Connection(module._socket_path)

tests/sanity/ignore-2.10.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
plugins/modules/_checkpoint_access_layer_facts.py validate-modules:deprecation-mismatch
2+
plugins/modules/_checkpoint_access_rule.py validate-modules:deprecation-mismatch
3+
plugins/modules/_checkpoint_access_rule_facts.py validate-modules:deprecation-mismatch
4+
plugins/modules/_checkpoint_host.py validate-modules:deprecation-mismatch
5+
plugins/modules/_checkpoint_host_facts.py validate-modules:deprecation-mismatch
6+
plugins/modules/_checkpoint_session.py validate-modules:deprecation-mismatch

tests/units/modules/test_checkpoint_access_rule.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
1717
#
1818

19-
from __future__ import absolute_import
19+
from __future__ import absolute_import, division, print_function
20+
21+
__metaclass__ = type
2022

2123
import pytest
2224
from units.modules.utils import set_module_args, exit_json, fail_json, AnsibleFailJson, AnsibleExitJson
@@ -103,4 +105,3 @@ def _run_module_with_fail_json(self, module_args):
103105
self.module.main()
104106
result = exc.value.args[0]
105107
return result
106-

0 commit comments

Comments
 (0)