示例#1
0
 def __init__(self, c):
     summary = c.summary
     self.name = esx_name(c)
     self.cores = summary.numCpuCores
     self.threads = summary.numCpuThreads
     self.mem = summary.totalMemory
     self.hosts = summary.numHosts
示例#2
0
 def __init__(self, c):
     summary = c.summary
     self.name = esx_name(c)
     self.cores = summary.numCpuCores
     self.threads = summary.numCpuThreads
     self.mem = summary.totalMemory
     self.hosts = summary.numHosts
示例#3
0
    def __init__(self, service, net):
        self.net = net
        self.service = service
        self.key = esx_name(net)
        self.name = net.summary.name
        self.type = EsxNetMap[type(net)]
        self.status = net.overallStatus
        self.ip_pool = net.summary.ipPoolName

        self.pg = None
        if self.type == ESX_NET_DVPG:
            self.pg = EsxDVPortGroup(net.config)
示例#4
0
    def __init__(self, service, net):
        self.net = net
        self.service = service
        self.key = esx_name(net)
        self.name = net.summary.name
        self.type = EsxNetMap[type(net)]
        self.status = net.overallStatus
        self.ip_pool = net.summary.ipPoolName

        self.pg = None
        if self.type == ESX_NET_DVPG:
            self.pg = EsxDVPortGroup(net.config)
示例#5
0
    def __init__(self, h):
        self.name = esx_name(h)
        self.version = h.summary.config.product.version
        self.ip = h.name
        self.status = h.overallStatus

        self.mem_size = h.summary.hardware.memorySize
        self.mem_usage = h.summary.quickStats.overallMemoryUsage * 1024 * 1024
        self.mem_fairness = round(float(h.summary.quickStats.distributedMemoryFairness) / 1000, 3)

        self.cpu = h.summary.hardware.numCpuPkgs
        self.cores =  h.summary.hardware.numCpuCores
        self.threads = h.summary.hardware.numCpuThreads
        self.cpu_mhz = h.summary.hardware.cpuMhz
        self.mean_core_usage_mhz = h.summary.quickStats.overallCpuUsage
        self.cpu_fairness = round(float(h.summary.quickStats.distributedCpuFairness) / 1000, 3)

        self.nics = h.summary.hardware.numNics
        self.vms = len(h.vm)
        self.uptime = h.summary.quickStats.uptime
示例#6
0
    def __init__(self, vm):
        summary = vm.summary
        config = summary.config
        runtime = summary.runtime
        guest = summary.guest
        storage = summary.storage
        stats = summary.quickStats

        self.name = config.name
        self.status = runtime.powerState
        self.pool = vm.resourcePool.name
        self.host = esx_name(str(runtime.host))
        self.folder = vm_guess_folder(vm)
        self.os = config.guestFullName
        self.hostname = guest.hostName
        self.ip = guest.ipAddress
        self.cpu = config.numCpu
        self.mem = config.memorySizeMB
        self.nic = config.numEthernetCards
        self.hd_size = (storage.committed + storage.uncommitted) / 1024 / 1024 / 1024
        self.uptime = humanize_time(stats.uptimeSeconds)
示例#7
0
    def __init__(self, vm):
        summary = vm.summary
        config = summary.config
        runtime = summary.runtime
        guest = summary.guest
        storage = summary.storage
        stats = summary.quickStats

        self.name = config.name
        self.status = runtime.powerState
        self.pool = vm.resourcePool.name
        self.host = esx_name(str(runtime.host))
        self.folder = vm_guess_folder(vm)
        self.os = config.guestFullName
        self.hostname = guest.hostName
        self.ip = guest.ipAddress
        self.cpu = config.numCpu
        self.mem = config.memorySizeMB
        self.nic = config.numEthernetCards
        self.hd_size = (storage.committed +
                        storage.uncommitted) / 1024 / 1024 / 1024
        self.uptime = humanize_time(stats.uptimeSeconds)
示例#8
0
    def __init__(self, h):
        self.name = esx_name(h)
        self.version = h.summary.config.product.version
        self.ip = h.name
        self.status = h.overallStatus

        self.mem_size = h.summary.hardware.memorySize
        self.mem_usage = h.summary.quickStats.overallMemoryUsage * 1024 * 1024
        self.mem_fairness = round(
            float(h.summary.quickStats.distributedMemoryFairness) / 1000, 3)

        self.cpu = h.summary.hardware.numCpuPkgs
        self.cores = h.summary.hardware.numCpuCores
        self.threads = h.summary.hardware.numCpuThreads
        self.cpu_mhz = h.summary.hardware.cpuMhz
        self.mean_core_usage_mhz = h.summary.quickStats.overallCpuUsage
        self.cpu_fairness = round(
            float(h.summary.quickStats.distributedCpuFairness) / 1000, 3)

        self.nics = h.summary.hardware.numNics
        self.vms = len(h.vm)
        self.uptime = h.summary.quickStats.uptime
示例#9
0
 def __init__(self, service, vm):
     self.service = service
     self.vm = vm
     self.key = esx_name(vm)
     self.name = self.vm.name
示例#10
0
 def __init__(self, service, cluster):
     self.service = service
     self.cluster = cluster
     self.key = esx_name(cluster)
     self.name = cluster.name
     self.status = cluster.overallStatus
示例#11
0
 def __init__(self, service, pool):
     self.service = service
     self.pool = pool
     self.key = esx_name(pool)
     self.name = pool.name
     self.status = pool.overallStatus
示例#12
0
 def __init__(self, service, host):
     self.service = service
     self.host = host
     self.key = esx_name(host)
     self.name = self.host.name
示例#13
0
 def __init__(self, service, pool):
     self.service = service
     self.pool = pool
     self.key = esx_name(pool)
     self.name = pool.name
     self.status = pool.overallStatus
示例#14
0
 def __init__(self, service, cluster):
     self.service = service
     self.cluster = cluster
     self.key = esx_name(cluster)
     self.name = cluster.name
     self.status = cluster.overallStatus
示例#15
0
 def __init__(self, service, ds):
     self.service     = service
     self.ds          = ds
     self.key         = esx_name(ds)
     self.name        = ds.name
示例#16
0
 def __init__(self, service, template):
     self.service = service
     self.template = template
     self.key = esx_name(template)
     self.name = template.name
示例#17
0
 def __init__(self, service, folder):
     self.service = service
     self.folder = folder
     self.key = esx_name(folder)
     self.name = folder.name
     self.status = folder.overallStatus
示例#18
0
 def __init__(self, service, template):
     self.service = service
     self.template = template
     self.key = esx_name(template)
     self.name = template.name
示例#19
0
 def __init__(self, service, host):
     self.service = service
     self.host = host
     self.key = esx_name(host)
     self.name = self.host.name
示例#20
0
 def __init__(self, service, vm):
     self.service = service
     self.vm = vm
     self.key = esx_name(vm)
     self.name = self.vm.name
示例#21
0
 def __init__(self, service, dc):
     self.service = service
     self.dc = dc
     self.key = esx_name(dc)
     self.name = dc.name
     self.status = dc.overallStatus
示例#22
0
 def __init__(self, service, dc):
     self.service = service
     self.dc = dc
     self.key = esx_name(dc)
     self.name = dc.name
     self.status = dc.overallStatus