© 1999-2017 Citrix Systems, Inc. All rights reserved.
p.242
https://docs.citrix.com
To account for the failure of some operations within the bulk operation, NITRO allows you to configure one of the
following behaviors:
Exit .
Exit . When the first error is encountered, the execution stops. The commands that were executed before the error are
committed.
Cont inue.
Cont inue. All the commands in the list are executed even if some commands fail.
Note: You must configure the required behavior while establishing a connection with the appliance, by setting the onerror
param in the nitro_service() method.
The following sample code adds two NetScalers in one operation:
ns[] newns = new ns[2];
//Specify details of first NetScaler
newns[0] = new ns();
newns[0].set_name("ns_instance1");
newns[0].set_ip_address("10.70.136.5");
newns[0].set_netmask("255.255.255.0");
newns[0].set_gateway("10.70.136.1");
...
...
...
//Specify details of second NetScaler
newns[1] = new ns();
newns[1].set_name("ns_instance2");
newns[1].set_ip_address("10.70.136.8");
newns[1].set_netmask("255.255.255.0");
newns[1].set_gateway("10.70.136.1");
...
...
//upload the details of the NetScalers to the NITRO server
ns[] result = ns.add(nitroservice, newns);
The
errorcode
field indicates the status of the operation.
An errorcode of 0 indicates that the operation is successful.
A non-zero errorcode indicates an error in processing the NITRO request.
The error message field provides a brief explanation and the nature of the failure.
All exceptions in the execution of NITRO APIs are caught by the
com.citrix.sdx.nitro.exception.nitro_exception
class. To get information about the exception, you can use the
getErrorCode()
method.
For a more detailed description of the error codes, see the API reference available in the <NITRO_SDK_HOME>/doc folder.
Содержание NetScaler SDX 11500
Страница 90: ...1999 2017 Citrix Systems Inc All rights reserved p 90 https docs citrix com 5 Click OK...
Страница 218: ...1999 2017 Citrix Systems Inc All rights reserved p 218 https docs citrix com...
Страница 235: ...1999 2017 Citrix Systems Inc All rights reserved p 235 https docs citrix com...
Страница 253: ...1999 2017 Citrix Systems Inc All rights reserved p 253 https docs citrix com errorcode 1 message IP address is missing...