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

[WIP] Add iproute2 module #36538

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@lets00

lets00 commented Feb 21, 2018

SUMMARY

This module allows you manage ip interfaces using iproute2 tool.
Status: WIP

COMPONENT NAME

iproute2

ANSIBLE VERSION
2.6devel
@ansibot

This comment has been minimized.

Contributor

ansibot commented Feb 21, 2018

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

lib/ansible/modules/net_tools/ip.py:0:0: has a documentation error formatting or is missing documentation.

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

lib/ansible/modules/net_tools/ip.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/net_tools/ip.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/net_tools/ip.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/net_tools/ip.py:0:0: has a documentation error formatting or is missing documentation.

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

lib/ansible/modules/net_tools/ip.py:23:72: W291 trailing whitespace

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

lib/ansible/modules/net_tools/ip.py:0:0: E310 No EXAMPLES provided
lib/ansible/modules/net_tools/ip.py:0:0: E312 No RETURN provided
lib/ansible/modules/net_tools/ip.py:0:0: E317 "name" is marked as required but specifies a default. Arguments with a default should not be marked as required
lib/ansible/modules/net_tools/ip.py:0:0: E324 Value for "default" from the argument_spec ('vepa') for "macvlan_mode" does not match the documentation (None)
lib/ansible/modules/net_tools/ip.py:0:0: E324 Value for "default" from the argument_spec ('vepa') for "macvtap_mode" does not match the documentation (None)
lib/ansible/modules/net_tools/ip.py:0:0: E325 argument_spec for "flush_ip" defines type="bool" but documentation does not
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['802.1q', '802.1ad']) for "vlan_protocol" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['bridge', 'dummy', 'gre', 'macvlan', 'macvtap', 'netns', 'tuntap', 'veth', 'vlan', 'vrf']) for "type" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['present', 'absent', 'up', 'down']) for "state" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['tun', 'tap']) for "tuntap_mode" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['vepa', 'private', 'bridge', 'passthru']) for "macvlan_mode" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['vepa', 'private', 'bridge', 'passthru']) for "macvtap_mode" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:23:9: E302 DOCUMENTATION is not valid YAML

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

lib/ansible/modules/net_tools/ip.py:23:9: error DOCUMENTATION: syntax error: expected a comment or a line break, but found 'T'

click here for bot help

@ansibot ansibot added ci_verified and removed ci_verified labels Feb 21, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Feb 21, 2018

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

lib/ansible/modules/net_tools/ip.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/net_tools/ip.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/net_tools/ip.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/net_tools/ip.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/net_tools/ip.py:0:0: has a documentation error formatting or is missing documentation.

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

lib/ansible/modules/net_tools/ip.py:23:72: W291 trailing whitespace

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

lib/ansible/modules/net_tools/ip.py:0:0: E310 No EXAMPLES provided
lib/ansible/modules/net_tools/ip.py:0:0: E312 No RETURN provided
lib/ansible/modules/net_tools/ip.py:0:0: E317 "name" is marked as required but specifies a default. Arguments with a default should not be marked as required
lib/ansible/modules/net_tools/ip.py:0:0: E324 Value for "default" from the argument_spec ('vepa') for "macvlan_mode" does not match the documentation (None)
lib/ansible/modules/net_tools/ip.py:0:0: E324 Value for "default" from the argument_spec ('vepa') for "macvtap_mode" does not match the documentation (None)
lib/ansible/modules/net_tools/ip.py:0:0: E325 argument_spec for "flush_ip" defines type="bool" but documentation does not
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['802.1q', '802.1ad']) for "vlan_protocol" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['bridge', 'dummy', 'gre', 'macvlan', 'macvtap', 'netns', 'tuntap', 'veth', 'vlan', 'vrf']) for "type" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['present', 'absent', 'up', 'down']) for "state" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['tun', 'tap']) for "tuntap_mode" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['vepa', 'private', 'bridge', 'passthru']) for "macvlan_mode" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['vepa', 'private', 'bridge', 'passthru']) for "macvtap_mode" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:23:9: E302 DOCUMENTATION is not valid YAML

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

lib/ansible/modules/net_tools/ip.py:23:9: error DOCUMENTATION: syntax error: expected a comment or a line break, but found 'T'

click here for bot help

@ansibot ansibot added the ci_verified label Feb 21, 2018

@lets00 lets00 force-pushed the lets00:iproute2 branch Feb 23, 2018

@ansibot ansibot removed the ci_verified label Feb 23, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Feb 23, 2018

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

lib/ansible/modules/net_tools/ip.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/net_tools/ip.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/net_tools/ip.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/net_tools/ip.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/net_tools/ip.py:0:0: has a documentation error formatting or is missing documentation.

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

lib/ansible/modules/net_tools/ip.py:145:24: W291 trailing whitespace
lib/ansible/modules/net_tools/ip.py:146:1: W293 blank line contains whitespace

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

