From 1bf87dda57b076e042301eeafa966283265d08cf Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 8 Jun 2013 13:18:51 +0200 Subject: Fix and enable H403 tests Multi-line doc-strings should end on a new, separate line. Change-Id: I4cf0cfe92b634ef77971863a4df41ef43531bc20 --- nova/cmd/baremetal_manage.py | 6 ++++-- nova/cmd/manage.py | 38 +++++++++++++++++++++++++++----------- 2 files changed, 31 insertions(+), 13 deletions(-) (limited to 'nova/cmd') 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='', @@ -193,7 +196,9 @@ class ShellCommands(object): @args('--path', metavar='', 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='', 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='', 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='', 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: """ + + arguments: + """ 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('_'): -- cgit