Eliminate function redefined pylint error
Add disable function redefined pylint error comment at the begining of the v3/shell.py, also fix some typos. Change-Id: Ic86b14ab7286a8a76f0db551ac6330211a509ff3
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# pylint: disable=function-redefined
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
@@ -92,8 +94,8 @@ RESET_STATE_RESOURCES = {'volume': utils.find_volume,
|
||||
metavar='<key=value>',
|
||||
default=None,
|
||||
start_version='3.4',
|
||||
help='Filters results by a image metadata key and value pair. Require '
|
||||
'volume api version >=3.4. Default=None.')
|
||||
help='Filters results by a image metadata key and value pair. '
|
||||
'Require volume api version >=3.4. Default=None.')
|
||||
@utils.arg('--marker',
|
||||
metavar='<marker>',
|
||||
default=None,
|
||||
@@ -533,7 +535,7 @@ def do_group_type_delete(cs, args):
|
||||
gtype = shell_utils.find_group_type(cs, group_type)
|
||||
cs.group_types.delete(gtype)
|
||||
print("Request to delete group type %s has been accepted."
|
||||
% (group_type))
|
||||
% group_type)
|
||||
except Exception as e:
|
||||
failure_count += 1
|
||||
print("Delete for group type %s failed: %s" % (group_type, e))
|
||||
@@ -798,7 +800,8 @@ def do_cluster_disable(cs, args):
|
||||
help=(('Comma-separated list of sort keys and directions in the '
|
||||
'form of <key>[:<asc|desc>]. '
|
||||
'Valid keys: %s. '
|
||||
'Default=None.') % ', '.join(base.SORT_MANAGEABLE_KEY_VALUES)))
|
||||
'Default=None.'
|
||||
) % ', '.join(base.SORT_MANAGEABLE_KEY_VALUES)))
|
||||
def do_manageable_list(cs, args):
|
||||
"""Lists all manageable volumes."""
|
||||
detailed = strutils.bool_from_string(args.detailed)
|
||||
@@ -1150,7 +1153,8 @@ def do_service_list(cs, args):
|
||||
help=(('Comma-separated list of sort keys and directions in the '
|
||||
'form of <key>[:<asc|desc>]. '
|
||||
'Valid keys: %s. '
|
||||
'Default=None.') % ', '.join(base.SORT_MANAGEABLE_KEY_VALUES)))
|
||||
'Default=None.'
|
||||
) % ', '.join(base.SORT_MANAGEABLE_KEY_VALUES)))
|
||||
def do_snapshot_manageable_list(cs, args):
|
||||
"""Lists all manageable snapshots."""
|
||||
detailed = strutils.bool_from_string(args.detailed)
|
||||
@@ -1173,6 +1177,7 @@ def do_api_version(cs, args):
|
||||
response = cs.services.server_api_version()
|
||||
utils.print_list(response, columns)
|
||||
|
||||
|
||||
@api_versions.wraps("3.3")
|
||||
@utils.arg('--marker',
|
||||
metavar='<marker>',
|
||||
@@ -1274,6 +1279,7 @@ def do_message_delete(cs, args):
|
||||
raise exceptions.CommandError("Unable to delete any of the specified "
|
||||
"messages.")
|
||||
|
||||
|
||||
@utils.arg('--all-tenants',
|
||||
dest='all_tenants',
|
||||
metavar='<0|1>',
|
||||
@@ -1396,7 +1402,7 @@ def do_snapshot_list(cs, args):
|
||||
@utils.arg('--limit',
|
||||
metavar='<limit>',
|
||||
default=None,
|
||||
help='Maximum number of attachemnts to return. Default=None.')
|
||||
help='Maximum number of attachments to return. Default=None.')
|
||||
@utils.arg('--sort',
|
||||
metavar='<key>[:<direction>]',
|
||||
default=None,
|
||||
@@ -1584,11 +1590,11 @@ def do_version_list(cs, args):
|
||||
else:
|
||||
columns = ["Id", "Status", "Updated"]
|
||||
|
||||
print(("Client supported API versions:"))
|
||||
print(("Minimum version %(v)s") %
|
||||
print("Client supported API versions:")
|
||||
print("Minimum version %(v)s" %
|
||||
{'v': api_versions.MIN_VERSION})
|
||||
print(("Maximum version %(v)s") %
|
||||
print("Maximum version %(v)s" %
|
||||
{'v': api_versions.MAX_VERSION})
|
||||
|
||||
print(("\nServer supported API versions:"))
|
||||
print("\nServer supported API versions:")
|
||||
utils.print_list(result, columns)
|
||||
|
||||
Reference in New Issue
Block a user