Return the device name.
340970
def name(self) -> str:
        """"""
        return next(
            attr['Value'] for attr in self._device_json.get('Attributes', [])
            if attr.get('AttributeDisplayName') == 'desc')
47763
function() {
            var parts = [
                this.vendor(),
                this.model()
            ];

            for (var index = parts.length - 1; index >= 0; index--) {
                var part = parts[index];
                if (part == null || part.length == null || part.length <= 0) {
                    parts.splice(index, 1);
                }
            }

            var deviceName = parts.join(" - ");

            return deviceName;
        }
405377
def _get_device_id(self, bus):
        
        _dbus = bus.get(SERVICE_BUS, PATH)
        devices = _dbus.devices()

        if self.device is None and self.device_id is None and len(devices) == 1:
            return devices[0]

        for id in devices:
            self._dev = bus.get(SERVICE_BUS, DEVICE_PATH + "/%s" % id)
            if self.device == self._dev.name:
                return id

        return None
98420
def device_uuid(self):
        """"""
        if self._device:
            return self._device
        return GEN_ID_FORMAT.format(self.src_ip)
502756
def DbGetDeviceAlias(self, argin):
        
        self._log.debug("In DbGetDeviceAlias()")
        ret, dev_name, dfm = check_device_name(argin)
        if not ret:
            th_exc(DB_IncorrectDeviceName,
                  "device name (" + argin + ") syntax error (should be [tango:][//instance/]domain/family/member)",
                  "DataBase::DbGetDeviceAlias()")

        return self.db.get_device_alias(dev_name)
172626
def interface_by_name(self, name):
        '''
        
        '''
        if name in self._devinfo:
            return self._devinfo[name]
        raise KeyError("No device named {}".format(name))
164598
def get(self, device_id: int) -> Optional[Device]:
        """"""
        return self._devices.get(device_id)
669280
def set_device_name(self, newname):
        
        return self.write(request.SetDeviceName(self.seq, *self.prep_str(newname)))
427473
def get_device_by_id(self, device_id):
        

        # Find the device for the vera device name we are interested in
        found_device = None
        for device in self.get_devices():
            if device.device_id == device_id:
              found_device = device
              # found the first (and should be only) one so we will finish
              break

        if found_device is None:
            logger.debug('Did not find device with {}'.format(device_id))

        return found_device
1260681
def get_device_names_to_objects(devices):
    '''
    '''

    name_to_object = {}
    for device in devices:
        device_name = get_device_info(device).name
        name_to_object[device_name] = device
    return name_to_object
1137478
def devices_dict(self):
        """"""
        json_list = {}
        z = 0
        for x in self._raw[ROOT_START_ACTION]:
            if z != self.index:
                json_list.update(x)
            z = z + 1
        return json_list
34639
def name(self):
        """"""
        return str(conf.lib.clang_getCString(conf.lib.clang_getFileName(self)))
1242065
def _get_device_info(self, device_id):
        """"""
        params = {'access_token': self.access_token}
        r = self.spark_api(device_id).GET(params=params, timeout=30)
        self._check_error(r)
        return r.json()
637495
def driver_name(self):
        
        self._driver_name, value = self.get_attr_string(self._driver_name, 'driver_name')
        return value
809088
def device_typename(item):
        

        dev_type = {'ROUTER': {'from': 'ROUTER',
                               'desc': 'Router',
                               'type': 'Router',
                               'label_x': 19.5},
                    'QEMU': {'from': 'QEMU',
                             'desc': 'QEMU VM',
                             'type': 'QemuVM',
                             'ext_conf': 'QemuDevice',
                             'label_x': -12},
                    'ASA': {'from': 'ASA',
                            'desc': 'QEMU VM',
                            'type': 'QemuVM',
                            'ext_conf': '5520',
                            'label_x': 2.5},
                    'PIX': {'from': 'PIX',
                            'desc': 'QEMU VM',
                            'type': 'QemuVM',
                            'ext_conf': '525',
                            'label_x': -12},
                    'JUNOS': {'from': 'JUNOS',
                              'desc': 'QEMU VM',
                              'type': 'QemuVM',
                              'ext_conf': 'O-series',
                              'label_x': -12},
                    'IDS': {'from': 'IDS',
                            'desc': 'QEMU VM',
                            'type': 'QemuVM',
                            'ext_conf': 'IDS-4215',
                            'label_x': -12},
                    'VBOX': {'from': 'VBOX',
                             'desc': 'VirtualBox VM',
                             'type': 'VirtualBoxVM',
                             'ext_conf': 'VBoxDevice',
                             'label_x': -4.5},
                    'FRSW': {'from': 'FRSW',
                             'desc': 'Frame Relay switch',
                             'type': 'FrameRelaySwitch',
                             'label_x': 7.5},
                    'ETHSW': {'from': 'ETHSW',
                              'desc': 'Ethernet switch',
                              'type': 'EthernetSwitch',
                              'label_x': 15.5},
                    'Hub': {'from': 'Hub',
                            'desc': 'Ethernet hub',
                            'type': 'EthernetHub',
                            'label_x': 12.0},
                    'ATMSW': {'from': 'ATMSW',
                              'desc': 'ATM switch',
                              'type': 'ATMSwitch',
                              'label_x': 2.0},
                    'ATMBR': {'from': 'ATMBR',  # TODO: Investigate ATM Bridge
                              'desc': 'ATMBR',
                              'type': 'ATMBR'},
                    'Cloud': {'from': 'Cloud',
                              'desc': 'Cloud',
                              'type': 'Cloud',
                              'label_x': 47.5}}

        item_type = item.split(' ')[0]
        name = item.replace('%s ' % dev_type[item_type]['from'], '')
        return name, dev_type[item_type]
320942
def __getStationName(name, id):
    """"""
    name = name.replace("Meetstation", "")
    name = name.strip()
    name += " (%s)" % id
    return name
480320
def name(self):
        """"""
        with self._bt_interface.connect(self._mac) as connection:
            name = connection.read_handle(_HANDLE_READ_NAME)  # pylint: disable=no-member

        if not name:
            raise BluetoothBackendException("Could not read NAME using handle %s"
                                            " from Mi Temp sensor %s" % (hex(_HANDLE_READ_NAME), self._mac))
        return ''.join(chr(n) for n in name)