summaryrefslogtreecommitdiff
path: root/troveclient/compat/mcli.py
diff options
context:
space:
mode:
authorSushil Kumar <sushil.kumar2@globallogic.com>2014-01-13 17:04:50 +0000
committerSushil Kumar <sushil.kumar2@globallogic.com>2014-05-09 08:54:39 +0000
commit8bc695bd70853305bdd1009a69503728712f57a5 (patch)
tree315d6cb2c99ce9d610b32a6340d58b2decce60ad /troveclient/compat/mcli.py
parent4643f78a200aff5155e7029dfde0eebe9bef0e70 (diff)
downloadpython-troveclient-8bc695bd70853305bdd1009a69503728712f57a5.tar.gz
Enabled F821, H306, H402, and H404 flake8 rule
Reasons: - F821 is disabled. - H306 is disabled. - H402 is disabled. - H404 is disabled. Changes: - Updates tox.ini to enable F821, H306, H402 and H404 rules. - Updates code for F821, H306, H402 and H404 violation. Change-Id: I772270bb833ac774e080fc63e330d6b333f23de2
Diffstat (limited to 'troveclient/compat/mcli.py')
-rw-r--r--troveclient/compat/mcli.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/troveclient/compat/mcli.py b/troveclient/compat/mcli.py
index 7a597ed..8dda4d0 100644
--- a/troveclient/compat/mcli.py
+++ b/troveclient/compat/mcli.py
@@ -43,24 +43,24 @@ def _pretty_print(info):
class HostCommands(common.AuthedCommandsBase):
- """Commands to list info on hosts"""
+ """Commands to list info on hosts."""
params = [
'name',
]
def update_all(self):
- """Update all instances on a host"""
+ """Update all instances on a host."""
self._require('name')
self.dbaas.hosts.update_all(self.name)
def get(self):
- """List details for the specified host"""
+ """List details for the specified host."""
self._require('name')
self._pretty_print(self.dbaas.hosts.get, self.name)
def list(self):
- """List all compute hosts"""
+ """List all compute hosts."""
self._pretty_list(self.dbaas.hosts.index)
@@ -73,12 +73,12 @@ class QuotaCommands(common.AuthedCommandsBase):
'backups']
def list(self):
- """List all quotas for a tenant"""
+ """List all quotas for a tenant."""
self._require('id')
self._pretty_print(self.dbaas.quota.show, self.id)
def update(self):
- """Update quota limits for a tenant"""
+ """Update quota limits for a tenant."""
self._require('id')
self._pretty_print(self.dbaas.quota.update, self.id,
dict((param, getattr(self, param))
@@ -99,18 +99,18 @@ class RootCommands(common.AuthedCommandsBase):
class AccountCommands(common.AuthedCommandsBase):
- """Commands to list account info"""
+ """Commands to list account info."""
params = [
'id',
]
def list(self):
- """List all accounts with non-deleted instances"""
+ """List all accounts with non-deleted instances."""
self._pretty_print(self.dbaas.accounts.index)
def get(self):
- """List details for the account provided"""
+ """List details for the account provided."""
self._require('id')
self._pretty_print(self.dbaas.accounts.show, self.id)
@@ -132,7 +132,7 @@ class InstanceCommands(common.AuthedCommandsBase):
self._pretty_print(self.dbaas.management.show, self.id)
def list(self):
- """List all instances for account"""
+ """List all instances for account."""
deleted = None
if self.deleted is not None:
if self.deleted.lower() in ['true']:
@@ -173,17 +173,17 @@ class InstanceCommands(common.AuthedCommandsBase):
class StorageCommands(common.AuthedCommandsBase):
- """Commands to list devices info"""
+ """Commands to list devices info."""
params = []
def list(self):
- """List details for the storage device"""
+ """List details for the storage device."""
self._pretty_list(self.dbaas.storage.index)
class FlavorsCommands(common.AuthedCommandsBase):
- """Commands for managing Flavors"""
+ """Commands for managing Flavors."""
params = [
'name',
@@ -198,7 +198,7 @@ class FlavorsCommands(common.AuthedCommandsBase):
]
def create(self):
- """Create a new flavor"""
+ """Create a new flavor."""
self._require('name', 'ram', 'disk', 'vcpus',
'flavor_id', 'service_type')
self._pretty_print(self.dbaas.mgmt_flavor.create, self.name,