Show the details from the provider concerning an instance
422353
def show_instance(name, call=None):
    '''
    
    '''
    if call != 'action':
        raise SaltCloudSystemExit(
            'The show_instance action must be called with -a or --action.'
        )

    nodes = list_nodes_full()
    # Find under which cloud service the name is listed, if any
    if name not in nodes:
        return {}
    if 'name' not in nodes[name]:
        nodes[name]['name'] = nodes[name]['id']
    try:
        __utils__['cloud.cache_node'](nodes[name], __active_provider_name__, __opts__)
    except TypeError:
        log.warning('Unable to show cache node data; this may be because the node has been deleted')
    return nodes[name]
1028326
def getDetails(self):
        """"""

        response = self.pingdom.request('GET', 'checks/%s' % self.id)
        self.__addDetails__(response.json()['check'])
        return response.json()['check']
757668
def show_instance(name, session=None, call=None):
    '''
    

    '''
    if call == 'function':
        raise SaltCloudException(
            'The show_instnce function must be called with -a or --action.'
        )
    log.debug('show_instance-> name: %s session: %s', name, session)
    if session is None:
        session = _get_session()
    vm = _get_vm(name, session=session)
    record = session.xenapi.VM.get_record(vm)
    if not record['is_a_template'] and not record['is_control_domain']:
        try:
            base_template_name = record['other_config']['base_template_name']
        except Exception:
            base_template_name = None
            log.debug(
                'VM %s, doesnt have base_template_name attribute',
                record['name_label']
            )
        ret = {'id': record['uuid'],
               'image': base_template_name,
               'name': record['name_label'],
               'size': record['memory_dynamic_max'],
               'state': record['power_state'],
               'private_ips': get_vm_ip(name, session),
               'public_ips': None}

        __utils__['cloud.cache_node'](
            ret,
            __active_provider_name__,
            __opts__
        )
    return ret
412460
def bind(self, instance_id: str, binding_id: str, details: BindDetails) -> Binding:
        
        
        # Find the instance
        instance = self._backend.find(instance_id)
        
        # Find or create the binding
        binding = self._backend.find(binding_id, instance)
        
        # Create the binding if needed
        return self._backend.bind(binding, details.parameters)
1110570
def login_details(self):
        
        if not self.__login_details:
            self.__login_details = LoginDetails(self.__connection)
        return self.__login_details
150080
def show(name):
    '''
    
    '''
    ret = {}
    ret['enabled'] = False
    ret['disabled'] = True
    ret['running'] = False
    ret['service_path'] = None
    ret['autostart'] = False
    ret['command_path'] = None

    ret['available'] = available(name)
    if not ret['available']:
        return ret

    ret['enabled'] = enabled(name)
    ret['disabled'] = not ret['enabled']
    ret['running'] = status(name)
    ret['autostart'] = status_autostart(name)
    ret['service_path'] = _get_svc_path(name)[0]
    if ret['service_path']:
        ret['command_path'] = os.path.join(ret['service_path'], 'run')

    # XXX provide info about alias ?

    return ret
910474
def get_by_details(self, name, type, clazz):
        """"""
        entry = DNSEntry(name, type, clazz)
        return self.get(entry)
705026
def show_detailed_monitoring(name=None, instance_id=None, call=None, quiet=False):
    '''
    
    '''
    if call != 'action':
        raise SaltCloudSystemExit(
            'The show_detailed_monitoring action must be called with -a or --action.'
        )
    location = get_location()
    if six.text_type(name).startswith('i-') and (len(name) == 10 or len(name) == 19):
        instance_id = name

    if not name and not instance_id:
        raise SaltCloudSystemExit(
            'The show_detailed_monitoring action must be provided with a name or instance\
 ID'
        )
    matched = _get_node(name=name, instance_id=instance_id, location=location)
    log.log(
        logging.DEBUG if quiet is True else logging.INFO,
        'Detailed Monitoring is %s for %s', matched['monitoring'], name
    )
    return matched['monitoring']
603487
def show_instance(name, call=None):
    '''
    
    '''
    if call != 'action':
        raise SaltCloudSystemExit(
            'The show_instance action must be called with -a or --action.'
        )

    nodes = list_nodes_full()
    # Find under which cloud service the name is listed, if any
    if name not in nodes:
        return {}
    __utils__['cloud.cache_node'](nodes[name], __active_provider_name__, __opts__)
    return nodes[name]
67165
private void printServiceInstance(ServiceInstance instance) {
        print("\nServiceInstance\n-------------------------");
        if (instance == null) {
            print("null");
            return;
        }
        print("serviceName:  " + instance.getServiceName());
        print("status:  " + instance.getStatus());
        print("uri:  " + instance.getUri());
        print("address:  " + instance.getAddress());
        print("monitorEnabled:  " + instance.isMonitorEnabled());
        print("metadata:");
        Map<String, String> meta = instance.getMetadata();
        for (Entry<String, String> entry : meta.entrySet()) {
            print("  " + entry.getKey() + "  =>  " + entry.getValue());
        }
    }
