diff --git a/vitrageclient/v1/alarm.py b/vitrageclient/v1/alarm.py index dee8c85..a17e9e0 100644 --- a/vitrageclient/v1/alarm.py +++ b/vitrageclient/v1/alarm.py @@ -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 diff --git a/vitrageclient/v1/cli/alarm.py b/vitrageclient/v1/cli/alarm.py index 6a0b290..87547c5 100644 --- a/vitrageclient/v1/cli/alarm.py +++ b/vitrageclient/v1/cli/alarm.py @@ -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') diff --git a/vitrageclient/v1/cli/rca.py b/vitrageclient/v1/cli/rca.py index 3c4042f..04e7594 100644 --- a/vitrageclient/v1/cli/rca.py +++ b/vitrageclient/v1/cli/rca.py @@ -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 diff --git a/vitrageclient/v1/cli/topology.py b/vitrageclient/v1/cli/topology.py index 5dce6f7..b1a3b59 100644 --- a/vitrageclient/v1/cli/topology.py +++ b/vitrageclient/v1/cli/topology.py @@ -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') diff --git a/vitrageclient/v1/rca.py b/vitrageclient/v1/rca.py index 7c54ca5..f2e4577 100644 --- a/vitrageclient/v1/rca.py +++ b/vitrageclient/v1/rca.py @@ -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 diff --git a/vitrageclient/v1/topology.py b/vitrageclient/v1/topology.py index 5a56d7b..6fa20da 100644 --- a/vitrageclient/v1/topology.py +++ b/vitrageclient/v1/topology.py @@ -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