Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR to introduce cp_network and cp_publish as modules #57621

Merged
merged 27 commits into from Jun 11, 2019
Merged

PR to introduce cp_network and cp_publish as modules #57621

merged 27 commits into from Jun 11, 2019

Conversation

chkp-orso
Copy link
Contributor

@chkp-orso chkp-orso commented Jun 10, 2019

SUMMARY

PR to introduce cp_network and cp_publish, checkpoint modules

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

checkpoint

ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Jun 10, 2019

@ansibot
Copy link
Contributor

ansibot commented Jun 10, 2019

@chkp-orso this PR contains more than one new module.

Please submit only one new module per pull request. For a detailed explanation, please read the grouped modules documentation

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Jun 10, 2019

@chkp-orso, just so you are aware we have a dedicated Working Group for network.
You can find other people interested in this in #ansible-network on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jun 10, 2019
@ansibot ansibot added needs_triage Needs a first human triage before being processed. networking Network category new_contributor This PR is the first contribution by a new community member. new_module This PR includes a new module. new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community. support:network This issue/PR relates to code supported by the Ansible Network Team. labels Jun 10, 2019
@justjais justjais changed the title cp_network and cp_publish as examples modules PR to introduce cp_network and cp_publish as modules Jun 10, 2019

- name: delete-network
cp_network:
name : New Network 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chkp-orso please include state params, in the example. I need to verify with state: present the module will call add-network, but how can user call set-network.

state : absent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justjais ohh yeah u r right, I will add it.
and as for recognition of add-network or set-network that's all the logic we implemented in the modules_utils (checkpoint)

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Jun 10, 2019
@ansibot
Copy link
Contributor

ansibot commented Jun 10, 2019

The test ansible-test sanity --test ansible-doc --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.8 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test docs-build [explain] failed with the error:

Command "/usr/bin/python3.6 test/sanity/code-smell/docs-build.py" returned exit status 1.
>>> Standard Error
Command 'make singlehtmldocs' failed with status code: 2
--> Standard Output
PYTHONPATH=../../lib ../bin/dump_config.py --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ -d ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../bin/generate_man.py --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
PYTHONPATH=../../lib ../bin/dump_keywords.py --template-dir=../templates --output-dir=rst/reference_appendices/ -d ./keyword_desc.yml
PYTHONPATH=../../lib ../bin/plugin_formatter.py -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/modules/ 
Evaluating module files...
Makefile:93: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../bin/plugin_formatter.py", line 813, in <module>
    main()
  File "../bin/plugin_formatter.py", line 768, in main
    plugin_info, categories = get_plugin_info(options.module_dir, limit_to=options.limit_to, verbose=(options.verbosity > 0))
  File "../bin/plugin_formatter.py", line 298, in get_plugin_info
    doc, examples, returndocs, metadata = plugin_docs.get_docstring(module_path, fragment_loader, verbose=verbose)
  File "/root/ansible/lib/ansible/utils/plugin_docs.py", line 111, in get_docstring
    data = read_docstring(filename, verbose=verbose, ignore_errors=ignore_errors)
  File "/root/ansible/lib/ansible/parsing/plugin_docs.py", line 59, in read_docstring
    data[varkey] = AnsibleLoader(child.value.s, file_name=filename).get_single_data()
  File "/usr/local/lib/python3.6/dist-packages/yaml/constructor.py", line 41, in get_single_data
    node = self.get_single_node()
  File "ext/_yaml.pyx", line 707, in _yaml.CParser.get_single_node
  File "ext/_yaml.pyx", line 725, in _yaml.CParser._compose_document
  File "ext/_yaml.pyx", line 776, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 890, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 776, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 890, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 776, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 890, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 774, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 853, in _yaml.CParser._compose_sequence_node
  File "ext/_yaml.pyx", line 905, in _yaml.CParser._parse_next_event
yaml.scanner.ScannerError: while scanning a simple key
  in "<unicode string>", line 30, column 1
could not find expected ':'
  in "<unicode string>", line 31, column 9
make: *** [modules] Error 1

The test ansible-test sanity --test pep8 [explain] failed with 4 errors:

lib/ansible/modules/network/checkpoint/cp_network.py:112:120: W291 trailing whitespace
lib/ansible/modules/network/checkpoint/cp_network.py:179:1: E128 continuation line under-indented for visual indent
lib/ansible/modules/network/checkpoint/cp_network.py:180:1: E128 continuation line under-indented for visual indent
lib/ansible/modules/network/checkpoint/cp_network.py:181:1: E128 continuation line under-indented for visual indent

The test ansible-test sanity --test validate-modules [explain] failed with 6 errors:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: E324 Argument 'wait_for_task' in argument_spec defines default as (True) but documentation defines default as (False)
lib/ansible/modules/network/checkpoint/cp_network.py:0:0: E326 Argument 'broadcast' in argument_spec defines choices as (['disallow', 'allow']) but documentation defines choices as ([])
lib/ansible/modules/network/checkpoint/cp_network.py:0:0: E326 Argument 'color' in argument_spec defines choices as (['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green', 'khaki', 'orchid', 'dark orange', 'dark sea green', 'pink', 'turquoise', 'dark blue', 'firebrick', 'brown', 'forest green', 'gold', 'dark gold', 'gray', 'dark gray', 'light green', 'lemon chiffon', 'coral', 'sea green', 'sky blue', 'magenta', 'purple', 'slate blue', 'violet red', 'navy blue', 'olive', 'orange', 'red', 'sienna', 'yellow']) but documentation defines choices as ([])
lib/ansible/modules/network/checkpoint/cp_network.py:0:0: E326 Argument 'details_level' in argument_spec defines choices as (['uid', 'standard', 'full']) but documentation defines choices as ([])
lib/ansible/modules/network/checkpoint/cp_network.py:0:0: E326 Argument 'state' in argument_spec defines choices as (['present', 'absent']) but documentation defines choices as ([])
lib/ansible/modules/network/checkpoint/cp_network.py:58:9: E302 DOCUMENTATION is not valid YAML

