VOL-3272: Bug fix in in-band startup script
Change-Id: Ic679155d51ffd9d9dbe0e869274b66527c7b135e
diff --git a/agent/inband/scripts/fetch_olt_sw_hw_details.py b/agent/inband/scripts/fetch_olt_sw_hw_details.py
index 78f4d44..627a73c 100644
--- a/agent/inband/scripts/fetch_olt_sw_hw_details.py
+++ b/agent/inband/scripts/fetch_olt_sw_hw_details.py
@@ -123,7 +123,7 @@
return None
-def retreive_vlan_id():
+def retrieve_vlan_id():
"""
Retrieves VLAN ids of in-band interfaces.
@@ -147,7 +147,7 @@
if olt_model == ASX_16:
if re.search(asf16_vlan, line):
eth_vlan = int(line.split('=')[1].strip())
- else if olt_model == ASG_64:
+ elif olt_model == ASG_64:
if re.search(asg64_vlan, line):
eth_vlan = int(line.split('=')[1].strip())
else:
@@ -230,14 +230,14 @@
olt_model=get_olt_board_name()
# retrieving VLAN ids of in-band interfaces
- vlan = retreive_vlan_id()
+ vlan = retrieve_vlan_id()
try:
if vlan is not None:
# Retreiving MAC address for in-band interfaces
if olt_model == ASX_16:
macaddr = os.popen("ifconfig " + ETH_2 + "." + str(vlan) +
" | grep -Po 'HWaddr " + r"\K.*$'").read().strip()
- else if olt_model == ASG_64:
+ elif olt_model == ASG_64:
macaddr = os.popen("ifconfig " + ETH_1 + "." + str(vlan) +
" | grep -Po 'HWaddr " + r"\K.*$'").read().strip()
else:
diff --git a/agent/inband/scripts/start_inband_oltservices.sh b/agent/inband/scripts/start_inband_oltservices.sh
index 4a8b433..5dfd1e8 100644
--- a/agent/inband/scripts/start_inband_oltservices.sh
+++ b/agent/inband/scripts/start_inband_oltservices.sh
@@ -78,7 +78,7 @@
OPENOLT_ARG_INPUT_FILE=/etc/default/openolt
# Wait time for BAL to get ready
-WAIT_TIME_BAL_READY=20
+WAIT_TIME_BAL_READY=120
#------------------------------------------------------------------------------
# Function Name: does_logger_exist
@@ -283,7 +283,7 @@
check_interface_is_up eth2 $interface_type
# wait for BAL to get ready
- sleep WAIT_TIME_BAL_READY
+ sleep $WAIT_TIME_BAL_READY
# enabling in-band communication through broadcom API on NIC interface id 14 for eth2 interface
echo "/Api/Set object=inband_mgmt_channel id=0 nni_intf={intf_type=nni intf_id=0} nic_intf_id=14 \
@@ -295,7 +295,7 @@
# Waiting till interface eth1 get initialized & RUNNING state
check_interface_is_up eth1 $interface_type
# wait for BAL to get ready
- sleep WAIT_TIME_BAL_READY
+ sleep $WAIT_TIME_BAL_READY
# enabling in-band communication through broadcom API on NIC interface id 14 for eth1 interface
echo "/Api/Set object=inband_mgmt_channel id=0 nni_intf={intf_type=nni intf_id=0} nic_intf_id=14 \
vlan_id=${ASGVOLT64_VLAN_ID_ETH1} action=none" | ./example_user_appl