Skip to content

Commit 0064bdd

Browse files
committed
namespace typo fixes (#2795)
What I did - corrected `namesapce` -> `namespace` across portconfig/docs/tests. Signed-off-by: Bojun Feng <davidfeng@uchicago.edu>
1 parent 3994fcd commit 0064bdd

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

pfcwd/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,14 @@ def collect_config(self, ports):
226226
).get('POLL_INTERVAL')
227227

228228
current_ns = self.multi_asic.current_namespace
229-
asic_namesapce = \
229+
asic_namespace = \
230230
"" if current_ns is None or current_ns == "" else " on {}".format(
231231
current_ns
232232
)
233233
if poll_interval is not None:
234234
click.echo(
235235
"Changed polling interval to {}ms{}".format(
236-
poll_interval, asic_namesapce
236+
poll_interval, asic_namespace
237237
)
238238
)
239239

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

244244
if big_red_switch is not None:
245245
click.echo("BIG_RED_SWITCH status is {}{}".format(
246-
big_red_switch, asic_namesapce
246+
big_red_switch, asic_namespace
247247
))
248248

249249
self.table += table

scripts/generate_dump

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ save_bcmcmd() {
150150
}
151151

152152
###############################################################################
153-
# Runs a given bcmcmd command in all namesapces in case of multi ASIC platform
153+
# Runs a given bcmcmd command in all namespaces in case of multi ASIC platform
154154
# Globals:
155155
# NUM_ASICS
156156
# Arguments:
@@ -298,7 +298,7 @@ dummy_cleanup_method() {
298298
}
299299

300300
###############################################################################
301-
# Runs a given command in all namesapces in case of multi ASIC platform, in
301+
# Runs a given command in all namespaces in case of multi ASIC platform, in
302302
# default (host) namespace in single ASIC platform
303303
# Globals:
304304
# NUM_ASICS
@@ -422,7 +422,7 @@ get_vtysh_namespace() {
422422
}
423423

424424
###############################################################################
425-
# Runs a vtysh command in all namesapces for a multi ASIC platform, and in
425+
# Runs a vtysh command in all namespaces for a multi ASIC platform, and in
426426
# default (host) namespace in single ASIC platforms. Saves its output to the
427427
# file.
428428
# Globals:
@@ -1557,7 +1557,7 @@ collect_nvidia_sdk_dumps() {
15571557
}
15581558

15591559
###############################################################################
1560-
# Runs a given marvellcmd command in all namesapces in case of multi ASIC platform
1560+
# Runs a given marvellcmd command in all namespaces in case of multi ASIC platform
15611561
# Globals:
15621562
# NUM_ASICS
15631563
# Arguments:

scripts/portconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ optional arguments:
1616
-f --fec port fec mode
1717
-m --mtu port mtu in bytes
1818
-tp --tpid interface tpid (0x8100, 9100, 9200, 88A8)
19-
-n --namesapce Namespace name
19+
-n --namespace Namespace name
2020
-an --autoneg port auto negotiation mode
2121
-S --adv-speeds port advertised speeds
2222
-t --interface-type port interface type
@@ -258,7 +258,7 @@ class portconfig(object):
258258
if not self.namespace:
259259
state_db = SonicV2Connector(host="127.0.0.1")
260260
else:
261-
state_db = SonicV2Connector(host="127.0.0.1", namesapce=self.namespace, use_unix_socket_path=True)
261+
state_db = SonicV2Connector(host="127.0.0.1", namespace=self.namespace, use_unix_socket_path=True)
262262
state_db.connect(state_db.STATE_DB)
263263
return state_db.get(state_db.STATE_DB, '{}|{}'.format(PORT_STATE_TABLE_NAME, port), PORT_STATE_SUPPORTED_SPEEDS)
264264

tests/ip_show_routes_multi_asic_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def test_show_multi_asic_ip_route_namespace_option_err(
135135
show.cli.commands["ip"].commands["route"], ["-nasic7"])
136136
print("{}".format(result.output))
137137
assert result.exit_code == 0
138-
assert result.output == show_ip_route_common.show_ip_route_multi_asic_invalid_namesapce_err_output
138+
assert result.output == show_ip_route_common.show_ip_route_multi_asic_invalid_namespace_err_output
139139

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

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

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

198198
@pytest.mark.parametrize('setup_multi_asic_bgp_instance',
199199
['ipv6_specific_route'], indirect=['setup_multi_asic_bgp_instance'])

tests/show_ip_route_common.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@
665665
* via 10.0.0.16, PortChannel1016, 2d22h00m
666666
"""
667667

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

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

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

791-
show_ip_route_multi_asic_invalid_namesapce_err_output = """\
791+
show_ip_route_multi_asic_invalid_namespace_err_output = """\
792792
namespace 'asic7' is not valid. valid name spaces are:
793793
['asic0', 'asic1', 'asic2']
794794
"""

0 commit comments

Comments
 (0)