Commit 791021b9 authored by Binh Nguyen's avatar Binh Nguyen

Modify paths

parent 3c92f168
......@@ -56,7 +56,7 @@ ENABLE_OVS_GTP = 0
class SMORE_controller(app_manager.RyuApp):
_SCRIPTS = "/usr/local/src/simeca_scripts"
_SCRIPTS = "/usr/local/src/simeca/start_scripts"
OFP_VERSIONS = [ofproto_v1_3.OFP_VERSION]
#OFP_VERSIONS = [ofproto_v1_0.OFP_VERSION]
_LISTEN_INF = "eth2" #Todo: should be SGW's net_d interface
......
......@@ -38,7 +38,7 @@ import os
class AccessSwitchGtp:
##constants
_SCRIPTS="/usr/local/src/simeca_scripts"
_SCRIPTS="/usr/local/src/simeca/start_scripts"
_debug = 0
_OVS_OFCTL = "ovs-ofctl"
......@@ -89,7 +89,7 @@ class AccessSwitchGtp:
enb_ulr = "enb%s.%s" % (index,domain_name)
if index=="1":
enb_ulr = "penb1.%s" % (domain_name)
physical_logical_inf_map = subprocess.check_output(['ssh %s "cd %s && ./get_interface_map.pl"'% (enb_ulr, self._SCRIPTS)], 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)
enb_mac = ":".join(re.findall(r'.{1,2}',re.search(r"net-d-enb" + str(index) + r" -> (.*) -> (.*) -> (.*)",physical_logical_inf_map).group(3)))
self.access_switches[a]['enb_mac'] = enb_mac
......
......@@ -49,7 +49,7 @@ from collections import defaultdict
class Dispatcher(ControllerBase):
cnt = 0
##constants
_SCRIPTS = "/usr/local/src/simeca_scripts"
_SCRIPTS = "/usr/local/src/simeca/start_scripts"
_debug = 0
_XML_HEADER = "<?xml version=\"1.0\"?>\n\
......@@ -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 %s "cd %s/iot-controller && ./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"' % (self._SCRIPTS, enb_ulr)], 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 %s "cd %s/iot-controller && ./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"' % (self._SCRIPTS, enb_ulr)], 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 %s "%s/iot-controller/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"' % (self._SCRIPTS, enb_ulr)], 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)
......
#!/bin/bash
ovs-ofctl dump-ports-desc br0
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