Commit 46da4032 authored by Leigh Stoller's avatar Leigh Stoller

Incorporate Rob's Step object.

parent df5ab4d9
......@@ -139,16 +139,18 @@ sub new($$;$)
if ($name ne "step") {
fatal("Unknown element in steps: $name");
}
my $type = GetTextOrFail("point_type", $stepchild);
my $id = GetTextOrFail("point_id", $stepchild);
my $desc = FindFirst("n:description", $stepchild);
my $text = $desc->textContent();
my $type = GetTextOrFail("point_type", $stepchild);
my $id = GetTextOrFail("point_id", $stepchild);
my $desc = FindFirst("n:description", $stepchild);
my $dtype = GetText("type", $desc);
my $text = $desc->textContent();
# Kill terminating newline for rtecheck
chomp($text);
push(@steps, {
"type" => $type,
"id" => $id,
"description" => $text});
"description" => $text,
"description_type" => $dtype});
}
# We see a lot of empty steps
$tour->{'steps'} = \@steps
......
......@@ -644,8 +644,14 @@ sub SpitSteps($$)
my $type = $step->{"type"};
my $id = $step->{"id"};
my $desc = $step->{"description"};
my $dtype = $step->{"description_type"};
$desc =~ s/\"/\\"/g;
print $where "tour.addStep('$id', '$type', \"$desc\")\n";
print $where "tour.addStep(emulab.Tour.Step('$id', ".
"\"$desc\", '$type'";
if (defined($dtype)) {
print $where ", '$dtype'";
}
print $where "))\n";
}
print $where "request.addTour(tour)\n\n\n";
......
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