Commit 58628ee0 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Fixes; do not use dots in cooked mode experiment names. Add the

virtualization_type on to links so that emulated links work properly.
parent 568005a2
...@@ -267,16 +267,17 @@ sub CreateFromLocal($$$) ...@@ -267,16 +267,17 @@ sub CreateFromLocal($$$)
} }
# #
# XXX Form hrn from the domain. # This mirrors the code in GeniSA.pm
# #
my $hrn = "${PGENIDOMAIN}.slices." . $experiment->idx(); my $hrn = "CE" . $experiment->idx();
my $urn = GeniHRN::Generate( "@OURDOMAIN@", "slice", my $urn = GeniHRN::Generate("@OURDOMAIN@", "slice", $hrn);
"slices." . $experiment->idx() ); $hrn = "${PGENIDOMAIN}.${hrn}";
# #
# Generate a certificate. # Generate a certificate.
# #
$certificate = GeniCertificate->Create("slice", $urn, $hrn, $user->email()); $certificate = GeniCertificate->Create("slice", $urn, $hrn,
$user->email());
if (!defined($certificate)) { if (!defined($certificate)) {
print STDERR "GeniSlice::CreateFromLocal: ". print STDERR "GeniSlice::CreateFromLocal: ".
"Could not generate new certificate $experiment\n"; "Could not generate new certificate $experiment\n";
......
...@@ -2036,6 +2036,9 @@ sub GenVirtLans($) ...@@ -2036,6 +2036,9 @@ sub GenVirtLans($)
'virtual_interface_id' => "$member1" }, 'virtual_interface_id' => "$member1" },
], ],
}; };
if ($emulated) {
$ref->{'virtualization_type'} = $vlan->_encapstyle();
}
if (!exists($self->rspec()->{'link'})) { if (!exists($self->rspec()->{'link'})) {
$self->rspec()->{'link'} = []; $self->rspec()->{'link'} = [];
} }
...@@ -2299,9 +2302,8 @@ sub GenVirtLans($) ...@@ -2299,9 +2302,8 @@ sub GenVirtLans($)
$noderef->{'component_urn'} = $noderef->{'component_urn'} =
GeniHRN::Generate($authority, "node", "*"); GeniHRN::Generate($authority, "node", "*");
} }
my $ref = {
push(@{ $self->rspec()->{'link'} }, 'virtual_id' => "$vname:$member",
{ 'virtual_id' => "$vname:$member",
# The list references are so XML::Simple does not # The list references are so XML::Simple does not
# turn them into attributes. Need a better solution. # turn them into attributes. Need a better solution.
'latency' => [0], 'latency' => [0],
...@@ -2316,8 +2318,11 @@ sub GenVirtLans($) ...@@ -2316,8 +2318,11 @@ sub GenVirtLans($)
{ 'virtual_node_id' => "lan-$vname", { 'virtual_node_id' => "lan-$vname",
'virtual_interface_id' => "$member" } 'virtual_interface_id' => "$member" }
] ]
}); };
if ($emulated) {
$ref->{'virtualization_type'} = $vlan->_encapstyle();
}
push(@{ $self->rspec()->{'link'} }, $ref);
push(@nrefs, { 'virtual_id' => "$member"}); push(@nrefs, { 'virtual_id' => "$member"});
} }
$noderef->{'interface'} = \@nrefs; $noderef->{'interface'} = \@nrefs;
......
Supports Markdown
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