change api syntax for alarms list
change for 'alarms list' to 'alarm list' Change-Id: I05408636ea1faa51ff6ee0425e7063645f74499a
This commit is contained in:
parent
a06798673d
commit
0d701694ad
@ -141,7 +141,7 @@ You'll find complete documentation on the shell by running
|
||||
User's password
|
||||
|
||||
Commands:
|
||||
alarms list List alarms on entity
|
||||
alarm list List alarms on entity
|
||||
complete print bash completion command
|
||||
help print detailed help for another command
|
||||
rca show Show an RCA
|
||||
@ -668,9 +668,9 @@ Alarms Examples
|
||||
---------------
|
||||
Note: To see complete usage: 'vitrage help' and 'vitrage help <command>'
|
||||
|
||||
alarms list::
|
||||
alarm list::
|
||||
|
||||
vitrage alarms list
|
||||
vitrage alarm list
|
||||
+---------+--------------------+---------------+--------------------------------------+----------+----------------------+
|
||||
| type | name | resource_type | resource_id | severity | update_timestamp |
|
||||
+---------+--------------------+---------------+--------------------------------------+----------+----------------------+
|
||||
|
@ -30,7 +30,7 @@ from keystoneauth1 import loading
|
||||
|
||||
import client
|
||||
|
||||
from v1.cli import alarms
|
||||
from v1.cli import alarm
|
||||
from v1.cli import rca
|
||||
from v1.cli import resource
|
||||
from v1.cli import template
|
||||
@ -43,7 +43,7 @@ class VitrageCommandManager(commandmanager.CommandManager):
|
||||
'topology show': topology.TopologyShow,
|
||||
'resource show': resource.ResourceShow,
|
||||
'resource list': resource.ResourceList,
|
||||
'alarms list': alarms.AlarmsList,
|
||||
'alarm list': alarm.AlarmList,
|
||||
'rca show': rca.RcaShow,
|
||||
'template validate': template.TemplateValidate,
|
||||
'template list': template.TemplateList,
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
class Alarm(object):
|
||||
url = 'v1/alarms/'
|
||||
url = 'v1/alarm/'
|
||||
|
||||
def __init__(self, api):
|
||||
self.api = api
|
@ -15,11 +15,11 @@ from cliff import lister
|
||||
from vitrageclient.common import utils
|
||||
|
||||
|
||||
class AlarmsList(lister.Lister):
|
||||
class AlarmList(lister.Lister):
|
||||
"""List alarms on entity"""
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
parser = super(AlarmsList, self).get_parser(prog_name)
|
||||
parser = super(AlarmList, self).get_parser(prog_name)
|
||||
parser.add_argument("vitrage_id",
|
||||
default='all',
|
||||
nargs='?',
|
||||
@ -30,7 +30,7 @@ class AlarmsList(lister.Lister):
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
vitrage_id = parsed_args.vitrage_id
|
||||
alarms = self.app.client.alarms.list(vitrage_id=vitrage_id)
|
||||
alarms = self.app.client.alarm.list(vitrage_id=vitrage_id)
|
||||
return utils.list2cols(('type',
|
||||
'name',
|
||||
'resource_type',
|
@ -12,7 +12,7 @@
|
||||
|
||||
from vitrageclient import client
|
||||
|
||||
from vitrageclient.v1 import alarms
|
||||
from vitrageclient.v1 import alarm
|
||||
from vitrageclient.v1 import rca
|
||||
from vitrageclient.v1 import resource
|
||||
from vitrageclient.v1 import template
|
||||
@ -26,6 +26,6 @@ class Client(object):
|
||||
**kwargs)
|
||||
self.topology = topology.Topology(self._api)
|
||||
self.resource = resource.Resource(self._api)
|
||||
self.alarms = alarms.Alarm(self._api)
|
||||
self.alarm = alarm.Alarm(self._api)
|
||||
self.rca = rca.Rca(self._api)
|
||||
self.template = template.Template(self._api)
|
||||
|
Loading…
Reference in New Issue
Block a user