620653
def show(params={})
      key = params.delete(:key)
      Zcloudjp::Client.get("/machines/#{machine.id}/metadata/#{key}", machine.request_options)
    end
1343651
def show_instance(name, call=None):
    '''
    
    '''
    if call != 'action':
        raise SaltCloudSystemExit(
            'The show_instance action must be called with '
            '-a or --action.'
        )

    vm_properties = [
        "config.hardware.device",
        "summary.storage.committed",
        "summary.storage.uncommitted",
        "summary.storage.unshared",
        "layoutEx.file",
        "config.guestFullName",
        "config.guestId",
        "guest.net",
        "config.hardware.memoryMB",
        "name",
        "config.hardware.numCPU",
        "config.files.vmPathName",
        "summary.runtime.powerState",
        "guest.toolsStatus"
    ]

    vm_list = salt.utils.vmware.get_mors_with_properties(_get_si(), vim.VirtualMachine, vm_properties)

    for vm in vm_list:
        if vm['name'] == name:
            return _format_instance_info(vm)

    return {}
193825
def info(self, show_defaults=False):
        
        pprinter = PrettyPrinter(show_options=True, show_defaults=show_defaults)
        print(pprinter.pprint(self._obj))
833218
private CloudInstance getCloudInstanceDetails(String account,
                                                  Instance currInstance, Map<String, String> autoScaleMap, CloudInstanceRepository repository) {

        long lastUpdated = System.currentTimeMillis();
        CloudInstance instance = repository.findByInstanceId(currInstance.getInstanceId());
        if (instance != null) {
            lastUpdated = instance.getLastUpdatedDate();
        }
        CloudInstance object = new CloudInstance();
        object.setAccountNumber(account);
        object.setLastUpdatedDate(System.currentTimeMillis());
        object.setAge(getInstanceAge(currInstance));
        object.setCpuUtilization(getInstanceCPUSinceLastRun(currInstance.getInstanceId(), lastUpdated));
        object.setIsTagged(isInstanceTagged(currInstance));
        object.setIsStopped(isInstanceStopped(currInstance));
        object.setNetworkIn(getLastHourInstanceNetworkIn(currInstance.getInstanceId(), lastUpdated));
        object.setNetworkOut(getLastHourIntanceNetworkOut(currInstance.getInstanceId(), lastUpdated));
        object.setDiskRead(getLastHourInstanceDiskRead(currInstance.getInstanceId(), lastUpdated));
        object.setDiskWrite(getLastInstanceHourDiskWrite(currInstance.getInstanceId()));
        // rest of the details
        object.setImageId(currInstance.getImageId());
        object.setInstanceId(currInstance.getInstanceId());
        object.setInstanceType(currInstance.getInstanceType());
        object.setIsMonitored("enabled".equalsIgnoreCase(currInstance.getMonitoring().getState()));
        object.setPrivateDns(currInstance.getPrivateDnsName());
        object.setPrivateIp(currInstance.getPrivateIpAddress());
        object.setPublicDns(currInstance.getPublicDnsName());
        object.setPublicIp(currInstance.getPublicIpAddress());
        object.setVirtualNetworkId(currInstance.getVpcId());
        object.setRootDeviceName(currInstance.getRootDeviceName());
        object.setSubnetId(currInstance.getSubnetId());
        object.setAutoScaleName(autoScaleMap.getOrDefault(currInstance.getInstanceId(), "NONE"));
        object.setLastAction("ADD");
        List<Tag> tags = currInstance.getTags();

        if (!CollectionUtils.isEmpty(tags)) {
            for (Tag tag : tags) {
                NameValue nv = new NameValue(tag.getKey(), tag.getValue());
                object.getTags().add(nv);
            }
        }
        List<GroupIdentifier> groups = currInstance.getSecurityGroups();
        for (GroupIdentifier gi : groups) {
            object.addSecurityGroups(gi.getGroupName());
        }

        return object;
    }
1180513
def list_nic(self, instance_id):
        """"""
        output = self.client.describe_instances(InstanceIds=[instance_id])
        output = output.get("Reservations")[0].get("Instances")[0]
        return output.get("NetworkInterfaces")
901431
def show(type, name)
      resource_class = parse_type(type)
      client_setup
      matches = resource_class.find_by(@client, name: name)
      fail_nice 'Not Found' if matches.empty?
      data = matches.first.data
      if options['attribute']
        data = select_attributes(options['attribute'], data)
      end
      output data
    end
420080
def ipopo_instances(self):
        
        try:
            with use_ipopo(self.__context) as ipopo:
                return {
                    instance[0]: ipopo.get_instance_details(instance[0])
                    for instance in ipopo.get_instances()
                }
        except BundleException:
            # iPOPO is not available:
            return None