Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pfcwd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,14 @@ def collect_config(self, ports):
).get('POLL_INTERVAL')

current_ns = self.multi_asic.current_namespace
asic_namesapce = \
asic_namespace = \
"" if current_ns is None or current_ns == "" else " on {}".format(
current_ns
)
if poll_interval is not None:
click.echo(
"Changed polling interval to {}ms{}".format(
poll_interval, asic_namesapce
poll_interval, asic_namespace
)
)

Expand All @@ -243,7 +243,7 @@ def collect_config(self, ports):

if big_red_switch is not None:
click.echo("BIG_RED_SWITCH status is {}{}".format(
big_red_switch, asic_namesapce
big_red_switch, asic_namespace
))

self.table += table
Expand Down
8 changes: 4 additions & 4 deletions scripts/generate_dump
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ save_bcmcmd() {
}

###############################################################################
# Runs a given bcmcmd command in all namesapces in case of multi ASIC platform
# Runs a given bcmcmd command in all namespaces in case of multi ASIC platform
# Globals:
# NUM_ASICS
# Arguments:
Expand Down Expand Up @@ -298,7 +298,7 @@ dummy_cleanup_method() {
}

###############################################################################
# Runs a given command in all namesapces in case of multi ASIC platform, in
# Runs a given command in all namespaces in case of multi ASIC platform, in
# default (host) namespace in single ASIC platform
# Globals:
# NUM_ASICS
Expand Down Expand Up @@ -422,7 +422,7 @@ get_vtysh_namespace() {
}

###############################################################################
# Runs a vtysh command in all namesapces for a multi ASIC platform, and in
# Runs a vtysh command in all namespaces for a multi ASIC platform, and in
# default (host) namespace in single ASIC platforms. Saves its output to the
# file.
# Globals:
Expand Down Expand Up @@ -1557,7 +1557,7 @@ collect_nvidia_sdk_dumps() {
}

###############################################################################
# Runs a given marvellcmd command in all namesapces in case of multi ASIC platform
# Runs a given marvellcmd command in all namespaces in case of multi ASIC platform
# Globals:
# NUM_ASICS
# Arguments:
Expand Down
4 changes: 2 additions & 2 deletions scripts/portconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ optional arguments:
-f --fec port fec mode
-m --mtu port mtu in bytes
-tp --tpid interface tpid (0x8100, 9100, 9200, 88A8)
-n --namesapce Namespace name
-n --namespace Namespace name
-an --autoneg port auto negotiation mode
-S --adv-speeds port advertised speeds
-t --interface-type port interface type
Expand Down Expand Up @@ -258,7 +258,7 @@ class portconfig(object):
if not self.namespace:
state_db = SonicV2Connector(host="127.0.0.1")
else:
state_db = SonicV2Connector(host="127.0.0.1", namesapce=self.namespace, use_unix_socket_path=True)
state_db = SonicV2Connector(host="127.0.0.1", namespace=self.namespace, use_unix_socket_path=True)
state_db.connect(state_db.STATE_DB)
return state_db.get(state_db.STATE_DB, '{}|{}'.format(PORT_STATE_TABLE_NAME, port), PORT_STATE_SUPPORTED_SPEEDS)

Expand Down
8 changes: 4 additions & 4 deletions tests/ip_show_routes_multi_asic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_show_multi_asic_ip_route_namespace_option_err(
show.cli.commands["ip"].commands["route"], ["-nasic7"])
print("{}".format(result.output))
assert result.exit_code == 0
assert result.output == show_ip_route_common.show_ip_route_multi_asic_invalid_namesapce_err_output
assert result.output == show_ip_route_common.show_ip_route_multi_asic_invalid_namespace_err_output

@pytest.mark.parametrize('setup_multi_asic_bgp_instance',
['ip_route'], indirect=['setup_multi_asic_bgp_instance'])
Expand Down Expand Up @@ -163,7 +163,7 @@ def test_show_multi_asic_ipv6_route_all_namespace(
show.cli.commands["ipv6"].commands["route"], ["-dfrontend"])
print("{}".format(result.output))
assert result.exit_code == 0
assert result.output == show_ip_route_common.show_ipv6_route_multi_asic_all_namesapce_output
assert result.output == show_ip_route_common.show_ipv6_route_multi_asic_all_namespace_output

@pytest.mark.parametrize('setup_multi_asic_bgp_instance',
['ipv6_route'], indirect=['setup_multi_asic_bgp_instance'])
Expand All @@ -179,7 +179,7 @@ def test_show_multi_asic_ipv6_route_all_namespace_alias(
os.environ['SONIC_CLI_IFACE_MODE'] = "default"
print("{}".format(result.output))
assert result.exit_code == 0
assert result.output == show_ip_route_common.show_ipv6_route_multi_asic_all_namesapce_alias_output
assert result.output == show_ip_route_common.show_ipv6_route_multi_asic_all_namespace_alias_output

@pytest.mark.parametrize('setup_multi_asic_bgp_instance',
['ipv6_route'], indirect=['setup_multi_asic_bgp_instance'])
Expand All @@ -193,7 +193,7 @@ def test_show_multi_asic_ipv6_route_single_namespace(
show.cli.commands["ipv6"].commands["route"], ["-nasic2"])
print("{}".format(result.output))
assert result.exit_code == 0
assert result.output == show_ip_route_common.show_ipv6_route_multi_asic_single_namesapce_output
assert result.output == show_ip_route_common.show_ipv6_route_multi_asic_single_namespace_output

@pytest.mark.parametrize('setup_multi_asic_bgp_instance',
['ipv6_specific_route'], indirect=['setup_multi_asic_bgp_instance'])
Expand Down
8 changes: 4 additions & 4 deletions tests/show_ip_route_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@
* via 10.0.0.16, PortChannel1016, 2d22h00m
"""

show_ipv6_route_multi_asic_all_namesapce_output = """\
show_ipv6_route_multi_asic_all_namespace_output = """\
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
Expand Down Expand Up @@ -711,7 +711,7 @@
C *fe80::/64 is directly connected, Ethernet24, 2d22h02m
"""

show_ipv6_route_multi_asic_all_namesapce_alias_output = """\
show_ipv6_route_multi_asic_all_namespace_alias_output = """\
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
Expand Down Expand Up @@ -757,7 +757,7 @@
C *fe80::/64 is directly connected, Ethernet1/7, 2d22h02m
"""

show_ipv6_route_multi_asic_single_namesapce_output = """\
show_ipv6_route_multi_asic_single_namespace_output = """\
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
Expand Down Expand Up @@ -788,7 +788,7 @@
C *fe80::/64 is directly connected, PortChannel1016, 2d22h02m
"""

show_ip_route_multi_asic_invalid_namesapce_err_output = """\
show_ip_route_multi_asic_invalid_namespace_err_output = """\
namespace 'asic7' is not valid. valid name spaces are:
['asic0', 'asic1', 'asic2']
"""
Expand Down
Loading