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

Added lxd_network module to manage LXD network profiles. #44632

Open
wants to merge 8 commits into
base: devel
from

Conversation

Projects
None yet
3 participants
@sirtaj
Copy link

sirtaj commented Aug 24, 2018

SUMMARY

Adds new module lxd_network to manage network profile configuration on an LXD host. Code is based on existing cloud/lxd_profile module.

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

cloud/lxd_network

ANSIBLE VERSION
ansible 2.6.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/sirtaj/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Aug 24, 2018

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Aug 24, 2018

The test ansible-test sanity --test pylint [explain] failed with 5 errors:

lib/ansible/modules/cloud/lxd/lxd_network.py:259:31: ansible-format-automatic-specification Format string contains automatic field numbering specification
lib/ansible/modules/cloud/lxd/lxd_network.py:286:30: ansible-format-automatic-specification Format string contains automatic field numbering specification
lib/ansible/modules/cloud/lxd/lxd_network.py:290:33: ansible-format-automatic-specification Format string contains automatic field numbering specification
lib/ansible/modules/cloud/lxd/lxd_network.py:354:24: ansible-format-automatic-specification Format string contains automatic field numbering specification
lib/ansible/modules/cloud/lxd/lxd_network.py:358:24: ansible-format-automatic-specification Format string contains automatic field numbering specification

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

lib/ansible/modules/cloud/lxd/lxd_network.py:329:5: E303 too many blank lines (2)

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

lib/ansible/modules/cloud/lxd/lxd_network.py:0:0: E305 DOCUMENTATION.version_added: required key not provided @ data['version_added']. Got None
lib/ansible/modules/cloud/lxd/lxd_network.py:0:0: E307 version_added should be 2.7. Currently 0.0
lib/ansible/modules/cloud/lxd/lxd_network.py:0:0: E316 ANSIBLE_METADATA.metadata_version: not a valid value for dictionary value @ data['metadata_version']. Got '1.0'
lib/ansible/modules/cloud/lxd/lxd_network.py:0:0: E324 Value for "default" from the argument_spec ('/root/.config/lxc/client.crt') for "cert_file" does not match the documentation ('"{}/.config/lxc/client.crt" .format(os.environ["HOME"])')
lib/ansible/modules/cloud/lxd/lxd_network.py:0:0: E324 Value for "default" from the argument_spec ('/root/.config/lxc/client.key') for "key_file" does not match the documentation ('"{}/.config/lxc/client.key" .format(os.environ["HOME"])')

click here for bot help

@ansibot ansibot removed the ci_verified label Aug 24, 2018

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Aug 24, 2018

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

lib/ansible/modules/cloud/lxd/lxd_network.py:0:0: E324 Value for "default" from the argument_spec ('/root/.config/lxc/client.crt') for "cert_file" does not match the documentation ('"{0}/.config/lxc/client.crt".format(os.environ["HOME"])')
lib/ansible/modules/cloud/lxd/lxd_network.py:0:0: E324 Value for "default" from the argument_spec ('/root/.config/lxc/client.key') for "key_file" does not match the documentation ('"{0}/.config/lxc/client.key".format(os.environ["HOME"])')

click here for bot help

@ansibot ansibot added the ci_verified label Aug 24, 2018

sirtaj added some commits Aug 24, 2018

@ansibot ansibot removed the ci_verified label Aug 24, 2018

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Aug 24, 2018

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

lib/ansible/modules/cloud/lxd/lxd_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/cloud/lxd/lxd_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/cloud/lxd/lxd_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/cloud/lxd/lxd_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/cloud/lxd/lxd_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/python test/sanity/code-smell/docs-build.py" returned exit status 1.
>>> Standard Error
Traceback (most recent call last):
  File "test/sanity/code-smell/docs-build.py", line 100, in <module>
    main()
  File "test/sanity/code-smell/docs-build.py", line 17, in main
    raise subprocess.CalledProcessError(sphinx.returncode, cmd, output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['make', 'singlehtmldocs']' returned non-zero exit status 2.

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

lib/ansible/modules/cloud/lxd/lxd_network.py:0:0: E324 Value for "default" from the argument_spec ('present') for "state" does not match the documentation (None)
lib/ansible/modules/cloud/lxd/lxd_network.py:0:0: E324 Value for "default" from the argument_spec ('unix:/var/lib/lxd/unix.socket') for "url" does not match the documentation (None)
lib/ansible/modules/cloud/lxd/lxd_network.py:0:0: E326 Value for "choices" from the argument_spec (['present', 'absent']) for "state" does not match the documentation ([])
lib/ansible/modules/cloud/lxd/lxd_network.py:67:9: E302 DOCUMENTATION is not valid YAML

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

lib/ansible/modules/cloud/lxd/lxd_network.py:67:9: error DOCUMENTATION: syntax error: could not find expected ':'

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Aug 24, 2018

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

lib/ansible/modules/cloud/lxd/lxd_network.py:0:0: E324 Value for "default" from the argument_spec (None) for "cert_file" does not match the documentation ('None')
lib/ansible/modules/cloud/lxd/lxd_network.py:0:0: E324 Value for "default" from the argument_spec (None) for "key_file" does not match the documentation ('None')

click here for bot help

@ansibot ansibot added the ci_verified label Aug 24, 2018

@ansibot ansibot removed the ci_verified label Aug 24, 2018

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Aug 24, 2018

@hnakamur

As a maintainer of a module in the same namespace this new module has been submitted to, your vote counts for shipits. Please review this module and add shipit if you would like to see it merged.

click here for bot help

version_added: 2.7
description:
- Management of LXD networks
author: "Sirtaj Singh Kang (@sirtaj) and Hiroaki Nakamura (@hnakamur)"

This comment has been minimized.

@resmo

resmo Aug 24, 2018

Member

not a blocker but create a list for the authors (keep the key "author" as is)

- "Sirtaj Singh Kang (@sirtaj) 
- "Hiroaki Nakamura (@hnakamur)"
are different, they this module tries to apply the configurations.
- Not all config values are supported to apply the existing network.
Maybe you need to delete and recreate a network.
required: false

This comment has been minimized.

@resmo

resmo Aug 24, 2018

Member

not a blocker: required: false is the default, can be omitted

@ansibot ansibot removed the needs_triage label Aug 24, 2018

@sirtaj

This comment has been minimized.

Copy link
Author

sirtaj commented Aug 29, 2018

I've resolved the issues left by @resmo, so I think this is ready to be merged.

@ansibot ansibot added the stale_ci label Sep 6, 2018

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.