Commit 310c3956 authored by Jonathon Duerig's avatar Jonathon Duerig

Added support for '-1' option to print out a single node in ptopgen_new

parent 7a528e68
......@@ -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);
......
......@@ -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) {
......
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