Merge "use bool type for all_tenants param"

This commit is contained in:
Jenkins 2017-02-13 08:28:39 +00:00 committed by Gerrit Code Review
commit 5b26c6cf8c
6 changed files with 9 additions and 18 deletions

View File

@ -17,7 +17,7 @@ class Alarm(object):
def __init__(self, api):
self.api = api
def list(self, vitrage_id, all_tenants='0'):
def list(self, vitrage_id, all_tenants=False):
"""Get a all alarms on entity
:param vitrage_id: the id for the entity

View File

@ -27,12 +27,9 @@ class AlarmList(lister.Lister):
help="Vitrage id of the affected resource")
parser.add_argument('--all-tenants',
metavar='<0|1>',
nargs='?',
type=int,
const=1,
default=0,
default=False,
dest='all_tenants',
action='store_true',
help='Shows alarms of all the tenants in the '
'entity graph')

View File

@ -24,12 +24,9 @@ class RcaShow(show.ShowOne):
help='ID of an alarm')
parser.add_argument('--all-tenants',
metavar='<0|1>',
nargs='?',
type=int,
const=1,
default=0,
default=False,
dest='all_tenants',
action='store_true',
help='Shows alarms of all the tenants for the RCA')
return parser

View File

@ -41,12 +41,9 @@ class TopologyShow(show.ShowOne):
'Valid graph types: [tree, graph]')
parser.add_argument('--all-tenants',
metavar='<0|1>',
nargs='?',
type=int,
const=1,
default=0,
default=False,
dest='all_tenants',
action='store_true',
help='Shows entities of all the tenants in the '
'entity graph')

View File

@ -17,7 +17,7 @@ class Rca(object):
def __init__(self, api):
self.api = api
def get(self, alarm_id, all_tenants='0'):
def get(self, alarm_id, all_tenants=False):
"""Get RCA for an alarm
:param alarm_id: the id of the alarm

View File

@ -22,7 +22,7 @@ class Topology(object):
graph_type='graph',
query=None,
root=None,
all_tenants=0):
all_tenants=False):
"""Get a topology
:param root: the root of the topology graph