diff options
| author | Justin Santa Barbara <justin@fathomdb.com> | 2011-03-22 22:49:22 -0700 |
|---|---|---|
| committer | Justin Santa Barbara <justin@fathomdb.com> | 2011-03-22 22:49:22 -0700 |
| commit | 52c2bb5e7fadf12aae96d895d374990fd4990e29 (patch) | |
| tree | 5870366b4393943e3fc79da3e56c242a2ff1b580 | |
| parent | a4d78e44d7ca35a6cca4454667cab743409fd95a (diff) | |
Cleaned up comment about virsh domain.info() return format
| -rw-r--r-- | nova/virt/libvirt_conn.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py index e95bcac39..dfe0bca49 100644 --- a/nova/virt/libvirt_conn.py +++ b/nova/virt/libvirt_conn.py @@ -60,10 +60,10 @@ from nova import log as logging #from nova import test from nova import utils from nova.auth import manager -from nova.compute import driver from nova.compute import instance_types from nova.compute import power_state from nova.virt import disk +from nova.virt import driver from nova.virt import images libvirt = None @@ -135,8 +135,8 @@ def get_connection(read_only): def _late_load_cheetah(): global Template if Template is None: - t = __import__('Cheetah.Template', globals(), locals(), ['Template'], - -1) + t = __import__('Cheetah.Template', globals(), locals(), + ['Template'], -1) Template = t.Template @@ -238,12 +238,15 @@ class LibvirtConnection(driver.ComputeDriver): for x in self._conn.listDomainsID()] def _map_to_instance_info(self, domain): - # .info() returns a list of: - #state: one of the state values (virDomainState) - #maxMemory: the maximum memory used by the domain - #memory: the current amount of memory used by the domain - #nbVirtCPU: the number of virtual CPU - #cpuTime: the time used by the domain in nanoseconds + """Gets info from a virsh domain object into an InstanceInfo""" + + # domain.info() returns a list of: + # state: one of the state values (virDomainState) + # maxMemory: the maximum memory used by the domain + # memory: the current amount of memory used by the domain + # nbVirtCPU: the number of virtual CPU + # puTime: the time used by the domain in nanoseconds + (state, _max_mem, _mem, _num_cpu, _cpu_time) = domain.info() name = domain.name() |
