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
Pluribus Networks pn_dscp_map_pri_map module with Unit tests #50142
Conversation
@rajaspachipulusu17, just so you are aware we have a dedicated Working Group for network. |
CI failure in unit tests: https://app.shippable.com/github/ansible/ansible/runs/99187/9/tests |
import json | ||
|
||
from units.compat.mock import patch | ||
from ansible.modules.network.netvisor import pn_dhcp_map_pri_map |
There was a problem hiding this comment.
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.
@Akasurde can you merge this? Thanks, |
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- State the action to perform. Use 'update' to modify | |
- State the action to perform. Use C(update) to modify |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Can you merge now @Akasurde ? |
if state == 'update': | ||
self.run_check_cli.return_value = True | ||
|
||
def test_dhcp_map_pri_map_t1(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def test_dhcp_map_pri_map_t3(self): | |
def test_dscp_map_pri_map_t3(self): |
@Akasurde can you merge this? |
@Akasurde can you merge this? Thanks, |
Can someone merge? its been quite some time now. Thanks, |
@Akasurde can you merge this? |
…#50142) * Pluribus Networks pn_dscp_map_pri_map module with Unit tests * Corrected method name in unit test script
…#50142) * Pluribus Networks pn_dscp_map_pri_map module with Unit tests * Corrected method name in unit test script
SUMMARY
Point feature of dscp map pri map for Pluribus Networks Netvisor switches
ISSUE TYPE
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]