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

Add voice vlan option to ios_l2_interface module #52892

Open
wants to merge 11 commits into
base: devel
from

Conversation

Projects
None yet
4 participants
@smolz
Copy link
Contributor

smolz commented Feb 24, 2019

SUMMARY

Add an option to the ios_l2_interface module to include a voice vlan on an interface

Fixes #38873

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ios_l2_interface

ADDITIONAL INFORMATION
Before:
interface GigabitEthernet1/0/14
 description DATA PORTS
 switchport access vlan 10
 switchport mode access

After:
interface GigabitEthernet1/0/14
 description DATA PORTS
 switchport access vlan 10
 switchport mode access
 switchport voice vlan 20
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 24, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 24, 2019

@smolz, 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

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 24, 2019

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

lib/ansible/modules/network/ios/ios_l2_interface.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/ios/ios_l2_interface.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/ios/ios_l2_interface.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/ios/ios_l2_interface.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/ios/ios_l2_interface.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/ios/ios_l2_interface.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/python test/sanity/code-smell/docs-build.py" returned exit status 1.
>>> Standard Error
Command 'make singlehtmldocs' failed with status code: 2
--> Standard Output
cat _themes/srtd/static/css/theme.css | sed -e 's/^[ 	]*//g; s/[ 	]*$//g; s/\([:{;,]\) /\1/g; s/ {/{/g; s/\/\*.*\*\///g; /^$/d' | sed -e :a -e '$!N; s/\n\(.\)/\1/; ta' > _themes/srtd/static/css/theme.min.css
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 774, in <module>
    main()
  File "../bin/plugin_formatter.py", line 729, 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 294, 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 103, 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 35, in get_single_data
    node = self.get_single_node()
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 82, in compose_node
    node = self.compose_sequence_node(anchor)
  File "/usr/local/lib/python3.6/dist-packages/yaml/composer.py", line 110, in compose_sequence_node
    while not self.check_event(SequenceEndEvent):
  File "/usr/local/lib/python3.6/dist-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/usr/local/lib/python3.6/dist-packages/yaml/parser.py", line 484, in parse_flow_sequence_entry
    "expected ',' or ']', but got %r" % token.id, token.start_mark)
yaml.parser.ParserError: while parsing a flow sequence
  in "<unicode string>", line 23, column 14:
        choices: ['access', 'voice-access, 'trunk']
                 ^
expected ',' or ']', but got '<scalar>'
  in "<unicode string>", line 23, column 41:
     ... ces: ['access', 'voice-access, 'trunk']
                                         ^
make: *** [modules] Error 1

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

lib/ansible/modules/network/ios/ios_l2_interface.py:0:0: E326 Argument 'mode' in argument_spec defines choices as (['access', 'voice-access', 'trunk']) but documentation defines choices as ([])
lib/ansible/modules/network/ios/ios_l2_interface.py:0:0: E326 Argument 'state' in argument_spec defines choices as (['absent', 'present', 'unconfigured']) but documentation defines choices as ([])
lib/ansible/modules/network/ios/ios_l2_interface.py:37:41: E302 DOCUMENTATION is not valid YAML

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

lib/ansible/modules/network/ios/ios_l2_interface.py:37:41: error DOCUMENTATION: syntax error: expected ',' or ']', but got '<scalar>'

click here for bot help

@ansibot ansibot added needs_revision and removed core_review labels Feb 24, 2019

@smolz

This comment has been minimized.

Copy link
Contributor Author

smolz commented Feb 25, 2019

Need some help on the error:
ERROR: lib/ansible/modules/network/ios/ios_l2_interface.py:0:0: E309 version_added for new option (voice_vlan) should be '2.8'. Currently StrictVersion ('0.0') (75%)

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 25, 2019

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

lib/ansible/modules/network/ios/ios_l2_interface.py:0:0: E309 version_added for new option (voice_vlan) should be '2.8'. Currently StrictVersion ('0.0')

click here for bot help

@ansibot ansibot added the ci_verified label Feb 25, 2019

@NilashishC

This comment has been minimized.

Copy link
Contributor

NilashishC commented Feb 27, 2019

@smolz You need to add the version_added key for this new option. Please refer to this.

@ansibot ansibot removed the needs_triage label Feb 27, 2019

@NilashishC

This comment has been minimized.

Copy link
Contributor

NilashishC commented Feb 27, 2019

@smolz Could you also add unit tests for this new feature?

@dagwieers dagwieers added the cisco label Feb 27, 2019

@smolz

This comment has been minimized.

Copy link
Contributor Author

smolz commented Mar 2, 2019

@smolz Could you also add unit tests for this new feature?

I wouldn't know where to start?

@smolz

This comment has been minimized.

Copy link
Contributor Author

smolz commented Mar 3, 2019

@smolz Could you also add unit tests for this new feature?

There are no existing tests for that module

smolz added a commit to smolz/ansible-1 that referenced this pull request Mar 11, 2019

@ansibot ansibot added the stale_ci label Mar 12, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 20, 2019

@smolz this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@smolz smolz force-pushed the smolz:patch-11 branch from 4826365 to 63a85ff Mar 20, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 20, 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.