The test ansible-test sanity --test yamllint [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:58:9: error DOCUMENTATION: syntax error: could not find expected ':'

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Jun 10, 2019

The test ansible-test sanity --test ansible-doc --python 2.6 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 2.7 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.5 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.7 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.6 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test ansible-doc --python 3.8 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: has a documentation error formatting or is missing documentation.

The test ansible-test sanity --test docs-build [explain] failed with the error:

Command "/usr/bin/python3.6 test/sanity/code-smell/docs-build.py" returned exit status 1.
>>> Standard Error
Command 'make singlehtmldocs' failed with status code: 2
--> Standard Output
PYTHONPATH=../../lib ../bin/dump_config.py --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ -d ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../bin/generate_man.py --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
PYTHONPATH=../../lib ../bin/dump_keywords.py --template-dir=../templates --output-dir=rst/reference_appendices/ -d ./keyword_desc.yml
PYTHONPATH=../../lib ../bin/plugin_formatter.py -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/modules/ 
Evaluating module files...
Makefile:93: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../bin/plugin_formatter.py", line 813, in <module>
    main()
  File "../bin/plugin_formatter.py", line 768, in main
    plugin_info, categories = get_plugin_info(options.module_dir, limit_to=options.limit_to, verbose=(options.verbosity > 0))
  File "../bin/plugin_formatter.py", line 298, in get_plugin_info
    doc, examples, returndocs, metadata = plugin_docs.get_docstring(module_path, fragment_loader, verbose=verbose)
  File "/root/ansible/lib/ansible/utils/plugin_docs.py", line 111, in get_docstring
    data = read_docstring(filename, verbose=verbose, ignore_errors=ignore_errors)
  File "/root/ansible/lib/ansible/parsing/plugin_docs.py", line 59, in read_docstring
    data[varkey] = AnsibleLoader(child.value.s, file_name=filename).get_single_data()
  File "/usr/local/lib/python3.6/dist-packages/yaml/constructor.py", line 41, in get_single_data
    node = self.get_single_node()
  File "ext/_yaml.pyx", line 707, in _yaml.CParser.get_single_node
  File "ext/_yaml.pyx", line 725, in _yaml.CParser._compose_document
  File "ext/_yaml.pyx", line 776, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 892, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 905, in _yaml.CParser._parse_next_event
yaml.parser.ParserError: while parsing a block mapping
  in "<unicode string>", line 3, column 1
did not find expected key
  in "<unicode string>", line 87, column 1
make: *** [modules] Error 1

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:113:120: W291 trailing whitespace

The test ansible-test sanity --test validate-modules [explain] failed with 6 errors:

lib/ansible/modules/network/checkpoint/cp_network.py:0:0: E324 Argument 'wait_for_task' in argument_spec defines default as (True) but documentation defines default as (False)
lib/ansible/modules/network/checkpoint/cp_network.py:0:0: E326 Argument 'broadcast' in argument_spec defines choices as (['disallow', 'allow']) but documentation defines choices as ([])
lib/ansible/modules/network/checkpoint/cp_network.py:0:0: E326 Argument 'color' in argument_spec defines choices as (['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green', 'khaki', 'orchid', 'dark orange', 'dark sea green', 'pink', 'turquoise', 'dark blue', 'firebrick', 'brown', 'forest green', 'gold', 'dark gold', 'gray', 'dark gray', 'light green', 'lemon chiffon', 'coral', 'sea green', 'sky blue', 'magenta', 'purple', 'slate blue', 'violet red', 'navy blue', 'olive', 'orange', 'red', 'sienna', 'yellow']) but documentation defines choices as ([])
lib/ansible/modules/network/checkpoint/cp_network.py:0:0: E326 Argument 'details_level' in argument_spec defines choices as (['uid', 'standard', 'full']) but documentation defines choices as ([])
lib/ansible/modules/network/checkpoint/cp_network.py:0:0: E326 Argument 'state' in argument_spec defines choices as (['present', 'absent']) but documentation defines choices as ([])
lib/ansible/modules/network/checkpoint/cp_network.py:114:1: E302 DOCUMENTATION is not valid YAML

The test ansible-test sanity --test yamllint [explain] failed with 1 error:

lib/ansible/modules/network/checkpoint/cp_network.py:114:1: error DOCUMENTATION: syntax error: expected <block end>, but found '-'

click here for bot help

@justjais justjais merged commit bab1a3c into ansible:devel Jun 11, 2019
agowa pushed a commit to agowa/ansible-1 that referenced this pull request Jun 30, 2019
* network and install policy modules for example

network and install policy modules for example

* revert the changes in version

revert the changes in version

* documentation_fragment

documentation_fragment

* Checking the status code of the set request

* delete some of Rikis' files

* retrieve Rikis' files and call equals API method

* adding blanck line between functions

* implement host, address-range and group

* mostly sintax fixes

* try again with the old host and access rule

* small changes

* adding service udp and publish

* publish command

* little fix

* choises for state parameter

* support wait_for_task and API version

* imports

* refactor of function's name

* network module

* rename modules and return value from modules

* PR before examples to: tests, lookup, check_mode

* small fixes

* fixes for code review

* small fixes

* state parameter in examples and many /n

* white spaces

* 4 tries for how choices should be, and turn true to True
@ansible ansible locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. networking Network category new_contributor This PR is the first contribution by a new community member. new_module This PR includes a new module. new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community. support:network This issue/PR relates to code supported by the Ansible Network Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants