Clean deprecated "query" paremeter in alarm.list()
Change-Id: I233dde6a89c57af39ac968a84a012627a6672571
This commit is contained in:
parent
d7a96eafc8
commit
8a4e9b0776
@ -11,7 +11,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from debtcollector import removals
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
from aodhclient import utils
|
from aodhclient import utils
|
||||||
@ -31,12 +30,7 @@ class AlarmManager(base.Manager):
|
|||||||
urls.append(url)
|
urls.append(url)
|
||||||
return '&'.join(urls)
|
return '&'.join(urls)
|
||||||
|
|
||||||
@removals.removed_kwarg('query',
|
def list(self, filters=None, limit=None,
|
||||||
message='Calling list() with query parameter'
|
|
||||||
'is deprecated, and will be removed'
|
|
||||||
'in python-aodhclient 0.7.0, please '
|
|
||||||
'use query() instead.')
|
|
||||||
def list(self, filters=None, query=None, limit=None,
|
|
||||||
marker=None, sorts=None):
|
marker=None, sorts=None):
|
||||||
"""List alarms.
|
"""List alarms.
|
||||||
|
|
||||||
@ -45,10 +39,6 @@ class AlarmManager(base.Manager):
|
|||||||
filters to query alarms with type='threshold' and
|
filters to query alarms with type='threshold' and
|
||||||
severity='low'.
|
severity='low'.
|
||||||
:type filters: dict
|
:type filters: dict
|
||||||
:param query: A json format complex query expression, like this:
|
|
||||||
'{"=":{"type":"threshold"}}', this expression is used to
|
|
||||||
query all the threshold type alarms.
|
|
||||||
:type query: js
|
|
||||||
:param limit: maximum number of resources to return
|
:param limit: maximum number of resources to return
|
||||||
:type limit: int
|
:type limit: int
|
||||||
:param marker: the last item of the previous page; we return the next
|
:param marker: the last item of the previous page; we return the next
|
||||||
@ -57,9 +47,6 @@ class AlarmManager(base.Manager):
|
|||||||
:param sorts: list of resource attributes to order by.
|
:param sorts: list of resource attributes to order by.
|
||||||
:type sorts: list of str
|
:type sorts: list of str
|
||||||
"""
|
"""
|
||||||
if query:
|
|
||||||
return query(query)
|
|
||||||
|
|
||||||
pagination = utils.get_pagination_options(limit, marker, sorts)
|
pagination = utils.get_pagination_options(limit, marker, sorts)
|
||||||
filter_string = (self._filtersdict_to_url(filters) if
|
filter_string = (self._filtersdict_to_url(filters) if
|
||||||
filters else "")
|
filters else "")
|
||||||
|
@ -10,5 +10,4 @@ oslo.serialization>=1.4.0 # Apache-2.0
|
|||||||
oslo.utils>=2.0.0 # Apache-2.0
|
oslo.utils>=2.0.0 # Apache-2.0
|
||||||
keystoneauth1>=1.0.0
|
keystoneauth1>=1.0.0
|
||||||
six
|
six
|
||||||
debtcollector
|
|
||||||
pyparsing
|
pyparsing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user