Get details on the specified EventHub.
        Keys in the details dictionary include:
            -'name'
            -'type'
            -'created_at'
            -'partition_count'
            -'partition_ids'

        :rtype: dict
351696
def get_eventhub_info(self):
        
        alt_creds = {
            "username": self._auth_config.get("iot_username"),
            "password":self._auth_config.get("iot_password")}
        try:
            mgmt_auth = self._create_auth(**alt_creds)
            mgmt_client = uamqp.AMQPClient(self.mgmt_target, auth=mgmt_auth, debug=self.debug)
            mgmt_client.open()
            mgmt_msg = Message(application_properties={'name': self.eh_name})
            response = mgmt_client.mgmt_request(
                mgmt_msg,
                constants.READ_OPERATION,
                op_type=b'com.microsoft:eventhub',
                status_code_field=b'status-code',
                description_fields=b'status-description')
            eh_info = response.get_data()
            output = {}
            if eh_info:
                output['name'] = eh_info[b'name'].decode('utf-8')
                output['type'] = eh_info[b'type'].decode('utf-8')
                output['created_at'] = datetime.datetime.fromtimestamp(float(eh_info[b'created_at'])/1000)
                output['partition_count'] = eh_info[b'partition_count']
                output['partition_ids'] = [p.decode('utf-8') for p in eh_info[b'partition_ids']]
            return output
        finally:
            mgmt_client.close()
1240236
def folder_get_info(self, folder_key=None, device_id=None, details=None):
        
        return self.request('folder/get_info', QueryParams({
            'folder_key': folder_key,
            'device_id': device_id,
            'details': details
        }))
841134
def get_params(self):
        
        return self.enabled, self.size, self.chunk_delay, self.start_delay
137677
def details(self):
        
        params = {'wsfunction': 'core_course_get_categories',
                  'criteria[0][key]': 'id',
                  'criteria[0][value]': self.category_id}

        params.update(self.request_params)

        return requests.post(self.api_url, params=params, verify=False)
989924
def _get_sz_info(self):
        
        if 'None' == self._state:
            return None

        cmd = 'show virtual-service detail name guestshell+'
        got = self.cli(cmd)
        got = got['TABLE_detail']['ROW_detail']

        sz_cpu = int(got['cpu_reservation'])
        sz_disk = int(got['disk_reservation'])
        sz_memory = int(got['memory_reservation'])

        self.sz_has = _guestshell.Resources(
            cpu=sz_cpu, memory=sz_memory, disk=sz_disk)
432924
def get_info(self):
        
        info = {
            "name":     self.name,
            "mode":     self.mode & 0o7777,
            "uid":      self.uid,
            "gid":      self.gid,
            "size":     self.size,
            "mtime":    self.mtime,
            "chksum":   self.chksum,
            "type":     self.type,
            "linkname": self.linkname,
            "uname":    self.uname,
            "gname":    self.gname,
            "devmajor": self.devmajor,
            "devminor": self.devminor
        }

        if info["type"] == DIRTYPE and not info["name"].endswith("/"):
            info["name"] += "/"

        return info
