Skip to content

Commit

Permalink
Revert "Update 201803 branch with masters of sonic-swss, sonic-saired…
Browse files Browse the repository at this point in the history
…is, sonic-swss-common, and sonic-utilities (sonic-net#1791)"

This reverts commit 4d795ec.
  • Loading branch information
bolv committed Jul 30, 2018
1 parent e129efe commit 16790a4
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,3 @@
{%- endif %}
{# Write the contents of sai_ profile_filename to sai.profile file #}
{{ sai_profile_contents }}
{# make linkscan interval time equal to 2.0 sec to make Fast-Reboot faster #}
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['fast_reboot'] is defined -%}
{%- set fast_reboot = DEVICE_METADATA['localhost']['fast_reboot'] -%}
{%- if fast_reboot %}
{%- set sai_profile_contents = 'SAI_BCM_LINKSCAN_INTERVAL=2000000' -%}
{%- else %}
{%- set sai_profile_contents = '' -%}
{%- endif %}
{{ sai_profile_contents }}
{%- endif %}
6 changes: 3 additions & 3 deletions dockers/docker-lldp-sv2/lldpmgrd
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class LldpManager(object):
TABLE_SEPARATOR = "|"

# Retrieve all entires for this port from the Port table
port_table = swsscommon.Table(self.config_db, swsscommon.CFG_PORT_TABLE_NAME)
port_table = swsscommon.Table(self.config_db, swsscommon.CFG_PORT_TABLE_NAME, TABLE_SEPARATOR)
(status, fvp) = port_table.get(port_name)
if status:
# Convert list of tuples to a dictionary
Expand All @@ -144,7 +144,7 @@ class LldpManager(object):
lldpcli_cmd = "lldpcli configure ports {0} lldp portidsubtype local {1}".format(port_name, port_alias)

# Retrieve all entires for this port from the Device Neighbor table
device_neighbor_table = swsscommon.Table(self.config_db, swsscommon.CFG_DEVICE_NEIGHBOR_TABLE_NAME)
device_neighbor_table = swsscommon.Table(self.config_db, swsscommon.CFG_DEVICE_NEIGHBOR_TABLE_NAME, TABLE_SEPARATOR)
(status, fvp) = device_neighbor_table.get(port_name)
if status:
# Convert list of tuples to a dictionary
Expand Down Expand Up @@ -216,7 +216,7 @@ class LldpManager(object):

# Listen indefinitely for changes to the PORT table in the State DB
while True:
(state, c) = sel.select(SELECT_TIMEOUT_MS)
(state, c, fd) = sel.select(SELECT_TIMEOUT_MS)

if state == swsscommon.Select.OBJECT:
(key, op, fvp) = sst.pop()
Expand Down
2 changes: 0 additions & 2 deletions files/image_config/cron.d/s6100-fast-reboot

This file was deleted.

2 changes: 1 addition & 1 deletion platform/broadcom/docker-syncd-brcm/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mkdir -p /etc/sai.d/

# Create/Copy the sai.profile to /etc/sai.d/sai.profile
if [ -f $HWSKU_DIR/sai.profile.j2 ]; then
sonic-cfggen -H -d -t $HWSKU_DIR/sai.profile.j2 > /etc/sai.d/sai.profile
sonic-cfggen -d -t $HWSKU_DIR/sai.profile.j2 > /etc/sai.d/sai.profile
else
if [ -f $HWSKU_DIR/sai.profile ]; then
cp $HWSKU_DIR/sai.profile /etc/sai.d/sai.profile
Expand Down
4 changes: 1 addition & 3 deletions src/sonic-config-engine/sonic-cfggen
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ from portconfig import get_port_config
from sonic_platform import get_machine_info
from sonic_platform import get_platform_info
from sonic_platform import get_system_mac
from sonic_platform import get_fast_reboot_status
from swsssdk import ConfigDBConnector
from collections import OrderedDict
from natsort import natsorted
Expand Down Expand Up @@ -206,8 +205,7 @@ def main():
if args.platform_info:
hardware_data = {'DEVICE_METADATA': {'localhost': {
'platform': platform,
'mac': get_system_mac(),
'fast_reboot': get_fast_reboot_status()
'mac': get_system_mac()
}}}
deep_update(data, hardware_data)

Expand Down
3 changes: 0 additions & 3 deletions src/sonic-config-engine/sonic_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,3 @@ def get_system_mac():
mac = mac[:-2] + aligned_last_byte
return mac

def get_fast_reboot_status():
with open('/proc/cmdline') as fp:
return 'fast-reboot' in fp.read()
2 changes: 1 addition & 1 deletion src/sonic-sairedis
2 changes: 1 addition & 1 deletion src/sonic-swss
2 changes: 1 addition & 1 deletion src/sonic-swss-common
2 changes: 1 addition & 1 deletion src/sonic-utilities

0 comments on commit 16790a4

Please sign in to comment.