code
stringlengths
67
466k
docstring
stringlengths
1
13.2k
protected T2 getValue(String statsType) { if (statsType.equals(CodecUtil.STATS_TYPE_MEAN)) { return operations.divide1(valueSum, valueN); } else if (statsType.equals(CodecUtil.STATS_TYPE_GEOMETRICMEAN)) { return operations.exp2(operations.divide2(valueSumOfLogs, valueN)); } else if (statsType.equals(CodecUtil.STATS_TYPE_STANDARDDEVIATION)) { return operations .sqrt2( operations.divide2( operations.subtract12(valueSumOfSquares, operations.divide1( operations.product11(valueSum, valueSum), valueN)), (valueN - 1))); } else if (statsType.equals(CodecUtil.STATS_TYPE_VARIANCE)) { return operations .divide2( operations .subtract12(valueSumOfSquares, operations.divide1( operations.product11(valueSum, valueSum), valueN)), (valueN - 1)); } else if (statsType.equals(CodecUtil.STATS_TYPE_POPULATIONVARIANCE)) { return operations .divide2( operations .subtract12(valueSumOfSquares, operations.divide1( operations.product11(valueSum, valueSum), valueN)), valueN); } else if (statsType.equals(CodecUtil.STATS_TYPE_QUADRATICMEAN)) { return operations.sqrt2(operations.divide1(valueSumOfSquares, valueN)); } else { return null; } }
Gets the value. @param statsType the stats type @return the value
@Override public int getCompareValueType() throws IOException { switch (sortType) { case CodecUtil.STATS_TYPE_N: return 0; case CodecUtil.STATS_TYPE_SUM: return 1; case CodecUtil.STATS_TYPE_MAX: return 1; case CodecUtil.STATS_TYPE_MIN: return 1; case CodecUtil.STATS_TYPE_SUMSQ: return 1; case CodecUtil.STATS_TYPE_SUMOFLOGS: return 2; case CodecUtil.STATS_TYPE_MEAN: return 2; case CodecUtil.STATS_TYPE_GEOMETRICMEAN: return 2; case CodecUtil.STATS_TYPE_STANDARDDEVIATION: return 2; case CodecUtil.STATS_TYPE_VARIANCE: return 2; case CodecUtil.STATS_TYPE_POPULATIONVARIANCE: return 2; case CodecUtil.STATS_TYPE_QUADRATICMEAN: return 2; default: throw new IOException("sortType " + sortType + " not supported"); } }
/* (non-Javadoc) @see mtas.codec.util.collector.MtasDataItem#getCompareValueType()
@Override public final MtasDataItemNumberComparator<Long> getCompareValue0() { switch (sortType) { case CodecUtil.STATS_TYPE_N: return new MtasDataItemNumberComparator<Long>(valueN, sortDirection); default: return null; } }
/* (non-Javadoc) @see mtas.codec.util.collector.MtasDataItem#getCompareValue0()
public static base_response add(nitro_service client, snmpmanager resource) throws Exception { snmpmanager addresource = new snmpmanager(); addresource.ipaddress = resource.ipaddress; addresource.netmask = resource.netmask; addresource.domainresolveretry = resource.domainresolveretry; return addresource.add_resource(client); }
Use this API to add snmpmanager.
public static base_responses add(nitro_service client, snmpmanager resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { snmpmanager addresources[] = new snmpmanager[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new snmpmanager(); addresources[i].ipaddress = resources[i].ipaddress; addresources[i].netmask = resources[i].netmask; addresources[i].domainresolveretry = resources[i].domainresolveretry; } result = add_bulk_request(client, addresources); } return result; }
Use this API to add snmpmanager resources.
public static base_response delete(nitro_service client, snmpmanager resource) throws Exception { snmpmanager deleteresource = new snmpmanager(); deleteresource.ipaddress = resource.ipaddress; deleteresource.netmask = resource.netmask; return deleteresource.delete_resource(client); }
Use this API to delete snmpmanager.
public static base_response update(nitro_service client, snmpmanager resource) throws Exception { snmpmanager updateresource = new snmpmanager(); updateresource.ipaddress = resource.ipaddress; updateresource.netmask = resource.netmask; updateresource.domainresolveretry = resource.domainresolveretry; return updateresource.update_resource(client); }
Use this API to update snmpmanager.
public static base_responses update(nitro_service client, snmpmanager resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { snmpmanager updateresources[] = new snmpmanager[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new snmpmanager(); updateresources[i].ipaddress = resources[i].ipaddress; updateresources[i].netmask = resources[i].netmask; updateresources[i].domainresolveretry = resources[i].domainresolveretry; } result = update_bulk_request(client, updateresources); } return result; }
Use this API to update snmpmanager resources.
public static base_response unset(nitro_service client, snmpmanager resource, String[] args) throws Exception{ snmpmanager unsetresource = new snmpmanager(); unsetresource.ipaddress = resource.ipaddress; unsetresource.netmask = resource.netmask; return unsetresource.unset_resource(client,args); }
Use this API to unset the properties of snmpmanager resource. Properties that need to be unset are specified in args array.
public static snmpmanager[] get(nitro_service service) throws Exception{ snmpmanager obj = new snmpmanager(); snmpmanager[] response = (snmpmanager[])obj.get_resources(service); return response; }
Use this API to fetch all the snmpmanager resources that are configured on netscaler.
public static snmpmanager[] get_filtered(nitro_service service, String filter) throws Exception{ snmpmanager obj = new snmpmanager(); options option = new options(); option.set_filter(filter); snmpmanager[] response = (snmpmanager[]) obj.getfiltered(service, option); return response; }
Use this API to fetch filtered set of snmpmanager resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
public static appfwprofile_denyurl_binding[] get(nitro_service service, String name) throws Exception{ appfwprofile_denyurl_binding obj = new appfwprofile_denyurl_binding(); obj.set_name(name); appfwprofile_denyurl_binding response[] = (appfwprofile_denyurl_binding[]) obj.get_resources(service); return response; }
Use this API to fetch appfwprofile_denyurl_binding resources of given name .
public static netbridge_vlan_binding[] get(nitro_service service, String name) throws Exception{ netbridge_vlan_binding obj = new netbridge_vlan_binding(); obj.set_name(name); netbridge_vlan_binding response[] = (netbridge_vlan_binding[]) obj.get_resources(service); return response; }
Use this API to fetch netbridge_vlan_binding resources of given name .
public static <T1,T2> Pair<T1,T2> newPair(T1 first, T2 second) { return new Pair<T1,T2>(first, second); }
/* Other
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception { audit_stats[] resources = new audit_stats[1]; audit_response result = (audit_response) service.get_payload_formatter().string_to_resource(audit_response.class, response); if(result.errorcode != 0) { if (result.errorcode == 444) { service.clear_session(); } if(result.severity != null) { if (result.severity.equals("ERROR")) throw new nitro_exception(result.message,result.errorcode); } else { throw new nitro_exception(result.message,result.errorcode); } } resources[0] = result.audit; return resources; }
<pre> converts nitro response into object and returns the object array in case of get request. </pre>
public static audit_stats get(nitro_service service, options option) throws Exception{ audit_stats obj = new audit_stats(); audit_stats[] response = (audit_stats[])obj.stat_resources(service,option); return response[0]; }
Use this API to fetch the statistics of all audit_stats resources that are configured on netscaler.
public base_response login() throws Exception { login login = new login(this.user_name, this.password, this.timeout); base_response result = login.perform_operation(this); if (result.errorcode == 0 || result.errorcode == 1034) this.sessionid = result.sessionid; return result; }
<pre> Use this API to login into Netscaler. @return status of the operation performed. @throws nitro_exception nitro exception is thrown. </pre>
public base_response loginchallengeresponse(String response) throws Exception { loginchallengeresponse logincr = new loginchallengeresponse(response); base_response result = logincr.perform_operation(this); if (result.errorcode == 0) this.sessionid = result.sessionid; return result; }
<pre> Use this API to loginchallengeresponse into Netscaler with challenge response. @return status of the operation performed. @throws nitro_exception nitro exception is thrown. </pre>
public base_response reboot(boolean warm) throws Exception { reboot resource = new reboot(); resource.set_warm(warm); base_response result = resource.perform_operation(this); return result; }
<pre> Use this API to reboot Netscaler. @param warm set this to true for warm reboot. @return status of the operation performed. </pre>
public base_response forcehasync(Boolean force, String save) throws Exception { hasync resource = new hasync(); resource.set_force(force) ; resource.set_save(save); options option = new options(); option.set_action("force"); base_response result = resource.perform_operation(this,option); return result; }
<pre> Use this API to force the sync in secondary Netscaler. @param force set this to true for forcesync @param save set this to YES,if want to save the configuration after sync. @return status of the operation performed. </pre>
public base_response forcehafailover(Boolean force) throws Exception { hafailover resource = new hafailover(); resource.set_force(force); options option = new options(); option.set_action("force"); base_response result = resource.perform_operation(this,option); return result; }
<pre> Use this API to invoke force failover in primary Netscaler. @param force set this to true if force failover is needed. @return status of the operation performed. </pre>
public base_response clear_config(Boolean force, String level) throws Exception { base_response result = null; nsconfig resource = new nsconfig(); if (force) resource.set_force(force); resource.set_level(level); options option = new options(); option.set_action("clear"); result = resource.perform_operation(this, option); return result; }
Use this API to clear configuration on netscaler. @param force clear confirmation without prompting. @param level clear config according to the level. eg: basic, extended, full @return status of the operation performed. @throws Exception Nitro exception is thrown.
public base_response save_config() throws Exception { nsconfig resource = new nsconfig(); options option = new options(); option.set_action("save"); base_response result = resource.perform_operation(this, option); return result; }
<pre> Use this API to save configuration on Netscaler. @return status of the operation performed. </pre>
public base_response enable_features(String[] features) throws Exception { base_response result = null; nsfeature resource = new nsfeature(); resource.set_feature(features); options option = new options(); option.set_action("enable"); result = resource.perform_operation(this, option); return result; }
Use this API to enable the feature on Netscaler. @param feature feature to be enabled. @return status of the operation performed. @throws Exception Nitro exception.
public base_response enable_modes(String[] modes) throws Exception { base_response result = null; nsmode resource = new nsmode(); resource.set_mode(modes); options option = new options(); option.set_action("enable"); result = resource.perform_operation(this, option); return result; }
Use this API to enable the mode on Netscaler. @param mode mode to be enabled. @return status of the operation performed. @throws Exception Nitro exception.
public base_response login(String username, String password, Long timeout) throws Exception { this.set_credential(username, password); this.set_timeout(timeout); return this.login(); }
Use this API to login into Netscaler. @param username Username @param password Password for the Netscaler. @param timeout timeout for netscaler session.Default is 1800secs @return status of the operation performed. @throws Exception nitro exception is thrown.
public base_response logout() throws Exception { base_response result = null; logout logout = new logout(); result = logout.perform_operation(this); sessionid = null; user_name = null; password = null; return result; }
<pre> Use this API to logout from current session. @return status of the operation performed. </pre>
public void set_protocol(String protocol) throws nitro_exception { if (protocol == null || !(protocol.equalsIgnoreCase("http") ||protocol.equalsIgnoreCase("https"))) { throw new nitro_exception("error: protocol value " + protocol + " is not supported"); } this.protocol = protocol; }
Sets the protocol. @param protocol The protocol to be set.
public static authenticationvserver_authenticationlocalpolicy_binding[] get(nitro_service service, String name) throws Exception{ authenticationvserver_authenticationlocalpolicy_binding obj = new authenticationvserver_authenticationlocalpolicy_binding(); obj.set_name(name); authenticationvserver_authenticationlocalpolicy_binding response[] = (authenticationvserver_authenticationlocalpolicy_binding[]) obj.get_resources(service); return response; }
Use this API to fetch authenticationvserver_authenticationlocalpolicy_binding resources of given name .
public static responderglobal_responderpolicy_binding[] get(nitro_service service) throws Exception{ responderglobal_responderpolicy_binding obj = new responderglobal_responderpolicy_binding(); responderglobal_responderpolicy_binding response[] = (responderglobal_responderpolicy_binding[]) obj.get_resources(service); return response; }
Use this API to fetch a responderglobal_responderpolicy_binding resources.
public static responderglobal_responderpolicy_binding[] get_filtered(nitro_service service, String filter) throws Exception{ responderglobal_responderpolicy_binding obj = new responderglobal_responderpolicy_binding(); options option = new options(); option.set_filter(filter); responderglobal_responderpolicy_binding[] response = (responderglobal_responderpolicy_binding[]) obj.getfiltered(service, option); return response; }
Use this API to fetch filtered set of responderglobal_responderpolicy_binding resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception { systemmemory_stats[] resources = new systemmemory_stats[1]; systemmemory_response result = (systemmemory_response) service.get_payload_formatter().string_to_resource(systemmemory_response.class, response); if(result.errorcode != 0) { if (result.errorcode == 444) { service.clear_session(); } if(result.severity != null) { if (result.severity.equals("ERROR")) throw new nitro_exception(result.message,result.errorcode); } else { throw new nitro_exception(result.message,result.errorcode); } } resources[0] = result.systemmemory; return resources; }
<pre> converts nitro response into object and returns the object array in case of get request. </pre>
public static systemmemory_stats get(nitro_service service) throws Exception{ systemmemory_stats obj = new systemmemory_stats(); systemmemory_stats[] response = (systemmemory_stats[])obj.stat_resources(service); return response[0]; }
Use this API to fetch the statistics of all systemmemory_stats resources that are configured on netscaler.
public static base_response unset(nitro_service client, sslservice resource, String[] args) throws Exception{ sslservice unsetresource = new sslservice(); unsetresource.servicename = resource.servicename; return unsetresource.unset_resource(client,args); }
Use this API to unset the properties of sslservice resource. Properties that need to be unset are specified in args array.
public static sslservice[] get(nitro_service service) throws Exception{ sslservice obj = new sslservice(); sslservice[] response = (sslservice[])obj.get_resources(service); return response; }
Use this API to fetch all the sslservice resources that are configured on netscaler.
public static sslservice[] get(nitro_service service, sslservice_args args) throws Exception{ sslservice obj = new sslservice(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); sslservice[] response = (sslservice[])obj.get_resources(service, option); return response; }
Use this API to fetch all the sslservice resources that are configured on netscaler. This uses sslservice_args which is a way to provide additional arguments while fetching the resources.
public static sslservice get(nitro_service service, String servicename) throws Exception{ sslservice obj = new sslservice(); obj.set_servicename(servicename); sslservice response = (sslservice) obj.get_resource(service); return response; }
Use this API to fetch sslservice resource of given name .
public static sslservice[] get_filtered(nitro_service service, String filter) throws Exception{ sslservice obj = new sslservice(); options option = new options(); option.set_filter(filter); sslservice[] response = (sslservice[]) obj.getfiltered(service, option); return response; }
Use this API to fetch filtered set of sslservice resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
public static base_response add(nitro_service client, vpath resource) throws Exception { vpath addresource = new vpath(); addresource.name = resource.name; addresource.destip = resource.destip; addresource.encapmode = resource.encapmode; return addresource.add_resource(client); }
Use this API to add vpath.
public static base_responses add(nitro_service client, vpath resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { vpath addresources[] = new vpath[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new vpath(); addresources[i].name = resources[i].name; addresources[i].destip = resources[i].destip; addresources[i].encapmode = resources[i].encapmode; } result = add_bulk_request(client, addresources); } return result; }
Use this API to add vpath resources.
public static vpath[] get(nitro_service service) throws Exception{ vpath obj = new vpath(); vpath[] response = (vpath[])obj.get_resources(service); return response; }
Use this API to fetch all the vpath resources that are configured on netscaler.
public static vpath get(nitro_service service, String name) throws Exception{ vpath obj = new vpath(); obj.set_name(name); vpath response = (vpath) obj.get_resource(service); return response; }
Use this API to fetch vpath resource of given name .
public static vpath[] get_filtered(nitro_service service, String filter) throws Exception{ vpath obj = new vpath(); options option = new options(); option.set_filter(filter); vpath[] response = (vpath[]) obj.getfiltered(service, option); return response; }
Use this API to fetch filtered set of vpath resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
public Tokenizer<Tree> getTokenizer(final Reader r) { return new AbstractTokenizer<Tree>() { TreeReader tr = trf.newTreeReader(r); @Override public Tree getNext() { try { return tr.readTree(); } catch(IOException e) { System.err.println("Error in reading tree."); return null; } } }; }
Gets a tokenizer from a reader.
public static lbvserver_scpolicy_binding[] get(nitro_service service, String name) throws Exception{ lbvserver_scpolicy_binding obj = new lbvserver_scpolicy_binding(); obj.set_name(name); lbvserver_scpolicy_binding response[] = (lbvserver_scpolicy_binding[]) obj.get_resources(service); return response; }
Use this API to fetch lbvserver_scpolicy_binding resources of given name .
public static transformpolicylabel[] get(nitro_service service) throws Exception{ transformpolicylabel obj = new transformpolicylabel(); transformpolicylabel[] response = (transformpolicylabel[])obj.get_resources(service); return response; }
Use this API to fetch all the transformpolicylabel resources that are configured on netscaler.
public static transformpolicylabel get(nitro_service service, String labelname) throws Exception{ transformpolicylabel obj = new transformpolicylabel(); obj.set_labelname(labelname); transformpolicylabel response = (transformpolicylabel) obj.get_resource(service); return response; }
Use this API to fetch transformpolicylabel resource of given name .
public static transformpolicylabel[] get_filtered(nitro_service service, String filter) throws Exception{ transformpolicylabel obj = new transformpolicylabel(); options option = new options(); option.set_filter(filter); transformpolicylabel[] response = (transformpolicylabel[]) obj.getfiltered(service, option); return response; }
Use this API to fetch filtered set of transformpolicylabel resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
public static base_response add(nitro_service client, ntpserver resource) throws Exception { ntpserver addresource = new ntpserver(); addresource.serverip = resource.serverip; addresource.servername = resource.servername; addresource.minpoll = resource.minpoll; addresource.maxpoll = resource.maxpoll; addresource.autokey = resource.autokey; addresource.key = resource.key; return addresource.add_resource(client); }
Use this API to add ntpserver.
public static base_responses add(nitro_service client, ntpserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { ntpserver addresources[] = new ntpserver[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new ntpserver(); addresources[i].serverip = resources[i].serverip; addresources[i].servername = resources[i].servername; addresources[i].minpoll = resources[i].minpoll; addresources[i].maxpoll = resources[i].maxpoll; addresources[i].autokey = resources[i].autokey; addresources[i].key = resources[i].key; } result = add_bulk_request(client, addresources); } return result; }
Use this API to add ntpserver resources.
public static base_response delete(nitro_service client, String serverip) throws Exception { ntpserver deleteresource = new ntpserver(); deleteresource.serverip = serverip; return deleteresource.delete_resource(client); }
Use this API to delete ntpserver of given name.
public static base_response delete(nitro_service client, ntpserver resource) throws Exception { ntpserver deleteresource = new ntpserver(); deleteresource.serverip = resource.serverip; deleteresource.servername = resource.servername; return deleteresource.delete_resource(client); }
Use this API to delete ntpserver.
public static base_responses delete(nitro_service client, String serverip[]) throws Exception { base_responses result = null; if (serverip != null && serverip.length > 0) { ntpserver deleteresources[] = new ntpserver[serverip.length]; for (int i=0;i<serverip.length;i++){ deleteresources[i] = new ntpserver(); deleteresources[i].serverip = serverip[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
Use this API to delete ntpserver resources of given names.
public static base_responses delete(nitro_service client, ntpserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { ntpserver deleteresources[] = new ntpserver[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new ntpserver(); deleteresources[i].serverip = resources[i].serverip; deleteresources[i].servername = resources[i].servername; } result = delete_bulk_request(client, deleteresources); } return result; }
Use this API to delete ntpserver resources.
public static base_response update(nitro_service client, ntpserver resource) throws Exception { ntpserver updateresource = new ntpserver(); updateresource.serverip = resource.serverip; updateresource.servername = resource.servername; updateresource.minpoll = resource.minpoll; updateresource.maxpoll = resource.maxpoll; updateresource.preferredntpserver = resource.preferredntpserver; updateresource.autokey = resource.autokey; updateresource.key = resource.key; return updateresource.update_resource(client); }
Use this API to update ntpserver.
public static base_responses update(nitro_service client, ntpserver resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { ntpserver updateresources[] = new ntpserver[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new ntpserver(); updateresources[i].serverip = resources[i].serverip; updateresources[i].servername = resources[i].servername; updateresources[i].minpoll = resources[i].minpoll; updateresources[i].maxpoll = resources[i].maxpoll; updateresources[i].preferredntpserver = resources[i].preferredntpserver; updateresources[i].autokey = resources[i].autokey; updateresources[i].key = resources[i].key; } result = update_bulk_request(client, updateresources); } return result; }
Use this API to update ntpserver resources.
public static base_response unset(nitro_service client, ntpserver resource, String[] args) throws Exception{ ntpserver unsetresource = new ntpserver(); unsetresource.serverip = resource.serverip; unsetresource.servername = resource.servername; return unsetresource.unset_resource(client,args); }
Use this API to unset the properties of ntpserver resource. Properties that need to be unset are specified in args array.
public static base_responses unset(nitro_service client, String serverip[], String args[]) throws Exception { base_responses result = null; if (serverip != null && serverip.length > 0) { ntpserver unsetresources[] = new ntpserver[serverip.length]; for (int i=0;i<serverip.length;i++){ unsetresources[i] = new ntpserver(); unsetresources[i].serverip = serverip[i]; } result = unset_bulk_request(client, unsetresources,args); } return result; }
Use this API to unset the properties of ntpserver resources. Properties that need to be unset are specified in args array.
public static base_responses unset(nitro_service client, ntpserver resources[], String[] args) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { ntpserver unsetresources[] = new ntpserver[resources.length]; for (int i=0;i<resources.length;i++){ unsetresources[i] = new ntpserver(); unsetresources[i].serverip = resources[i].serverip; unsetresources[i].servername = resources[i].servername; } result = unset_bulk_request(client, unsetresources,args); } return result; }
Use this API to unset the properties of ntpserver resources. Properties that need to be unset are specified in args array.
public static ntpserver[] get(nitro_service service) throws Exception{ ntpserver obj = new ntpserver(); ntpserver[] response = (ntpserver[])obj.get_resources(service); return response; }
Use this API to fetch all the ntpserver resources that are configured on netscaler.
public static ntpserver[] get_filtered(nitro_service service, String filter) throws Exception{ ntpserver obj = new ntpserver(); options option = new options(); option.set_filter(filter); ntpserver[] response = (ntpserver[]) obj.getfiltered(service, option); return response; }
Use this API to fetch filtered set of ntpserver resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
public static base_response add(nitro_service client, dnssuffix resource) throws Exception { dnssuffix addresource = new dnssuffix(); addresource.Dnssuffix = resource.Dnssuffix; return addresource.add_resource(client); }
Use this API to add dnssuffix.
public static base_responses add(nitro_service client, dnssuffix resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnssuffix addresources[] = new dnssuffix[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new dnssuffix(); addresources[i].Dnssuffix = resources[i].Dnssuffix; } result = add_bulk_request(client, addresources); } return result; }
Use this API to add dnssuffix resources.
public static base_response delete(nitro_service client, String Dnssuffix) throws Exception { dnssuffix deleteresource = new dnssuffix(); deleteresource.Dnssuffix = Dnssuffix; return deleteresource.delete_resource(client); }
Use this API to delete dnssuffix of given name.
public static base_responses delete(nitro_service client, String Dnssuffix[]) throws Exception { base_responses result = null; if (Dnssuffix != null && Dnssuffix.length > 0) { dnssuffix deleteresources[] = new dnssuffix[Dnssuffix.length]; for (int i=0;i<Dnssuffix.length;i++){ deleteresources[i] = new dnssuffix(); deleteresources[i].Dnssuffix = Dnssuffix[i]; } result = delete_bulk_request(client, deleteresources); } return result; }
Use this API to delete dnssuffix resources of given names.
public static dnssuffix[] get(nitro_service service) throws Exception{ dnssuffix obj = new dnssuffix(); dnssuffix[] response = (dnssuffix[])obj.get_resources(service); return response; }
Use this API to fetch all the dnssuffix resources that are configured on netscaler.
public static dnssuffix get(nitro_service service, String Dnssuffix) throws Exception{ dnssuffix obj = new dnssuffix(); obj.set_Dnssuffix(Dnssuffix); dnssuffix response = (dnssuffix) obj.get_resource(service); return response; }
Use this API to fetch dnssuffix resource of given name .
public static dnssuffix[] get(nitro_service service, String Dnssuffix[]) throws Exception{ if (Dnssuffix !=null && Dnssuffix.length>0) { dnssuffix response[] = new dnssuffix[Dnssuffix.length]; dnssuffix obj[] = new dnssuffix[Dnssuffix.length]; for (int i=0;i<Dnssuffix.length;i++) { obj[i] = new dnssuffix(); obj[i].set_Dnssuffix(Dnssuffix[i]); response[i] = (dnssuffix) obj[i].get_resource(service); } return response; } return null; }
Use this API to fetch dnssuffix resources of given names .
public static dnssuffix[] get_filtered(nitro_service service, String filter) throws Exception{ dnssuffix obj = new dnssuffix(); options option = new options(); option.set_filter(filter); dnssuffix[] response = (dnssuffix[]) obj.getfiltered(service, option); return response; }
Use this API to fetch filtered set of dnssuffix resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
public static base_response update(nitro_service client, vridparam resource) throws Exception { vridparam updateresource = new vridparam(); updateresource.sendtomaster = resource.sendtomaster; return updateresource.update_resource(client); }
Use this API to update vridparam.
public static base_response unset(nitro_service client, vridparam resource, String[] args) throws Exception{ vridparam unsetresource = new vridparam(); return unsetresource.unset_resource(client,args); }
Use this API to unset the properties of vridparam resource. Properties that need to be unset are specified in args array.
public static vridparam get(nitro_service service) throws Exception{ vridparam obj = new vridparam(); vridparam[] response = (vridparam[])obj.get_resources(service); return response[0]; }
Use this API to fetch all the vridparam resources that are configured on netscaler.
public static cmppolicylabel_stats[] get(nitro_service service) throws Exception{ cmppolicylabel_stats obj = new cmppolicylabel_stats(); cmppolicylabel_stats[] response = (cmppolicylabel_stats[])obj.stat_resources(service); return response; }
Use this API to fetch the statistics of all cmppolicylabel_stats resources that are configured on netscaler.
public static cmppolicylabel_stats get(nitro_service service, String labelname) throws Exception{ cmppolicylabel_stats obj = new cmppolicylabel_stats(); obj.set_labelname(labelname); cmppolicylabel_stats response = (cmppolicylabel_stats) obj.stat_resource(service); return response; }
Use this API to fetch statistics of cmppolicylabel_stats resource of given name .
public static base_response add(nitro_service client, dnstxtrec resource) throws Exception { dnstxtrec addresource = new dnstxtrec(); addresource.domain = resource.domain; addresource.String = resource.String; addresource.ttl = resource.ttl; return addresource.add_resource(client); }
Use this API to add dnstxtrec.
public static base_responses add(nitro_service client, dnstxtrec resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnstxtrec addresources[] = new dnstxtrec[resources.length]; for (int i=0;i<resources.length;i++){ addresources[i] = new dnstxtrec(); addresources[i].domain = resources[i].domain; addresources[i].String = resources[i].String; addresources[i].ttl = resources[i].ttl; } result = add_bulk_request(client, addresources); } return result; }
Use this API to add dnstxtrec resources.
public static base_response delete(nitro_service client, String domain) throws Exception { dnstxtrec deleteresource = new dnstxtrec(); deleteresource.domain = domain; return deleteresource.delete_resource(client); }
Use this API to delete dnstxtrec of given name.
public static base_response delete(nitro_service client, dnstxtrec resource) throws Exception { dnstxtrec deleteresource = new dnstxtrec(); deleteresource.domain = resource.domain; deleteresource.String = resource.String; deleteresource.recordid = resource.recordid; return deleteresource.delete_resource(client); }
Use this API to delete dnstxtrec.
public static base_responses delete(nitro_service client, dnstxtrec resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { dnstxtrec deleteresources[] = new dnstxtrec[resources.length]; for (int i=0;i<resources.length;i++){ deleteresources[i] = new dnstxtrec(); deleteresources[i].domain = resources[i].domain; deleteresources[i].String = resources[i].String; deleteresources[i].recordid = resources[i].recordid; } result = delete_bulk_request(client, deleteresources); } return result; }
Use this API to delete dnstxtrec resources.
public static dnstxtrec[] get(nitro_service service) throws Exception{ dnstxtrec obj = new dnstxtrec(); dnstxtrec[] response = (dnstxtrec[])obj.get_resources(service); return response; }
Use this API to fetch all the dnstxtrec resources that are configured on netscaler.
public static dnstxtrec[] get(nitro_service service, dnstxtrec_args args) throws Exception{ dnstxtrec obj = new dnstxtrec(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); dnstxtrec[] response = (dnstxtrec[])obj.get_resources(service, option); return response; }
Use this API to fetch all the dnstxtrec resources that are configured on netscaler. This uses dnstxtrec_args which is a way to provide additional arguments while fetching the resources.
public static dnstxtrec get(nitro_service service, String domain) throws Exception{ dnstxtrec obj = new dnstxtrec(); obj.set_domain(domain); dnstxtrec response = (dnstxtrec) obj.get_resource(service); return response; }
Use this API to fetch dnstxtrec resource of given name .
public static dnstxtrec[] get(nitro_service service, String domain[]) throws Exception{ if (domain !=null && domain.length>0) { dnstxtrec response[] = new dnstxtrec[domain.length]; dnstxtrec obj[] = new dnstxtrec[domain.length]; for (int i=0;i<domain.length;i++) { obj[i] = new dnstxtrec(); obj[i].set_domain(domain[i]); response[i] = (dnstxtrec) obj[i].get_resource(service); } return response; } return null; }
Use this API to fetch dnstxtrec resources of given names .
public static dnstxtrec[] get_filtered(nitro_service service, String filter) throws Exception{ dnstxtrec obj = new dnstxtrec(); options option = new options(); option.set_filter(filter); dnstxtrec[] response = (dnstxtrec[]) obj.getfiltered(service, option); return response; }
Use this API to fetch filtered set of dnstxtrec resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
public static bridgegroup_vlan_binding[] get(nitro_service service, Long id) throws Exception{ bridgegroup_vlan_binding obj = new bridgegroup_vlan_binding(); obj.set_id(id); bridgegroup_vlan_binding response[] = (bridgegroup_vlan_binding[]) obj.get_resources(service); return response; }
Use this API to fetch bridgegroup_vlan_binding resources of given name .
public static bridgegroup_vlan_binding[] get_filtered(nitro_service service, Long id, String filter) throws Exception{ bridgegroup_vlan_binding obj = new bridgegroup_vlan_binding(); obj.set_id(id); options option = new options(); option.set_filter(filter); bridgegroup_vlan_binding[] response = (bridgegroup_vlan_binding[]) obj.getfiltered(service, option); return response; }
Use this API to fetch filtered set of bridgegroup_vlan_binding resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
public static long count(nitro_service service, Long id) throws Exception{ bridgegroup_vlan_binding obj = new bridgegroup_vlan_binding(); obj.set_id(id); options option = new options(); option.set_count(true); bridgegroup_vlan_binding response[] = (bridgegroup_vlan_binding[]) obj.get_resources(service,option); if (response != null) { return response[0].__count; } return 0; }
Use this API to count bridgegroup_vlan_binding resources configued on NetScaler.
public boolean accept(File file) { if (file.isDirectory()) { return recursively; } else { String filename = file.getName(); return accept(filename); } }
Checks whether a file satisfies the number range selection filter. The test is evaluated based on the rightmost natural number found in the filename string (proper, not including directories in a path). @param file The file @return true If the file is within the ranges filtered for
public boolean accept(String str) { int k = str.length() - 1; char c = str.charAt(k); while (k >= 0 && !Character.isDigit(c)) { k--; if (k >= 0) { c = str.charAt(k); } } if (k < 0) { return false; } int j = k; c = str.charAt(j); while (j >= 0 && Character.isDigit(c)) { j--; if (j >= 0) { c = str.charAt(j); } } j++; k++; String theNumber = str.substring(j, k); int number = Integer.parseInt(theNumber); for (Pair<Integer,Integer> p : ranges) { int low = p.first().intValue(); int high = p.second().intValue(); if (number >= low && number <= high) { return true; } } return false; }
Checks whether a String satisfies the number range selection filter. The test is evaluated based on the rightmost natural number found in the String. Note that this is just evaluated on the String as given. It is not trying to interpret it as a filename and to decide whether the file exists, is a directory or anything like that. @param str The String to check for a number in @return true If the String is within the ranges filtered for