Read Group-Global Service Objects
This section shows how to use the Perl Client Library to read Group-Global service objects.
To read a service object:
1.
Log into the Perl client.
2.
Read the object.
Enter:
my ( $result, $values ) ;
( $result, $values ) =
$service->getServiceObjects('OBJECT_NAME'=>['Service-1','Service-2','Service-3','Service-4','Service-5']);
while( my $hash = shift(@{$values} ) ){
put_log('INFO',
msg=>"Result ==> $hash->{'OBJECT_ID'} : $hash->{'OBJECT_NAME'} :
$hash->{'COMMENT'} "); while( my $hashref =
shift(@{$hash->{'MEMBERS'}} ) ){
while( my($key, $val ) = each( %{$hashref} ) ){
put_log('INFO',msg=> "$key\t$val" );
}
}
}
( $result, $values ) =
$service->getGroupObjects('OBJECT_NAME'=>['Group-1','Group-2','Group-3']);
while( my $hash = shift(@{$values} ) ){
put_log('INFO', msg=>"Result ==> $hash->{'OBJECT_ID'} :
$hash->{'OBJECT_NAME'} : $hash->{'COMMENT'} "); while( my $tmp
= shift(@{$hash->{'MEMBERS'}} ) ){
put_log('INFO',msg=> "$tmp" );
}
}
( $result, $values ) =
$service->getGlobalObjects('OBJECT_NAME'=>['Poly-1','Poly-2','Poly-3','Poly-4']);
while( my $hash = shift(@{$values} ) ){
put_log('INFO',
msg=>"Result ==> $hash->{'OBJECT_ID'} : $hash->{'OBJECT_NAME'} :
$hash->{'COMMENT'} "); while( my $hashref =
shift(@{$hash->{'MEMBERS'}} ) ){
put_log('INFO',msg=> "Result -->
".$hashref->{'DOMAIN'}.":".$hashref->{'DEVICE'}.":".$hashref->{'SERVICE'}
); }
}
3.
Log out.
Copyright © 2010, Juniper Networks, Inc.
90
Network and Security Manager 2010.4 API Guide
Содержание NETWORK AND SECURITY MANAGER 2010.4 - API GUIDE REV 1
Страница 6: ...Copyright 2010 Juniper Networks Inc vi...
Страница 10: ...Copyright 2010 Juniper Networks Inc x Network and Security Manager 2010 4 API Guide...
Страница 12: ...Copyright 2010 Juniper Networks Inc xii Network and Security Manager 2010 4 API Guide...
Страница 20: ...Copyright 2010 Juniper Networks Inc 2 Network and Security Manager 2010 4 API Guide...
Страница 24: ...Copyright 2010 Juniper Networks Inc 6 Network and Security Manager 2010 4 API Guide...
Страница 34: ...Copyright 2010 Juniper Networks Inc 16 Network and Security Manager 2010 4 API Guide...
Страница 58: ...Figure 10 IDP Rulebase Copyright 2010 Juniper Networks Inc 40 Network and Security Manager 2010 4 API Guide...
Страница 92: ...Copyright 2010 Juniper Networks Inc 74 Network and Security Manager 2010 4 API Guide...
Страница 98: ...Copyright 2010 Juniper Networks Inc 80 Network and Security Manager 2010 4 API Guide...
Страница 100: ...Copyright 2010 Juniper Networks Inc 82 Network and Security Manager 2010 4 API Guide...
Страница 112: ...Copyright 2010 Juniper Networks Inc 94 Network and Security Manager 2010 4 API Guide...
Страница 128: ...Copyright 2010 Juniper Networks Inc 110 Network and Security Manager 2010 4 API Guide...
Страница 138: ...Copyright 2010 Juniper Networks Inc 120 Network and Security Manager 2010 4 API Guide...
Страница 152: ...Copyright 2010 Juniper Networks Inc 134 Network and Security Manager 2010 4 API Guide...
Страница 165: ...PART 6 Index Index on page 149 147 Copyright 2010 Juniper Networks Inc...
Страница 166: ...Copyright 2010 Juniper Networks Inc 148 Network and Security Manager 2010 4 API Guide...