Skip to content

Commit 6be74f7

Browse files
remove python wrapper
Signed-off-by: Stepan Blyschak <[email protected]>
1 parent e7de774 commit 6be74f7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

config/main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from utilities_common import util_base
3636
from swsscommon import swsscommon
3737
from swsscommon.swsscommon import SonicV2Connector, ConfigDBConnector, ConfigDBPipeConnector, \
38-
is_interface_name_valid, IFACE_NAME_MAX_LEN
38+
isInterfaceNameValid, IFACE_NAME_MAX_LEN
3939
from utilities_common.db import Db
4040
from utilities_common.intf_filter import parse_interface_in_filter
4141
from utilities_common import bgp_util
@@ -439,7 +439,7 @@ def is_portchannel_name_valid(portchannel_name):
439439
if (portchannel_name[CFG_PORTCHANNEL_PREFIX_LEN:].isdigit() is False or
440440
int(portchannel_name[CFG_PORTCHANNEL_PREFIX_LEN:]) > CFG_PORTCHANNEL_MAX_VAL) :
441441
return False
442-
if not is_interface_name_valid(portchannel_name):
442+
if not isInterfaceNameValid(portchannel_name):
443443
return False
444444
return True
445445

@@ -6031,7 +6031,7 @@ def add_vrf(ctx, vrf_name):
60316031
config_db = ValidatedConfigDBConnector(ctx.obj['config_db'])
60326032
if not vrf_name.startswith("Vrf") and not (vrf_name == 'mgmt') and not (vrf_name == 'management'):
60336033
ctx.fail("'vrf_name' must begin with 'Vrf' or named 'mgmt'/'management' in case of ManagementVRF.")
6034-
if not is_interface_name_valid(vrf_name):
6034+
if not isInterfaceNameValid(vrf_name):
60356035
ctx.fail("'vrf_name' length should not exceed {} characters".format(IFACE_NAME_MAX_LEN))
60366036
if is_vrf_exists(config_db, vrf_name):
60376037
ctx.fail("VRF {} already exists!".format(vrf_name))
@@ -6051,7 +6051,7 @@ def del_vrf(ctx, vrf_name):
60516051
config_db = ValidatedConfigDBConnector(ctx.obj['config_db'])
60526052
if not vrf_name.startswith("Vrf") and not (vrf_name == 'mgmt') and not (vrf_name == 'management'):
60536053
ctx.fail("'vrf_name' must begin with 'Vrf' or named 'mgmt'/'management' in case of ManagementVRF.")
6054-
if not is_interface_name_valid(vrf_name):
6054+
if not isInterfaceNameValid(vrf_name):
60556055
ctx.fail("'vrf_name' length should not exceed {} characters".format((IFACE_NAME_MAX_LEN)))
60566056
syslog_table = config_db.get_table("SYSLOG_SERVER")
60576057
syslog_vrf_dev = "mgmt" if vrf_name == "management" else vrf_name
@@ -7830,7 +7830,7 @@ def add_subinterface(ctx, subinterface_name, vid):
78307830

78317831
if interface_alias is None:
78327832
ctx.fail("{} invalid subinterface".format(interface_alias))
7833-
if not is_interface_name_valid(interface_alias):
7833+
if not isInterfaceNameValid(interface_alias):
78347834
ctx.fail("Subinterface name length should not exceed {} characters".format(IFACE_NAME_MAX_LEN))
78357835

78367836
if interface_alias.startswith("Po") is True:

config/vxlan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from jsonpatch import JsonPatchConflict
55
from .validated_config_db_connector import ValidatedConfigDBConnector
6-
from swsscommon.swsscommon import is_interface_name_valid, IFACE_NAME_MAX_LEN
6+
from swsscommon.swsscommon import isInterfaceNameValid, IFACE_NAME_MAX_LEN
77

88
ADHOC_VALIDATION = True
99
#
@@ -25,7 +25,7 @@ def add_vxlan(db, vxlan_name, src_ip):
2525
if ADHOC_VALIDATION:
2626
if not clicommon.is_ipaddress(src_ip):
2727
ctx.fail("{} invalid src ip address".format(src_ip))
28-
if not is_interface_name_valid(vxlan_name):
28+
if not isInterfaceNameValid(vxlan_name):
2929
ctx.fail("'vxlan_name' length should not exceed {} characters".format(IFACE_NAME_MAX_LEN))
3030

3131
vxlan_keys = db.cfgdb.get_keys('VXLAN_TUNNEL')

0 commit comments

Comments
 (0)