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

Resource module for ios_vlans #59640

Merged
merged 10 commits into from Aug 19, 2019

Conversation

@justjais
Copy link
Contributor

commented Jul 26, 2019

SUMMARY

Resource module for ios_vlans, with supported operations and respective integration tests.
(ref model: Vlan Model)

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

ios_vlans

ADDITIONAL INFORMATION

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 26, 2019

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

Command "ansible-doc -t module ios_facts ios_vlan ios_vlans" returned exit status 1.
>>> Standard Error
ERROR! module ios_vlans missing documentation (or could not parse documentation): mapping values are not allowed in this context
  in "<unicode string>", line 3, column 16

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

Command "/usr/bin/python3.6 /root/ansible/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 ../../hacking/build-ansible.py collection-meta --template-file=../templates/collections_galaxy_meta.rst.j2 --output-dir=rst/dev_guide/ ../../lib/ansible/galaxy/data/collections_galaxy_meta.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-config --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../../hacking/build-ansible.py generate-man --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-keywords --template-dir=../templates --output-dir=rst/reference_appendices/ ./keyword_desc.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-plugins -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/modules/ 
Evaluating module files...
Makefile:98: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../../hacking/build-ansible.py", line 88, in <module>
    main()
  File "../../hacking/build-ansible.py", line 79, in main
    retval = command.main(args)
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 698, in main
    plugin_info, categories = get_plugin_info(args.module_dir, limit_to=args.limit_to, verbose=(args.verbosity > 0))
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 225, 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.scanner.ScannerError: mapping values are not allowed in this context
  in "<unicode string>", line 3, column 16
make: *** [modules] Error 1

click here for bot help

@ansibot

This comment has been minimized.

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 26, 2019

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

Command "ansible-doc -t module ios_facts ios_vlan ios_vlans" returned exit status 1.
>>> Standard Error
ERROR! module ios_vlans missing documentation (or could not parse documentation): mapping values are not allowed in this context
  in "<unicode string>", line 3, column 16

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

Command "/usr/bin/python3.6 /root/ansible/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 ../../hacking/build-ansible.py collection-meta --template-file=../templates/collections_galaxy_meta.rst.j2 --output-dir=rst/dev_guide/ ../../lib/ansible/galaxy/data/collections_galaxy_meta.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-config --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../../hacking/build-ansible.py generate-man --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-keywords --template-dir=../templates --output-dir=rst/reference_appendices/ ./keyword_desc.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-plugins -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/modules/ 
Evaluating module files...
Makefile:98: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../../hacking/build-ansible.py", line 88, in <module>
    main()
  File "../../hacking/build-ansible.py", line 79, in main
    retval = command.main(args)
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 698, in main
    plugin_info, categories = get_plugin_info(args.module_dir, limit_to=args.limit_to, verbose=(args.verbosity > 0))
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 225, 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.scanner.ScannerError: mapping values are not allowed in this context
  in "<unicode string>", line 3, column 16
make: *** [modules] Error 1

click here for bot help

@ansibot

This comment has been minimized.

@ansible-zuul

This comment has been minimized.

Copy link

commented Jul 26, 2019

Build failed (third-party-check pipeline) integration testing with
Ansible.

@justjais justjais added this to Module in Review in Ansible 2.9 Networking Feature Dev Jul 29, 2019

@ansible-zuul

This comment has been minimized.

Copy link

commented Jul 29, 2019

Build failed (third-party-check pipeline) integration testing with
Ansible.

@pabelanger pabelanger self-assigned this Jul 31, 2019

@pabelanger

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

note for me, we need a new image in zuul.a.c to properly test this.

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 16, 2019

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

Command "ansible-doc -t module ios_facts ios_interfaces ios_vlan ios_vlans" returned exit status 1.
>>> Standard Error
ERROR! module ios_facts missing documentation (or could not parse documentation): while scanning a simple key
  in "<unicode string>", line 35, column 1
could not find expected ':'
  in "<unicode string>", line 36, column 12

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

Command "/usr/bin/python3.6 /root/ansible/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 ../../hacking/build-ansible.py collection-meta --template-file=../templates/collections_galaxy_meta.rst.j2 --output-dir=rst/dev_guide/ ../../lib/ansible/galaxy/data/collections_galaxy_meta.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-config --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../../hacking/build-ansible.py generate-man --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-keywords --template-dir=../templates --output-dir=rst/reference_appendices/ ./keyword_desc.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-plugins -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/modules/ 
Evaluating module files...
Makefile:98: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../../hacking/build-ansible.py", line 88, in <module>
    main()
  File "../../hacking/build-ansible.py", line 79, in main
    retval = command.main(args)
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 711, in main
    plugin_info, categories = get_plugin_info(args.module_dir, limit_to=args.limit_to, verbose=(args.verbosity > 0))
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 225, 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 35, column 1
could not find expected ':'
  in "<unicode string>", line 36, column 12
make: *** [modules] Error 1

click here for bot help

1 similar comment
@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 16, 2019

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

Command "ansible-doc -t module ios_facts ios_interfaces ios_vlan ios_vlans" returned exit status 1.
>>> Standard Error
ERROR! module ios_facts missing documentation (or could not parse documentation): while scanning a simple key
  in "<unicode string>", line 35, column 1
could not find expected ':'
  in "<unicode string>", line 36, column 12

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

Command "/usr/bin/python3.6 /root/ansible/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 ../../hacking/build-ansible.py collection-meta --template-file=../templates/collections_galaxy_meta.rst.j2 --output-dir=rst/dev_guide/ ../../lib/ansible/galaxy/data/collections_galaxy_meta.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-config --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../../hacking/build-ansible.py generate-man --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-keywords --template-dir=../templates --output-dir=rst/reference_appendices/ ./keyword_desc.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-plugins -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/modules/ 
Evaluating module files...
Makefile:98: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../../hacking/build-ansible.py", line 88, in <module>
    main()
  File "../../hacking/build-ansible.py", line 79, in main
    retval = command.main(args)
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 711, in main
    plugin_info, categories = get_plugin_info(args.module_dir, limit_to=args.limit_to, verbose=(args.verbosity > 0))
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 225, 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 35, column 1
could not find expected ':'
  in "<unicode string>", line 36, column 12
make: *** [modules] Error 1

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 16, 2019

The test ansible-test sanity --test import --python 2.6 [explain] failed with 2 errors:

lib/ansible/module_utils/network/ios/config/interfaces/interfaces.py:20:0: ImportError: cannot import name dict_diff
test/runner/.tox/import/lib/ansible/module_utils/network/ios/config/interfaces/interfaces.py:20:0: ImportError: cannot import name dict_diff

The test ansible-test sanity --test import --python 2.7 [explain] failed with 3 errors:

lib/ansible/module_utils/network/ios/config/interfaces/interfaces.py:20:0: ImportError: cannot import name dict_diff
lib/ansible/modules/network/ios/ios_interfaces.py:379:0: ImportError: cannot import name dict_diff
test/runner/.tox/import/lib/ansible/module_utils/network/ios/config/interfaces/interfaces.py:20:0: ImportError: cannot import name dict_diff

The test ansible-test sanity --test import --python 3.5 [explain] failed with 3 errors:

lib/ansible/module_utils/network/ios/config/interfaces/interfaces.py:20:0: ImportError: cannot import name 'dict_diff'
lib/ansible/modules/network/ios/ios_interfaces.py:379:0: ImportError: cannot import name 'dict_diff'
test/runner/.tox/import/lib/ansible/module_utils/network/ios/config/interfaces/interfaces.py:20:0: ImportError: cannot import name 'dict_diff'

The test ansible-test sanity --test import --python 3.6 [explain] failed with 3 errors:

lib/ansible/module_utils/network/ios/config/interfaces/interfaces.py:20:0: ImportError: cannot import name 'dict_diff'
lib/ansible/modules/network/ios/ios_interfaces.py:379:0: ImportError: cannot import name 'dict_diff'
test/runner/.tox/import/lib/ansible/module_utils/network/ios/config/interfaces/interfaces.py:20:0: ImportError: cannot import name 'dict_diff'

