Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
e38b30c6
Commit
e38b30c6
authored
Nov 09, 2016
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Back out a recent cleanup, which had the negative side effect of
breaking stitching.
parent
db11f836
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
13 deletions
+36
-13
apt/manage_reservations.in
apt/manage_reservations.in
+2
-2
db/Project.pm.in
db/Project.pm.in
+15
-5
db/User.pm.in
db/User.pm.in
+13
-3
protogeni/lib/GeniCluster.pm.in
protogeni/lib/GeniCluster.pm.in
+6
-3
No files found.
apt/manage_reservations.in
View file @
e38b30c6
...
...
@@ -220,7 +220,7 @@ sub DoReserve()
#
(
$credential
,
$speaksfor
)
=
APT_Geni::
GenUserCredential
(
$geniuser
);
$rpcargs
{"
project_urn
"}
=
$project
->
urn
();
$rpcargs
{"
project_urn
"}
=
$project
->
urn
()
->
asString
()
;
}
else
{
if
(
!
$project
->
AccessCheck
(
$this_user
,
TB_PROJECT_CREATEEXPT
()))
{
...
...
@@ -396,7 +396,7 @@ sub DoDelete()
my
$response
=
APT_Geni::
PortalRPC
(
$authority
,
undef
,
"
DeleteReservation
",
{"
idx
"
=>
$idx
,
"
project
"
=>
$project
->
urn
()});
"
project
"
=>
$project
->
urn
()
->
asString
()
});
if
(
GeniResponse::
IsError
(
$response
))
{
#
# All errors are fatal.
...
...
db/Project.pm.in
View file @
e38b30c6
...
...
@@ -599,16 +599,26 @@ sub urn($)
{
my
($
self
)
=
@
_
;
my
$
pid
=
$
self
->
pid
();
return
undef
if
(
!$PGENISUPPORT);
if
($
self
->
IsNonLocal
())
{
return
$
self
->
nonlocal_id
();
}
require
GeniHRN
;
my
$
domain
=
"${OURDOMAIN}:${pid}"
;
return
GeniHRN
::
Generate
($
domain
,
"project"
,
$
pid
);
return
GeniHRN
->
new
(
GeniHRN
::
Generate
($
domain
,
"project"
,
$
pid
));
}
sub
nonlocalurn
($)
{
my
($
self
)
=
@
_
;
return
undef
if
(
!$PGENISUPPORT);
require
GeniHRN
;
if
($
self
->
IsNonLocal
())
{
return
GeniHRN
->
new
($
self
->
nonlocal_id
());
}
return
$
self
->
urn
();
}
#
...
...
db/User.pm.in
View file @
e38b30c6
...
...
@@ -263,10 +263,20 @@ sub urn($)
if
(
!$PGENISUPPORT);
require
GeniHRN
;
my
$
urn
=
($
self
->
IsNonLocal
()
?
$
self
->
nonlocal_id
()
:
GeniHRN
::
Generate
($
OURDOMAIN
,
"user"
,
$
uid
));
return
GeniHRN
->
new
(
GeniHRN
::
Generate
($
OURDOMAIN
,
"user"
,
$
uid
));
}
sub
nonlocalurn
($)
{
my
($
self
)
=
@
_
;
return
undef
if
(
!$PGENISUPPORT);
require
GeniHRN
;
return
GeniHRN
->
new
($
urn
);
if
($
self
->
IsNonLocal
())
{
return
GeniHRN
->
new
($
self
->
nonlocal_id
());
}
return
$
self
->
urn
();
}
#
...
...
protogeni/lib/GeniCluster.pm.in
View file @
e38b30c6
...
...
@@ -612,6 +612,8 @@ sub Reserve($)
return
$
geniuser
if
(
GeniResponse
::
IsResponse
($
geniuser
));
return
GeniResponse
->
MalformedArgsResponse
(
"Not a local user"
)
if
(
!$geniuser->IsLocal());
#
#
No
project
,
we
need
to
have
a
project
urn
.
...
...
@@ -623,7 +625,8 @@ sub Reserve($)
if
(
!GeniHRN::IsValid($argref->{'project_urn'}));
my
$
hrn
=
GeniHRN
->
new
($
argref
->{
'project_urn'
});
return
GeniResponse
->
MalformedArgsResponse
(
"Mismatching project URN"
)
if
($
hrn
->
domain
()
ne
$
geniuser
->
urn
()->
domain
());
if
($
hrn
->
domain
()
ne
$
geniuser
->
emulab_user
()->
nonlocalurn
()->
domain
());
my
$
group
=
GeniUtil
::
GetHoldingProject
($
hrn
,
undef
,
1
);
return
$
group
...
...
@@ -825,8 +828,8 @@ sub Reservations($)
next
;
}
$
blob
->{
"idx"
}
=
$
idx
;
$
blob
->{
"project"
}
=
$
project
->
urn
();
$
blob
->{
"user"
}
=
$
user
->
urn
();
$
blob
->{
"project"
}
=
$
project
->
nonlocal
urn
();
$
blob
->{
"user"
}
=
$
user
->
nonlocal
urn
();
$
blob
->{
"nodes"
}
=
$
row
->{
'nodes'
};
$
blob
->{
"type"
}
=
$
row
->{
'type'
};
$
blob
->{
"created"
}
=
TBDateStringGMT
($
row
->{
'created'
});
...
...
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