Skip to content

Commit

Permalink
Fix run error
Browse files Browse the repository at this point in the history
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
  • Loading branch information
wendani committed Mar 2, 2021
1 parent b161dc5 commit ec36bcd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_sub_port_intf.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def create_sub_port_intf_profile_appl_db(self, sub_port_intf_name, admin_status,
pairs.append((VRF_NAME if vrf_name.startswith(VRF_PREFIX) else VNET_NAME, vrf_name))
fvs = swsscommon.FieldValuePairs(pairs)

tbl = swsscommon.ProducerStateTable(self.appl_db, APP_INTF_TABLE_NAME)
tbl = swsscommon.ProducerStateTable(self.app_db.db_connection, APP_INTF_TABLE_NAME)
tbl.set(sub_port_intf_name, fvs)

def add_sub_port_intf_ip_addr(self, sub_port_intf_name, ip_addr):
Expand All @@ -127,7 +127,7 @@ def add_sub_port_intf_ip_addr_appl_db(self, sub_port_intf_name, ip_addr):
]
fvs = swsscommon.FieldValuePairs(pairs)

tbl = swsscommon.ProducerStateTable(self.appl_db, APP_INTF_TABLE_NAME)
tbl = swsscommon.ProducerStateTable(self.app_db.db_connection, APP_INTF_TABLE_NAME)
tbl.set(sub_port_intf_name + APPL_DB_SEPARATOR + ip_addr, fvs)

def set_sub_port_intf_admin_status(self, sub_port_intf_name, status):
Expand All @@ -147,7 +147,7 @@ def check_sub_port_intf_profile_removal(self, rif_oid):
self.asic_db.wait_for_deleted_keys(ASIC_RIF_TABLE, [rif_oid])

def remove_sub_port_intf_profile_appl_db(self, sub_port_intf_name):
tbl = swsscommon.ProducerStateTable(self.appl_db, APP_INTF_TABLE_NAME)
tbl = swsscommon.ProducerStateTable(self.app_db.db_connection, APP_INTF_TABLE_NAME)
tbl._del(sub_port_intf_name)

def remove_sub_port_intf_ip_addr(self, sub_port_intf_name, ip_addr):
Expand All @@ -159,7 +159,7 @@ def check_sub_port_intf_ip_addr_removal(self, sub_port_intf_name, ip_addrs):
self.app_db.wait_for_deleted_keys(APP_INTF_TABLE_NAME, interfaces)

def remove_sub_port_intf_ip_addr_appl_db(self, sub_port_intf_name, ip_addr):
tbl = swsscommon.ProducerStateTable(self.appl_db, APP_INTF_TABLE_NAME)
tbl = swsscommon.ProducerStateTable(self.app_db.db_connection, APP_INTF_TABLE_NAME)
tbl._del(sub_port_intf_name + APPL_DB_SEPARATOR + ip_addr)

def get_oids(self, table):
Expand Down

0 comments on commit ec36bcd

Please sign in to comment.