From 7a65069b306e01bd66bab0a878b208530cbde9ad Mon Sep 17 00:00:00 2001 From: Jed Reynolds Date: Mon, 9 Mar 2020 14:42:35 -0700 Subject: [PATCH] Utils: getting test group items --- LANforge/Utils.pm | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/LANforge/Utils.pm b/LANforge/Utils.pm index b5db4cce..218f2239 100644 --- a/LANforge/Utils.pm +++ b/LANforge/Utils.pm @@ -547,12 +547,20 @@ sub list_groups { print Dumper($ra); die("testing"); } -1; # So the require or use succeeds (perl stuff) +sub group_items { + my ($self, $tg_name) = @_; + die("Utils::group_items wants a test group name, bye.") + if (!(defined $tg_name) || ("" eq $tg_name)); + my @lines = split(/\r?\n/, $self->doAsyncCmd( $self->fmt_cmd("show_group", $tg_name))); + $self->sleep_ms(100); + print Dumper(\@lines); + die("testing"); +} +#### +1; __END__ -# Plain Old Documentation (POD) - =head1 NAME Port - class to implement various LANforge utility and helper functions. @@ -583,19 +591,13 @@ __END__ $ob->doAsyncCmd("$Some Asynchronous CLI command\n"); =head1 DESCRIPTION - The Utils class gives you some powerful and packaged access to various LANforge CLI objects. =head1 AUTHOR Ben Greear (greearb@candelatech.com) - - Copyright (c) 2001 Candela Technologies. All rights reserved. + Copyright (c) 2020 Candela Technologies. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. - -=head1 VERSION - Version 0.0.1 May 26, 2001 - =end