Returns a list of IDs of VLANs which match the given VLAN name.

        :param string name: a VLAN name
        :returns: List of matching IDs
342258
def _list_vlans_by_name(self, name):
        
        results = self.list_vlans(name=name, mask='id')
        return [result['id'] for result in results]
642548
def get_rule_id_from_name(self, name):
        
        results = self.client.call('SoftLayer_Virtual_PlacementGroup_Rule', 'getAllObjects')
        return [result['id'] for result in results if result['keyName'] == name.upper()]
212871
def get_zone(name)
      params = {
          'command' => 'listZones',
          'available' => 'true'
      }
      json = send_request(params)

      networks = json['zone']
      return nil unless networks

      networks.each { |z|
        if name.is_uuid? then
          return z if z['id'] == name
        else
          return z if z['name'] == name
        end
      }
      nil
    end
68751
def get_boolean(self, name):
        
        for interface in self.all_interfaces:
            if isinstance(interface, VlanInterface):
                if any(vlan for vlan in interface.interfaces
                       if getattr(vlan, name)):
                    return True
            else:
                if getattr(interface, name):
                    return True
        return False
1362157
def create_networks(self, ids, id_vlan):
        

        network_map = dict()
        network_map['ids'] = ids
        network_map['id_vlan'] = id_vlan

        code, xml = self.submit(
            {'network': network_map}, 'PUT', 'network/create/')

        return self.response(code, xml)
954085
def get_name_servers(self, id_or_uri):
        

        uri = self._client.build_uri(id_or_uri) + "/nameServers"
        return self._client.get(uri)
1087191
def get_containers_by_name(self, name):
        
        code, containers = self.get_containers()

        if code != httplib.OK:
            return []

        return [container for container in containers if
                any(map(lambda x: x.startswith(name), container.Names))]
1202774
def parse_vlan_range_mappings(mappings):
    
    _mappings = parse_mappings(mappings)
    if not _mappings:
        return {}

    mappings = {}
    for p, r in six.iteritems(_mappings):
        mappings[p] = tuple(r.split(':'))

    return mappings
1216907
def lookupByName(self, name):
        
        res = yield queue.executeInThread(self.connection.lookupByName, name)
        return self.DomainClass(self, res)
208235
def find_network!(name)
      network = find_network(name)
      return network unless network.nil?

      raise CommandError, "a network with the name #{name.inspect} " \
                          'does not exist'
    end
1237830
def get_name_value(self):
        
        name, value = self.get()
        if not isinstance(name, list):
            name = [name]
        if not isinstance(value, list):
            value = [value]
        return list(zip(name, value))
1190257
def get_network(name)
      params = {
          'command' => 'listNetworks'
      }
      json = send_request(params)

      networks = json['network']
      return nil unless networks

      networks.each { |n|
        if name.is_uuid? then
          return n if n['id'] == name
        else
          return n if n['name'] == name
        end
      }
      nil
    end
842835
def create_vlan(self, id_vlan):
        

        vlan_map = dict()

        vlan_map['vlan_id'] = id_vlan

        code, xml = self.submit({'vlan': vlan_map}, 'PUT', 'vlan/create/')

        return self.response(code, xml)
271207
def update(self, vlans):
        

        data = {'vlans': vlans}
        vlans_ids = [str(vlan.get('id')) for vlan in vlans]

        return super(ApiVlan, self).put('api/v3/vlan/%s/' %
                                        ';'.join(vlans_ids), data)
229121
public static vlan_stats get(nitro_service service, Long id) throws Exception{
		vlan_stats obj = new vlan_stats();
		obj.set_id(id);
		vlan_stats response = (vlan_stats) obj.stat_resource(service);
		return response;
	}
700298
def get_network_by_full_name(self, si, default_network_full_name):
        
        path, name = get_path_and_name(default_network_full_name)
        return self.find_network_by_name(si, path, name) if name else None
866027
def fetch_room_ids(self, names):
        
        ret = {}
        names_set = set(names)
        try:
            for d in msgpack.unpack(urllib2.urlopen(
                    "%s/list/locations?format=msgpack" % self.url)):
                name = d['name'].upper() # normalize: Hg -> HG
                if name in names_set:
                    ret[name] = d['id']
        except urllib2.HTTPError, e:
            raise RuusterError(e)
        return ret