use bool type for all_tenants param
Change-Id: Ife56e399434bb6b51ce4aab1cc25cec3fc44d336 Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
This commit is contained in:
parent
34a3148f39
commit
b8f6662075
@ -17,7 +17,7 @@ class Alarm(object):
|
|||||||
def __init__(self, api):
|
def __init__(self, api):
|
||||||
self.api = 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
|
"""Get a all alarms on entity
|
||||||
|
|
||||||
:param vitrage_id: the id for the entity
|
:param vitrage_id: the id for the entity
|
||||||
|
@ -27,12 +27,9 @@ class AlarmList(lister.Lister):
|
|||||||
help="Vitrage id of the affected resource")
|
help="Vitrage id of the affected resource")
|
||||||
|
|
||||||
parser.add_argument('--all-tenants',
|
parser.add_argument('--all-tenants',
|
||||||
metavar='<0|1>',
|
default=False,
|
||||||
nargs='?',
|
|
||||||
type=int,
|
|
||||||
const=1,
|
|
||||||
default=0,
|
|
||||||
dest='all_tenants',
|
dest='all_tenants',
|
||||||
|
action='store_true',
|
||||||
help='Shows alarms of all the tenants in the '
|
help='Shows alarms of all the tenants in the '
|
||||||
'entity graph')
|
'entity graph')
|
||||||
|
|
||||||
|
@ -24,12 +24,9 @@ class RcaShow(show.ShowOne):
|
|||||||
help='ID of an alarm')
|
help='ID of an alarm')
|
||||||
|
|
||||||
parser.add_argument('--all-tenants',
|
parser.add_argument('--all-tenants',
|
||||||
metavar='<0|1>',
|
default=False,
|
||||||
nargs='?',
|
|
||||||
type=int,
|
|
||||||
const=1,
|
|
||||||
default=0,
|
|
||||||
dest='all_tenants',
|
dest='all_tenants',
|
||||||
|
action='store_true',
|
||||||
help='Shows alarms of all the tenants for the RCA')
|
help='Shows alarms of all the tenants for the RCA')
|
||||||
|
|
||||||
return parser
|
return parser
|
||||||
|
@ -41,12 +41,9 @@ class TopologyShow(show.ShowOne):
|
|||||||
'Valid graph types: [tree, graph]')
|
'Valid graph types: [tree, graph]')
|
||||||
|
|
||||||
parser.add_argument('--all-tenants',
|
parser.add_argument('--all-tenants',
|
||||||
metavar='<0|1>',
|
default=False,
|
||||||
nargs='?',
|
|
||||||
type=int,
|
|
||||||
const=1,
|
|
||||||
default=0,
|
|
||||||
dest='all_tenants',
|
dest='all_tenants',
|
||||||
|
action='store_true',
|
||||||
help='Shows entities of all the tenants in the '
|
help='Shows entities of all the tenants in the '
|
||||||
'entity graph')
|
'entity graph')
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ class Rca(object):
|
|||||||
def __init__(self, api):
|
def __init__(self, api):
|
||||||
self.api = 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
|
"""Get RCA for an alarm
|
||||||
|
|
||||||
:param alarm_id: the id of the alarm
|
:param alarm_id: the id of the alarm
|
||||||
|
@ -22,7 +22,7 @@ class Topology(object):
|
|||||||
graph_type='graph',
|
graph_type='graph',
|
||||||
query=None,
|
query=None,
|
||||||
root=None,
|
root=None,
|
||||||
all_tenants=0):
|
all_tenants=False):
|
||||||
"""Get a topology
|
"""Get a topology
|
||||||
|
|
||||||
:param root: the root of the topology graph
|
:param root: the root of the topology graph
|
||||||
|
Loading…
x
Reference in New Issue
Block a user