Commit fedd45bd authored by Leigh B Stoller's avatar Leigh B Stoller

ProtoGENI slivers are now created in separate projects instead of a

single GeniSlices project. There two forms to this;

1. If the user is actually a local user, create the sliver in the
   User's "default" project. Later this will change to use use sub
   authorities, when we can generate and read those credentials.

2. If the user is form another SA, create a new non-local project
   named by the SA's domain, and optionally a subgroup named by the
   project sub authority (see above comment).

At the same time, add proper resource usage accounting. In other
words, Show History on the web page works for protogeni experiments
and projects.
parent 77550b50
This diff is collapsed.
......@@ -815,6 +815,17 @@ sub SliverAction($$$$$)
return 0;
};
my $user = GeniCM::CreateUserFromCertificate($credential);
return $user
if (GeniResponse::IsResponse($user));
my $realuser = GeniCM::FlipToUser($slice, $user);
if (! (defined($realuser) && $realuser)) {
print STDERR "Error flipping to real user\n";
return GeniResponse->Create(GENIRESPONSE_ERROR, undef,
"FlipToUser Error");
}
if (defined($slice_urn)) {
$response = &$CheckState($aggregate, $action);
goto bad
......@@ -1556,6 +1567,16 @@ sub ReleaseTicket($)
return GeniResponse->Create(GENIRESPONSE_ERROR, undef,
"This ticket is for another slice");
}
my $user = GeniCM::CreateUserFromCertificate($credential);
return $user
if (GeniResponse::IsResponse($user));
my $realuser = GeniCM::FlipToUser($slice, $user);
if (! (defined($realuser) && $realuser)) {
print STDERR "Error flipping to real user\n";
return GeniResponse->Create(GENIRESPONSE_ERROR, undef,
"FlipToUser Error");
}
#
# XXX Need to do a restore backup state operation if this ticket
# was the result of an update.
......@@ -1699,9 +1720,9 @@ sub ReserveVlanTags($)
}
my $slice_experiment = GeniCM::GeniExperiment($slice);
if (!defined($slice_experiment)) {
if (GeniResponse::IsResponse($slice_experiment)) {
print STDERR "Could not create new Geni slice experiment!\n";
$response = GeniResponse->Create(GENIRESPONSE_ERROR);
$response = $slice_experiment;
goto done;
}
my $pid = $slice_experiment->pid();
......
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