List all connected resources.
167125
def do_list(self, args):
        """"""

        try:
            resources = self.resource_manager.list_resources_info()
        except Exception as e:
            print(e)
        else:
            self.resources = []
            for ndx, (resource_name, value) in enumerate(resources.items()):
                if not args:
                    print('({0:2d}) {1}'.format(ndx, resource_name))
                    if value.alias:
                        print('     alias: {}'.format(value.alias))

                self.resources.append((resource_name, value.alias or None))
788268
def resource_list(cls):
        
        items = cls.list({'items_per_page': 500})
        ret = [str(ip['id']) for ip in items]
        ret.extend([ip['ip'] for ip in items])
        return ret
624975
def list_subnets(self, retrieve_all=True, **_params):
        """"""
        return self.list('subnets', self.subnets_path, retrieve_all,
                         **_params)
544747
def get_resources(cls):
        """"""
        my_plurals = resource_helper.build_plural_mappings(
            {}, RESOURCE_ATTRIBUTE_MAP)
        attributes.PLURALS.update(my_plurals)
        attr_map = RESOURCE_ATTRIBUTE_MAP
        resources = resource_helper.build_resource_info(my_plurals,
                                                        attr_map,
                                                        constants.A10_DEVICE_INSTANCE)

        return resources
940524
def do_list_port(self, line):
        

        def f(p, args):
            o = p.get()
            for p in o.resources.port:
                print('%s %s %s' % (p.resource_id, p.name, p.number))

        self._request(line, f)
579934
def is_connected(self):
        """"""
        return all([r.is_connected() for r in dict.values(self.children)])
755494
def list(cls, datacenter=None):
        """"""
        options = {}
        if datacenter:
            datacenter_id = int(Datacenter.usable_id(datacenter))
            options['datacenter_id'] = datacenter_id

        return cls.call('hosting.vlan.list', options)
61017
def list_datasources(self, source_id):
        
        target_url = self.client.get_url('DATASOURCE', 'GET', 'multi', {'source_id': source_id})
        return base.Query(self.client.get_manager(Datasource), target_url)
742496
public function listResources()
	{
		$list = [];
		$path = $this->getPath() . "resources";
		if( file_exists($path) )
		{
			$scan = @ scandir($path);
			if( !$scan )
			{
				throw new ReadException("Cannot ready resources directory for the '" . get_class($this) . "' module");
			}

			$path .= DIRECTORY_SEPARATOR;
			foreach( $scan as $file )
			{
				if( $file[0] !== "." && preg_match('/\.json$/', $file) )
				{
					$list[] = new Resource($path . $file);
				}
			}
		}

		return new Collection($list);
	}
1192287
def index():
    """"""
    kwdb = current_app.kwdb

    libraries = get_collections(kwdb, libtype="library")
    resource_files = get_collections(kwdb, libtype="resource")

    return flask.render_template("libraryNames.html",
                                 data={"libraries": libraries,
                                       "version": __version__,
                                       "resource_files": resource_files
                                   })
26725
def get_resources(cls):
        """"""
        exts = []
        parent = dict(member_name=ciscohostingdevicemanager.DEVICE,
                      collection_name=ciscohostingdevicemanager.DEVICES)
        controller = resource.Resource(
            RouterHostingDeviceSchedulerController(), cb_faults.FAULT_MAP)
        exts.append(extensions.ResourceExtension(
            DEVICE_L3_ROUTERS, controller, parent, path_prefix="/dev_mgr"))
        parent = dict(member_name="router",
                      collection_name=l3_const.ROUTERS)
        controller = resource.Resource(
            HostingDevicesHostingRouterController(), cb_faults.FAULT_MAP)
        exts.append(extensions.ResourceExtension(L3_ROUTER_DEVICES, controller,
                                                 parent))
        return exts
972015
def list(gandi, state, id, vhosts, type, limit):
    """"""
    options = {
        'items_per_page': limit,
    }
    if state:
        options['state'] = state

    output_keys = ['name', 'state']
    if id:
        output_keys.append('id')
    if vhosts:
        output_keys.append('vhost')
    if type:
        output_keys.append('type')

    paas_hosts = {}
    result = gandi.paas.list(options)
    for num, paas in enumerate(result):
        paas_hosts[paas['id']] = []
        if vhosts:
            list_vhost = gandi.vhost.list({'paas_id': paas['id']})
            for host in list_vhost:
                paas_hosts[paas['id']].append(host['name'])

        if num:
            gandi.separator_line()
        output_paas(gandi, paas, [], paas_hosts[paas['id']],
                    output_keys)

    return result
839619
def get_networks(self):
        
        networks = self.c_resources["networks"]
        result = []
        for net in networks:
            _c_network = net.get("_c_network")
            if _c_network is None:
                continue
            roles = utils.get_roles_as_list(net)
            result.append((roles, _c_network))
        return result
16085
def resource_list(cls):
        
        items = cls.list({'items_per_page': 500})
        ret = [paas['name'] for paas in items]
        ret.extend([str(paas['id']) for paas in items])
        for paas in items:
            paas = cls.info(paas['id'])
            ret.extend([vhost['name'] for vhost in paas['vhosts']])

        return ret
995018
def resources(self):
        """"""
        return [self.pdf.getPage(i) for i in range(self.pdf.getNumPages())]
1072222
def connected_outports(self):
        '''

        '''
        return [p for p in self.ports \
                    if p.__class__.__name__ == 'DataOutPort' \
                    and p.is_connected]
1301892
def resource_list(self):
        
        self.prune()
        resources = [
            dict(
                name=resource,
                num_total=r_dict['total'],
                num_used=r_dict['used']
            ) for resource, r_dict in six.iteritems(self.resources())]
        if self._resources is not None:
            consumers = collections.defaultdict(dict)
            for task in self._state.get_active_tasks_by_status(RUNNING):
                if task.status == RUNNING and task.resources:
                    for resource, amount in six.iteritems(task.resources):
                        consumers[resource][task.id] = self._serialize_task(task.id, include_deps=False)
            for resource in resources:
                tasks = consumers[resource['name']]
                resource['num_consumer'] = len(tasks)
                resource['running'] = tasks
        return resources