Commit e222d744 authored by Rahman's avatar Rahman

kirk's modifications

parent 979f6986
......@@ -64,27 +64,19 @@ import geni.rspec.emulab.pnext as PN
#
class GLOBALS(object):
OAI_DS = "urn:publicid:IDN+emulab.net:phantomnet+ltdataset+oai-develop"
OAI_SIM_DS = "urn:publicid:IDN+emulab.net:phantomnet+dataset+PhantomNet:oai"
UE_IMG = URN.Image(PN.PNDEFS.PNET_AM, "PhantomNet:ANDROID444-STD")
ADB_IMG = URN.Image(PN.PNDEFS.PNET_AM, "PhantomNet:UBUNTU14-64-PNTOOLS")
OAI_EPC_IMG = URN.Image(PN.PNDEFS.PNET_AM, "PhantomNet:UBUNTU16-64-OAIEPC")
OAI_ENB_IMG = URN.Image(PN.PNDEFS.PNET_AM, "PhantomNet:OAI-Real-Hardware.enb1")
OAI_SIM_IMG = URN.Image(PN.PNDEFS.PNET_AM, "PhantomNet:UBUNTU14-64-OAI")
OAI_CONF_SCRIPT = "/usr/bin/sudo /local/repository/bin/config_oai.pl"
SIM_HWTYPE = "d430"
NUC_HWTYPE = "nuc5300"
UE_HWTYPE = "nexus5"
PC_IMG = "urn:publicid:IDN+emulab.net+image+argos-test:soapyuhd"
PC_HWTYPE = "d430"
IRIS_HWTYPE = "iris030"
def connectOAI_DS(node, sim):
def connectOAI_DS(node):
# Create remote read-write clone dataset object bound to OAI dataset
bs = request.RemoteBlockstore("ds-%s" % node.name, "/opt/oai")
if sim == 1:
bs.dataset = GLOBALS.OAI_SIM_DS
else:
bs.dataset = GLOBALS.OAI_DS
bs.dataset = GLOBALS.OAI_DS
bs.rwclone = True
# Create link from node to OAI dataset rw clone
......@@ -106,13 +98,6 @@ pc = portal.Context()
pc.defineParameter("FIXED_UE", "Bind to a specific UE",
portal.ParameterType.STRING, "", advanced=True,
longDescription="Input the name of a PhantomNet UE node to allocate (e.g., 'ue1'). Leave blank to let the mapping algorithm choose.")
pc.defineParameter("FIXED_ENB", "Bind to a specific eNodeB",
portal.ParameterType.STRING, "", advanced=True,
longDescription="Input the name of a PhantomNet eNodeB device to allocate (e.g., 'nuc1'). Leave blank to let the mapping algorithm choose. If you bind both UE and eNodeB devices, mapping will fail unless there is path between them via the attenuator matrix.")
pc.defineParameter("TYPE", "Experiment type",
portal.ParameterType.STRING,"ota",[("sim","Simulated UE"),("atten","Real UE with attenuator"),("ota","Over the air")],
longDescription="*Simulated UE*: OAI simulated UE connects to an OAI eNodeB and EPC. *Real UE with attenuator*: Real RF devices will be connected via transmission lines with variable attenuator control. *Over the air*: Real RF devices with real antennas and transmissions propagated through free space will be selected.")
#pc.defineParameter("RADIATEDRF", "Radiated (over-the-air) RF transmissions",
# portal.ParameterType.BOOLEAN, False,
......@@ -131,70 +116,54 @@ pc.verifyParameters()
# to request in our experiment, and their configuration.
#
request = pc.makeRequestRSpec()
epclink = request.Link("s1-lan")
# Checking for oaisim
if params.TYPE == "sim":
sim_enb = request.RawPC("sim-enb")
sim_enb.disk_image = GLOBALS.OAI_SIM_IMG
sim_enb.hardware_type = GLOBALS.SIM_HWTYPE
sim_enb.addService(rspec.Execute(shell="sh", command=GLOBALS.OAI_CONF_SCRIPT + " -r SIM_ENB"))
connectOAI_DS(sim_enb, 1)
epclink.addNode(sim_enb)
else:
# Add a node to act as the ADB target host
adb_t = request.RawPC("adb-tgt")
adb_t.disk_image = GLOBALS.ADB_IMG
# Request a PC for enb
enb1 = request.RawPC("enb1")
if params.FIXED_ENB:
enb1.component_id = params.FIXED_ENB
enb1.hardware_type = GLOBALS.PC_HWTYPE
enb1.disk_image = GLOBALS.PC_IMG
enb1.Desire( "rf-radiated" if params.TYPE == "ota" else "rf-controlled", 1 )
connectOAI_DS(enb1, 0)
enb1.addService(rspec.Execute(shell="sh", command="/usr/bin/sudo /local/repository/irishost_start.sh"))
ifpc1ir1 = enb1.addInterface("pc1ir1", rspec.IPv4Address("192.168.1.1", "255.255.255.0"))
# Request an Iris SDR
ir1 = request.RawPC("iris1")
ir1.hardware_type = GLOBALS.IRIS_HWTYPE
# Connect nuc1 to ir1 over the wired net
link1 = request.Link("l1", members=[ifpc1ir1,ir1])
enb1.addService(rspec.Execute(shell="sh", command=GLOBALS.OAI_CONF_SCRIPT + " -r ENB"))
enb1_rue1_rf = enb1.addInterface("rue1_rf")
# Add an OTS (Nexus 5) UE
rue1 = request.UE("rue1")
if params.FIXED_UE:
rue1.component_id = params.FIXED_UE
rue1.hardware_type = GLOBALS.UE_HWTYPE
rue1.disk_image = GLOBALS.UE_IMG
rue1.Desire( "rf-radiated" if params.TYPE == "ota" else "rf-controlled", 1 )
rue1.adb_target = "adb-tgt"
rue1_enb1_rf = rue1.addInterface("enb1_rf")
# Create the RF link between the Nexus 5 UE and eNodeB
rflink2 = request.RFLink("rflink2")
rflink2.addInterface(enb1_rue1_rf)
rflink2.addInterface(rue1_enb1_rf)
# Add a link connecting the NUC eNB and the OAI EPC node.
epclink.addNode(enb1)
# Add a node to act as the ADB target host
adb_t = request.RawPC("adb-tgt")
adb_t.disk_image = GLOBALS.ADB_IMG
# Request a PC for enb
enb1 = request.RawPC("enb1")
enb1.hardware_type = GLOBALS.PC_HWTYPE
enb1.disk_image = GLOBALS.PC_IMG
connectOAI_DS(enb1)
enb1.addService(rspec.Execute(shell="sh", command="/usr/bin/sudo /local/repository/irishost_start.sh"))
ifpc1ir1 = enb1.addInterface("pc1ir1", rspec.IPv4Address("192.168.1.1", "255.255.255.0"))
#enb1.addService(rspec.Execute(shell="sh", command=GLOBALS.OAI_CONF_SCRIPT + " -r ENB"))
# Request an Iris SDR
ir1 = request.RawPC("iris1")
ir1.hardware_type = GLOBALS.IRIS_HWTYPE
ir1_rf = ir1.addInterface("ir1_rf")
# Connect eNodeB PC to ir1 over the wired net
link1 = request.Link("l1", members=[ifpc1ir1,ir1])
# Add an OTS (Nexus 5) UE
rue1 = request.UE("rue1")
if params.FIXED_UE:
rue1.component_id = params.FIXED_UE
rue1.hardware_type = GLOBALS.UE_HWTYPE
rue1.disk_image = GLOBALS.UE_IMG
#rue1.Desire("rf-controlled", 1)
rue1.adb_target = "adb-tgt"
rue1_rf = rue1.addInterface("rue1_rf")
# Create the RF link between the Nexus 5 UE and Iris radio
rflink = request.RFLink("rflink1")
rflink.addInterface(ir1_rf)
rflink.addInterface(rue1_rf)
# Add OAI EPC (HSS, MME, SPGW) node.
epc = request.RawPC("epc")
epc.disk_image = GLOBALS.OAI_EPC_IMG
epc.addService(rspec.Execute(shell="sh", command=GLOBALS.OAI_CONF_SCRIPT + " -r EPC"))
connectOAI_DS(epc, 0)
epclink.addNode(epc)
epclink.link_multiplexing = True
epclink.vlan_tagging = True
epclink.best_effort = True
connectOAI_DS(epc)
# Add a link connecting the PC eNB and the OAI EPC node.
epclink = request.Link("s1-lan", members=[enb1, epc])
#epclink.link_multiplexing = True
#epclink.vlan_tagging = True
#epclink.best_effort = True
tour = IG.Tour()
tour.Description(IG.Tour.MARKDOWN, tourDescription)
......
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