Commit b64bc16b authored by Leigh Stoller's avatar Leigh Stoller

The experiment argument in the XML file is an idx, not a pid,eid.

parent 65c0514b
......@@ -130,9 +130,9 @@ my $SLOT_ADMINONLY = 0x4; # Only admins can set this field.
#
my %xmlfields =
# XML Field Name DB slot name Flags Default
("experiment" => ["eid", $SLOT_REQUIRED],
("experiment" => ["eid_idx", $SLOT_REQUIRED],
# The rest are optional, so we can skip passing ones that are not changing.
# The rest are optional, so we can skip passing ones that are not changing
"description" => ["description", $SLOT_OPTIONAL],
"idle_ignore" => ["idle_ignore", $SLOT_OPTIONAL],
"swappable" => ["swappable", $SLOT_OPTIONAL],
......@@ -238,7 +238,7 @@ UserError()
#
my $doemail = 0;
my $experiment = Experiment->Lookup($editexp_args{"eid"});
my $experiment = Experiment->Lookup($editexp_args{"eid_idx"});
if (!defined($experiment)) {
UserError("Experiment: No such experiment");
}
......
......@@ -554,6 +554,7 @@ REPLACE INTO table_regex VALUES ('eventlist','eventtype','int','redirect','defau
REPLACE INTO table_regex VALUES ('eventlist','arguments','text','redirect','default:text',0,1024,NULL);
REPLACE INTO table_regex VALUES ('eventlist','atstring','text','redirect','default:text',0,1024,NULL);
REPLACE INTO table_regex VALUES ('experiments','eid','text','regex','^[a-zA-Z0-9][-a-zA-Z0-9]+$',2,19,'Must ensure not too long for the database. PID is 12, and the max is 32, so the user is not allowed to specify an EID more than 19, since other parts of the system may concatenate them together with a hyphen');
REPLACE INTO table_regex VALUES ('experiments','eid_idx','text','regex','^[\\d]+$',1,12,NULL);
REPLACE INTO table_regex VALUES ('experiments','multiplex_factor','int','redirect','default:tinyint',0,0,NULL);
REPLACE INTO table_regex VALUES ('experiments','forcelinkdelays','int','redirect','default:boolean',0,0,NULL);
REPLACE INTO table_regex VALUES ('experiments','uselinkdelays','int','redirect','default:boolean',0,0,NULL);
......
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