Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
92bf08ac
Commit
92bf08ac
authored
Feb 16, 2011
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More bits and pieces for vlan stitching.
Lbs
parent
de382e17
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
49 deletions
+46
-49
db/Lan.pm.in
db/Lan.pm.in
+16
-10
db/Node.pm.in
db/Node.pm.in
+2
-1
protogeni/lib/GeniCM.pm.in
protogeni/lib/GeniCM.pm.in
+25
-19
protogeni/lib/GeniCMV2.pm.in
protogeni/lib/GeniCMV2.pm.in
+1
-17
protogeni/lib/GeniSA.pm.in
protogeni/lib/GeniSA.pm.in
+2
-2
No files found.
db/Lan.pm.in
View file @
92bf08ac
...
...
@@ -747,7 +747,12 @@ sub AddInterface($$$$;$$)
#
print
"fee $interface
\n
"
;
#
#
Set
the
attribute
for
the
physical
interface
.
#
If
a
member
was
provided
,
then
the
physical
interface
#
is
already
set
.
Do
not
overwrite
it
.
#
if
(
!defined($member)) {
if
(
defined
($
iface
)
&&
$
interface
->
SetAttribute
(
"iface"
,
$
iface
)
!= 0) {
$
interface
->
Destroy
();
...
...
@@ -758,6 +763,7 @@ sub AddInterface($$$$;$$)
$
interface
->
Destroy
();
return
undef
;
}
}
return
$
interface
;
}
...
...
db/Node.pm.in
View file @
92bf08ac
#
!/usr/bin/perl -wT
#
#
EMULAB
-
COPYRIGHT
#
Copyright
(
c
)
2005
-
201
0
University
of
Utah
and
the
Flux
Group
.
#
Copyright
(
c
)
2005
-
201
1
University
of
Utah
and
the
Flux
Group
.
#
All
rights
reserved
.
#
package
Node
;
...
...
@@ -1862,6 +1862,7 @@ sub CreateVnodes($$$)
else {
$nodeprefix = $pnode;
$nodenum = "";
$ipbase = 0;
if ($isjailed) {
#
...
...
protogeni/lib/GeniCM.pm.in
View file @
92bf08ac
...
...
@@ -1179,7 +1179,7 @@ sub GetTicketAuxAux($$$$$$$$$)
my ($auth,undef,undef) = GeniHRN::Parse($urn);
if (defined($auth) and $auth eq $OURDOMAIN) {
$hopref = $hops{$urn};
$hop_urn= $urn;
$hop_urn
= $urn;
last;
}
}
...
...
@@ -1189,32 +1189,38 @@ sub GetTicketAuxAux($$$$$$$$$)
"$lanname: no local component_hop");
goto bad;
}
my (undef,undef,$hop_id) = GeniHRN::Parse($hop_urn);
print "$hop_id\n";
#
# An artifact of the way we convert physical links
# into urns is that we now have to undo that to
# figure out what node and interface. At the moment
# it looks like "link-ion:eth2-procurve-pgeni-wash:(null)"
# Inside is an interface_ref.
#
my ($link,$iface,undef) = split(":", $hop_id);
if (! (defined($link) && defined($iface))) {
my $ifaceref =
GeniXML::FindFirst("n:interface_ref", $hopref);
if (!defined($ifaceref)) {
$response =
GeniResponse->Create(GENIRESPONSE_ERROR, undef,
"$lanname:
bad
component_hop");
"$lanname:
no iface in
component_hop");
goto bad;
}
# and strip off the link- stuff.
my ($network_id) = ($link =~ /^link-(.*)$/);
# ditto for the iface cruft.
my ($iface_id) = ($iface =~ /^(eth\d*)/);
my (undef,undef,$network_id) = GeniHRN::Parse($hop_urn);
my $iface_node_urn =
GeniXML::GetText("component_node_urn", $ifaceref);
my $iface_iface_id =
GeniXML::GetText("component_interface_id", $ifaceref);
my (undef, undef, $iface_node_id) =
GeniHRN::Parse($iface_node_urn);
if (! (defined($network_id) && defined($iface_node_id) &&
defined($iface_iface_id))) {
$response =
GeniResponse->Create(GENIRESPONSE_ERROR, undef,
"$lanname: bad component_hop");
goto bad;
}
if (! ($network_id =~ /^[-\w]*$/ &&
$iface_id =~ /^[-\w]*$/)) {
$iface_node_id =~ /^[-\w]*$/ &&
$iface_iface_id =~ /^[-\w]*$/)) {
$response =
GeniResponse->Create(GENIRESPONSE_ERROR, undef,
"$lanname: bad network or iface");
"$lanname: bad network
, node
or iface");
goto bad;
}
...
...
@@ -1229,7 +1235,7 @@ sub GetTicketAuxAux($$$$$$$$$)
"$lanname: unknown component_hop");
goto bad;
}
my $network_node = Node->Lookup($
network->
node_id
()
);
my $network_node = Node->Lookup($
iface_
node_id);
if (!defined($network_node)) {
$response =
GeniResponse->Create(GENIRESPONSE_ERROR, undef,
...
...
@@ -1259,7 +1265,7 @@ sub GetTicketAuxAux($$$$$$$$$)
"desire" => "pcshared",
"weight" => 0.95});
$virtexperiment->encap_style("vlan");
$iface_name = $iface_id;
$iface_name = $iface_
iface_
id;
$iface_vport = 0;
goto stitch;
}
...
...
protogeni/lib/GeniCMV2.pm.in
View file @
92bf08ac
...
...
@@ -1711,23 +1711,7 @@ sub ReserveVlanTags($)
goto
done
;
}
my
$
hop_urn
=
GeniXML
::
GetNodeId
($
hopref
);
my
(
undef
,
undef
,$
hop_id
)
=
GeniHRN
::
Parse
($
hop_urn
);
#
#
An
artifact
of
the
way
we
convert
physical
links
#
into
urns
is
that
we
now
have
to
undo
that
to
#
figure
out
what
node
and
interface
.
At
the
moment
#
it
looks
like
"link-ion:eth2-procurve-pgeni-wash:(null)"
#
my
($
link
,$
iface
,
undef
)
=
split
(
":"
,
$
hop_id
);
if
(
! (defined($link) && defined($iface))) {
$
response
=
GeniResponse
->
Create
(
GENIRESPONSE_ERROR
,
undef
,
"badly specified component_hop"
);
goto
done
;
}
#
and
strip
off
the
link
-
stuff
.
my
($
network_id
)
=
($
link
=~
/^
link
-(.*)$/);
my
(
undef
,
undef
,$
network_id
)
=
GeniHRN
::
Parse
($
hop_urn
);
my
$
network
=
ExternalNetwork
->
Lookup
($
network_id
);
if
(
!defined($network)) {
...
...
protogeni/lib/GeniSA.pm.in
View file @
92bf08ac
#
!/usr/bin/perl -wT
#
#
GENIPUBLIC
-
COPYRIGHT
#
Copyright
(
c
)
2008
-
201
0
University
of
Utah
and
the
Flux
Group
.
#
Copyright
(
c
)
2008
-
201
1
University
of
Utah
and
the
Flux
Group
.
#
All
rights
reserved
.
#
package
GeniSA
;
...
...
@@ -706,7 +706,7 @@ sub BindToSlice($)
print
STDERR
"Could not find local authority object
\n
"
;
return
GeniResponse
->
Create
(
GENIRESPONSE_ERROR
);
}
my
$
credential
=
CheckCredential
($
cred
,
$
authority
);
my
$
credential
=
CheckCredential
($
cred
);
return
$
credential
if
(
GeniResponse
::
IsResponse
($
credential
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment