Programmer's Guide (Supporting ADX v03.1.00) Manual

852 Brocade Virtual ADX XML API Programmer’s Guide
53-1003248-01
Example: Unbinding a real server from a VIP
B
]));
print LOG "Unbinding the Real Server Port from the Virtual Server\n";
# Note the time before making a SOAP Request
$request_time = &start_timer;
# Make the SOAP Call and store the XML result in a variable
# Response is stored in "$xml_result" as XML. Further action can be taken based on
the Response Content.
$xml_result =
$slbsoap->call('urn:unbindRealServerPortsFromVipPort',@slbsoap_body,$slbsoap_head
er);
# Get the elapsed time (Time taken for the SOAP Response to arrive after the
request was sent)
$response_time = &get_elapsed_time($request_time);
# Write the Time taken to the Test Case LOG File
print LOG "SOAP Response Time for the Unbind Operation: $response_time\n";
print LOG "===== Operation Complete =====\n\n";
#### Delete the Virtual Server ####
###################################
# Build the SOAP Request Message with the XML Context and Header
@slbsoap_body = (name('vip')->value([
name('Name')->value('VirtualServer-001')
]));
print LOG "Deleting the Virtual Server\n";
# Note the time before making a SOAP Request
$request_time = &start_timer;
# Make the SOAP Call and store the XML result in a variable
# Response is stored in "$xml_result" as XML. Further action can be taken based on
the Response Content.
$xml_result =
$slbsoap->call('urn:deleteVirtualServer',@slbsoap_body,$slbsoap_header);
# Get the elapsed time (Time taken for the SOAP Response to arrive after the
request was sent)
$response_time = &get_elapsed_time($request_time);
# Write the Time taken to the Test Case LOG File
print LOG "SOAP Response Time to Delete the Virtual Server: $response_time\n";
print LOG "===== Operation Complete =====\n\n";
#### Delete the Real Server ####
################################
# Build the SOAP Request Message with the XML Context and Header
@slbsoap_body = (name('rs')->value([
name('Name')->value('RealServer-001')
]));
# Note the time before making a SOAP Request
$request_time = &start_timer;
# Make the SOAP Call and store the XML result in a variable
# Response is stored in "$xml_result" as XML. Further action can be taken based on
the Response Content.
$xml_result =
$slbsoap->call('urn:deleteRealServer',@slbsoap_body,$slbsoap_header);
# Get the elapsed time (Time taken for the SOAP Response to arrive after the
request was sent)
$response_time = &get_elapsed_time($request_time);
# Write the Time taken to the Test Case LOG File
print LOG "SOAP Response Time to Delete the Real Server: $response_time\n";
print LOG "===== Operation Complete =====\n\n";
#### Write Configuration in Memory to the Startup Config File ####
##################################################################
print LOG "Writing Configuration in Memory to Startup Config\n";
# Note the time before making a SOAP Request
$request_time = &start_timer;