Commit 1f305970 authored by Binh Nguyen's avatar Binh Nguyen

Fix bug

parent 49d04977
#!/bin/sh
#!/bin/bash
source ../simeca_constants.sh
#
......@@ -14,11 +14,17 @@ ssh -o StrictHostKeyChecking=no epc.$domain -t -t "cd $HSS_PROVISION && sudo ./l
ssh -o StrictHostKeyChecking=no epc.$domain -t -t "cd $HSS_PROVISION && sudo ./load_1_client.sh 001011234567899 491234567899 100"
ssh -o StrictHostKeyChecking=no epc.$domain -t -t "cd $HSS_PROVISION && sudo ./load_1_client.sh $NEXUS_IMSI $NEXUS_MISDN 200"
sudo bash -c 'echo "001011234567890|$NEXUS_IMSI" > $CONF_PATH/P2P_ATTACH.data' #for P2P HO
sudo bash -c 'echo "1,001011234567899,192.168.7.10" > $CONF_PATH/SERVER.data'
sudo bash -c 'echo "2,001011234567890,192.168.7.10" >> $CONF_PATH/SERVER.data'
sudo bash -c 'echo "3,001011234567891,192.168.7.10" >> $CONF_PATH/SERVER.data'
sudo bash -c 'echo "4,$NEXUS_IMSI,192.168.7.10" >> $CONF_PATH/SERVER.data'
echo $CONF_PATH/P2P_ATTACH.data
echo "001011234567890|$NEXUS_IMSI" > /tmp/P2P_ATTACH.data #for P2P HO
echo "1,001011234567899,192.168.7.10" > /tmp/SERVER.data
echo "2,001011234567890,192.168.7.10" >> /tmp/SERVER.data
echo "3,001011234567891,192.168.7.10" >> /tmp/SERVER.data
echo "4,$NEXUS_IMSI,192.168.7.10" >> /tmp/SERVER.data
sudo cp /tmp/P2P_ATTACH.data $CONF_PATH/P2P_ATTACH.data #for P2P HO
sudo cp /tmp/SERVER.data $CONF_PATH/SERVER.data
echo "==========Starting eNBs and MF .... ============"
......@@ -26,7 +32,7 @@ cd $EPC
bash $EPC/restart_epc.sh
echo "==========Copying IMSI data into $DATA ==========="
scp -o StrictHostKeyChecking=no 'epc.$domain:/tmp/IMSI_*' /tmp/
scp -o StrictHostKeyChecking=no "epc.$domain:/tmp/IMSI_*" /tmp/
sudo cp /tmp/IMSI_* $DATA/
echo "==========Starting MC .... ============"
......
......@@ -8,8 +8,8 @@ source ../simeca_constants.sh
echo "==========Starting eNBs and MF .... ============"
cd $SIMECA_PATH
bash $SIMECA_PATH/restart_epc.sh
cd $EPC
bash $EPC/restart_epc.sh
echo "==========Starting MC .... ============"
cd $MC_PATH
......
......@@ -42,7 +42,7 @@ sudo sed -i "s/MGN/$mgn/g" /opt/OpenEPC/etc/enodeb-ip.xml
sudo cp /opt/OpenEPC/etc/enodeb.xml /opt/OpenEPC/etc/enodeb.bk.xml
sudo cp /opt/OpenEPC/etc/enodeb-ip.xml /opt/OpenEPC/etc/enodeb.xml
cd $SIMECA_EPC/wharf_rel5
cd $SIMECA_EPC/wharf
screen -S enodeb -L -d -m -h 10000 /bin/bash -c "./wharf -f /opt/OpenEPC/etc/enodeb.xml"
screen -wipe
......
......@@ -41,7 +41,7 @@ sudo sed -i "s/001011234567890/$imsi/g" /opt/OpenEPC/etc/mm.xml
sudo sed -i "s/Alice/$c_name/g" /opt/OpenEPC/etc/mm.xml
cd $SIMECA_EPC/wharf_rel5
cd $SIMECA_EPC/wharf
screen -S mm -L -d -m -h 10000 /bin/bash -c "./wharf -f /opt/OpenEPC/etc/mm.xml"
screen -wipe
......
......@@ -167,7 +167,7 @@ class Dispatcher(ControllerBase):
enb_num = enb_name[3:4]
#if int(enb_num) > 2:
# enb_num = '2'
physical_logical_inf_map = subprocess.check_output(['ssh -o StrictHostKeyChecking=no %s "cd %s && ./get_interface_map.pl"' % (self._SCRIPTS, enb_ulr)], shell=True)
physical_logical_inf_map = subprocess.check_output(['ssh -o StrictHostKeyChecking=no %s "cd %s && ./get_interface_map.pl"' % (enb_ulr,self._SCRIPTS)], shell=True)
an_lte_inf = re.search(r"an-lte"+enb_num+r" -> (.*) -> (.*) -> (.*)",physical_logical_inf_map).group(1)
#print "_set_default_route_enb %s, ue_prefix %s, an_lte interface %s" % ( enb_cellid, ue_prefix, an_lte_inf)
......@@ -184,7 +184,7 @@ class Dispatcher(ControllerBase):
enb_num = enb_name[3:4]
#if int(enb_num) > 2:
# enb_num = '2'
physical_logical_inf_map = subprocess.check_output(['ssh -o StrictHostKeyChecking=no %s "cd %s && ./get_interface_map.pl"' % (self._SCRIPTS, enb_ulr)], shell=True)
physical_logical_inf_map = subprocess.check_output(['ssh -o StrictHostKeyChecking=no %s "cd %s && ./get_interface_map.pl"' % (enb_ulr, self._SCRIPTS)], shell=True)
LOG.debug("%s\n%s\n%s\n%s" % (enb_cellid, enb_name, enb_ulr, physical_logical_inf_map))
an_lte_inf = re.search(r"an-lte(.*) -> (.*) -> (.*) -> (.*)",physical_logical_inf_map).group(2)
......@@ -230,7 +230,7 @@ class Dispatcher(ControllerBase):
server_ip = Dispatcher.servers[server]['ip']
t = server_ip.split('.')
server_subnet = "%s.%s.%s.0/24" % (t[0], t[1], t[2])
net_d_enb_str = subprocess.check_output(['ssh -o StrictHostKeyChecking=no %s "%s/get_interface_map.pl | grep net-d-enb"' % (self._SCRIPTS, enb_ulr)], shell=True)
net_d_enb_str = subprocess.check_output(['ssh -o StrictHostKeyChecking=no %s "%s/get_interface_map.pl | grep net-d-enb"' % (enb_ulr, self._SCRIPTS)], shell=True)
net_d_enb = net_d_enb_str.split('->')[1]
LOG.debug("Setting ip route for server %s on enb %s dev %s" % (server_subnet,enb_ulr, net_d_enb))
ssh_p = subprocess.Popen(["ssh", enb_ulr, "sudo ip route add %s dev %s" % (server_subnet, net_d_enb)], stdout=subprocess.PIPE)
......
......@@ -113,8 +113,8 @@ class RestIoTApi(app_manager.RyuApp):
'''
Set up multiple P2P flows between ue_ip and a number of destination UEs.
'''
#uri = path + '/attach/p2p_multiple'
uri = path + '/attach/p2p'
uri = path + '/attach/p2p_multiple'
#uri = path + '/attach/p2p'
mapper.connect('iot', uri,
controller=Dispatcher, action='installP2PFlowsUEs',
conditions=dict(method=['POST']))
......
......@@ -25,7 +25,7 @@ sudo apt-get install tshark
for a in "${access_switch_list[@]}"
do
echo "Starting switch $a.$domain, Controller IP = $controller_ip"
ssh $a.$domain "cd $START_SCRIPTS && sudo ./start_access_switch_with_controller.sh $controller_ip" || {
ssh -o StrictHostKeyChecking=no $a.$domain "cd $START_SCRIPTS && sudo ./start_access_switch_with_controller.sh $controller_ip" || {
echo "Could not start Access switch $a!"
exit 1
}
......@@ -34,7 +34,7 @@ done
for s in "${intermediary_switch_list[@]}"
do
echo "Starting switch $s.$domain, Controller IP = $controller_ip"
ssh $s.$domain "cd $START_SCRIPTS && sudo ./start_intermediary_switch_with_controller.sh $controller_ip" || {
ssh -o StrictHostKeyChecking=no $s.$domain "cd $START_SCRIPTS && sudo ./start_intermediary_switch_with_controller.sh $controller_ip" || {
echo "Could not start Intermediary switch $s!"
exit 1
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment