Returns the data ID for a Statistic name in this module (Stats)
341703
public int getDataId(String name) {
        Iterator allData = perfData.values().iterator();
        while (allData.hasNext()) {
            PmiDataInfo dataInfo = (PmiDataInfo) allData.next();
            if (dataInfo.getName().equalsIgnoreCase(name))
                return dataInfo.getId();
        }
        return UNKNOWN_ID;
    }
1209928
def _get_id(self):
        """"""
        return ''.join(map(str,
                           filter(is_not_None,
                                  [self.Prefix, self.Name])))
1262447
public static String statsTypeToModuleID(String statsType) {
        if (statsType != null) {
            int hashPos = statsType.indexOf('#');
            if (hashPos > 0)
                return statsType.substring(0, hashPos);
            else
                return statsType;
        } else
            return null;
    }
476145
def get_data_path(module_id: str) -> Path:
    
    profile = coordinator.profile
    data_path = get_base_path() / 'profiles' / profile / module_id
    if not data_path.exists():
        data_path.mkdir(parents=True)
    return data_path
915399
def identifier(self):
        
        if self.primary_key not in self._data:
            return 'Unknown'
        return str(self._data[self.primary_key])
1006400
def _GetNumericProjectId(self):
    
    project_id = 'project/numeric-project-id'
    return self.watcher.GetMetadata(metadata_key=project_id, recursive=False)
454337
def get_datastore_id(kwargs=None, call=None):
    '''
    
    '''
    if call == 'action':
        raise SaltCloudSystemExit(
            'The get_datastore_id function must be called with -f or --function.'
        )

    if kwargs is None:
        kwargs = {}

    name = kwargs.get('name', None)
    if name is None:
        raise SaltCloudSystemExit(
            'The get_datastore_id function requires a name.'
        )

    try:
        ret = list_datastores()[name]['id']
    except KeyError:
        raise SaltCloudSystemExit(
            'The datastore \'{0}\' could not be found.'.format(name)
        )

    return ret
725456
def id(self):
        
        h = hashlib.new('sha512')
        for value in (self.machine.name, self.machine.os, self.user, self.application.name,
                      self.application.path, self.event.report_type, self.event.type,
                      self.event.time.isoformat()):
            h.update(str(value).encode('utf-8'))
        for parameter in sorted(self.parameters, key=lambda k: getattr(k, 'id')):
            h.update(parameter.value.encode('utf-8'))
        return h.hexdigest()
1052144
def GetStat(self):
    
    if self._stat_object is None:
      self._stat_object = self._GetStat()
    return self._stat_object
726132
def stats(self, name, value):
        
        counter = self.get(name, CounterType.Statistics)
        self._calculate_stats(counter, value)
        self._update()
544520
def int_id(self):
        ""
        id_or_name = self.id_or_name
        if id_or_name is not None and isinstance(id_or_name, int):
            return id_or_name
        return None
839894
def integer_id(self):
    
    id = self.id()
    if not isinstance(id, (int, long)):
      id = None
    return id
936004
def get_nameid(self):
        
        nameid_value = None
        nameid_data = self.get_nameid_data()
        if nameid_data and 'Value' in nameid_data.keys():
            nameid_value = nameid_data['Value']
        return nameid_value
1090276
def str_id(self):
        ""
        id_or_name = self.id_or_name
        if id_or_name is not None and isinstance(id_or_name, str):
            return id_or_name
        return None
900258
def get_block_statistics(cls, block_id):
        
        if not os.environ.get("BLOCKSTACK_TEST"):
            raise Exception("This method is only available in the test framework")

        global STATISTICS
        return STATISTICS.get(block_id)
439826
def name(self):
        
        name = super(Interface, self).name
        return name if name else self.data.get('name')
347029
def getDataset(self, id_):
        
        if id_ not in self._datasetIdMap:
            raise exceptions.DatasetNotFoundException(id_)
        return self._datasetIdMap[id_]