Use this API to fetch filtered set of host_device resources.
filter string should be in JSON format.eg: "vm_state:DOWN,name:[a-z]+"
356345
public static host_device[] get_filtered(nitro_service service, String filter) throws Exception
	{
		host_device obj = new host_device();
		options option = new options();
		option.set_filter(filter);
		host_device[] response = (host_device[]) obj.getfiltered(service, option);
		return response;
	}
818658
def get_supported_resources(netid):
    
    url = _netid_supported_url(netid)
    response = get_resource(url)
    return _json_to_supported(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;
	}
293700
def get_dead_hosting_devices_info(self):
        
        res = []
        for hd_id in self.hosting_devices_backlog:
            hd = self.hosting_devices_backlog[hd_id]['hd']
            if hd['hd_state'] == cc.HD_DEAD:
                res.append(hd['id'])
        return res
696882
def get_vm_host_info(hostId):
    
    global r
    if auth is None or url is None:  # checks to see if the imc credentials are already available
        set_imc_creds()
    get_vm_host_info_url = "/imcrs/vrm/host?hostId=" + str(hostId)
    f_url = url + get_vm_host_info_url
    payload = None
    r = requests.get(f_url, auth=auth,
                     headers=headers)  # creates the URL using the payload variable as the contents
    # print(r.status_code)
    if r.status_code == 200:
        if len(r.text) > 0:
            return json.loads(r.text)
    elif r.status_code == 204:
        print("Device is not a supported Hypervisor")
        return "Device is not a supported Hypervisor"
    else:
        print("An Error has occured")
1359614
def _get_ids_from_hostname(self, hostname):
        """"""
        results = self.list_hardware(hostname=hostname, mask="id")
        return [result['id'] for result in results]
35732
public static dnszone[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
		dnszone obj = new dnszone();
		options option = new options();
		option.set_filter(filter);
		dnszone[] response = (dnszone[]) obj.getfiltered(service, option);
		return response;
	}
20739
def get_resource_areas_by_host(self, host_id):
        
        query_parameters = {}
        if host_id is not None:
            query_parameters['hostId'] = self._serialize.query('host_id', host_id, 'str')
        response = self._send(http_method='GET',
                              location_id='e81700f7-3be2-46de-8624-2eb35882fcaa',
                              version='5.0-preview.1',
                              query_parameters=query_parameters)
        return self._deserialize('[ResourceAreaInfo]', self._unwrap_collection(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
427397
def get_resources(cls):
        """"""
        exts = []
        parent = dict(member_name="agent",
                      collection_name="agents")
        controller = resource.Resource(HostingDeviceSchedulerController(),
                                       cb_faults.FAULT_MAP)
        exts.append(extensions.ResourceExtension(CFG_AGENT_HOSTING_DEVICES,
                                                 controller, parent))
        parent = dict(member_name=ciscohostingdevicemanager.DEVICE,
                      collection_name=ciscohostingdevicemanager.DEVICES)
        controller = resource.Resource(
            CfgAgentsHandlingHostingDeviceController(), cb_faults.FAULT_MAP)
        exts.append(extensions.ResourceExtension(HOSTING_DEVICE_CFG_AGENTS,
                                                 controller, parent,
                                                 PATH_PREFIX))
        return exts
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;
	}
522003
public static device_profile[] get_filtered(nitro_service service, String filter) throws Exception
	{
		device_profile obj = new device_profile();
		options option = new options();
		option.set_filter(filter);
		device_profile[] response = (device_profile[]) obj.getfiltered(service, option);
		return response;
	}
621714
public static vpntrafficpolicy[] get_filtered(nitro_service service, String filter) throws Exception{
		vpntrafficpolicy obj = new vpntrafficpolicy();
		options option = new options();
		option.set_filter(filter);
		vpntrafficpolicy[] response = (vpntrafficpolicy[]) obj.getfiltered(service, option);
		return response;
	}
962883
public static nshostname[] get_filtered(nitro_service service, String filter) throws Exception{
		nshostname obj = new nshostname();
		options option = new options();
		option.set_filter(filter);
		nshostname[] response = (nshostname[]) obj.getfiltered(service, option);
		return response;
	}
836843
public static policystringmap[] get_filtered(nitro_service service, String filter) throws Exception{
		policystringmap obj = new policystringmap();
		options option = new options();
		option.set_filter(filter);
		policystringmap[] response = (policystringmap[]) 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;
	}
905538
def get_hosting_devices_qry(self, context, hosting_device_ids,
                                load_agent=True):
        """"""
        query = context.session.query(hd_models.HostingDevice)
        if load_agent:
            query = query.options(joinedload('cfg_agent'))
        if len(hosting_device_ids) > 1:
            query = query.filter(hd_models.HostingDevice.id.in_(
                hosting_device_ids))
        else:
            query = query.filter(hd_models.HostingDevice.id ==
                                 hosting_device_ids[0])
        return query