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

nmcli: Introduce SIT Tunnel #45937

Merged
merged 1 commit into from
Dec 13, 2018
Merged

nmcli: Introduce SIT Tunnel #45937

merged 1 commit into from
Dec 13, 2018

Conversation

ssahani
Copy link
Contributor

@ssahani ssahani commented Sep 20, 2018

This work enables to add sit tunnel via nmcli module

Signed-off-by: Susant Sahani susant@redhat.com

SUMMARY
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

nmcli

ANSIBLE VERSION
2.8
ADDITIONAL INFORMATION
  - nmcli:
       state: present
       type: sit
       conn_name: sit_test1
       autoconnect: yes
       ip_tunnel_dev: enp0s8
       ip_tunnel_local: 192.168.1.2
       ip_tunnel_remote: 192.168.1.5

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. net_tools Net-tools category new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Sep 20, 2018
@ansibot
Copy link
Contributor

ansibot commented Sep 20, 2018

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

lib/ansible/modules/net_tools/nmcli.py:0:0: E309 version_added for new option (sit_dev) should be 2.8. Currently 0.0
lib/ansible/modules/net_tools/nmcli.py:0:0: E309 version_added for new option (sit_local) should be 2.8. Currently 0.0
lib/ansible/modules/net_tools/nmcli.py:0:0: E309 version_added for new option (sit_remote) should be 2.8. Currently 0.0

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. core_review In order to be merged, this PR must follow the core review workflow. and removed core_review In order to be merged, this PR must follow the core review workflow. ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Sep 20, 2018
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Sep 21, 2018
Copy link
Member

@Akasurde Akasurde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. Could you please write a test for this change here - https://github.com/ansible/ansible/blob/devel/test/units/modules/net_tools/test_nmcli.py ? Thanks.

@@ -1066,6 +1089,61 @@ def modify_connection_vlan(self):

return cmd

def create_connection_sit(self):
cmd = [self.nmcli_bin]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmd = [self.nmcli_bin, 'con', 'add', 'type', 'ip-tunnel', 'mode', 'sit', 'con-name']

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes sure . updated.

return cmd

def modify_connection_sit(self):
cmd = [self.nmcli_bin]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmd = [self.nmcli_bin, 'con', 'mod']

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. new_contributor This PR is the first contribution by a new community member. labels Sep 27, 2018
@ssahani
Copy link
Contributor Author

ssahani commented Sep 28, 2018

I have updated not sure how to run these tests locally ?

@Akasurde
Copy link
Member

@ssahani You can run tests locally using following command -

# pytest -r a -n auto --color yes --junit-xml test/results/junit/python2.6-units.xml -v test/units/modules/net_tools/test_nmcli.py

@ssahani
Copy link
Contributor Author

ssahani commented Sep 28, 2018

Thanks apparently I am missing something


 pytest -r a -n auto --color yes --junit-xml test/results/junit/python2.6-units.xml -v test/units/modules/net_tools/test_nmcli.py
usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: -n test/units/modules/net_tools/test_nmcli.py
  inifile: /home/sus/py/ansible-nmcli-sit/tox.ini
  rootdir: /home/sus/py/ansible-nmcli-sit

Ok I fixed it will fix the test cases

@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Sep 28, 2018
@ssahani
Copy link
Contributor Author

ssahani commented Sep 28, 2018

@Akasurde Thanks for reviewing. Seems all tests passed.

@ansibot ansibot added needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Oct 6, 2018
@ansibot ansibot added stale_review Updates were made after the last review and the last review is more than 7 days old. support:community This issue/PR relates to code supported by the Ansible community. labels Oct 6, 2018
@ssahani
Copy link
Contributor Author

ssahani commented Oct 26, 2018

@Akasurde Ping

@Akasurde
Copy link
Member

@ssahani Could you please rebase this ? needs_info

@ansibot ansibot added needs_info This issue requires further information. Please answer any outstanding questions. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html and removed stale_review Updates were made after the last review and the last review is more than 7 days old. labels Oct 30, 2018
@ssahani
Copy link
Contributor Author

ssahani commented Oct 31, 2018

Thanks for looking into it. I have updated #45933 . SInce again be a be conflict once IPIP PR get merged I will rebase it.

@ansibot ansibot removed the needs_info This issue requires further information. Please answer any outstanding questions. label Oct 31, 2018
@ansibot ansibot removed the needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) label Nov 16, 2018
@Akasurde
Copy link
Member

@ssahani #45933 is merged. Could you please rebase this ? Thanks.

@ansibot ansibot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Nov 17, 2018
@ansibot
Copy link
Contributor

ansibot commented Nov 17, 2018

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

