Skip to content

Commit

Permalink
[Fast-Reboot]: fast-reboot-dump.py script connects to the DB by TCP (s…
Browse files Browse the repository at this point in the history
…onic-net#225)

* Check user id for fast-reboot-dump.py script

* exit with exit code 1

* Use TCP to connect to the DB. Remove check for super user as redundant

* Finnaly Remove check for super user as redundant
  • Loading branch information
pavel-shirshov authored and lguohan committed Jul 15, 2018
1 parent 0c5b8b7 commit f1017ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/fast-reboot-dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
ARP_PAD = binascii.unhexlify('00' * 18)

def generate_arp_entries(filename, all_available_macs):
db = swsssdk.SonicV2Connector()
db = swsssdk.SonicV2Connector(host='127.0.0.1')
db.connect(db.APPL_DB, False) # Make one attempt only

arp_output = []
Expand Down Expand Up @@ -148,7 +148,7 @@ def get_fdb(db, vlan_name, vlan_id, bridge_id_2_iface):
def generate_fdb_entries(filename):
fdb_entries = []

db = swsssdk.SonicV2Connector()
db = swsssdk.SonicV2Connector(host='127.0.0.1')
db.connect(db.ASIC_DB, False) # Make one attempt only

bridge_id_2_iface = get_map_bridge_port_id_2_iface_name(db)
Expand Down Expand Up @@ -241,7 +241,7 @@ def get_default_entries(db, route):
return obj

def generate_default_route_entries(filename):
db = swsssdk.SonicV2Connector()
db = swsssdk.SonicV2Connector(host='127.0.0.1')
db.connect(db.APPL_DB, False) # Make one attempt only

default_routes_output = []
Expand Down

0 comments on commit f1017ab

Please sign in to comment.