summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorTodd Willey <todd@rubidine.com>2010-07-14 12:43:57 -0400
committerTodd Willey <todd@rubidine.com>2010-07-14 12:43:57 -0400
commitcd1510785f94ee7b3b76570ead8b73ccac7f8dd0 (patch)
tree2eadf6fbf8e60d0de463ea9b7950c84a6558ef36 /nova
parentc7f7e1bc4185be38ff792bfd82a74e35ecbeda12 (diff)
Fixes from code review.
Diffstat (limited to 'nova')
-rw-r--r--nova/adminclient.py7
-rw-r--r--nova/compute/model.py14
-rw-r--r--nova/compute/node.py3
3 files changed, 9 insertions, 15 deletions
diff --git a/nova/adminclient.py b/nova/adminclient.py
index 480e907c9..a97ad16a8 100644
--- a/nova/adminclient.py
+++ b/nova/adminclient.py
@@ -28,7 +28,8 @@ import boto
from boto.ec2.regioninfo import RegionInfo
class UserInfo(object):
- """ Information about a Nova user
+ """
+ Information about a Nova user, as parsed through SAX
fields include:
username
accesskey
@@ -46,11 +47,9 @@ class UserInfo(object):
def __repr__(self):
return 'UserInfo:%s' % self.username
- # this is needed by the sax parser, so ignore the ugly name
def startElement(self, name, attrs, connection):
return None
- # this is needed by the sax parser, so ignore the ugly name
def endElement(self, name, value, connection):
if name == 'username':
self.username = str(value)
@@ -63,7 +62,7 @@ class UserInfo(object):
class HostInfo(object):
"""
- Information about a Nova Host:
+ Information about a Nova Host, as parsed through SAX:
Disk stats
Running Instances
Memory stats
diff --git a/nova/compute/model.py b/nova/compute/model.py
index ad1f97a0a..88b94525c 100644
--- a/nova/compute/model.py
+++ b/nova/compute/model.py
@@ -366,9 +366,7 @@ class Instance(BasicModel):
return super(Instance, self).destroy()
class Host(BasicModel):
- """
- A Host is the machine where a Daemon is running.
- """
+ """A Host is the machine where a Daemon is running."""
def __init__(self, hostname):
"""loads an instance from the datastore if exists"""
@@ -385,9 +383,7 @@ class Host(BasicModel):
class Daemon(BasicModel):
- """
- A Daemon is a job (compute, api, network, ...) that runs on a host.
- """
+ """A Daemon is a job (compute, api, network, ...) that runs on a host."""
def __init__(self, host_or_combined, binpath=None):
"""loads an instance from the datastore if exists"""
@@ -404,9 +400,9 @@ class Daemon(BasicModel):
super(Daemon, self).__init__()
def default_state(self):
- return {"hostname": self.hostname,
- "binary": self.binary,
- "updated_at": utils.isotime()
+ return {"hostname": self.hostname,
+ "binary": self.binary,
+ "updated_at": utils.isotime()
}
@property
diff --git a/nova/compute/node.py b/nova/compute/node.py
index 7859d71c0..5b664f82d 100644
--- a/nova/compute/node.py
+++ b/nova/compute/node.py
@@ -144,8 +144,7 @@ class Node(object, service.Service):
@defer.inlineCallbacks
def report_state(self, nodename, daemon):
- # TODO(termie): Termie has an idea for wrapping this connection failure
- # pattern to be more elegant. -todd
+ # TODO(termie): make this pattern be more elegant. -todd
try:
record = model.Daemon(nodename, daemon)
record.heartbeat()