The test ansible-test sanity --test import --python 3.7 [explain] failed with 3 errors:

lib/ansible/module_utils/network/ios/config/interfaces/interfaces.py:20:0: ImportError: cannot import name 'dict_diff' from 'ansible.module_utils.network.ios.utils.utils' (/root/ansible/test/runner/.tox/import/lib/ansible/module_utils/network/ios/utils/utils.py)
lib/ansible/modules/network/ios/ios_interfaces.py:379:0: ImportError: cannot import name 'dict_diff' from 'ansible.module_utils.network.ios.utils.utils' (/root/ansible/test/runner/.tox/import/lib/ansible/module_utils/network/ios/utils/utils.py)
test/runner/.tox/import/lib/ansible/module_utils/network/ios/config/interfaces/interfaces.py:20:0: ImportError: cannot import name 'dict_diff' from 'ansible.module_utils.network.ios.utils.utils' (/root/ansible/test/runner/.tox/import/lib/ansible/module_utils/network/ios/utils/utils.py)

The test ansible-test sanity --test import --python 3.8 [explain] failed with 3 errors:

lib/ansible/module_utils/network/ios/config/interfaces/interfaces.py:20:0: ImportError: cannot import name 'dict_diff' from 'ansible.module_utils.network.ios.utils.utils' (/root/ansible/test/runner/.tox/import/lib/ansible/module_utils/network/ios/utils/utils.py)
lib/ansible/modules/network/ios/ios_interfaces.py:379:0: ImportError: cannot import name 'dict_diff' from 'ansible.module_utils.network.ios.utils.utils' (/root/ansible/test/runner/.tox/import/lib/ansible/module_utils/network/ios/utils/utils.py)
test/runner/.tox/import/lib/ansible/module_utils/network/ios/config/interfaces/interfaces.py:20:0: ImportError: cannot import name 'dict_diff' from 'ansible.module_utils.network.ios.utils.utils' (/root/ansible/test/runner/.tox/import/lib/ansible/module_utils/network/ios/utils/utils.py)

click here for bot help

fix facts doc
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
@@ -9,7 +9,7 @@


ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'status': ['deprecated'],

This comment has been minimized.

Copy link
@danielmellado

danielmellado Aug 19, 2019

Contributor

besides deprecation, this file needs to be moved to _ios_vlan.py

@danielmellado
Copy link
Contributor

left a comment

just some minor nit ;)

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 19, 2019

fix test
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 19, 2019

@danielmellado
Copy link
Contributor

left a comment

Some indentation issues on the module doc

fix indentation
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

@justjais justjais requested a review from danielmellado Aug 19, 2019

@danielmellado
Copy link
Contributor

left a comment

Hopefully final change!

@danielmellado

This comment has been minimized.

Copy link
Contributor

commented Aug 19, 2019

you need to add the python shebang

diff --git a/lib/ansible/modules/network/ios/ios_vlans.py b/lib/ansible/modules/network/ios/ios_vlans.py
index 1da875367d..a716f49362 100644
--- a/lib/ansible/modules/network/ios/ios_vlans.py
+++ b/lib/ansible/modules/network/ios/ios_vlans.py
@@ -1,4 +1,4 @@
-#
+#!/usr/bin/python
 # -*- coding: utf-8 -*-
 # Copyright 2019 Red Hat
 # GNU General Public License v3.0+
fix shebang
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

@justjais justjais requested a review from danielmellado Aug 19, 2019

@danielmellado
Copy link
Contributor

left a comment

Should be all right now! Thanks Sumit!

@ansibot ansibot added core_review and removed needs_revision labels Aug 19, 2019

@ansible-zuul

This comment has been minimized.

Copy link

commented Aug 19, 2019

Build succeeded (third-party-check pipeline).

@justjais justjais merged commit b55a544 into ansible:devel Aug 19, 2019

2 checks passed

Shippable Run 137948 status is SUCCESS.
Details
ansible/third-party-check third-party-check status: success
Details

@justjais justjais moved this from Module in Review to Module Completed in Ansible 2.9 Networking Feature Dev Aug 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.