Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
  • Loading branch information
arlakshm committed Jul 24, 2020
1 parent 7f3a0b4 commit 15dbd2f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
9 changes: 9 additions & 0 deletions utilities_common/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#All the constant used in sonic-utilities

DEFAULT_NAMESPACE = ''
DISPLAY_ALL = 'all'
DISPLAY_EXTERNAL = 'frontend'
BGP_NEIGH_OBJ = 'BGP_NEIGH'
PORT_CHANNEL_OBJ = 'PORT_CHANNEL'
PORT_OBJ = 'PORT'

15 changes: 5 additions & 10 deletions utilities_common/multi_asic.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,10 @@
from sonic_device_util import is_bgp_session_internal
from sonic_device_util import is_port_channel_internal
from sonic_device_util import is_port_internal


from swsssdk import ConfigDBConnector
from swsssdk import SonicDBConfig
from swsssdk import SonicV2Connector

DEFAULT_NAMESPACE = ''
DISPLAY_ALL = 'all'
DISPLAY_EXTERNAL = 'frontend'
PORT_CHANNEL_OBJ = 'PORT_CHANNEL'
PORT_OBJ = 'PORT'
BGP_NEIGH_OBJ = 'BGP_NEIGH'
from utilities_common.constants import *

class MultiAsic(object):

Expand Down Expand Up @@ -67,7 +59,10 @@ def connect_config_db_for_ns(self, namespace=DEFAULT_NAMESPACE):

def is_object_internal(self, object_type, cli_object):
'''
The function check if a CLI object is internal and returns true or false.
The function checks if a CLI object is internal and returns true or false.
Internal objects are port or portchannel which are connected to other
ports or portchannels within a multi ASIC device.
For single asic, this function is not applicable
'''
if object_type == PORT_OBJ:
Expand Down

0 comments on commit 15dbd2f

Please sign in to comment.