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

os_server - add "tag" to instance nics #61119

Merged
merged 1 commit into from Sep 2, 2019

Conversation

@MaxBab
Copy link
Contributor

commented Aug 22, 2019

SUMMARY

A custom "tag" could be passed to the instance metadata with the nics.
Add support for the "tag" to the module.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

os_server

ADDITIONAL INFORMATION

Depends-On: https://review.opendev.org/#/c/675306/

@ansibot

This comment has been minimized.

@MaxBab MaxBab force-pushed the MaxBab:add_tag_to_os_server_nic branch 2 times, most recently from be4fc2d to a0a6284 Aug 22, 2019

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

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

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

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:99: 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 124, 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 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: mapping values are not allowed in this context
  in "<unicode string>", line 66, column 17
make: *** [modules] Error 1

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

Command "/usr/bin/python3.6 /root/ansible/test/sanity/code-smell/package-data.py" returned exit status 1.
>>> Standard Error
Traceback (most recent call last):
  File "/root/ansible/test/sanity/code-smell/package-data.py", line 373, in <module>
    main()
  File "/root/ansible/test/sanity/code-smell/package-data.py", line 350, in main
    sdist_path = create_sdist(tmp_dir)
  File "/root/ansible/test/sanity/code-smell/package-data.py", line 175, in create_sdist
    raise Exception('sdist was not created in the temp dir')
Exception: sdist was not created in the temp dir

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

lib/ansible/modules/cloud/openstack/os_server.py:0:0: E326 Argument 'interface' in argument_spec defines choices as (['public', 'internal', 'admin']) but documentation defines choices as ([])
lib/ansible/modules/cloud/openstack/os_server.py:0:0: E326 Argument 'state' in argument_spec defines choices as (['absent', 'present']) but documentation defines choices as ([])
lib/ansible/modules/cloud/openstack/os_server.py:83:17: E302 DOCUMENTATION is not valid YAML
test/sanity/ignore.txt:1677:1: A100 Ignoring 'E322' on 'lib/ansible/modules/cloud/openstack/os_server.py' is unnecessary

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

lib/ansible/modules/cloud/openstack/os_server.py:83:17: error DOCUMENTATION: syntax error: mapping values are not allowed here

click here for bot help

@opendev-zuul

This comment has been minimized.

Copy link

commented Aug 22, 2019

Build succeeded (third-party-check pipeline).

@MaxBab MaxBab force-pushed the MaxBab:add_tag_to_os_server_nic branch from a0a6284 to 18fb2b2 Aug 22, 2019

@opendev-zuul

This comment has been minimized.

Copy link

commented Aug 22, 2019

Build succeeded (third-party-check pipeline).

@cloudnull
Copy link
Contributor

left a comment

shipit

os_server - add "tag" to instance nics
A custom "tag" could be passed to the instance metadata with the nics.
Add support for the "tag" to the module.

@MaxBab MaxBab force-pushed the MaxBab:add_tag_to_os_server_nic branch from 18fb2b2 to aaf3108 Aug 25, 2019

@opendev-zuul

This comment has been minimized.

Copy link

commented Aug 25, 2019

Build succeeded (third-party-check pipeline).

@MaxBab

This comment has been minimized.

Copy link
Contributor Author

commented Aug 26, 2019

@cloudnull
Hi,
Could you take a look at the patch once again, please?
I rebased it.

Thanks.

@cloudnull
Copy link
Contributor

left a comment

shipit

@MaxBab

This comment has been minimized.

Copy link
Contributor Author

commented Aug 26, 2019

Hello @Shrews @dagnello @emonty @gtema @mnaser @odyssey4me

Could you take a look at the patch, please?

Thanks.

Yarboa pushed a commit to redhat-openstack/ansible-nfv that referenced this pull request Aug 27, 2019
Add "tag" support to instance nics of os_server module
A custom "tag" could be passed to the instance metadata with the nics.
Add support for the "tag" to the os_server module.

The upstream PR could be tracked by the following url:
ansible/ansible#61119

The feature depends on the following patch to openstacksdk library:
https://review.opendev.org/#/c/675306/

Change-Id: I6962c0efbd225f13a0ad96655aa196c0b7b1aa9f
@odyssey4me
Copy link
Contributor

left a comment

shipit

@ansibot ansibot merged commit f1a1b72 into ansible:devel Sep 2, 2019

2 checks passed

Shippable Run 139662 status is SUCCESS.
Details
openstack/third-party-check third-party-check status: success
Details

@MaxBab MaxBab deleted the MaxBab:add_tag_to_os_server_nic branch Sep 2, 2019

@gundalow gundalow referenced this pull request Sep 2, 2019
adharshsrivatsr added a commit to adharshsrivatsr/ansible that referenced this pull request Sep 3, 2019
os_server - add "tag" to instance nics (ansible#61119)
A custom "tag" could be passed to the instance metadata with the nics.
Add support for the "tag" to the module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.