Manually fetch a complete set of attributes for this entity.

        For more information, see `Bugzilla #1449749
        <https://bugzilla.redhat.com/show_bug.cgi?id=1449749>`_.
482142
def create(self, create_missing=None):
        
        return Host(
            self._server_config,
            id=self.create_json(create_missing)['id'],
        ).read()
1117282
def list(self, entity=None):
        
        uri = "/%s" % self.uri_base
        if entity:
            uri = "%s?entityId=%s" % (uri, utils.get_id(entity))
        resp, resp_body = self._list(uri, return_raw=True)
        return resp_body
1142013
def get_attributes(self):
        
        items = {}
        items['form_method'] = self.form_method.strip()
        items['form_tag'] = self.form_tag
        items['form_style'] = self.form_style.strip()
        
        if self.form_action:
            items['form_action'] = self.form_action.strip()
        if self.form_id:
            items['id'] = self.form_id.strip()
        if self.form_class:
            items['class'] = self.form_class.strip()
        if self.inputs:
            items['inputs'] = self.inputs
        if self.form_error_title:
            items['form_error_title'] = self.form_error_title.strip()
        if self.formset_error_title:
            items['formset_error_title'] = self.formset_error_title.strip()
        return items
529547
def get(self, name, param=None):
        
        if name not in self.attribs:
            raise exceptions.SoftLayerError('Unknown metadata attribute.')

        call_details = self.attribs[name]

        if call_details.get('param_req'):
            if not param:
                raise exceptions.SoftLayerError(
                    'Parameter required to get this attribute.')

        params = tuple()
        if param is not None:
            params = (param,)
        try:
            return self.client.call('Resource_Metadata',
                                    self.attribs[name]['call'],
                                    *params)
        except exceptions.SoftLayerAPIError as ex:
            if ex.faultCode == 404:
                return None
            raise ex
556148
def getAttribute(self):
        """"""
        data = self.data
        # Step 1 (skip chars)
        c = data.skip(spaceCharactersBytes | frozenset([b"/"]))
        assert c is None or len(c) == 1
        # Step 2
        if c in (b">", None):
            return None
        # Step 3
        attrName = []
        attrValue = []
        # Step 4 attribute name
        while True:
            if c == b"=" and attrName:
                break
            elif c in spaceCharactersBytes:
                # Step 6!
                c = data.skip()
                break
            elif c in (b"/", b">"):
                return b"".join(attrName), b""
            elif c in asciiUppercaseBytes:
                attrName.append(c.lower())
            elif c is None:
                return None
            else:
                attrName.append(c)
            # Step 5
            c = next(data)
        # Step 7
        if c != b"=":
            data.previous()
            return b"".join(attrName), b""
        # Step 8
        next(data)
        # Step 9
        c = data.skip()
        # Step 10
        if c in (b"'", b'"'):
            # 10.1
            quoteChar = c
            while True:
                # 10.2
                c = next(data)
                # 10.3
                if c == quoteChar:
                    next(data)
                    return b"".join(attrName), b"".join(attrValue)
                # 10.4
                elif c in asciiUppercaseBytes:
                    attrValue.append(c.lower())
                # 10.5
                else:
                    attrValue.append(c)
        elif c == b">":
            return b"".join(attrName), b""
        elif c in asciiUppercaseBytes:
            attrValue.append(c.lower())
        elif c is None:
            return None
        else:
            attrValue.append(c)
        # Step 11
        while True:
            c = next(data)
            if c in spacesAngleBrackets:
                return b"".join(attrName), b"".join(attrValue)
            elif c in asciiUppercaseBytes:
                attrValue.append(c.lower())
            elif c is None:
                return None
            else:
                attrValue.append(c)
1284747
@GetMapping(value = "/{entityTypeId}/meta/{attributeName}", produces = APPLICATION_JSON_VALUE)
  public AttributeResponse retrieveEntityAttributeMeta(
      @PathVariable("entityTypeId") String entityTypeId,
      @PathVariable("attributeName") String attributeName,
      @RequestParam(value = "attributes", required = false) String[] attributes,
      @RequestParam(value = "expand", required = false) String[] attributeExpands) {
    Set<String> attributeSet = toAttributeSet(attributes);
    Map<String, Set<String>> attributeExpandSet = toExpandMap(attributeExpands);

    return getAttributePostInternal(entityTypeId, attributeName, attributeSet, attributeExpandSet);
  }
12373
def _get_attributes(self, attributes):
    

    params = []

    if isinstance(attributes, dict):
      for attribute_key in attributes.keys():
        attribute_value = attributes.get(attribute_key)
        # Omit attribute values that are not supported by the log endpoint.
        if validator.is_attribute_valid(attribute_key, attribute_value):
          attribute_id = self.config.get_attribute_id(attribute_key)
          if attribute_id:
            params.append({
              'entity_id': attribute_id,
              'key': attribute_key,
              'type': self.EventParams.CUSTOM,
              'value': attribute_value
            })

    # Append Bot Filtering Attribute
    bot_filtering_value = self._get_bot_filtering()
    if isinstance(bot_filtering_value, bool):
      params.append({
          'entity_id': enums.ControlAttributes.BOT_FILTERING,
          'key': enums.ControlAttributes.BOT_FILTERING,
          'type': self.EventParams.CUSTOM,
          'value': bot_filtering_value
      })

    return params
1041298
def get_attributes(name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    try:
        url = conn.get_queue_url(QueueName=name)['QueueUrl']
        r = conn.get_queue_attributes(QueueUrl=url, AttributeNames=['All'])
        return {'result': r['Attributes']}
    except botocore.exceptions.ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
392019
def get_cgi_parameter_list(form: cgi.FieldStorage, key: str) -> List[str]:
    
    return form.getlist(key)
504032
def extract_attributes(model)
      self.class.attributes.reduce({}) do |result, name|
        if model.respond_to?(name)
          result[name] = model.public_send(name)
        elsif model.respond_to?(:[]) && model.respond_to?(:key?) && model.key?(name)
          result[name] = model[name]
        end
        result
      end
    end
1297350
def _collect_attrs(self, name, obj):
        
        for key in obj.ncattrs():
            value = getattr(obj, key)
            fc_key = "{}/attr/{}".format(name, key)
            try:
                self.file_content[fc_key] = np2str(value)
            except ValueError:
                self.file_content[fc_key] = value
19674
def list_attributes(self, name):
        
        result = self.client.service.getListAttributes(name, self.proxy_id)
        if isinstance(result, list) and len(result) == 1:
            return result[0]
        return result
26341
def read(self, entity=None, attrs=None, ignore=None, params=None):
        
        if attrs is None:
            attrs = self.read_json()
        attrs['search_'] = attrs.pop('search')

        # Satellite doesn't return this attribute. See BZ 1257255.
        attr = 'max_count'
        if ignore is None:
            ignore = set()
        if attr not in ignore:
            # We cannot call `self.update_json([])`, as an ID might not be
            # present on self. However, `attrs` is guaranteed to have an ID.
            attrs[attr] = DiscoveryRule(
                self._server_config,
                id=attrs['id'],
            ).update_json([])[attr]
        return super(DiscoveryRule, self).read(entity, attrs, ignore, params)
573969
def get_summary(config, bugnumber):
    """"""

    bugzilla_url_regex = re.compile(
        re.escape("https://bugzilla.mozilla.org/show_bug.cgi?id=") + r"(\d+)$"
    )

    # The user could have pasted in a bugzilla ID or a bugzilla URL
    if bugzilla_url_regex.search(bugnumber.split("#")[0]):
        # that's easy then!
        bugzilla_id, = bugzilla_url_regex.search(bugnumber.split("#")[0]).groups()
        bugzilla_id = int(bugzilla_id)
        summary, url = bugzilla.get_summary(config, bugzilla_id)
        return summary, bugzilla_id, url

    # The user could have pasted in a GitHub issue URL
    github_url_regex = re.compile(r"https://github.com/([^/]+)/([^/]+)/issues/(\d+)")
    if github_url_regex.search(bugnumber.split("#")[0]):
        # that's also easy
        org, repo, id_, = github_url_regex.search(bugnumber.split("#")[0]).groups()
        id_ = int(id_)
        title, url = github.get_title(config, org, repo, id_)
        return title, id_, url

    # If it's a number it can be either a github issue or a bugzilla bug
    if bugnumber.isdigit():
        # try both and see if one of them turns up something interesting

        repo = config.repo
        state = read(config.configfile)
        fork_name = state.get("FORK_NAME", getpass.getuser())
        if config.verbose:
            info_out("Using fork name: {}".format(fork_name))
        candidates = []
        # Looping over the remotes, let's figure out which one
        # is the one that has issues. Let's try every one that isn't
        # your fork remote.
        for origin in repo.remotes:
            if origin.name == fork_name:
                continue
            url = origin.url
            org, repo = parse_remote_url(origin.url)
            github_title, github_url = github.get_title(
                config, org, repo, int(bugnumber)
            )
            if github_title:
                candidates.append((github_title, int(bugnumber), github_url))

        bugzilla_summary, bugzilla_url = bugzilla.get_summary(config, bugnumber)
        if bugzilla_summary:
            candidates.append((bugzilla_summary, int(bugnumber), bugzilla_url))

        if len(candidates) > 1:
            info_out(
                "Input is ambiguous. Multiple possibilities found. "
                "Please re-run with the full URL:"
            )
            for title, _, url in candidates:
                info_out("\t{}".format(url))
                info_out("\t{}\n".format(title))
            error_out("Awaiting your choice")
        elif len(candidates) == 1:
            return candidates[0]
        else:
            error_out("ID could not be found on GitHub or Bugzilla")
        raise Exception(bugnumber)

    return bugnumber, None, None
1328308
def DbGetAttributeAliasList(self, argin):
        
        self._log.debug("In DbGetAttributeAliasList()")
        if not argin:
            argin = "%"
        else:
            argin = replace_wildcard(argin)
        return self.db.get_attribute_alias_list(argin)
240981
def get_bug_simple(self, bugid):
        
        payload = {'ids': bugid}
        d = self.call('Bug.get', payload)
        d.addCallback(self._parse_bug_callback)
        return d
988289
def get_attrs(self):
        
        if self.action != 'Create':
            return []
        index = self.extra['index']
        ret = [index.hash_key]
        if index.range_key is not None:
            ret.append(index.range_key)
        return ret