Commit 94af2137 authored by Leigh Stoller's avatar Leigh Stoller

Replace profile.py

parent 2c89022f
......@@ -10,7 +10,7 @@ import geni.rspec.emulab as emulab
# Spectrum specific extensions.
import geni.rspec.emulab.spectrum as spectrum
# Route specific extensions.
import geni.rspec.emulab.route as route
#import geni.rspec.emulab.route as route
# Create a portal context, needed to defined parameters
pc = portal.Context()
......@@ -62,17 +62,16 @@ routes = [
('', "None"),
('Red Detour', "Red Detour"),
("Purple", "Purple"),
("Green", "Green"),
("Green", "Green"),
("Guardsman Direct", "Guardsman Direct"),
("Blue Detour", "Blue Detour"),
("Orange", "Orange"),
]
# Request a route
pc.defineParameter("route1", "Bus Route 1",
portal.ParameterType.STRING, routes[0], routes)
pc.defineParameter("route2", "Bus Route 2",
portal.ParameterType.STRING, routes[0], routes)
pc.defineParameter("Routes", "Bus Route",
portal.ParameterType.STRING, [routes[0][0]], routes,
min=1, multiValue=1, itemDefaultValue='')
# Now a structure to define a set of frequency ranges
ps = pc.defineStructParameter(
......@@ -151,12 +150,10 @@ while params.n:
params.n = params.n - 1;
pass
# Request the bus route
if params.route1:
request.requestBusRoute(params.route1)
pass
if params.route2:
request.requestBusRoute(params.route2)
for route in params.Routes:
if route != "":
request.requestBusRoute(route)
pass
pass
# Print the RSpec to the enclosing page.
......
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