lib/ansible/modules/net_tools/ip.py:0:0: E310 No EXAMPLES provided
lib/ansible/modules/net_tools/ip.py:0:0: E312 No RETURN provided
lib/ansible/modules/net_tools/ip.py:0:0: E317 "name" is marked as required but specifies a default. Arguments with a default should not be marked as required
lib/ansible/modules/net_tools/ip.py:0:0: E324 Value for "default" from the argument_spec ('vepa') for "macvlan_mode" does not match the documentation (None)
lib/ansible/modules/net_tools/ip.py:0:0: E324 Value for "default" from the argument_spec ('vepa') for "macvtap_mode" does not match the documentation (None)
lib/ansible/modules/net_tools/ip.py:0:0: E325 argument_spec for "flush_ip" defines type="bool" but documentation does not
lib/ansible/modules/net_tools/ip.py:0:0: E325 argument_spec for "promiscuity" defines type="bool" but documentation does not
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['802.1q', '802.1ad']) for "vlan_protocol" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['bridge', 'dummy', 'gre', 'macvlan', 'macvtap', 'netns', 'tuntap', 'veth', 'vlan', 'vrf']) for "type" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['present', 'absent', 'up', 'down']) for "state" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['tun', 'tap']) for "tuntap_mode" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['vepa', 'private', 'bridge', 'passthru']) for "macvlan_mode" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['vepa', 'private', 'bridge', 'passthru']) for "macvtap_mode" does not match the documentation ([])
lib/ansible/modules/net_tools/ip.py:23:9: E302 DOCUMENTATION is not valid YAML

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

lib/ansible/modules/net_tools/ip.py:23:9: error DOCUMENTATION: syntax error: expected a comment or a line break, but found 'T'

click here for bot help

@ansibot ansibot added the ci_verified label Feb 23, 2018

DOCUMENTATION = '''
---
module: ip

This comment has been minimized.

@s-hertel

s-hertel Feb 23, 2018

Contributor

This should be a more specific name that depicts what kind of IP. iproute2_ip_addr?

This comment has been minimized.

@lets00

lets00 Feb 23, 2018

Hi @s-hertel . Thank you for the comment.

The main idea for this module is manage all aspects that iproute2 support. Basically, It supports link (manage network interfaces, creating, deleting, change mtu status, and others), address (add, remove, flush IPv4/IPv6 network address), route , arp , rule and tunnel manipulations.

The linux CLI implementation to iroute2 is ip command. I used this name because is more easy remember how to use if you use ip command line. Usage iproute2_ip_addr as name limits that the module can offer.

Feel free to comment on.

@s-hertel s-hertel removed the needs_triage label Feb 23, 2018

@lets00 lets00 force-pushed the lets00:iproute2 branch Feb 26, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Feb 26, 2018

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

lib/ansible/modules/net_tools/ip.py:328:5: E303 too many blank lines (2)
lib/ansible/modules/net_tools/ip.py:332:19: E127 continuation line over-indented for visual indent

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

lib/ansible/modules/net_tools/ip.py:0:0: E307 version_added should be 2.6. Currently 2.5
lib/ansible/modules/net_tools/ip.py:0:0: E312 No RETURN provided

click here for bot help

@ansibot ansibot added the stale_ci label Mar 6, 2018

@lets00 lets00 force-pushed the lets00:iproute2 branch to 716b429 Mar 7, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Mar 7, 2018

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

lib/ansible/modules/net_tools/ip.py:0:0: E312 No RETURN provided

click here for bot help

@ansibot ansibot added the ci_verified label Mar 7, 2018

@ansibot ansibot added the stale_ci label Mar 15, 2018

@lets00 lets00 force-pushed the lets00:iproute2 branch from 716b429 to d613546 May 8, 2018

@ansibot ansibot removed the ci_verified label May 8, 2018

@ansibot ansibot removed the stale_ci label May 8, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented May 8, 2018

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

lib/ansible/modules/net_tools/ip.py:0:0: E312 No RETURN provided
lib/ansible/modules/net_tools/ip.py:0:0: E324 Value for "default" from the argument_spec (None) for "macvlan_mode" does not match the documentation ('vepa')
lib/ansible/modules/net_tools/ip.py:0:0: E324 Value for "default" from the argument_spec (None) for "macvtap_mode" does not match the documentation ('vepa')

click here for bot help

@ansibot

This comment has been minimized.

Contributor

ansibot commented Oct 26, 2018

@lets00 this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibot

This comment has been minimized.

Contributor

ansibot commented Oct 26, 2018

@lets00 This PR was evaluated as a potentially problematic PR for the following reasons:

  • More than 50 changed files.
  • More than 50 commits.

Such PR can only be merged by human. Contact a Core team member to review this PR on IRC: #ansible-devel on irc.freenode.net

click here for bot help

@lets00 lets00 force-pushed the lets00:iproute2 branch from f5cde31 to cf85cdd Oct 26, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Oct 26, 2018

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

lib/ansible/modules/net_tools/ip.py:0:0: E307 version_added should be 2.8. Currently 2.6
lib/ansible/modules/net_tools/ip.py:0:0: E312 No RETURN provided
lib/ansible/modules/net_tools/ip.py:0:0: E326 Value for "choices" from the argument_spec (['bridge', 'dummy', 'gre', 'macvlan', 'macvtap', 'tuntap', 'veth', 'vlan', 'vrf', 'vxlan']) for "type" does not match the documentation (['bridge', 'dummy', 'gre', 'macvlan', 'macvtap', 'tuntap', 'veth', 'vlan', 'vrf'])

click here for bot help

@ansibot ansibot added the ci_verified label Oct 26, 2018

@ansibot ansibot added the stale_ci label Nov 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment