summaryrefslogtreecommitdiffstats
path: root/nova/cmd
diff options
context:
space:
mode:
authorDirk Mueller <dirk@dmllr.de>2013-06-08 13:18:51 +0200
committerDirk Mueller <dirk@dmllr.de>2013-06-12 22:07:23 +0200
commit1bf87dda57b076e042301eeafa966283265d08cf (patch)
tree103b0d02f296210ca95f1ed117347ab5d2c948b2 /nova/cmd
parent957bd5c780c83243c750c22925e8f61f683f2b03 (diff)
downloadnova-1bf87dda57b076e042301eeafa966283265d08cf.tar.gz
nova-1bf87dda57b076e042301eeafa966283265d08cf.tar.xz
nova-1bf87dda57b076e042301eeafa966283265d08cf.zip
Fix and enable H403 tests
Multi-line doc-strings should end on a new, separate line. Change-Id: I4cf0cfe92b634ef77971863a4df41ef43531bc20
Diffstat (limited to 'nova/cmd')
-rw-r--r--nova/cmd/baremetal_manage.py6
-rw-r--r--nova/cmd/manage.py38
2 files changed, 31 insertions, 13 deletions
diff --git a/nova/cmd/baremetal_manage.py b/nova/cmd/baremetal_manage.py
index e1224664a..e28289f8d 100644
--- a/nova/cmd/baremetal_manage.py
+++ b/nova/cmd/baremetal_manage.py
@@ -101,8 +101,10 @@ CATEGORIES = {
def methods_of(obj):
- """Get all callable methods of an object that don't start with underscore
- returns a list of tuples of the form (method_name, method)"""
+ """Get all callable methods of an object that don't start with underscore.
+
+ returns a list of tuples of the form (method_name, method)
+ """
result = []
for i in dir(obj):
if callable(getattr(obj, i)) and not i.startswith('_'):
diff --git a/nova/cmd/manage.py b/nova/cmd/manage.py
index 1dc57aea0..46e6d371f 100644
--- a/nova/cmd/manage.py
+++ b/nova/cmd/manage.py
@@ -139,19 +139,22 @@ class ShellCommands(object):
def bpython(self):
"""Runs a bpython shell.
- Falls back to Ipython/python shell if unavailable"""
+ Falls back to Ipython/python shell if unavailable
+ """
self.run('bpython')
def ipython(self):
"""Runs an Ipython shell.
- Falls back to Python shell if unavailable"""
+ Falls back to Python shell if unavailable
+ """
self.run('ipython')
def python(self):
"""Runs a python shell.
- Falls back to Python shell if unavailable"""
+ Falls back to Python shell if unavailable
+ """
self.run('python')
@args('--shell', metavar='<bpython|ipython|python >',
@@ -193,7 +196,9 @@ class ShellCommands(object):
@args('--path', metavar='<path>', help='Script path')
def script(self, path):
"""Runs the script from the specified path with flags set properly.
- arguments: path"""
+
+ arguments: path
+ """
exec(compile(open(path).read(), path, 'exec'), locals(), globals())
@@ -335,13 +340,17 @@ class FixedIpCommands(object):
@args('--address', metavar='<ip address>', help='IP address')
def reserve(self, address):
"""Mark fixed ip as reserved
- arguments: address"""
+
+ arguments: address
+ """
return self._set_reserved(address, True)
@args('--address', metavar='<ip address>', help='IP address')
def unreserve(self, address):
"""Mark fixed ip as free to use
- arguments: address"""
+
+ arguments: address
+ """
return self._set_reserved(address, False)
def _set_reserved(self, address, reserved):
@@ -421,8 +430,10 @@ class FloatingIpCommands(object):
@args('--host', metavar='<host>', help='Host')
def list(self, host=None):
- """Lists all floating ips (optionally by host)
- Note: if host is given, only active floating IPs are returned"""
+ """Lists all floating ips (optionally by host).
+
+ Note: if host is given, only active floating IPs are returned
+ """
ctxt = context.get_admin_context()
try:
if host is None:
@@ -810,7 +821,8 @@ class HostCommands(object):
def list(self, zone=None):
"""Show a list of all physical hosts. Filter by zone.
- args: [zone]"""
+ args: [zone]
+ """
print "%-25s\t%-15s" % (_('host'),
_('zone'))
ctxt = context.get_admin_context()
@@ -1008,7 +1020,9 @@ class AgentBuildCommands(object):
def list(self, hypervisor=None):
"""Lists all agent builds.
- arguments: <none>"""
+
+ arguments: <none>
+ """
fmt = "%-10s %-8s %12s %s"
ctxt = context.get_admin_context()
by_hypervisor = {}
@@ -1178,7 +1192,9 @@ CATEGORIES = {
def methods_of(obj):
"""Get all callable methods of an object that don't start with underscore
- returns a list of tuples of the form (method_name, method)"""
+
+ returns a list of tuples of the form (method_name, method)
+ """
result = []
for i in dir(obj):
if callable(getattr(obj, i)) and not i.startswith('_'):