Find the minimum prefix required to address this Upload Area UUID uniquely.
        :param (str) area_uuid: UUID of Upload Area
        :return: a string with the minimum prefix required to be unique
        :rtype: str
424476
def unique_prefix(self, area_uuid):
        
        for prefix_len in range(1, len(area_uuid)):
            prefix = area_uuid[0:prefix_len]
            matching_areas = [uuid for uuid in self.areas if re.match(prefix, uuid)]
            if len(matching_areas) == 1:
                return prefix
1237074
def uuid5(namespace, name):
    """"""
    from hashlib import sha1
    hash = sha1(namespace.bytes + name).digest()
    return UUID(bytes=hash[:16], version=5)
849988
def uuid_(val):
    '''
    
    '''
    return six.text_type(
        uuid.uuid5(
            GLOBAL_UUID,
            salt.utils.stringutils.to_str(val)
        )
    )
443
def group_id(self):
        
        if self.derived_from is not None:
            return self.derived_from.group_id()
        if self.file_uuid is None:
            return None
        return utils.GROUP_ID_PREFIX + self.file_uuid
1000512
def _ensure_request_id_header(self):
        ""
        if REQUEST_ID_HEADER not in self.request.headers:
            self.request.headers.add(REQUEST_ID_HEADER, uuid.uuid1().hex)
1240631
def getbyuuid(self, uuid):
        
        if uuid not in self._schbyuuid:
            raise KeyError('uuid {0} not registered'.format(uuid))

        return self._schbyuuid[uuid]
800520
def get_prefix(self, key_prefix, sort_order=None, sort_target=None):
        
        return self.get(key_prefix,
                        metadata=True,
                        range_end=_encode(_increment_last_byte(key_prefix)),
                        sort_order=sort_order,
                        sort_target=sort_target)
176560
def info(self, uuid):
        
        args = {
            'uuid': uuid,
        }
        self._domain_action_chk.check(args)

        return self._client.json('kvm.info', args)
363145
def _getNextId(self):
        
        if not self._uuids:
            for _ in range(self.UUID_POOL_GEN_SIZE):
                self._uuids.append(uuid.uuid4().bytes)
        return self._uuids.pop()
455809
def routingAreaUpdateRequest(PTmsiSignature_presence=0,
                             GprsTimer_presence=0,
                             DrxParameter_presence=0,
                             TmsiStatus_presence=0):
    """"""
    a = TpPd(pd=0x3)
    b = MessageType(mesType=0x8)  # 00001000
    c = UpdateTypeAndCiphKeySeqNr()
    e = RoutingAreaIdentification()
    f = MsNetworkCapability()
    packet = a / b / c / e / f
    if PTmsiSignature_presence is 1:
        g = PTmsiSignature(ieiPTS=0x19)
        packet = packet / g
    if GprsTimer_presence is 1:
        h = GprsTimer(ieiGT=0x17)
        packet = packet / h
    if DrxParameter_presence is 1:
        i = DrxParameter(ieiDP=0x27)
        packet = packet / i
    if TmsiStatus_presence is 1:
        j = TmsiStatus(ieiTS=0x9)
        packet = packet / j
    return packet
1081531
def area_uuid_from_partial_uuid(self, partial_uuid):
        
        matching_areas = [uuid for uuid in self.areas if re.match(partial_uuid, uuid)]
        if len(matching_areas) == 0:
            raise UploadException("Sorry I don't recognize area \"%s\"" % (partial_uuid,))
        elif len(matching_areas) == 1:
            return matching_areas[0]
        else:
            raise UploadException(
                "\"%s\" matches more than one area, please provide more characters." % (partial_uuid,))
201693
def get_api_key_with_prefix(self, identifier):
        
        if self.api_key.get(identifier) and self.api_key_prefix.get(identifier):
            return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier]
        elif self.api_key.get(identifier):
            return self.api_key[identifier]
223414
def uuid_to_username(uuid):
    
    uuid_data = getattr(uuid, 'bytes', None) or UUID(uuid).bytes
    b32coded = base64.b32encode(uuid_data)
    return 'u-' + b32coded.decode('ascii').replace('=', '').lower()
923859
def create_unique_id(src, ase):
        # type: (blobxfer.models.upload.LocalPath,
        #        blobxfer.models.azure.StorageEntity) -> str
        
        return ';'.join(
            (str(src.absolute_path), ase._client.primary_endpoint, ase.path)
        )
1200778
def uuid(self):
		
		uuid_file = '/sys/block/%s/dm/uuid' % os.path.basename(os.path.realpath(self.volume_path()))
		lv_uuid = open(uuid_file).read().strip()
		if lv_uuid.startswith('LVM-') is True:
			return lv_uuid[4:]
		return lv_uuid
816180
def generate_uuid_based_oid(length=None):
    
    length = min(length or OID_LENGTH, OID_MAX_LENGTH)

    while True:
        yield uuid.uuid4().hex.upper()[:length]
685726
def uniqueId(self, prefix=""):
        
        _IdCounter.count += 1
        id = _IdCounter.count
        if prefix:
            return self._wrap(prefix + str(id))
        else:
            return self._wrap(id)