Commit ab25cbca authored by Kirk Webb's avatar Kirk Webb

A bunch of updates/changes vs. forked profile script.

parent c5f66b68
......@@ -118,20 +118,17 @@ import geni.rspec.emulab.pnext as PN
# Globals
#
class GLOBALS(object):
OAI_NR_ENB_DS = "urn:publicid:IDN+emulab.net:powdersandbox+ltdataset+gNB-dev"
OAI_NR_UE_DS = "urn:publicid:IDN+emulab.net:powdersandbox+ltdataset+nrUE-dev"
OAI_NR_DS = "urn:publicid:IDN+emulab.net:powderteam+ltdataset+OAI-NR"
OAI_NR_IMG = "urn:publicid:IDN+emulab.net+image+PowderTeam:update-nr-image"
OAI_CONF_SCRIPT = "/usr/bin/sudo /opt/oai/phantomnet/bin/config_oai.pl"
NUC_HWTYPE = "d740"
SDR_HWTYPE = "sdr"
TENGIG = 10 * 1000 * 1000
def connectOAI_DS(node, type):
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 type == 1:
bs.dataset = GLOBALS.OAI_NR_ENB_DS
else:
bs.dataset = GLOBALS.OAI_NR_UE_DS
bs = request.RemoteBlockstore("ds-%s" % node.name, "/opt/oai-nr")
bs.dataset = GLOBALS.OAI_NR_DS
bs.rwclone = True
# Create link from node to OAI dataset rw clone
......@@ -171,97 +168,49 @@ pc.verifyParameters()
#
request = pc.makeRequestRSpec()
# Add a node to act as the ADB target host
#adb_t = request.RawPC("adb-tgt")
#adb_t.disk_image = GLOBALS.ADB_IMG
# 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)
# Add a NUC eNB node.
enb1 = request.RawPC("enb1")
# Add a PC to pair with the X3x0 gNB.
gnb1 = request.RawPC("enb1")
if params.FIXED_ENB:
enb1.component_id = params.FIXED_ENB
enb1.hardware_type = GLOBALS.NUC_HWTYPE
enb1.Desire("site-meb", 1.0)
enb1.disk_image = GLOBALS.OAI_NR_IMG
connectOAI_DS(enb1,1)
enb1.addService(rspec.Execute(shell="sh", command=GLOBALS.OAI_CONF_SCRIPT + " -r ENB"))
#enb1_rue1_rf = enb1.addInterface("rue1_rf")
enb1_usrp_if = enb1.addInterface( "usrp_if" )
enb1_usrp_if.addAddress( rspec.IPv4Address( "192.168.30.1", "255.255.255.0" ) )
# 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.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 X300 node.
#usrp_enb = request.RawPC( "usrp_enb" )
usrp_enb = request.RawPC( "usrp_enb", component_id='pnbase2' )
usrp_enb.hardware_type = "sdr"
usrp_enb.disk_image = URN.Image(PN.PNDEFS.PNET_AM, "emulab-ops:GENERICDEV-NOVLANS")
usrp_enb_if = usrp_enb.addInterface( "usrp-nuc" )
usrp_enb_if.addAddress( rspec.IPv4Address( "192.168.30.2", "255.255.255.0" ) )
usrplink_enb = request.Link( "usrp-sdr_enb" )
usrplink_enb.addInterface( enb1_usrp_if )
usrplink_enb.addInterface( usrp_enb_if )
# Add a link connecting the NUC eNB and the OAI EPC node.
#epclink = request.Link("s1-lan")
#epclink.addNode(enb1)
#epclink.addNode(epc)
# Add a NUC eNB node.
gnb1.component_id = params.FIXED_ENB
gnb1.hardware_type = GLOBALS.NUC_HWTYPE
gnb1.Desire("site-meb", 1.0)
gnb1.disk_image = GLOBALS.OAI_NR_IMG
connectOAI_DS(gnb1,1)
gnb1_usrp_if = enb1.addInterface( "usrp_if" )
gnb1_usrp_if.addAddress( rspec.IPv4Address( "192.168.30.1", "255.255.255.0" ) )
# Add X300 eNB device.
usrp_gnb = request.RawPC( "gnb-lnk")
usrp_gnb.hardware_type = GLOBALS.SDR_HWTYPE
usrp_gnb.setUseTypeDefaultImage()
# Link between gNB X3x0 and PC host
enblnk = request.Link( "gNB-link", members = [gnb1_usrp_if, usrp_gnb] )
enblnk.bandwidth = GLOBALS.TENGIG
# Add a PC to pair with the X3x0 NR-UE.
rue1 = request.RawPC("rue1")
if params.FIXED_ENB:
rue1.component_id = params.FIXED_ENB
rue1.hardware_type = GLOBALS.NUC_HWTYPE
rue1.hardware_type = GLOBALS.PC_HWTYPE
rue1.Desire("site-meb", 1.0)
rue1.disk_image = GLOBALS.OAI_NR_IMG
connectOAI_DS(rue1,0)
rue1.addService(rspec.Execute(shell="sh", command=GLOBALS.OAI_CONF_SCRIPT + " -r ENB"))
#enb1_rue1_rf = enb1.addInterface("rue1_rf")
rue1_usrp_if = rue1.addInterface( "usrp_if" )
rue1_usrp_if.addAddress( rspec.IPv4Address( "192.168.30.1", "255.255.255.0" ) )
# 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.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 X300 node.
usrp_ue = request.RawPC( "usrp_ue" )
usrp_ue.hardware_type = "sdr"
usrp_ue.disk_image = URN.Image(PN.PNDEFS.PNET_AM, "emulab-ops:GENERICDEV-NOVLANS")
usrp_ue_if = usrp_ue.addInterface( "usrp-nuc" )
usrp_ue_if.addAddress( rspec.IPv4Address( "192.168.30.2", "255.255.255.0" ) )
usrplink_ue = request.Link( "usrp-sdr_ue" )
usrplink_ue.addInterface( rue1_usrp_if )
usrplink_ue.addInterface( usrp_ue_if )
# Add X300 NR-UE device.
usrp_ue = request.RawPC( "usrp-ue" )
usrp_ue.hardware_type = GLOBALS.SDR_HWTYPE
usrp_ue.setUseTypeDefaultImage()
# Create UE SDR -> PC link
uelnk = request.Link( "ue-lnk", members = [rue1_usrp_if, usrp_ue] )
uelnk.bandwidth = GLOBALS.TENGIG
# Create NR-UE to gNB PC Ethernet link for performing simulated runs
ethlnk = request.Link( "ue-gnb", members = [gnb1, rue1] )
ethlnk.bandwidth = GLOBALS.TENGIG
#
# Print and go!
......
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