diff options
author | Steve Baker <sbaker@redhat.com> | 2016-06-09 08:47:17 +1200 |
---|---|---|
committer | Steve Baker <sbaker@redhat.com> | 2016-06-10 14:30:20 +1200 |
commit | 31278ff5f77b152b5ef7a4197e15c441c72ff163 (patch) | |
tree | 9c86383ba63b2b9c137179530db975ea50a2024b /heatclient/v1 | |
parent | a654226dd1da9f623b6c58f29ab8e6cf2aaf6968 (diff) | |
download | python-heatclient-31278ff5f77b152b5ef7a4197e15c441c72ff163.tar.gz |
Implement client side of event list --nested-depth
This change does the following:
- cleans up the usage of get_events so that marker and limit are only
specified in their dedicated arguments, not also in event_args
(also, specifying only in event_args still works)
- first attempts server-side nested_depth support
- falls back to the old recursive approach if the response data lacks a
link with the ref root_stack
Since there is a fallback for old heat APIs, the client change can
land before or after the heat change
I27e1ffb770e00a7f929c081b2a505e2007f5d584
Change-Id: I43d12ec61ec359222184f07c170de3c97481f1ba
Closes-Bug: #1588561
Diffstat (limited to 'heatclient/v1')
-rw-r--r-- | heatclient/v1/events.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/heatclient/v1/events.py b/heatclient/v1/events.py index d348927..5e98aa0 100644 --- a/heatclient/v1/events.py +++ b/heatclient/v1/events.py @@ -13,6 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. +import collections from oslo_utils import encodeutils import six from six.moves.urllib import parse @@ -65,6 +66,8 @@ class EventManager(stacks.StackChildManager): parse.quote(stack_id, ''), parse.quote(encodeutils.safe_encode(resource_name), '')) if params: + # convert to a sorted dict for python3 predictible order + params = collections.OrderedDict(sorted(params.items())) url += '?%s' % parse.urlencode(params, True) return self._list(url, 'events') |