Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
310c3956
Commit
310c3956
authored
Sep 22, 2011
by
Jonathon Duerig
Browse files
Added support for '-1' option to print out a single node in ptopgen_new
parent
7a528e68
Changes
2
Hide whitespace changes
Inline
Side-by-side
tbsetup/libptop_new.pm.in
View file @
310c3956
...
...
@@ -35,6 +35,7 @@ if ($PGENISUPPORT) {
@
ISA
=
"Exporter"
;
@
EXPORT
=
qw
(
);
my
$
single_node
=
undef
;
my
$
user_project
=
undef
;
my
$
exempt_eid
=
undef
;
my
$
available_only
=
1
;
...
...
@@ -127,6 +128,9 @@ sub ProcessArgs($)
$print_shared = 1;
$print_virtual = 1;
}
if (defined($options{"1"})) {
$single_node = $options{"1"};
}
}
#
...
...
@@ -902,6 +906,10 @@ sub willPrint($;$)
my ($self, $tagRef) = @_;
my $node = $self->node();
if (defined($single_node)) {
return ($single_node eq $node->node_id());
}
# In geni mode, disallow nodes tagged protogeni_exclude from being printed.
my $geniExclude = 0;
$node->NodeAttribute("protogeni_exclude", \$geniExclude);
...
...
tbsetup/ptopgen_new.in
View file @
310c3956
...
...
@@ -55,12 +55,12 @@ sub usage()
"
-a Include reserved nodes
\n
"
.
"
-m Override multiplex_factor
\n
"
.
"
-u Prune unused interfaces of allocated nodes (-e)(UNIMPLEMENTED)
\n
"
.
"
-d Debug mode
--
prints
to stderr
any problems in the database
"
.
"
-d Debug mode prints any problems in the database
"
.
"
-c Override delay capacity
\n
"
.
"
-x Output in an RSpec xml format
\n
"
.
"
-g version With -x, geni version. Must be '0.1', '0.2' or '2'
\n
"
.
"
-l specifies the location of the type limit file
\n
"
.
"
-1 Print an rspec containing only the node component-name
(UNIMPLEMENTED)
");
"
-1 Print an rspec containing only the node component-name
");
exit
(
-
1
);
}
...
...
@@ -78,6 +78,9 @@ sub processArgs()
if
(
@ARGV
)
{
usage
();
}
if
(
defined
(
$options
{"
s
"}))
{
die
("
-s (switchtouse) option is not implemented
\n
");
}
if
(
defined
(
$options
{"
x
"}))
{
$print_xml
=
1
;
if
(
!
$
libptop_new::
PGENISUPPORT
)
{
...
...
Write
Preview
Supports
Markdown
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