Request info for System REST service.
978524
public static SysInfoCategory getRequestInfo(HttpServletRequest request) {
        List<SysInfo> requestInfos = new ArrayList<SysInfo>();
        requestInfos.add(new SysInfo("Method", request.getMethod()));
        requestInfos.add(new SysInfo("URL", request.getRequestURL().toString()));
        requestInfos.add(new SysInfo("Protocol", request.getProtocol()));
        requestInfos.add(new SysInfo("Servlet path", request.getServletPath()));
        requestInfos.add(new SysInfo("Context path", request.getContextPath()));
        requestInfos.add(new SysInfo("Path info", request.getPathInfo()));
        requestInfos.add(new SysInfo("Path translated", request.getPathTranslated()));
        requestInfos.add(new SysInfo("Query string", request.getQueryString()));
        requestInfos.add(new SysInfo("Content length: ", String.valueOf(request.getContentLength())));
        requestInfos.add(new SysInfo("Content type: ", request.getContentType()));
        requestInfos.add(new SysInfo("Server name", request.getServerName()));
        requestInfos.add(new SysInfo("Server port", String.valueOf(request.getServerPort())));
        requestInfos.add(new SysInfo("Remote user", request.getRemoteUser()));
        requestInfos.add(new SysInfo("Remote address", request.getRemoteAddr()));
        requestInfos.add(new SysInfo("Remote host", request.getRemoteHost()));
        requestInfos.add(new SysInfo("Authorization type", request.getAuthType()));
        requestInfos.add(new SysInfo("Locale", String.valueOf(request.getLocale())));

        SysInfo paramInfo = new SysInfo("Parameters");
        Enumeration<?> paramNames = request.getParameterNames();
        while (paramNames.hasMoreElements()) {
            String paramName = (String)paramNames.nextElement();
            paramInfo.addSysInfo(new SysInfo(paramName, request.getParameter(paramName)));
        }
        requestInfos.add(paramInfo);

        SysInfo headerInfo = new SysInfo("Headers");
        Enumeration<?> headerNames = request.getHeaderNames();
        while (headerNames.hasMoreElements()) {
            String headerName = (String)headerNames.nextElement();
            headerInfo.addSysInfo(new SysInfo(headerName, request.getHeader(headerName)));
        }
        requestInfos.add(headerInfo);

        SysInfo attrInfo = new SysInfo("Attributes");
        Enumeration<?> attrNames = request.getAttributeNames();
        while (attrNames.hasMoreElements()) {
            String attrName = (String)attrNames.nextElement();
            attrInfo.addSysInfo(new SysInfo(attrName, String.valueOf(request.getAttribute(attrName))));
        }
        requestInfos.add(attrInfo);

        return new SysInfoCategory("Request Details", requestInfos);
    }
831087
def info(name):
    '''
    
    '''
    info = __salt__['user.info'](name=name)

    ret = {'name': name,
           'passwd': '',
           'lstchg': '',
           'min': '',
           'max': '',
           'warn': '',
           'inact': '',
           'expire': ''}

    if info:
        ret = {'name': info['name'],
               'passwd': 'Unavailable',
               'lstchg': info['password_changed'],
               'min': '',
               'max': '',
               'warn': '',
               'inact': '',
               'expire': info['expiration_date']}

    return ret
1259269
def get_details(self):
        """"""
        body = helpers.req_body(self.manager, 'devicedetail')
        head = helpers.req_headers(self.manager)

        r, _ = helpers.call_api('/131airpurifier/v1/device/deviceDetail',
                                method='post', headers=head, json=body)

        if r is not None and helpers.check_response(r, 'airpur_detail'):
            self.device_status = r.get('deviceStatus', 'unknown')
            self.connection_status = r.get('connectionStatus', 'unknown')
            self.details['active_time'] = r.get('activeTime', 0)
            self.details['filter_life'] = r.get('filterLife', {})
            self.details['screeen_status'] = r.get('screenStatus', 'unknown')
            self.details['mode'] = r.get('mode', 'unknown')
            self.details['level'] = r.get('level', None)
828001
def getinfo(self, disk, part=''):
        
        args = {
            "disk": disk,
            "part": part,
        }

        self._getpart_chk.check(args)

        response = self._client.raw('disk.getinfo', args)

        result = response.get()

        if result.state != 'SUCCESS':
            raise RuntimeError('failed to get info: %s' % result.data)

        if result.level != 20:  # 20 is JSON output.
            raise RuntimeError('invalid response type from disk.getinfo command')

        data = result.data.strip()
        if data:
            return json.loads(data)
        else:
            return {}