437763
def workflow_get_details(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/getDetails' % object_id, input_params, always_retry=always_retry, **kwargs)
1095134
def encryption_details(self):
        
        event_type = self.findtext("event_type")
        if event_type != "encryption":
            raise AttributeError(
                'PREMIS events of type "{}" have no encryption'
                " details".format(event_type)
            )
        parsed_encryption_event_detail = self.parsed_event_detail
        encryption_program = _get_event_detail_attr(
            "program", parsed_encryption_event_detail
        )
        encryption_program_version = _get_event_detail_attr(
            "version", parsed_encryption_event_detail
        )
        encryption_key = _get_event_detail_attr("key", parsed_encryption_event_detail)
        return encryption_program, encryption_program_version, encryption_key
642456
def database_get_details(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/getDetails' % object_id, input_params, always_retry=always_retry, **kwargs)
143403
def get_stats_summary_dict(self):
        
        uptime = time.time() - self._established_time \
            if self._established_time != 0 else -1
        return {
            stats.UPDATE_MSG_IN: self.get_count(PeerCounterNames.RECV_UPDATES),
            stats.UPDATE_MSG_OUT: self.get_count(
                PeerCounterNames.SENT_UPDATES
            ),
            stats.TOTAL_MSG_IN: self.total_msg_recv,
            stats.TOTAL_MSG_OUT: self.total_msg_sent,
            stats.FMS_EST_TRANS: self.get_count(
                PeerCounterNames.FSM_ESTB_TRANSITIONS
            ),
            stats.UPTIME: uptime
        }
150868
def get_device_info_for_agent(self, context, hosting_device_db):
        
        template = hosting_device_db.template
        mgmt_port = hosting_device_db.management_port
        mgmt_ip = (mgmt_port['fixed_ips'][0]['ip_address']
                   if mgmt_port else hosting_device_db.management_ip_address)
        return {'id': hosting_device_db.id,
                'name': template.name,
                'template_id': template.id,
                'credentials': self._get_credentials(hosting_device_db),
                'host_category': template.host_category,
                'admin_state_up': hosting_device_db.admin_state_up,
                'service_types': template.service_types,
                'management_ip_address': mgmt_ip,
                'protocol_port': hosting_device_db.protocol_port,
                'timeout': None,
                'created_at': str(hosting_device_db.created_at),
                'status': hosting_device_db.status,
                'booting_time': template.booting_time}
618533
def get_event_detail(self, pguid, guid):
        
        params = dict(self.params)
        params.update({'lang': 'en-us', 'usertz': get_localzone().zone})
        url = '%s/%s/%s' % (self._calendar_event_detail_url, pguid, guid)
        req = self.session.get(url, params=params)
        self.response = req.json()
        return self.response['Event'][0]
1330547
def get_my_info():
    
    result = {}
    result['host_name'] = platform.node()
    result['real_host_name'] = platform.node()
    result['dist'] = platform.dist()
    result['nago_version'] = nago.get_version()
    return result
482107
def collect_info(self):
        
        try:
            info = {}
            res = self._send_request('GET', "/")
            info['server'] = {}
            info['server']['name'] = res['name']
            info['server']['version'] = res['version']
            info['allinfo'] = res
            info['status'] = self.cluster.status()
            info['aliases'] = self.indices.aliases()
            self.info = info
            return True
        except:
            self.info = {}
            return False
982228
def dataset_detail(request, dataset_id):
    """"""
    active_dataset = get_object_or_404(Dataset, pk=dataset_id)
    datadict_id = active_dataset.data_dictionary_id
    datadict = DataDictionaryField.objects.filter(
        parent_dict=datadict_id
    ).order_by('columnIndex')
    uploader_name = grab_names_from_emails([active_dataset.uploaded_by])
    tags = Tag.objects.filter(dataset=dataset_id)
    articles = Article.objects.filter(dataset=dataset_id)

    for hub in HUBS_LIST:
        if hub['slug'] == active_dataset.hub_slug:
            active_dataset.hub = hub['name']
            active_dataset.vertical = hub['vertical']['name']

    if len(uploader_name) == 0:
        uploader_name = active_dataset.uploaded_by
    else:
        uploader_name = uploader_name[active_dataset.uploaded_by]

    return render(
        request,
        'datafreezer/dataset_details.html',
        {
            'dataset': active_dataset,
            'datadict': datadict,
            'uploader_name': uploader_name,
            'tags': tags,
            'articles': articles,
        }
    )
5239
def getStageInfo(self, stageId):
        
        stage = self._jtracker.getStageInfo(stageId)
        if stage is not None:
            # TODO: fetch them in batch for better performance
            attrs = [getattr(stage, f)() for f in SparkStageInfo._fields[1:]]
            return SparkStageInfo(stageId, *attrs)
1242065
def _get_device_info(self, device_id):
        """"""
        params = {'access_token': self.access_token}
        r = self.spark_api(device_id).GET(params=params, timeout=30)
        self._check_error(r)
        return r.json()