Use this API to fetch filtered set of vm_template resources.
filter string should be in JSON format.eg: "vm_state:DOWN,name:[a-z]+"
519614
public static vm_template[] get_filtered(nitro_service service, String filter) throws Exception
	{
		vm_template obj = new vm_template();
		options option = new options();
		option.set_filter(filter);
		vm_template[] response = (vm_template[]) obj.getfiltered(service, option);
		return response;
	}
238551
public static xen_health_resource_hw[] get_filtered(nitro_service service, String filter) throws Exception
	{
		xen_health_resource_hw obj = new xen_health_resource_hw();
		options option = new options();
		option.set_filter(filter);
		xen_health_resource_hw[] response = (xen_health_resource_hw[]) obj.getfiltered(service, option);
		return response;
	}
1358495
public static vpnnexthopserver[] get_filtered(nitro_service service, String filter) throws Exception{
		vpnnexthopserver obj = new vpnnexthopserver();
		options option = new options();
		option.set_filter(filter);
		vpnnexthopserver[] response = (vpnnexthopserver[]) obj.getfiltered(service, option);
		return response;
	}
1099228
public static sslvserver[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
		sslvserver obj = new sslvserver();
		options option = new options();
		option.set_filter(filter);
		sslvserver[] response = (sslvserver[]) obj.getfiltered(service, option);
		return response;
	}
811667
public static systemgroup[] get_filtered(nitro_service service, String filter) throws Exception{
		systemgroup obj = new systemgroup();
		options option = new options();
		option.set_filter(filter);
		systemgroup[] response = (systemgroup[]) obj.getfiltered(service, option);
		return response;
	}
431141
public static systembackup[] get_filtered(nitro_service service, String filter) throws Exception{
		systembackup obj = new systembackup();
		options option = new options();
		option.set_filter(filter);
		systembackup[] response = (systembackup[]) obj.getfiltered(service, option);
		return response;
	}
1335130
public static vpnglobal_vpntrafficpolicy_binding[] get_filtered(nitro_service service, String filter) throws Exception{
		vpnglobal_vpntrafficpolicy_binding obj = new vpnglobal_vpntrafficpolicy_binding();
		options option = new options();
		option.set_filter(filter);
		vpnglobal_vpntrafficpolicy_binding[] response = (vpnglobal_vpntrafficpolicy_binding[]) obj.getfiltered(service, option);
		return response;
	}
1337345
public static systemuser[] get_filtered(nitro_service service, String filter) throws Exception{
		systemuser obj = new systemuser();
		options option = new options();
		option.set_filter(filter);
		systemuser[] response = (systemuser[]) obj.getfiltered(service, option);
		return response;
	}
732545
public static configstatus[] get_filtered(nitro_service service, String filter) throws Exception{
		configstatus obj = new configstatus();
		options option = new options();
		option.set_filter(filter);
		configstatus[] response = (configstatus[]) obj.getfiltered(service, option);
		return response;
	}
1159738
public static vpnglobal_vpnurl_binding[] get_filtered(nitro_service service, String filter) throws Exception{
		vpnglobal_vpnurl_binding obj = new vpnglobal_vpnurl_binding();
		options option = new options();
		option.set_filter(filter);
		vpnglobal_vpnurl_binding[] response = (vpnglobal_vpnurl_binding[]) obj.getfiltered(service, option);
		return response;
	}
113945
public static policydataset[] get_filtered(nitro_service service, String filter) throws Exception{
		policydataset obj = new policydataset();
		options option = new options();
		option.set_filter(filter);
		policydataset[] response = (policydataset[]) obj.getfiltered(service, option);
		return response;
	}
661043
public static host_cpu_core[] get_filtered(nitro_service service, String filter) throws Exception
	{
		host_cpu_core obj = new host_cpu_core();
		options option = new options();
		option.set_filter(filter);
		host_cpu_core[] response = (host_cpu_core[]) obj.getfiltered(service, option);
		return response;
	}
70167
public static dnskey[] get_filtered(nitro_service service, String filter) throws Exception{
		dnskey obj = new dnskey();
		options option = new options();
		option.set_filter(filter);
		dnskey[] response = (dnskey[]) obj.getfiltered(service, option);
		return response;
	}
367341
def get_resources_vms(call=None, resFilter=None, includeConfig=True):
    '''
    
    '''

    timeoutTime = time.time() + 60
    while True:
        log.debug('Getting resource: vms.. (filter: %s)', resFilter)
        resources = query('get', 'cluster/resources')
        ret = {}
        badResource = False
        for resource in resources:
            if 'type' in resource and resource['type'] in ['openvz', 'qemu',
                                                           'lxc']:
                try:
                    name = resource['name']
                except KeyError:
                    badResource = True
                    log.debug('No name in VM resource %s', repr(resource))
                    break

                ret[name] = resource

                if includeConfig:
                    # Requested to include the detailed configuration of a VM
                    ret[name]['config'] = get_vmconfig(
                        ret[name]['vmid'],
                        ret[name]['node'],
                        ret[name]['type']
                    )

        if time.time() > timeoutTime:
            raise SaltCloudExecutionTimeout('FAILED to get the proxmox '
                                            'resources vms')

        # Carry on if there wasn't a bad resource return from Proxmox
        if not badResource:
            break

        time.sleep(0.5)

    if resFilter is not None:
        log.debug('Filter given: %s, returning requested '
                  'resource: nodes', resFilter)
        return ret[resFilter]

    log.debug('Filter not given: %s, returning all resource: nodes', ret)
    return ret
94631
def get_all_host_templates(resource_root, cluster_name="default"):
  
  return call(resource_root.get,
      HOST_TEMPLATES_PATH % (cluster_name,),
      ApiHostTemplate, True, api_version=3)
476934
public static vm_template[] get(nitro_service client) throws Exception
	{
		vm_template resource = new vm_template();
		resource.validate("get");
		return (vm_template[]) resource.get_resources(client);
	}
403258
public static tmglobal_tmsessionpolicy_binding[] get_filtered(nitro_service service, String filter) throws Exception{
		tmglobal_tmsessionpolicy_binding obj = new tmglobal_tmsessionpolicy_binding();
		options option = new options();
		option.set_filter(filter);
		tmglobal_tmsessionpolicy_binding[] response = (tmglobal_tmsessionpolicy_binding[]) obj.getfiltered(service, option);
		return response;
	}