Use this API to fetch all the dnssrvrec resources that are configured on netscaler.
This uses dnssrvrec_args which is a way to provide additional arguments while fetching the resources.
546217
public static dnssrvrec[] get(nitro_service service, dnssrvrec_args args) throws Exception{
		dnssrvrec obj = new dnssrvrec();
		options option = new options();
		option.set_args(nitro_util.object_to_string_withoutquotes(args));
		dnssrvrec[] response = (dnssrvrec[])obj.get_resources(service, option);
		return response;
	}
321528
public static dnsnsecrec get(nitro_service service, String hostname) throws Exception{
		dnsnsecrec obj = new dnsnsecrec();
		obj.set_hostname(hostname);
		dnsnsecrec response = (dnsnsecrec) obj.get_resource(service);
		return response;
	}
1127711
public static base_response update(nitro_service client, dnssrvrec resource) throws Exception {
		dnssrvrec updateresource = new dnssrvrec();
		updateresource.domain = resource.domain;
		updateresource.target = resource.target;
		updateresource.priority = resource.priority;
		updateresource.weight = resource.weight;
		updateresource.port = resource.port;
		updateresource.ttl = resource.ttl;
		return updateresource.update_resource(client);
	}
729584
def get_service_resources(cls, model):
        
        key = cls.get_model_key(model)
        return cls.get_service_name_resources(key)
1284139
public static crvserver_stats[] get(nitro_service service) throws Exception{
		crvserver_stats obj = new crvserver_stats();
		crvserver_stats[] response = (crvserver_stats[])obj.stat_resources(service);
		return response;
	}
116428
public static dnstxtrec[] get(nitro_service service) throws Exception{
		dnstxtrec obj = new dnstxtrec();
		dnstxtrec[] response = (dnstxtrec[])obj.get_resources(service);
		return response;
	}
314648
public static dnssoarec[] get(nitro_service service, dnssoarec_args args) throws Exception{
		dnssoarec obj = new dnssoarec();
		options option = new options();
		option.set_args(nitro_util.object_to_string_withoutquotes(args));
		dnssoarec[] response = (dnssoarec[])obj.get_resources(service, option);
		return response;
	}
1246781
public static base_response delete(nitro_service client, dnssrvrec resource) throws Exception {
		dnssrvrec deleteresource = new dnssrvrec();
		deleteresource.domain = resource.domain;
		deleteresource.target = resource.target;
		return deleteresource.delete_resource(client);
	}
162771
public static nspbr[] get(nitro_service service, nspbr_args args) throws Exception{
		nspbr obj = new nspbr();
		options option = new options();
		option.set_args(nitro_util.object_to_string_withoutquotes(args));
		nspbr[] response = (nspbr[])obj.get_resources(service, option);
		return response;
	}
316216
public static nspbr6[] get(nitro_service service, nspbr6_args args) throws Exception{
		nspbr6 obj = new nspbr6();
		options option = new options();
		option.set_args(nitro_util.object_to_string_withoutquotes(args));
		nspbr6[] response = (nspbr6[])obj.get_resources(service, option);
		return response;
	}
1087141
public static dnsparameter get(nitro_service service) throws Exception{
		dnsparameter obj = new dnsparameter();
		dnsparameter[] response = (dnsparameter[])obj.get_resources(service);
		return response[0];
	}
502267
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;
	}
296986
public static dnsaddrec[] get(nitro_service service) throws Exception{
		dnsaddrec obj = new dnsaddrec();
		dnsaddrec[] response = (dnsaddrec[])obj.get_resources(service);
		return response;
	}
264824
public static vpnnexthopserver[] get(nitro_service service) throws Exception{
		vpnnexthopserver obj = new vpnnexthopserver();
		vpnnexthopserver[] response = (vpnnexthopserver[])obj.get_resources(service);
		return response;
	}
632707
def get_resource(resource_name):
    

    resource_path = None
    if hasattr(sys, "frozen"):
        resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), resource_name))
    elif not hasattr(sys, "frozen") and pkg_resources.resource_exists("gns3server", resource_name):
        resource_path = pkg_resources.resource_filename("gns3server", resource_name)
        resource_path = os.path.normpath(resource_path)
    return resource_path
862386
def GetArgs():
   
   parser = argparse.ArgumentParser(
       description='Process args for retrieving all the Virtual Machines')
   parser.add_argument('-s', '--host', required=True, action='store',
                       help='Remote host to connect to')
   parser.add_argument('-o', '--port', type=int, default=443, action='store',
                       help='Port to connect on')
   parser.add_argument('-u', '--user', required=True, action='store',
                       help='User name to use when connecting to host')
   parser.add_argument('-p', '--password', required=False, action='store',
                       help='Password to use when connecting to host')
   args = parser.parse_args()
   return args
775131
public static base_response add(nitro_service client, dnsnsrec resource) throws Exception {
		dnsnsrec addresource = new dnsnsrec();
		addresource.domain = resource.domain;
		addresource.nameserver = resource.nameserver;
		addresource.ttl = resource.ttl;
		return addresource.add_resource(client);
	}