Beispiel #1
0
 /**
  * Use this API to fetch filtered set of nsip resources. set the filter parameter values in
  * filtervalue object.
  */
 public static nsip[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception {
   nsip obj = new nsip();
   options option = new options();
   option.set_filter(filter);
   nsip[] response = (nsip[]) obj.getfiltered(service, option);
   return response;
 }
Beispiel #2
0
 /**
  * Use this API to unset the properties of nsip resource. Properties that need to be unset are
  * specified in args array.
  */
 public static base_response unset(nitro_service client, nsip resource, String[] args)
     throws Exception {
   nsip unsetresource = new nsip();
   unsetresource.ipaddress = resource.ipaddress;
   unsetresource.td = resource.td;
   return unsetresource.unset_resource(client, args);
 }
Beispiel #3
0
 /**
  * Use this API to fetch all the nsip resources that are configured on netscaler. This uses
  * nsip_args which is a way to provide additional arguments while fetching the resources.
  */
 public static nsip[] get(nitro_service service, nsip_args args) throws Exception {
   nsip obj = new nsip();
   options option = new options();
   option.set_args(nitro_util.object_to_string_withoutquotes(args));
   nsip[] response = (nsip[]) obj.get_resources(service, option);
   return response;
 }
Beispiel #4
0
 /** Use this API to count the nsip resources configured on NetScaler. */
 public static long count(nitro_service service) throws Exception {
   nsip obj = new nsip();
   options option = new options();
   option.set_count(true);
   nsip[] response = (nsip[]) obj.get_resources(service, option);
   if (response != null) {
     return response[0].__count;
   }
   return 0;
 }
Beispiel #5
0
 /**
  * Use this API to count the filtered set of nsip resources. set the filter parameter values in
  * filtervalue object.
  */
 public static long count_filtered(nitro_service service, filtervalue[] filter) throws Exception {
   nsip obj = new nsip();
   options option = new options();
   option.set_count(true);
   option.set_filter(filter);
   nsip[] response = (nsip[]) obj.getfiltered(service, option);
   if (response != null) {
     return response[0].__count;
   }
   return 0;
 }
Beispiel #6
0
 /** Use this API to delete nsip of given name. */
 public static base_response delete(nitro_service client, String ipaddress) throws Exception {
   nsip deleteresource = new nsip();
   deleteresource.ipaddress = ipaddress;
   return deleteresource.delete_resource(client);
 }
Beispiel #7
0
 /** Use this API to add nsip. */
 public static base_response add(nitro_service client, nsip resource) throws Exception {
   nsip addresource = new nsip();
   addresource.ipaddress = resource.ipaddress;
   addresource.netmask = resource.netmask;
   addresource.type = resource.type;
   addresource.arp = resource.arp;
   addresource.icmp = resource.icmp;
   addresource.vserver = resource.vserver;
   addresource.telnet = resource.telnet;
   addresource.ftp = resource.ftp;
   addresource.gui = resource.gui;
   addresource.ssh = resource.ssh;
   addresource.snmp = resource.snmp;
   addresource.mgmtaccess = resource.mgmtaccess;
   addresource.restrictaccess = resource.restrictaccess;
   addresource.dynamicrouting = resource.dynamicrouting;
   addresource.ospf = resource.ospf;
   addresource.bgp = resource.bgp;
   addresource.rip = resource.rip;
   addresource.hostroute = resource.hostroute;
   addresource.hostrtgw = resource.hostrtgw;
   addresource.metric = resource.metric;
   addresource.vserverrhilevel = resource.vserverrhilevel;
   addresource.ospflsatype = resource.ospflsatype;
   addresource.ospfarea = resource.ospfarea;
   addresource.state = resource.state;
   addresource.vrid = resource.vrid;
   addresource.icmpresponse = resource.icmpresponse;
   addresource.ownernode = resource.ownernode;
   addresource.arpresponse = resource.arpresponse;
   addresource.td = resource.td;
   return addresource.add_resource(client);
 }
Beispiel #8
0
 /** Use this API to fetch a nsip resource. */
 public static nsip get(nitro_service service, nsip obj) throws Exception {
   options option = new options();
   option.set_args(nitro_util.object_to_string_withoutquotes(obj));
   nsip response = (nsip) obj.get_resource(service, option);
   return response;
 }
Beispiel #9
0
 /** Use this API to fetch all the nsip resources that are configured on netscaler. */
 public static nsip[] get(nitro_service service, options option) throws Exception {
   nsip obj = new nsip();
   nsip[] response = (nsip[]) obj.get_resources(service, option);
   return response;
 }
Beispiel #10
0
 /** Use this API to disable nsip. */
 public static base_response disable(nitro_service client, nsip resource) throws Exception {
   nsip disableresource = new nsip();
   disableresource.ipaddress = resource.ipaddress;
   disableresource.td = resource.td;
   return disableresource.perform_operation(client, "disable");
 }
Beispiel #11
0
 /** Use this API to enable nsip of given name. */
 public static base_response enable(nitro_service client, String ipaddress) throws Exception {
   nsip enableresource = new nsip();
   enableresource.ipaddress = ipaddress;
   return enableresource.perform_operation(client, "enable");
 }
Beispiel #12
0
 /** Use this API to update nsip. */
 public static base_response update(nitro_service client, nsip resource) throws Exception {
   nsip updateresource = new nsip();
   updateresource.ipaddress = resource.ipaddress;
   updateresource.td = resource.td;
   updateresource.netmask = resource.netmask;
   updateresource.arp = resource.arp;
   updateresource.icmp = resource.icmp;
   updateresource.vserver = resource.vserver;
   updateresource.telnet = resource.telnet;
   updateresource.ftp = resource.ftp;
   updateresource.gui = resource.gui;
   updateresource.ssh = resource.ssh;
   updateresource.snmp = resource.snmp;
   updateresource.mgmtaccess = resource.mgmtaccess;
   updateresource.restrictaccess = resource.restrictaccess;
   updateresource.dynamicrouting = resource.dynamicrouting;
   updateresource.ospf = resource.ospf;
   updateresource.bgp = resource.bgp;
   updateresource.rip = resource.rip;
   updateresource.hostroute = resource.hostroute;
   updateresource.hostrtgw = resource.hostrtgw;
   updateresource.metric = resource.metric;
   updateresource.vserverrhilevel = resource.vserverrhilevel;
   updateresource.ospflsatype = resource.ospflsatype;
   updateresource.ospfarea = resource.ospfarea;
   updateresource.vrid = resource.vrid;
   updateresource.icmpresponse = resource.icmpresponse;
   updateresource.arpresponse = resource.arpresponse;
   return updateresource.update_resource(client);
 }