Hello community, here is the log from the commit of package python-heatclient for openSUSE:Factory checked in at 2013-07-10 17:31:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-heatclient (Old) and /work/SRC/openSUSE:Factory/.python-heatclient.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-heatclient" Changes: -------- --- /work/SRC/openSUSE:Factory/python-heatclient/python-heatclient.changes 2013-07-03 10:26:29.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-heatclient.new/python-heatclient.changes 2013-07-10 17:31:53.000000000 +0200 @@ -1,0 +2,13 @@ +Fri Jul 5 13:10:22 UTC 2013 - [email protected] + +- update requires + +------------------------------------------------------------------- +Wed Jul 3 23:50:16 UTC 2013 - [email protected] + +- Update to version 0.2.2.31.g9cba3da: + + Add support for suspend/resume actions + + Unit tests for pretty table special formatters. + + Format resource required_by in resource-show. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-heatclient.spec ++++++ --- /var/tmp/diff_new_pack.UfG6JR/_old 2013-07-10 17:31:54.000000000 +0200 +++ /var/tmp/diff_new_pack.UfG6JR/_new 2013-07-10 17:31:54.000000000 +0200 @@ -19,7 +19,7 @@ %define component heatclient Name: python-%{component} -Version: 0.2.2.26.g7774ac3 +Version: 0.2.2.31.g9cba3da Release: 0 Summary: Openstack Orchestration (Heat) API Client License: Apache-2.0 @@ -44,7 +44,6 @@ Requires: python-iso8601 >= 0.1.4 Requires: python-keystoneclient >= 0.2 Requires: python-pbr >= 0.5.10 -Requires: python-warlock < 2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} @@ -79,13 +78,14 @@ Requires: python-pep8 >= 1.4.5 Requires: python-pyflakes >= 0.7.2 Requires: python-testrepository >= 0.0.13 +Requires: python-testscenarios Requires: python-testtools >= 0.9.29 %description test This package contains testsuite files for %{name}. %prep -%setup -q -n python-heatclient-0.2.2.26.g7774ac3 +%setup -q -n python-heatclient-0.2.2.31.g9cba3da %openstack_cleanup_prep echo %{version} > heatclient/versioninfo ++++++ python-heatclient-master.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-heatclient-0.2.2.26.g7774ac3/ChangeLog new/python-heatclient-0.2.2.31.g9cba3da/ChangeLog --- old/python-heatclient-0.2.2.26.g7774ac3/ChangeLog 2013-07-01 01:19:48.000000000 +0200 +++ new/python-heatclient-0.2.2.31.g9cba3da/ChangeLog 2013-07-04 00:46:30.000000000 +0200 @@ -1,3 +1,48 @@ +commit 9cba3dab020712e3d78d8e1e062cbd17ab43f893 +Merge: 8dd6074 5320a3a +Author: Jenkins <[email protected]> +Date: Wed Jul 3 22:45:52 2013 +0000 + + Merge "Format resource required_by in resource-show." + +commit 8dd6074d88442ba0af9c316546e8f3bcba2cdeb7 +Merge: 0a23b8b f535cf9 +Author: Jenkins <[email protected]> +Date: Wed Jul 3 22:35:18 2013 +0000 + + Merge "Unit tests for pretty table special formatters." + +commit 5320a3a49ad15f129c420ffdbab66c3a0e5626c9 +Author: Steve Baker <[email protected]> +Date: Fri Jun 28 14:42:16 2013 +1200 + + Format resource required_by in resource-show. + + This change has no effect if the resource details contains + no requires key (such as for older API versions). + + Change-Id: I5bce5cf6a7c7cd3f531453cd126fb7b7b3e227ef + +commit f535cf99d07731a12471e84b2efd05e238c2d954 +Author: Steve Baker <[email protected]> +Date: Thu Jun 27 15:09:15 2013 +1200 + + Unit tests for pretty table special formatters. + + Change-Id: If07b4a5fc0c4ae2eecf486433134864270757945 + +commit 0a23b8bd55a50f5ce4df67af6c89b880a552914b +Author: Steven Hardy <[email protected]> +Date: Thu Jun 13 17:59:32 2013 +0100 + + Add support for suspend/resume actions + + Adds support for action-suspend and action-resume + + blueprint stack-suspend-resume + + Change-Id: If82e6b19756d3eae8a379141ae1f25565895e262 + commit 7774ac321759f38d5bd2ac52ff8ade16d8fd2870 Author: Angus Salkeld <[email protected]> Date: Sat Jun 29 20:54:38 2013 +1000 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-heatclient-0.2.2.26.g7774ac3/PKG-INFO new/python-heatclient-0.2.2.31.g9cba3da/PKG-INFO --- old/python-heatclient-0.2.2.26.g7774ac3/PKG-INFO 2013-07-01 01:19:49.000000000 +0200 +++ new/python-heatclient-0.2.2.31.g9cba3da/PKG-INFO 2013-07-04 00:46:32.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: python-heatclient -Version: 0.2.2.26.g7774ac3 +Version: 0.2.2.31.g9cba3da Summary: OpenStack Orchestration API Client Library Home-page: http://www.openstack.org/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-heatclient-0.2.2.26.g7774ac3/heatclient/common/utils.py new/python-heatclient-0.2.2.31.g9cba3da/heatclient/common/utils.py --- old/python-heatclient-0.2.2.26.g7774ac3/heatclient/common/utils.py 2013-07-01 01:19:11.000000000 +0200 +++ new/python-heatclient-0.2.2.31.g9cba3da/heatclient/common/utils.py 2013-07-04 00:45:55.000000000 +0200 @@ -13,11 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. +import json import os +import prettytable import sys +import textwrap import uuid -import prettytable from heatclient import exc from heatclient.openstack.common import importutils @@ -33,8 +35,20 @@ return _decorator -def pretty_choice_list(l): - return ', '.join("'%s'" % i for i in l) +def link_formatter(links): + return '\n'.join([l.get('href', '') for l in links or []]) + + +def json_formatter(js): + return json.dumps(js, indent=2) + + +def text_wrap_formatter(d): + return '\n'.join(textwrap.wrap(d or '', 55)) + + +def newline_list_formatter(r): + return '\n'.join(r or []) def print_list(objs, fields, field_labels=None, formatters={}, sortby=0): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-heatclient-0.2.2.26.g7774ac3/heatclient/tests/test_utils.py new/python-heatclient-0.2.2.31.g9cba3da/heatclient/tests/test_utils.py --- old/python-heatclient-0.2.2.26.g7774ac3/heatclient/tests/test_utils.py 2013-07-01 01:19:11.000000000 +0200 +++ new/python-heatclient-0.2.2.31.g9cba3da/heatclient/tests/test_utils.py 2013-07-04 00:45:55.000000000 +0200 @@ -49,3 +49,40 @@ params = 'KeyName=heat_key;UpstreamDNS8.8.8.8' self.assertRaises(exc.MalformedRequestBody, utils.format_parameters, params) + + def test_link_formatter(self): + self.assertEqual('', utils.link_formatter(None)) + self.assertEqual('', utils.link_formatter([])) + self.assertEqual( + 'http://foo.example.com\nhttp://bar.example.com', + utils.link_formatter([ + {'href': 'http://foo.example.com'}, + {'href': 'http://bar.example.com'}])) + self.assertEqual( + '\n', + utils.link_formatter([ + {'hrf': 'http://foo.example.com'}, + {}])) + + def test_json_formatter(self): + self.assertEqual('null', utils.json_formatter(None)) + self.assertEqual('{}', utils.json_formatter({})) + self.assertEqual('{\n "foo": "bar"\n}', + utils.json_formatter({"foo": "bar"})) + + def test_text_wrap_formatter(self): + self.assertEqual('', utils.text_wrap_formatter(None)) + self.assertEqual('', utils.text_wrap_formatter('')) + self.assertEqual('one two three', + utils.text_wrap_formatter('one two three')) + self.assertEqual( + 'one two three four five six seven eight nine ten eleven\ntwelve', + utils.text_wrap_formatter( + ('one two three four five six seven ' + 'eight nine ten eleven twelve'))) + + def test_newline_list_formatter(self): + self.assertEqual('', utils.newline_list_formatter(None)) + self.assertEqual('', utils.newline_list_formatter([])) + self.assertEqual('one\ntwo', + utils.newline_list_formatter(['one', 'two'])) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-heatclient-0.2.2.26.g7774ac3/heatclient/v1/actions.py new/python-heatclient-0.2.2.31.g9cba3da/heatclient/v1/actions.py --- old/python-heatclient-0.2.2.26.g7774ac3/heatclient/v1/actions.py 1970-01-01 01:00:00.000000000 +0100 +++ new/python-heatclient-0.2.2.31.g9cba3da/heatclient/v1/actions.py 2013-07-04 00:45:55.000000000 +0200 @@ -0,0 +1,50 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from heatclient.common import base +from heatclient.v1 import stacks + +DEFAULT_PAGE_SIZE = 20 + + +class Action(base.Resource): + def __repr__(self): + return "<Action %s>" % self._info + + def update(self, **fields): + self.manager.update(self, **fields) + + def delete(self): + return self.manager.delete(self) + + def data(self, **kwargs): + return self.manager.data(self, **kwargs) + + +class ActionManager(stacks.StackChildManager): + resource_class = Action + + def suspend(self, stack_id): + """Suspend a stack.""" + body = {'suspend': None} + resp, body = self.api.json_request('POST', + '/stacks/%s/actions' % stack_id, + body=body) + + def resume(self, stack_id): + """Resume a stack.""" + body = {'resume': None} + resp, body = self.api.json_request('POST', + '/stacks/%s/actions' % stack_id, + body=body) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-heatclient-0.2.2.26.g7774ac3/heatclient/v1/client.py new/python-heatclient-0.2.2.31.g9cba3da/heatclient/v1/client.py --- old/python-heatclient-0.2.2.26.g7774ac3/heatclient/v1/client.py 2013-07-01 01:19:11.000000000 +0200 +++ new/python-heatclient-0.2.2.31.g9cba3da/heatclient/v1/client.py 2013-07-04 00:45:55.000000000 +0200 @@ -14,6 +14,7 @@ # under the License. from heatclient.common import http +from heatclient.v1 import actions from heatclient.v1 import events from heatclient.v1 import resources from heatclient.v1 import stacks @@ -35,3 +36,4 @@ self.stacks = stacks.StackManager(self) self.resources = resources.ResourceManager(self) self.events = events.EventManager(self) + self.actions = actions.ActionManager(self) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-heatclient-0.2.2.26.g7774ac3/heatclient/v1/shell.py new/python-heatclient-0.2.2.31.g9cba3da/heatclient/v1/shell.py --- old/python-heatclient-0.2.2.26.g7774ac3/heatclient/v1/shell.py 2013-07-01 01:19:11.000000000 +0200 +++ new/python-heatclient-0.2.2.31.g9cba3da/heatclient/v1/shell.py 2013-07-04 00:45:55.000000000 +0200 @@ -14,7 +14,6 @@ # under the License. import json -import textwrap import urllib2 import yaml @@ -167,6 +166,31 @@ @utils.arg('id', metavar='<NAME or ID>', + help='Name or ID of stack to suspend.') +def do_action_suspend(hc, args): + '''Suspend the stack.''' + fields = {'stack_id': args.id} + try: + hc.actions.suspend(**fields) + except exc.HTTPNotFound: + raise exc.CommandError('Stack not found: %s' % args.id) + else: + do_stack_list(hc) + + [email protected]('id', metavar='<NAME or ID>', help='Name or ID of stack to resume.') +def do_action_resume(hc, args): + '''Resume the stack.''' + fields = {'stack_id': args.id} + try: + hc.actions.resume(**fields) + except exc.HTTPNotFound: + raise exc.CommandError('Stack not found: %s' % args.id) + else: + do_stack_list(hc) + + [email protected]('id', metavar='<NAME or ID>', help='Name or ID of stack to describe.') def do_describe(hc, args): '''DEPRECATED! Use stack-show instead.''' @@ -183,16 +207,13 @@ except exc.HTTPNotFound: raise exc.CommandError('Stack not found: %s' % args.id) else: - text_wrap = lambda d: '\n'.join(textwrap.wrap(d, 55)) - link_format = lambda links: '\n'.join([l['href'] for l in links]) - json_format = lambda js: json.dumps(js, indent=2) formatters = { - 'description': text_wrap, - 'template_description': text_wrap, - 'stack_status_reason': text_wrap, - 'parameters': json_format, - 'outputs': json_format, - 'links': link_format + 'description': utils.text_wrap_formatter, + 'template_description': utils.text_wrap_formatter, + 'stack_status_reason': utils.text_wrap_formatter, + 'parameters': utils.json_formatter, + 'outputs': utils.json_formatter, + 'links': utils.link_formatter } utils.print_dict(stack.to_dict(), formatters=formatters) @@ -341,9 +362,9 @@ raise exc.CommandError('Stack or resource not found: %s %s' % (args.id, args.resource)) else: - link_format = lambda links: '\n'.join([l['href'] for l in links]) formatters = { - 'links': link_format + 'links': utils.link_formatter, + 'required_by': utils.newline_list_formatter } utils.print_dict(resource.to_dict(), formatters=formatters) @@ -410,10 +431,8 @@ except exc.HTTPNotFound: raise exc.CommandError('Stack not found: %s' % args.id) else: - link_format = lambda links: '\n'.join([l['href'] for l in links]) - json_format = lambda js: json.dumps(js, indent=2) formatters = { - 'links': link_format, - 'resource_properties': json_format + 'links': utils.link_formatter, + 'resource_properties': utils.json_formatter } utils.print_dict(event.to_dict(), formatters=formatters) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-heatclient-0.2.2.26.g7774ac3/python_heatclient.egg-info/PKG-INFO new/python-heatclient-0.2.2.31.g9cba3da/python_heatclient.egg-info/PKG-INFO --- old/python-heatclient-0.2.2.26.g7774ac3/python_heatclient.egg-info/PKG-INFO 2013-07-01 01:19:48.000000000 +0200 +++ new/python-heatclient-0.2.2.31.g9cba3da/python_heatclient.egg-info/PKG-INFO 2013-07-04 00:46:30.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: python-heatclient -Version: 0.2.2.26.g7774ac3 +Version: 0.2.2.31.g9cba3da Summary: OpenStack Orchestration API Client Library Home-page: http://www.openstack.org/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-heatclient-0.2.2.26.g7774ac3/python_heatclient.egg-info/SOURCES.txt new/python-heatclient-0.2.2.31.g9cba3da/python_heatclient.egg-info/SOURCES.txt --- old/python-heatclient-0.2.2.26.g7774ac3/python_heatclient.egg-info/SOURCES.txt 2013-07-01 01:19:49.000000000 +0200 +++ new/python-heatclient-0.2.2.31.g9cba3da/python_heatclient.egg-info/SOURCES.txt 2013-07-04 00:46:32.000000000 +0200 @@ -33,6 +33,7 @@ heatclient/tests/v1/__init__.py heatclient/tests/var/minimal.template heatclient/v1/__init__.py +heatclient/v1/actions.py heatclient/v1/client.py heatclient/v1/events.py heatclient/v1/resources.py -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
