Returns the volume group uuid.
975775
def uuid(self):
        
        self.open()
        uuid = lvm_vg_get_uuid(self.handle)
        self.close()
        return uuid
504477
def uuid4():
    """"""
    # Otherwise, get randomness from urandom or the 'random' module.
    try:
        import os
        return UUID(bytes=os.urandom(16), version=4)
    except Exception:
        import random
        bytes = [chr(random.randrange(256)) for i in range(16)]
        return UUID(bytes=bytes, version=4)
402389
private function uuid4()
    {
        $uuid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
            // 32 bits for "time_low"
            mt_rand(0, 0xffff), mt_rand(0, 0xffff),

            // 16 bits for "time_mid"
            mt_rand(0, 0xffff),

            // 16 bits for "time_hi_and_version",
            // four most significant bits holds version number 4
            mt_rand(0, 0x0fff) | 0x4000,

            // 16 bits, 8 bits for "clk_seq_hi_res",
            // 8 bits for "clk_seq_low",
            // two most significant bits holds zero and one for variant DCE1.1
            mt_rand(0, 0x3fff) | 0x8000,

            // 48 bits for "node"
            mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
        );

        return str_replace('-', '', $uuid);
    }
102314
func GetVolumeGroup(uuid string) (VolumeGroup, error) {

	url := ""
	if string(uuid[0]) == "/" {
		url = uuid[8:]
	} else {
		url = "volumegroup/" + uuid + "/"
	}

	request := "GET"
	//Empty Body Request
	body := []byte(`{}`)
	var response VolumeGroup

	data, err := TutumCall(url, request, body)
	if err != nil {
		return response, err
	}

	err = json.Unmarshal(data, &response)
	if err != nil {
		return response, err
	}

	return response, nil
}
800256
public function uuid()
    {
        $arr = array_values(unpack('N1a/n4b/N1c', openssl_random_pseudo_bytes(16)));
        $arr[2] = ($arr[2] & 0x0fff) | 0x4000;
        $arr[3] = ($arr[3] & 0x3fff) | 0x8000;
        return vsprintf('%08x-%04x-%04x-%04x-%04x%08x', $arr);
    }
1074847
def get_group_partition(group, partition_count):
    """"""
    def java_string_hashcode(s):
        h = 0
        for c in s:
            h = (31 * h + ord(c)) & 0xFFFFFFFF
        return ((h + 0x80000000) & 0xFFFFFFFF) - 0x80000000
    return abs(java_string_hashcode(group)) % partition_count
21350
def GetVolumeByIdentifier(self, volume_identifier):
    
    if not self._is_parsed:
      self._Parse()
      self._is_parsed = True

    return self._volumes[volume_identifier]
79475
public function getUuid() : ?string 
    {
        if ( ! $this->hasUuid()) {
            $this->setUuid($this->getDefaultUuid());
        }
        return $this->uuid;
    }
284557
public static String getUUID() {
        UUID id = UUID.randomUUID();
        ByteBuffer bb = ByteBuffer.wrap(new byte[16]);
        bb.putLong(id.getMostSignificantBits());
        bb.putLong(id.getLeastSignificantBits());
        return Base64.encodeBase64URLSafeString(bb.array());
    }
849988
def uuid_(val):
    '''
    
    '''
    return six.text_type(
        uuid.uuid5(
            GLOBAL_UUID,
            salt.utils.stringutils.to_str(val)
        )
    )
327704
def uuid4(self):
    """"""
    return ''.join([hexchars[self.randint(0,15)] for x in range(0,8)]) + '-' +\
           ''.join([hexchars[self.randint(0,15)] for x in range(0,4)]) + '-' +\
           '4'+''.join([hexchars[self.randint(0,15)] for x in range(0,3)]) + '-' +\
           uuid4special[self.randint(0,3)]+''.join([hexchars[self.randint(0,15)] for x in range(0,3)]) + '-' +\
           ''.join([hexchars[self.randint(0,15)] for x in range(0,12)])
98420
def device_uuid(self):
        """"""
        if self._device:
            return self._device
        return GEN_ID_FORMAT.format(self.src_ip)
636232
def get_volume(self, id):
        
        # If the id is actually a path
        if exists(id):
            with open(id) as file:
                size = os.lseek(file.fileno(), 0, os.SEEK_END)
            return {'path': id, 'size': size}
        return self.volume.get(id)
1213003
def volume(self):
        
        volume = abs(self.primitive.polygon.area *
                     self.primitive.height)
        return volume
1020390
def get_host_uuid(self):
        
        xml = self._request_host()
        root = etree.fromstring(xml)
        data = self._elementtree_to_dict(root)
        return data['HSI']['SPN']['text'], data['HSI']['cUUID']['text']
1289107
def record(self):
        # type: () -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Logical Volume Descriptor not initialized')

        rec = struct.pack(self.FMT, b'\x00' * 16,
                          self.vol_desc_seqnum, self.desc_char_set,
                          self.logical_vol_ident, 2048,
                          self.domain_ident.record(),
                          self.logical_volume_contents_use.record(), 6, 1,
                          self.impl_ident.record(), self.implementation_use,
                          self.integrity_sequence_length,
                          self.integrity_sequence_extent,
                          self.partition_map.record(), b'\x00' * 66)[16:]
        return self.desc_tag.record(rec) + rec
1306313
def get_gid(group=None):
    '''
    
    '''
    if not HAS_GRP:
        return None
    if group is None:
        try:
            return os.getegid()
        except AttributeError:
            return None
    else:
        try:
            return grp.getgrnam(group).gr_gid
        except KeyError:
            return None