892538
def _requestDetails(self, ip_address=None):
        """"""
        if ip_address not in self.cache:
            url = self.API_URL
            if ip_address:
                url += '/' + ip_address

            response = requests.get(url, headers=self._get_headers(), **self.request_options)
            if response.status_code == 429:
                raise RequestQuotaExceededError()
            response.raise_for_status()
            self.cache[ip_address] = response.json()

        return self.cache[ip_address]
719747
def users_info(self, user_id=None, username=None, **kwargs):
        """"""
        if user_id:
            return self.__call_api_get('users.info', userId=user_id, kwargs=kwargs)
        elif username:
            return self.__call_api_get('users.info', username=username, kwargs=kwargs)
        else:
            raise RocketMissingParamException('userID or username required')
324090
async def get_details(self):
        
        data = await self._handler.details(system_id=self.system_id)
        return bson.decode_all(data)[0]
996583
def info(gandi, resource):
    """"""
    output_keys = ['fqdn', 'nameservers', 'services', 'zone_id', 'tags',
                   'created', 'expires', 'updated']
    contact_field = ['owner', 'admin', 'bill', 'tech', 'reseller']

    result = gandi.domain.info(resource)
    output_contact_info(gandi, result['contacts'], contact_field, justify=12)
    output_domain(gandi, result, output_keys, justify=12)

    return result
1149612
def _get_service_info(service):
    '''
    
    '''
    service_info = pyconnman.ConnService(os.path.join(SERVICE_PATH, service))
    data = {
        'label': service,
        'wireless': service_info.get_property('Type') == 'wifi',
        'connectionid': six.text_type(service_info.get_property('Ethernet')['Interface']),
        'hwaddr': six.text_type(service_info.get_property('Ethernet')['Address'])
    }

    state = service_info.get_property('State')
    if state == 'ready' or state == 'online':
        data['up'] = True
        data['ipv4'] = {
            'gateway': '0.0.0.0'
        }
        ipv4 = 'IPv4'
        if service_info.get_property('IPv4')['Method'] == 'manual':
            ipv4 += '.Configuration'
        ipv4_info = service_info.get_property(ipv4)
        for info in ['Method', 'Address', 'Netmask', 'Gateway']:
            value = ipv4_info.get(info)
            if value is None:
                log.warning('Unable to get IPv4 %s for service %s\n', info, service)
                continue
            if info == 'Method':
                info = 'requestmode'
                if value == 'dhcp':
                    value = 'dhcp_linklocal'
                elif value in ('manual', 'fixed'):
                    value = 'static'
            data['ipv4'][info.lower()] = six.text_type(value)

        ipv6_info = service_info.get_property('IPv6')
        for info in ['Address', 'Prefix', 'Gateway']:
            value = ipv6_info.get(info)
            if value is None:
                log.warning('Unable to get IPv6 %s for service %s\n', info, service)
                continue
            if 'ipv6' not in data:
                data['ipv6'] = {}
            data['ipv6'][info.lower()] = [six.text_type(value)]

        nameservers = []
        for nameserver_prop in service_info.get_property('Nameservers'):
            nameservers.append(six.text_type(nameserver_prop))
        data['ipv4']['dns'] = nameservers
    else:
        data['up'] = False
        data['ipv4'] = {
            'requestmode': 'disabled'
        }

    data['ipv4']['supportedrequestmodes'] = [
        'static',
        'dhcp_linklocal',
        'disabled'
    ]
    return data
904197
def getSystemInfo(self, timeout=1):
        
        namespace = System.getServiceType("getSystemInfo")
        uri = self.getControlURL(namespace)

        results = self.execute(uri, namespace, "GetInfo", timeout=timeout)

        return SystemInfo(results)
252478
def versions_request(self):
        """"""
        ret = self.handle_api_exceptions('GET', '', api_ver='')
        return [str_dict(x) for x in ret.json()]
1356373
def _status_request(self, url, length):
        """"""
        return requests.put(
            url=url,
            headers={'Content-Length': '0',
                     'Content-Range': 'bytes */%i' % length}
        )
269973
def get(self, service_name, **kwargs):
        """"""
        return self._send(requests.get, service_name, **kwargs)
1281860
def systemInformationType9():
    """"""
    a = L2PseudoLength(l2pLength=0x01)
    b = TpPd(pd=0x6)
    c = MessageType(mesType=0x4)  # 00000100
    d = Si9RestOctets()
    packet = a / b / c / d
    return packet
508198
def _request(self, data):
        """"""
        return requests.post(self.endpoint, data=data.encode("ascii")).content
916241
def user_info(self, verbose=False):
        '''
        
        '''
        url = '{}/{}'.format(self.rest_url, 'user')
        return self.__auth_req_get(url, verbose=verbose)
901299
async def sysinfo(dev: Device):
    """"""
    click.echo(await dev.get_system_info())
    click.echo(await dev.get_interface_information())