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
06e02fe5
Commit
06e02fe5
authored
Dec 04, 2008
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add force mode to re-register a node.
parent
3a31908c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
protogeni/scripts/register_resources.in
protogeni/scripts/register_resources.in
+10
-5
No files found.
protogeni/scripts/register_resources.in
View file @
06e02fe5
...
...
@@ -14,10 +14,11 @@ use Getopt::Std;
#
sub
usage
()
{
print
"
Usage: register_resources [-
c
]
\n
";
print
"
Usage: register_resources [-
f
]
\n
";
exit
(
1
);
}
my
$optlist
=
"";
my
$optlist
=
"
f
";
my
$force
=
0
;
# Configure variables
my
$TB
=
"
@prefix
@
";
...
...
@@ -34,7 +35,9 @@ my %options = ();
if
(
!
getopts
(
$optlist
,
\
%options
))
{
usage
();
}
if
(
defined
(
$options
{"
f
"}))
{
$force
=
1
;
}
use
vars
qw($GENI_DBNAME)
;
$GENI_DBNAME
=
"
geni-cm
";
...
...
@@ -93,8 +96,6 @@ foreach my $node_id (@nodes) {
die
("
*** $0:
\n
"
.
"
Could not map
$node_id
to object
\n
");
}
print
"
Registering
$node_id
\n
";
my
$component
=
GeniComponent
->
Lookup
(
$node
->
uuid
());
if
(
!
defined
(
$component
))
{
$certificate
=
GeniCertificate
->
Lookup
(
$node
->
uuid
());
...
...
@@ -114,8 +115,12 @@ foreach my $node_id (@nodes) {
"
Could not create component object for
$node
\n
");
}
}
elsif
(
!
$force
)
{
next
;
}
$certificate
=
$component
->
GetCertificate
();
print
"
Registering
$node_id
\n
";
if
(
$clearinghouse
->
Register
("
Component
",
$certificate
->
cert
(),
{})
!=
0
)
{
die
("
*** $0:
\n
"
.
...
...
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