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

Pluribus Networks pn_dscp_map_pri_map module with Unit tests #50142

Merged
merged 4 commits into from Jan 10, 2019
Merged

Pluribus Networks pn_dscp_map_pri_map module with Unit tests #50142

merged 4 commits into from Jan 10, 2019

Conversation

rajaspachipulusu17
Copy link
Contributor

SUMMARY

Point feature of dscp map pri map for Pluribus Networks Netvisor switches

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

pn_dscp_map_pri_map.py module with unit tests.

ADDITIONAL INFORMATION

ansible 2.4.0.0
config file = None
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]

@ansibot
Copy link
Contributor

ansibot commented Dec 19, 2018

@rajaspachipulusu17, 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 ansibot added affects_2.8 This issue/PR affects Ansible v2.8 module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. networking Network category new_module This PR includes a new module. new_plugin This PR includes a new plugin. 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. test This PR relates to tests. labels Dec 19, 2018
@mattclay
Copy link
Member

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Dec 19, 2018
import json

from units.compat.mock import patch
from ansible.modules.network.netvisor import pn_dhcp_map_pri_map
Copy link
Member

Choose a reason for hiding this comment

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

Typo, this looks like it should be pn_dscp_map_pri_map here and in several places below.

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Dec 19, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed 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 Dec 20, 2018
@rajaspachipulusu17
Copy link
Contributor Author

@Akasurde can you merge this?

Thanks,
Rajas

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.

Rest LGTM

type: str
state:
description:
- State the action to perform. Use 'update' to modify
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- State the action to perform. Use 'update' to modify
- State the action to perform. Use C(update) to modify

Copy link
Member

Choose a reason for hiding this comment

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

Apply this to rest of modules too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have somehow missed it. I will apply to future modules.

Thanks,
Rajas

@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. labels Dec 24, 2018
@rajaspachipulusu17
Copy link
Contributor Author

Can you merge now @Akasurde ?

if state == 'update':
self.run_check_cli.return_value = True

def test_dhcp_map_pri_map_t1(self):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
def test_dhcp_map_pri_map_t1(self):
def test_dscp_map_pri_map_t1(self):

expected_cmd = '/usr/bin/cli --quiet -e --no-login-prompt switch sw01 dscp-map-pri-map-modify pri 0 name foo dsmap 40'
self.assertEqual(result['cli_cmd'], expected_cmd)

def test_dhcp_map_pri_map_t2(self):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
def test_dhcp_map_pri_map_t2(self):
def test_dscp_map_pri_map_t2(self):

expected_cmd = '/usr/bin/cli --quiet -e --no-login-prompt switch sw01 dscp-map-pri-map-modify pri 1 name foo dsmap 8,10,12,14'
self.assertEqual(result['cli_cmd'], expected_cmd)

def test_dhcp_map_pri_map_t3(self):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
def test_dhcp_map_pri_map_t3(self):
def test_dscp_map_pri_map_t3(self):

@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 Dec 25, 2018
@rajaspachipulusu17
Copy link
Contributor Author

@Akasurde can you merge this?

@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 Jan 3, 2019
@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 Jan 7, 2019
@rajaspachipulusu17
Copy link
Contributor Author

@Akasurde can you merge this?

Thanks,
Rajas

@rajaspachipulusu17
Copy link
Contributor Author

Can someone merge? its been quite some time now.

Thanks,
Rajas

@rajaspachipulusu17
Copy link
Contributor Author

@Akasurde can you merge this?

@Akasurde Akasurde merged commit abdcf2a into ansible:devel Jan 10, 2019
kbreit pushed a commit to kbreit/ansible that referenced this pull request Jan 11, 2019
…#50142)

* Pluribus Networks pn_dscp_map_pri_map module with Unit tests
* Corrected method name in unit test script
knumskull pushed a commit to knumskull/ansible that referenced this pull request Jan 21, 2019
…#50142)

* Pluribus Networks pn_dscp_map_pri_map module with Unit tests
* Corrected method name in unit test script
@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. module This issue/PR relates to a module. networking Network category new_module This PR includes a new module. new_plugin This PR includes a new plugin. 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. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants