SMI-S and Web Services Programming Guide, Cisco DCNM for SAN, Release 5.x
Perl Client
Downloads: This chapterpdf (PDF - 220.0KB) The complete bookPDF (PDF - 5.27MB) | Feedback

Perl Client

Table Of Contents

Perl Client

Installing Perl

Installing SOAP:Lite

Running the Perl Client


Perl Client


This appendix provides information about the Perl client and installing Perl and the SOAP:Lite package.

This appendix contains the following sections:

Installing Perl

Installing SOAP:Lite

Running the Perl Client

Before executing the Perl script, you need to install ActiveState Perl and SOAP:Lite package.

Installing Perl


Step 1 Download Perl from http://www.perl.org/get.html and execute the downloaded executable file to install Perl.


Note Choose the appropriate Perl version for your operation system for download.


Step 2 Enter perl -v CLI command to verify the Perl installation. Figure B-1 is displayed.


Installing SOAP:Lite

Download SOAP:Lite from http://soaplite.com/download.html.


Note Choose the appropriate SOAP:Lite version for your operating system for download.


To install SOAP:lite, follow these steps:


Step 1 Using the command line prompt, browse to the directory where the Makefile.PL is located from the downloaded SOAP:Lite package.

Use the perl Makefile.PL -noprompt CLI command to install the SOAP:Lite package.

Step 2 Download nmake utility for Windows from http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe.

After you extract the downloaded Nmake15.exe, you will see two files, NMAKE.exe and NMAKE.ERR . Copy both the NMAKE.exe and NMAKE.ERR files to the installed Perl bin directory.

Step 3 Complete the SOAP:Lite installation by entering the following commands:

nmake
nmake test
nmake install 

For more information on installing SOAP:Lite, see http://soaplite.com/install.html.

Running the Perl Client


Note To run the Perl client, the client and the module file need to be in the same Perl folder.


From the Perl folder where the source files exist, enter the following command:

perl Client-File-Name FM-Server-IP Username password

Figure B-1 Running the Perl Client

 
   

Example B-1 Zone Client

my $username;
my $password;
my $url;
my $vsanId = 1;
my $vsan_wwn = '20:01:00:0D:EC:19:6A:81';
my $wwn = '20:00:00:0D:EC:19:6A:80';
my $zoneName = 'testZone1'; 
my $readOnly = 0;
my $broadcast = 0;
my $qos = 0;
my $qosPriority = -1;
my $zoneMemberType = 1;
my $zoneMemberFormat = 1; 
my $zoneMemberIvrFabricIndex = -1;
my $zoneMemberIvrVsanIndex = -1;
my $zoneMemberId = 'b1a2334455667728';
my $zoneLastModtime = 0;
my $zoneMemberLunId = '';
my $zoneMemberDbId = 0;
my $zoneisIvr = 0;
my $zoneSetName = 'testZoneSet1';
my $active = 0;
 
   
 
   
require 'zoneModule.plx';
 
   
($url,$username,$password) = @ARGV;
 
   
# Getting Token
my $token = getToken($url,$username,$password);
 
   
if(!$token) {
print "\nError in getToken call \n"; 
goto exit;
}
# Creating Zone
my $zoneIndex = 
createZone($token,$vsanId,$vsan_wwn,$wwn,$zoneName,$readOnly,$broadcast,$qos,$qosPriority)
; 
 
   
if(!$zoneIndex) {
print "\nError in createZone call \n";
goto exit;
}
# Adding Member to Zone
 
   
my $status = 
addZoneMemberToZone($token,$vsanId,$vsan_wwn,$wwn,$zoneName,$zoneMemberType,$zoneMemberFor
mat,$zoneMemberIvrFabricIndex,$zoneMemberIvrVsanIndex,$zoneMemberId,$zoneMemberLunId);
 
   
if(!$status) {
print "\nError in addZoneMemberToZone call \n";
goto exit;
}
 
   
# Creating ZoneSet
 
   
 my $zoneSetIndex = createZoneSet($token,$vsanId,$vsan_wwn,$wwn,$zoneSetName);
 
 if(!$zoneSetIndex) {
 print "\nError in createZoneSet call \n";
 goto exit;
 }
# Adding Zone to ZoneSet
 
   
my $status =  
addZoneToZoneset($token,$vsanId,$vsan_wwn,$wwn,$zoneIndex,$zoneName,$readOnly,$broadcast,$
qos,$qosPriority,$zoneMemberDbId,$zoneMemberType,$zoneLastModtime,$zoneMemberLunId,$zoneis
Ivr,$zoneSetIndex,$zoneSetName,$active);
 
   
if(!$status) {
print "\nError in addZoneToZoneset call \n";
goto exit;
}
 
   
# Activating ZoneSetCreating Zone
 
   
$status = activateZoneset($token,$vsanId,$vsan_wwn,$wwn,$zoneSetName);
 
   
if(!$status) {
print "\nError in activateZoneset call \n";
goto exit;
}
 
   
else {
print "successful \n";
 
   
}
 
   
 
   
exit:
 
   

Example B-2 Statistics Client

# Variables
my $username;
my $password;
my $url;
my $fabricDbId = -1;
my $switchDbId = -1;
my $vsanDbId = -1; 
my $sortField = 'rxTxStr';
my $sortType = 'DESC';
my $limit = NaN;
my $groupId = -1;
my $isGroup = 0;
my $networkType ='SAN'; 
my $filterStr = '';
my $temp = '24 Hours';
my $startIdx = 0;
my $recordSize = 45; 
my $interval = 1;
require 'statisticsModule.plx';
($url,$username,$password) = @ARGV;
 
   
# Getting Token
my $token = getToken($url,$username,$password);
($rrdFile,$fid,$pmType) = 
getIslStatList($token,$fabricDbId,$switchDbId,$vsanDbId,$sortField,$sortType,$limit,$group
Id,$isGroup,$networkType,$filterStr,$temp,$startIdx,$recordSize);
for (my $i=0;$i<1;$i++) {
getPmChartData($token,@$rrdFile[$i],@$pmType[$i],@$fid[$i],$interval) . "\n";
 }

Example B-3 Zone Module

use SOAP::Lite;
use Time::Local;
 
   
# Get Token
 
   
$url = '';
 
   
=begin nd
Function: getToken
 
   
Description:
This function is to get login token.
 
Web service call to : requestToken
 
Arguments for the webservice call : 
$username,$password,$expiration
=cut
 
   
sub getToken {
      my $username;
      my $password;
      
      ($url,$username,$password) = @_;
      
      # Setting uri and proxy
      
      my $client = SOAP::Lite
      	->uri('http://ep.jaxws.dcbu.cisco.com/')
    	->proxy('http://'.$url.'/LogonWSService/LogonWS?wsdl');
      my $username = SOAP::Data->type('string')->name('username')->value($username);
      my $password = SOAP::Data->type('string')->name('password')->value($password);
      my $expiration = SOAP::Data->type('long')->name('expiration')->value(100000000);
      
      # Calling requestToken method
      
      my $result = $client->requestToken($username,$password,$expiration);
      
      # check for error
      unless ($result->fault) {
      
      	my $token =  $result->result();
      	$token;
      } else {
      
      # error handling
      
      	print join ', ',
      		$result->faultcode,
      		$result->faultstring,
      		$result->faultdetail;
      }
}
 
   
 
   
 
   
=begin nd
Function: createZone
 
   
Description:
This function creates a Zone with the given name.
 
Web service call to : createZone
 
Arguments for the webservice call: 
$header,$VsanKey,$Wwn,$zName,$readOnly,$broadcast,$qos,$qosPriority
=cut
 
   
sub createZone {
 
   
	my $token;	
	my $arg_vsanId;
	my $arg_vsanwwn;
	my $arg_wwn;
	my $arg_zoneName;
	my $arg_readOnly;
	my $arg_broadcast;
	my $arg_qos;
	my $arg_qosPriority;
		
	
($token,$arg_vsanId,$arg_vsanwwn,$arg_wwn,$arg_zoneName,$arg_readOnly,$arg_broadcast,$arg_
qos,$arg_qosPriority) = @_;
	
	my $VsanKey = SOAP::Data->name("vsanKey" => \SOAP::Data->value(
		      SOAP::Data->name("vsanID" => $arg_vsanId),  
		      SOAP::Data->name("pWwn" => \SOAP::Data->value(SOAP::Data->name("value" => 
$arg_vsanwwn)))->type("Wwn")))->type("VsanKey");
	my $Wwn = SOAP::Data->name("switchKey" => \SOAP::Data->value(
	          SOAP::Data->name("wwn" => 
\SOAP::Data->value(SOAP::Data->name("value"=>$arg_wwn)))->type("Wwn")))->type("WwnKey");
	my $zName = SOAP::Data->name("zoneName"=>$arg_zoneName);
	my $readOnly = SOAP::Data->name("readOnly")->value($arg_readOnly);
	my $broadcast = SOAP::Data->name("broadcast")->value($arg_broadcast);
	my $qos = SOAP::Data->type('boolean')->name("qos")->value($arg_qos);
	my $qosPriority = 
SOAP::Data->type('int')->name("qosPriority")->value($arg_qosPriority);
	
	# Setting header
	      	
	my $header = 
SOAP::Header->name('token')->prefix('m')->value($token)->uri('http://ep.cisco.dcbu.cisco.c
om')->type('string');
	
	my $client = SOAP::Lite
			->uri('http://ep.jaxws.dcbu.cisco.com/')
		    	->proxy('http://'.$url.'/ZoneManagerWSService/ZoneManagerWS?wsdl');
         	
	# Calling createZone method
	    	
	my $result = 
$client->createZone($header,$VsanKey,$Wwn,$zName,$readOnly,$broadcast,$qos,$qosPriority);
	
	unless ($result->fault) {
	      return $result->valueof('//index');
	      	
	} else {
		
		print join ', ',
		      $result->faultcode,
		      $result->faultstring,
		      $result->faultdetail;
		return 0;
	      }
}
 
   
=begin nd
Function: addZoneMemberToZone
 
   
Description:
This function adds a member to already existing Zone, which was just created.
 
Web service call to : addZoneMemberToZone
 
   
Arguments for the webservice call: 
$header,$VsanKey,$Wwn,$zName,$zMemberType,$zMemberFormat,$zMemberIvrFabricIndex,$zMemberIv
rVsanIndex,$zMemberId,$zMemberLunId
=cut
 
   
sub addZoneMemberToZone {
	
	my $token;
	my $arg_vsanId;
	my $arg_wwn;
	my $arg_vsanwwn;
	my $arg_zoneName;
	my $arg_zoneMemberType;
	my $arg_zoneMemberFormat;
	my $arg_zoneMemberIvrFabricIndex;
	my $arg_zoneMemberIvrVsanIndex;
	my $arg_zoneMemberId;
	my $arg_zoneMemberLunId;
	
	
($token,$arg_vsanId,$arg_vsanwwn,$arg_wwn,$arg_zoneName,$arg_zoneMemberType,$arg_zoneMembe
rFormat,$arg_zoneMemberIvrFabricIndex,$arg_zoneMemberIvrVsanIndex,$arg_zoneMemberId,$arg_z
oneMemberLunId) = @_;
	
	my @hex    = ($arg_zoneMemberId =~ /(..)/g);
	my @dec    = map { hex($_) } @hex;
	my @zoneMemberId  = map { pack('C',$_) } @dec;
	my $arg_zoneMemberId = join("",@zoneMemberId);
	
	my $client = SOAP::Lite
		      	->uri('http://ep.jaxws.dcbu.cisco.com/')
		      	->proxy('http://'.$url.'/ZoneManagerWSService/ZoneManagerWS?wsdl');
		      	
	my $VsanKey = SOAP::Data->name("vsanKey" => \SOAP::Data->value(
		      SOAP::Data->name("vsanID" => $arg_vsanId),  
		      SOAP::Data->name("pWwn" => \SOAP::Data->value(SOAP::Data->name("value" => 
$arg_vsanwwn)))->type("Wwn")))->type("VsanKey");
	my $Wwn = SOAP::Data->name("switchKey" => \SOAP::Data->value(
		  SOAP::Data->name("wwn" => 
\SOAP::Data->value(SOAP::Data->name("value"=>$arg_wwn)))->type("Wwn")))->type("WwnKey");
	my $zName = SOAP::Data->name("zoneName"=>$arg_zoneName);
	my $zMemberType = SOAP::Data->name("zoneMemberType")->value($arg_zoneMemberType);
	my $zMemberFormat = 
SOAP::Data->name("zoneMemberFormat")->value($arg_zoneMemberFormat);
	my $zMemberIvrFabricIndex = 
SOAP::Data->name('zoneMemberIvrFabricIndex')->value($arg_zoneMemberIvrFabricIndex);
	my $zMemberIvrVsanIndex = 
SOAP::Data->type('int')->name("zoneMemberIvrVsanIndex")->value($arg_zoneMemberIvrVsanIndex
);
	my $zMemberId = SOAP::Data->name("zoneMemberId")->value($arg_zoneMemberId);
	my $zMemberLunId = SOAP::Data->name("zoneMemberLunId")->value(arg_zoneMemberLunId);
		
		      	
	my $header = 
SOAP::Header->name('token')->prefix('m')->value($token)->uri('http://ep.cisco.dcbu.cisco.c
om')->type('string');
        my $result = 
$client->addZoneMemberToZone($header,$VsanKey,$Wwn,$zName,$zMemberType,$zMemberFormat,$zMe
mberIvrFabricIndex,$zMemberIvrVsanIndex,$zMemberId,$zMemberLunId);
	unless ($result->fault) {
		    return 1;
	} 
	else {
				
			      
	print join ', ',
	      $result->faultcode,
	      $result->faultstring,
	      $result->faultdetail;
	return 0;
	}
 
   
}
 
   
=begin nd
Function: createZoneSet
 
   
Description:
This function creates a ZoneSet with the given name.
 
Web service call to : createZoneSet
 
Arguments for the webservice call: 
$header,$VsanKey,$Wwn,$zSetName
=cut
 
   
sub createZoneSet {
 
   
	my $token;
	my $arg_vsanId;
	my $arg_vsanwwn;
	my $arg_wwn;
	my $arg_zoneSetName;
	
	($token,$arg_vsanId,$arg_vsanwwn,$arg_wwn,$arg_zoneSetName) = @_;
	
	my $client = SOAP::Lite
			->uri('http://ep.jaxws.dcbu.cisco.com/')
		    	->proxy('http://'.$url.'/ZoneManagerWSService/ZoneManagerWS?wsdl');
	      	
	# Creating complex data type
	      	
	my $VsanKey = SOAP::Data->name("vsanKey" => \SOAP::Data->value(
		      SOAP::Data->name("vsanID" => $arg_vsanId),  
		      SOAP::Data->name("pWwn" => \SOAP::Data->value(SOAP::Data->name("value" => 
$arg_vsanwwn)))->type("Wwn")))->type("VsanKey");
	my $Wwn = SOAP::Data->name("switchKey" => \SOAP::Data->value(
		  SOAP::Data->name("wwn" => 
\SOAP::Data->value(SOAP::Data->name("value"=>$arg_wwn)))->type("Wwn")))->type("WwnKey");
	my $zSetName = SOAP::Data->name("zoneSetName"=>$arg_zoneSetName);
		
	# Setting header
	      	
	my $header = 
SOAP::Header->name('token')->prefix('m')->value($token)->uri('http://ep.cisco.dcbu.cisco.c
om')->type('string');
	   	
	# Calling createZone method
	    	
	my $result = $client->createZoneSet($header,$VsanKey,$Wwn,$zSetName);
	      	
	unless ($result->fault) {
	      
		return $result->valueof('//index')."\n";
	      	
	 } else {
				      
		print join ', ',
		      $result->faultcode,
		      $result->faultstring,
		      $result->faultdetail;
	return 0;
      	}
}
 
   
 
   
=begin nd
Function: addZoneToZoneset
 
   
Description:
This function adds the already created Zone to the ZoneSet.
 
Web service call to : addZoneToZoneset
 
Arguments for the webservice call: 
$header,$VsanKey,$Wwn,$zoneDO,$zoneSetDO
=cut
 
   
sub addZoneToZoneset {
	
	my $token;
	my $arg_vsanId;
	my $arg_vsanwwn;
	my $arg_wwn;
	my $arg_index;
	my $arg_zoneName;
	my $arg_readOnly;
	my $arg_broadcast;
	my $arg_qos;
	my $arg_qosPriority;
	my $arg_zoneMemberDbId;
	my $arg_zoneLastModtime;
	my $arg_memberType;
	my $arg_zoneMemberLunId;
	my $arg_isIvr;
	my $arg_zoneSetindex;
	my $arg_zoneSetName;
	my $active;
	
	
($token,$arg_vsanId,$arg_vsanwwn,$arg_wwn,$arg_index,$arg_zoneName,$arg_readOnly,$arg_broa
dcast,$arg_qos,$arg_qosPriority,$arg_zoneMemberDbId,$arg_memberType,$arg_zoneLastModtime,$
arg_zoneMemberLunId,$arg_isIvr,$arg_zoneSetindex,$arg_zoneSetName,$active) = @_;
	
	my $client = SOAP::Lite
			->uri('http://ep.jaxws.dcbu.cisco.com/')
		    	->proxy('http://'.$url.'/ZoneManagerWSService/ZoneManagerWS?wsdl');
	      	
	# Creating complex data type
	      	
	my $VsanKey = SOAP::Data->name("vsanKey" => \SOAP::Data->value(
		      SOAP::Data->name("vsanID" => $arg_vsanId),  
		      SOAP::Data->name("pWwn" => \SOAP::Data->value(SOAP::Data->name("value" => 
$arg_vsanwwn)))->type("Wwn")))->type("VsanKey");
	my $Wwn = SOAP::Data->name("switchKey" => \SOAP::Data->value(
		  SOAP::Data->name("wwn" => 
\SOAP::Data->value(SOAP::Data->name("value"=>$arg_wwn)))->type("Wwn")))->type("WwnKey");
	my $zoneDO = SOAP::Data->name("zoneDo"=> \SOAP::Data->value(
		     SOAP::Data->name("index"=>$arg_index),
	             SOAP::Data->name("name"=>$arg_zoneName),
		     SOAP::Data->name("readonly"=>$arg_readonly),
		     SOAP::Data->name("qos"=>$arg_qos),
		     SOAP::Data->name("qosPriority"=>arg_qosPriority),
		     SOAP::Data->name("broadcast"=>$arg_broadcast),
	             SOAP::Data->name("active"=>$active),
		     SOAP::Data->name("zoneLastModtime"=>arg_zoneLastModtime),
	             SOAP::Data->name("zoneMemberDbId"=>$arg_zoneMemberDbId),
	             SOAP::Data->name("vsanId"=>$arg_vsanId),
		     SOAP::Data->name("isIvr"=>$arg_isIvr),
		     SOAP::Data->name("memberType"=>$arg_memberType),
		     SOAP::Data->name("lunId"=>$arg_zoneMemberLunId)))->type("zone");
	my $zoneSetDO = SOAP::Data->name("zoneSetDo"=> \SOAP::Data->value(
			SOAP::Data->name("index"=>$arg_zoneSetindex),
			SOAP::Data->name("name"=>$arg_zoneSetName),
			SOAP::Data->name("active"=>$active),
			SOAP::Data->name("zoneLastModified"=>$arg_zoneLastModtime)))->type("ZoneSet");
	      	
	# Setting header
	      	
	my $header = 
SOAP::Header->name('token')->prefix('m')->value($token)->uri('http://ep.cisco.dcbu.cisco.c
om')->type('string');
	   	
	# Calling addZonetoZoneSet method
	    	
	my $result = $client->addZoneToZoneset($header,$VsanKey,$Wwn,$zoneDO,$zoneSetDO);
	      	
	unless ($result->fault) {
		
		return 1;
	      
	} else {
		print join ', ',
		      $result->faultcode,
		      $result->faultstring,
		      $result->faultdetail;
      return 0;	      
      }
 
   
}
 
   
=begin nd
Function: activateZoneset
 
   
Description:
This function activates the input ZoneSet.
 
Web service call to : activateZoneset
 
Arguments for the webservice call : 
$header,$VsanKey,$Wwn,$zSetName
=cut
 
   
 
   
sub activateZoneset {
	
	my $token;
	my $arg_vsanId;
	my $arg_vsanwwn;
	my $arg_wwn;
	my $arg_zoneSetName;
	
	
	($token,$arg_vsanId,$arg_vsanwwn,$arg_wwn,$arg_zoneSetName) = @_;
	
	my $client = SOAP::Lite
		->uri('http://ep.jaxws.dcbu.cisco.com/')
	    	->proxy('http://'.$url.'/ZoneManagerWSService/ZoneManagerWS?wsdl');
      	
      	# Creating complex data type
      	
      	my $VsanKey = SOAP::Data->name("vsanKey" => \SOAP::Data->value(
	      	      SOAP::Data->name("vsanID" => $arg_vsanId),  
	              SOAP::Data->name("pWwn" => \SOAP::Data->value(SOAP::Data->name("value" 
=> $arg_vsanwwn)))->type("Wwn")))->type("VsanKey");
	my $Wwn = SOAP::Data->name("switchKey" => \SOAP::Data->value(
		  SOAP::Data->name("wwn" => 
\SOAP::Data->value(SOAP::Data->name("value"=>$arg_wwn)))->type("Wwn")))->type("WwnKey");
	my $zSetName = SOAP::Data->name("zoneSetName"=>$arg_zoneSetName);
	
      	# Setting header
      	
	my $header = 
SOAP::Header->name('token')->prefix('m')->value($token)->uri('http://ep.cisco.dcbu.cisco.c
om')->type('string');
   	
    	# Calling activateZoneset method
    	
      	my $result = $client->activateZoneset($header,$VsanKey,$Wwn,$zSetName);
      	
      	unless ($result->fault) {
      	
      		return 1;
      
  
      	} else {
	      	print join ', ',
	      	      $result->faultcode,
	       	      $result->faultstring,
	      	      $result->faultdetail;
        return 0;
        }
}
 
   
1;

Example B-4 Statistics Module

use SOAP::Lite;
use Time::Local;
 
   
# Get Token
 
   
$url = '';
 
   
=begin nd
Function: getToken
 
   
Description:
This function is to get login token.
 
Web service call to : requestToken
 
Arguments for the webservice call : 
$username,$password,$expiration
=cut
 
   
sub getToken {
      my $username;
      my $password;
      
      ($url,$username,$password) = @_;
      
      # Setting uri and proxy
      
      my $client = SOAP::Lite
      	->uri('http://ep.jaxws.dcbu.cisco.com/')
    	->proxy('http://'.$url.'/LogonWSService/LogonWS?wsdl');
      my $username = SOAP::Data->type('string')->name('username')->value($username);
      my $password = SOAP::Data->type('string')->name('password')->value($password);
      my $expiration = SOAP::Data->type('long')->name('expiration')->value(100000000);
      
      # Calling requestToken method
      
      my $result = $client->requestToken($username,$password,$expiration);
      
      # check for error
      unless ($result->fault) {
      
      	my $token =  $result->result();
      	$token;
      } else {
      
      # error handling
      
      	print join ', ',
      		$result->faultcode,
      		$result->faultstring,
      		$result->faultdetail;
      }
}
 
   
 
   
=begin nd
Function: getIslStatList
 
   
Description:
This function is to get Inter Switch Link Statistics.
 
Web service call to : requestToken
 
Arguments for the webservice call : 
$header,$DbFilter,$interval,$data_startIdx,$data_recordSize
=cut
 
   
sub getIslStatList {
 
   
 
   
	my $token;	
	my $arg_fabricDbId;
	my $arg_switchDbId;
	my $arg_vsanDbId; 
	my $arg_sortField;
	my $arg_sortType;
	my $arg_limit;
	my $arg_groupId;
	my $arg_isGroup;
	my $arg_networkType; 
	my $arg_filterStr;
	my $arg_interval;
	my $arg_startIdx;
	my $arg_recordSize;
		
		
	
($token,$arg_fabricDbId,$arg_switchDbId,$arg_vsanDbId,$arg_sortField,$arg_sortType,$arg_li
mit,$arg_groupId,$arg_isGroup,$arg_networkType,$arg_filterStr,$arg_interval,$arg_startIdx,
$arg_recordSize) = @_;
	
	
	
	my $DbFilter= SOAP::Data->name("arg0" => \SOAP::Data->value(
		      SOAP::Data->name("fabricDbId" => $arg_fabricDbId), 
		      SOAP::Data->name("switchDbId" => $arg_switchDbId), 
		      SOAP::Data->name("vsanDbId" => $arg_vsanDbId),
		      SOAP::Data->name("sortField" => $arg_sortField),
		      SOAP::Data->name("sortType" => $arg_sortType),
		      SOAP::Data->name("limit" => $arg_limit),
		      SOAP::Data->name("groupId" => $arg_groupId),
		      SOAP::Data->name("isGroup" => $arg_isGroup)->type("boolean"),
		      SOAP::Data->name("networkType" => $arg_networkType),
		      SOAP::Data->name("filterStr" => $arg_filterStr)))->type("DbFilter");
	
	
	
	my $interval = SOAP::Data->type("string")->name("arg1")->value($arg_interval);
	
	my $data_startIdx = SOAP::Data->name("arg2"=>$arg_startIdx);
	my $data_recordSize = SOAP::Data->name("arg3"=>$arg_recordSize);
	
	
	# Setting header
	      	
	my $header = 
SOAP::Header->name('token')->prefix('m')->value($token)->uri('http://ep.cisco.dcbu.cisco.c
om')->type('string');
	
	my $client = SOAP::Lite
			->uri('http://ep.jaxws.dcbu.cisco.com/')
		    	->proxy('http://'.$url.'/StatisticsWSService/StatisticsWS?wsdl');
         	
	# Calling getIslStatDataLength method
	    	
	    	
	my $result = 
$client->getIslStatList($header,$DbFilter,$interval,$data_startIdx,$data_recordSize);
	
	unless ($result->fault) {
	
		
	     print "\ngetIslStatList\n\n";	
	     
	     	     
	     
	     my @fabric = $result->valueof('//item/fabric');
	     my @title = $result->valueof('//item/title');
	     my @maxTxStr = $result->valueof('//item/maxTxStr');
	     my @maxRxStr = $result->valueof('//item/rxTxStr');
	     my @rxTx = $result->valueof('//item/rxTx');
	     
	     my $count = @fabric;
	     
	     for(my $i=0;$i<10;$i++)
	     {
	     
	        print "---------------------------------------------------------\n";
	     	print "Fabric -> " . $fabric[$i] . "\n";
	     	print "Title -> " . $title[$i] . "\n";
	     	print "maxTxStr -> " . $maxTxStr[$i] . "\n";
	     	print "maxRxStr -> " . $maxRxStr[$i] . "\n";
	     	print "rxTx -> " . $rxTx[$i] . "\n";
	     	print "---------------------------------------------------------\n";
	     
	     }
	     
	     my @rrdFile = $result->valueof('//item/rrdFile');
	     my @fid = $result->valueof('//item/fid');
	     my @pmType = $result->valueof('//item/pmtype');
	     return (\@rrdFile,\@fid,\@pmType);
	     
	     
	      	
	} else {
		print join ', ',
		      $result->faultcode,
		      $result->faultstring,
		      $result->faultdetail;
	      }
 
   
 
   
 
   
 
   
 
   
}
 
   
 
   
=begin nd
Function: getToken
 
   
Description:
This function is to get the Performance data .
 
Web service call to : getPmChartData
 
Arguments for the webservice call : 
$header,$data_rrd,$data_pmType,$data_fid,$data_interval
=cut
 
   
sub getPmChartData {
 
   
 
   
	my $token;	
	my $arg_rrd;
	my $arg_pmType;
	my $arg_fid; 
	my $arg_interval;
	
		
		
	($token,$arg_rrd,$arg_pmType,$arg_fid,$arg_interval) = @_;
	
	print "\nInvoking getPmChartData of StatisticsWS\n";
	
	#Checking whether $arg_rrd,$arg_pmType,$arg_fid is NULL or Empty.
	
	if((!defined($arg_rrd)) || (!defined($arg_pmType)) || (!defined($arg_fid))){
		print "\nValue of rrdFileis " .$arg_rrd. "\n";
		print "\nValue of pmType is " .$arg_pmType. "\n";
		print "\nValue of fid is " .$arg_fid. "\n";
		print "\nCannot call getPmChartData with Null/Empty value\n";
		goto exit;		
	}
	
	
	my $data_rrd = SOAP::Data->type("string")->name("arg0")->value($arg_rrd);
	my $data_pmType = SOAP::Data->type("int")->name("arg1")->value($arg_pmType);
	
	my $data_fid = SOAP::Data->name("arg2"=>$arg_fid);
	my $data_interval = SOAP::Data->name("arg3"=>$arg_interval);
	
	
	# Setting header
	      	
	my $header = 
SOAP::Header->name('token')->prefix('m')->value($token)->uri('http://ep.cisco.dcbu.cisco.c
om')->type('string');
	
	my $client = SOAP::Lite
			->uri('http://ep.jaxws.dcbu.cisco.com/')
		    	->proxy('http://'.$url.'/StatisticsWSService/StatisticsWS?wsdl');
         	
	# Calling getPmChartData method
	    	
	    	
	my $result = 
$client->getPmChartData($header,$data_rrd,$data_pmType,$data_fid,$data_interval);
	
	unless ($result->fault) {
	
		
	     
	     
	     print "\n\nGetPmChartData\n\n";
	     
	     my @item = $result->valueof('//item/item');
	     for(my $i=2;$i<30;$i=$i+3) {
	     print "---------------------------------------------------------\n";
	     print "Rx -> ".$item[$i-2]."\n";
	     print "Tx -> ".$item[$i-1]."\n";
	     print "Time -> ".scalar localtime($item[$i]) . "\n";
	     print "---------------------------------------------------------\n";
	     }
	     	     
	     
	      	
	} else {
		print join ', ',
		      $result->faultcode,
		      $result->faultstring,
		      $result->faultdetail;
	      }
 
   
}
 
   
 
   
1;