test/units/modules/net_tools/test_nmcli.py:68:0: syntax-error invalid character in identifier (<unknown>, line 68)

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

lib/ansible/modules/net_tools/nmcli.py:542:15: duplicate-key Duplicate key 17 in dictionary

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

test/units/modules/net_tools/test_nmcli.py:68:5: SyntaxError:    'type': 'sit',

The test ansible-test sanity --test compile --python 2.7 [explain] failed with 1 error:

test/units/modules/net_tools/test_nmcli.py:68:5: SyntaxError:    'type': 'sit',

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

test/units/modules/net_tools/test_nmcli.py:68:5: SyntaxError:    'type': 'sit',

The test ansible-test sanity --test compile --python 3.6 [explain] failed with 1 error:

test/units/modules/net_tools/test_nmcli.py:68:5: SyntaxError:    'type': 'sit',

The test ansible-test sanity --test compile --python 3.7 [explain] failed with 1 error:

test/units/modules/net_tools/test_nmcli.py:68:5: SyntaxError:    'type': 'sit',

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

test/units/modules/net_tools/test_nmcli.py:67:6: E201 whitespace after '{'
test/units/modules/net_tools/test_nmcli.py:68:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:69:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:70:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:71:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:72:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:72:4: E202 whitespace before '}'
test/units/modules/net_tools/test_nmcli.py:179:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:180:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:181:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:182:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:183:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:184:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:185:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:186:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:187:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:188:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:188:6: E202 whitespace before '}'
test/units/modules/net_tools/test_nmcli.py:189:1: E122 continuation line missing indentation or outdented
test/units/modules/net_tools/test_nmcli.py:189:2: E202 whitespace before ']'
test/units/modules/net_tools/test_nmcli.py:594:1: E112 expected an indented block
test/units/modules/net_tools/test_nmcli.py:594:1: E305 expected 2 blank lines after class or function definition, found 0
test/units/modules/net_tools/test_nmcli.py:597:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:598:1: E112 expected an indented block
test/units/modules/net_tools/test_nmcli.py:600:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:604:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:605:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:606:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:607:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:608:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:609:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:610:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:611:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:612:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:613:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:614:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:615:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:616:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:618:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:619:1: E112 expected an indented block
test/units/modules/net_tools/test_nmcli.py:619:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:622:1: E302 expected 2 blank lines, found 0
test/units/modules/net_tools/test_nmcli.py:624:1: E112 expected an indented block
test/units/modules/net_tools/test_nmcli.py:624:1: E305 expected 2 blank lines after class or function definition, found 0
test/units/modules/net_tools/test_nmcli.py:627:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:628:1: E112 expected an indented block
test/units/modules/net_tools/test_nmcli.py:630:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:634:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:635:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:636:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:637:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:639:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:640:1: E112 expected an indented block
test/units/modules/net_tools/test_nmcli.py:640:2: E272 multiple spaces before keyword
test/units/modules/net_tools/test_nmcli.py:643:1: E302 expected 2 blank lines, found 0

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

lib/ansible/modules/net_tools/nmcli.py:477:1: E311 EXAMPLES is not valid YAML

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

lib/ansible/modules/net_tools/nmcli.py:477:1: error EXAMPLES: syntax error: expected <block end>, but found '?'

click here for bot help

This work enables to add sit tunnel via nmcli module

Signed-off-by: Susant Sahani susant@redhat.com

SUMMARY
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
nmcli

ANSIBLE VERSION
2.8
ADDITIONAL INFORMATION
  - nmcli:
       state: present
       type: sit
       conn_name: sit_test1
       autoconnect: yes
       ip_tunnel_dev: enp0s8
       ip_tunnel_local: 192.168.1.2
       ip_tunnel_remote: 192.168.1.5
@ssahani
Copy link
Contributor Author

ssahani commented Nov 17, 2018

@Akasurde Thanks updated.

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 18, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 26, 2018
@ansibot
Copy link
Contributor

ansibot commented Dec 12, 2018

@Akasurde
Copy link
Member

rebuild_merge

@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Dec 13, 2018
@ansibot ansibot merged commit 59dcf3f into ansible:devel Dec 13, 2018
kbreit pushed a commit to kbreit/ansible that referenced this pull request Jan 11, 2019
This work enables to add sit tunnel via nmcli module

Signed-off-by: Susant Sahani susant@redhat.com

SUMMARY
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
nmcli

ANSIBLE VERSION
2.8
ADDITIONAL INFORMATION
  - nmcli:
       state: present
       type: sit
       conn_name: sit_test1
       autoconnect: yes
       ip_tunnel_dev: enp0s8
       ip_tunnel_local: 192.168.1.2
       ip_tunnel_remote: 192.168.1.5
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. net_tools Net-tools category support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants