20
20
from portconfig import get_child_ports
21
21
from socket import AF_INET , AF_INET6
22
22
from sonic_py_common import device_info , multi_asic
23
- from sonic_py_common .interface import get_interface_table_name , get_port_table_name , intf_get_longname
23
+ from sonic_py_common .interface import get_interface_table_name , get_port_table_name , get_intf_longname
24
24
from utilities_common import util_base
25
25
from swsscommon .swsscommon import SonicV2Connector , ConfigDBConnector
26
26
from utilities_common .db import Db
@@ -5901,7 +5901,7 @@ def add_subinterface(ctx, subinterface_name, vid):
5901
5901
if interface_alias is not None :
5902
5902
if not port_dict :
5903
5903
ctx .fail ("{} parent interface not found. {} table none" .format (interface_alias , intf_table_name ))
5904
- if intf_get_longname (interface_alias ) not in port_dict .keys ():
5904
+ if get_intf_longname (interface_alias ) not in port_dict .keys ():
5905
5905
ctx .fail ("{} parent interface not found" .format (subinterface_name ))
5906
5906
5907
5907
# Validate if parent is portchannel member
@@ -5924,7 +5924,7 @@ def add_subinterface(ctx, subinterface_name, vid):
5924
5924
if vid is not None :
5925
5925
subintf_dict .update ({"vlan" : vid })
5926
5926
5927
- if subintf_vlan_check (config_db , intf_get_longname (interface_alias ), vid ) is True :
5927
+ if subintf_vlan_check (config_db , get_intf_longname (interface_alias ), vid ) is True :
5928
5928
ctx .fail ("Vlan {} encap already configured on other subinterface on {}" .format (vid , interface_alias ))
5929
5929
5930
5930
subintf_dict .update ({"admin_status" : "up" })
0 commit comments