From 1e05c89d5835255f4f8ecc4524f8713bc228660945b8be33bcdecd8a0e6be53e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 21 Apr 2013 17:56:23 +0000 Subject: [PATCH] Switch to Grizzly packages OBS-URL: https://build.opensuse.org/package/show/Cloud:OpenStack:Factory/python-glanceclient?expand=0&rev=3 --- 31960f0a8584802852d97ec8ce27b5516b32d63b.diff | 83 ++++++++++++++++ _service | 3 +- python-glanceclient-0.8.0.tar.gz | 3 + python-glanceclient-master.tar.gz | 3 - python-glanceclient.changes | 95 +++++++++++++++++++ python-glanceclient.spec | 39 ++++---- 6 files changed, 206 insertions(+), 20 deletions(-) create mode 100644 31960f0a8584802852d97ec8ce27b5516b32d63b.diff create mode 100644 python-glanceclient-0.8.0.tar.gz delete mode 100644 python-glanceclient-master.tar.gz diff --git a/31960f0a8584802852d97ec8ce27b5516b32d63b.diff b/31960f0a8584802852d97ec8ce27b5516b32d63b.diff new file mode 100644 index 0000000..00d545c --- /dev/null +++ b/31960f0a8584802852d97ec8ce27b5516b32d63b.diff @@ -0,0 +1,83 @@ +commit 31960f0a8584802852d97ec8ce27b5516b32d63b +Author: Dirk Mueller +Date: Fri Feb 22 16:11:12 2013 +0100 + + Allow for prettytable 0.7.x as well + + Relax requirements to >= 0.6, < 0.8, as 0.7.x seems to + work as well. Added testcase to ensure this. + + Change-Id: I1a1a709e6053451b1256a0d78f8fe8562fb10e62 + +diff --git a/tests/test_utils.py b/tests/test_utils.py +index 3f275b8..279f5d6 100644 +--- a/tests/test_utils.py ++++ b/tests/test_utils.py +@@ -15,6 +15,8 @@ + + import errno + import testtools ++import sys ++import StringIO + + from glanceclient.common import utils + +@@ -69,6 +71,47 @@ class TestUtils(testtools.TestCase): + self.assertEqual(u'ni\xf1o', ensure_unicode('ni\xc3\xb1o', + incoming='ascii')) + ++ def test_prettytable(self): ++ class Struct: ++ def __init__(self, **entries): ++ self.__dict__.update(entries) ++ ++ # test that the prettytable output is wellformatted (left-aligned) ++ columns = ['ID', 'Name'] ++ val = ['Name1', 'another', 'veeeery long'] ++ images = [Struct(**{'id': i ** 16, 'name': val[i]}) ++ for i in range(len(val))] ++ ++ saved_stdout = sys.stdout ++ try: ++ sys.stdout = output_list = StringIO.StringIO() ++ utils.print_list(images, columns) ++ ++ sys.stdout = output_dict = StringIO.StringIO() ++ utils.print_dict({'K': 'k', 'Key': 'Value'}) ++ ++ finally: ++ sys.stdout = saved_stdout ++ ++ self.assertEqual(output_list.getvalue(), '''\ +++-------+--------------+ ++| ID | Name | +++-------+--------------+ ++| | Name1 | ++| 1 | another | ++| 65536 | veeeery long | +++-------+--------------+ ++''') ++ ++ self.assertEqual(output_dict.getvalue(), '''\ +++----------+-------+ ++| Property | Value | +++----------+-------+ ++| K | k | ++| Key | Value | +++----------+-------+ ++''') ++ + def test_ensure_str(self): + ensure_str = utils.ensure_str + self.assertEqual("True", ensure_str(True)) +diff --git a/tools/pip-requires b/tools/pip-requires +index e5a9941..7aaf5da 100644 +--- a/tools/pip-requires ++++ b/tools/pip-requires +@@ -1,5 +1,5 @@ + argparse +-prettytable>=0.6,<0.7 ++prettytable>=0.6,<0.8 + python-keystoneclient>=0.1.2,<1 + pyOpenSSL + warlock>=0.7.0,<2 diff --git a/_service b/_service index d5a896b..203d758 100644 --- a/_service +++ b/_service @@ -1,6 +1,7 @@ - http://tarballs.openstack.org/python-glanceclient/python-glanceclient-master.tar.gz + http://tarballs.openstack.org/python-glanceclient/python-glanceclient-0.8.0.tar.gz cloud-devel@suse.de + True diff --git a/python-glanceclient-0.8.0.tar.gz b/python-glanceclient-0.8.0.tar.gz new file mode 100644 index 0000000..61f4401 --- /dev/null +++ b/python-glanceclient-0.8.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46bfe15087437f19499c803394334a470081804f3f23f19dcc5a83608c01d383 +size 90083 diff --git a/python-glanceclient-master.tar.gz b/python-glanceclient-master.tar.gz deleted file mode 100644 index a3aff46..0000000 --- a/python-glanceclient-master.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:77669dc2d954378f800d96696baca72e109a0002eb135ac864e2067d7e0d47e5 -size 84859 diff --git a/python-glanceclient.changes b/python-glanceclient.changes index cc0b888..bb7e06c 100644 --- a/python-glanceclient.changes +++ b/python-glanceclient.changes @@ -1,3 +1,98 @@ +------------------------------------------------------------------- +Wed Apr 3 11:44:48 UTC 2013 - dmueller@suse.com + +- add 31960f0a8584802852d97ec8ce27b5516b32d63b.diff + +------------------------------------------------------------------- +Tue Apr 2 10:12:08 UTC 2013 - dmueller@suse.com + +- downgrade to the released tarball (0.8.0) + +------------------------------------------------------------------- +Tue Mar 26 13:43:11 UTC 2013 - dmueller@suse.com + +- update to 0.8.0.13 + +------------------------------------------------------------------- +Mon Mar 18 10:42:52 UTC 2013 - speilicke@suse.com + +- Drop +git.$TIMESTAMP.$COMMITHASH version suffix + +-------------------------------------------------------------------- +Wed Mar 13 00:14:12 UTC 2013 - cloud-devel@suse.de + +- Update to version 0.8.0.10+git.1363133652.c7c8e92: + + Implements filters: visibility, owner, member_status. Includes tests. + +-------------------------------------------------------------------- +Tue Mar 12 00:12:02 UTC 2013 - cloud-devel@suse.de + +- Update to version 0.8.0.8+git.1363047122.8787c82: + + Control C does not cancel the CLI cleanly + +-------------------------------------------------------------------- +Mon Mar 11 10:04:27 UTC 2013 - cloud-devel@suse.de + +- Update to version 0.8.0.6+git.1362996267.d810019: + + Add missing spaces in help msg + +-------------------------------------------------------------------- +Tue Mar 5 17:23:47 UTC 2013 - cloud-devel@suse.de + +- Update to version 0.8.0.5+git.1362504227.0ca43be: + + Replace SchemaNotFound with HTTPNotFound + + Use getattr properly in legacy shell + +------------------------------------------------------------------- +Fri Feb 22 14:12:23 UTC 2013 - saschpe@suse.de + +- Update to version 0.8.0.2+git.1361542435.6c7fb0e: + + Make effective ssl callback behaviour more obvious + + Update .coveragerc + + Expect minumum warlock version of 0.7.0 + + Add library support for v2 image update + + Update to latest oslo-version. + + Decode input and encode output + + Add docs for v0.8.0 + + Report name resolution errors properly +- Add glanceclient-prettytable.patch: Relax version constraints + on python-prettytable + +------------------------------------------------------------------- +Fri Feb 22 11:26:09 UTC 2013 - saschpe@suse.de + +- BuildRequire openstack-suse-macros instead of openstack-macros + +-------------------------------------------------------------------- +Mon Feb 11 15:10:58 UTC 2013 - cloud-devel@suse.de + +- Update to version 0.7.0.13+git.1360595458.60cfebc: + + Quote image ids before passing them to glance + +-------------------------------------------------------------------- +Mon Feb 4 12:03:59 UTC 2013 - dmueller@suse.com + +- Update to version 0.7.0.12+git.1359979439.ed67c32: + + Fix typo in image-update help page + + Adds image-delete functionality. + + Change https port to be an optional parameter + + Migrate to testr. + +------------------------------------------------------------------- +Thu Jan 17 14:08:20 UTC 2013 - vuntz@suse.com + +- Use version-regexp param for git_tarballs service to avoid + uselessly including the last git commit id twice. + +-------------------------------------------------------------------- +Mon Jan 14 12:50:33 UTC 2013 - cloud-devel@suse.de + +- Update to version 0.7.0.5.ga5f996c+git.1358164233.a5f996c: + + Add image names to glance command arguments. + + Use testtools instead of unittest. + + Add details to stdout error message. +- Build HTML documentation + ------------------------------------------------------------------- Wed Dec 19 15:14:51 UTC 2012 - saschpe@suse.de diff --git a/python-glanceclient.spec b/python-glanceclient.spec index b04957d..c4f14ab 100644 --- a/python-glanceclient.spec +++ b/python-glanceclient.spec @@ -1,7 +1,7 @@ # # spec file for package python-glanceclient # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,23 +19,32 @@ %define component glanceclient Name: python-glanceclient -Version: 0.6.0.14.gc057fe4+git.1355912586.c057fe4 +Version: 0.8.0 Release: 0 -License: Apache-2.0 Summary: Openstack Image (Glance) API Client -Url: http://launchpad.net/python-glanceclient +License: Apache-2.0 Group: Development/Languages/Python -Source: python-glanceclient-master.tar.gz +Url: http://launchpad.net/python-glanceclient +Source: python-glanceclient-0.8.0.tar.gz Source2: openstack-glance.sh -BuildRequires: openstack-macros +Patch0: 31960f0a8584802852d97ec8ce27b5516b32d63b.diff +BuildRequires: openstack-suse-macros BuildRequires: python-base BuildRequires: python-distribute +# Documentation build requirements: +BuildRequires: python-Sphinx +BuildRequires: python-iso8601 +BuildRequires: python-keystoneclient +BuildRequires: python-prettytable +BuildRequires: python-pyOpenSSL +BuildRequires: python-warlock Requires: python >= 2.6.8 +Requires: python-argparse # /usr/bin/glance uses pkg_resources, thus: Requires: python-distribute -Requires: python-httplib2 -Requires: python-prettytable Requires: python-keystoneclient +Requires: python-prettytable >= 0.6 +Requires: python-pyOpenSSL Requires: python-warlock BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 @@ -52,30 +61,29 @@ a Python API (the glanceclient module), and a command-line tool (glance). Summary: Openstack Image (Glance) API Client - Testsuite Group: System/Management Requires: %{name} = %{version} -Requires: python-mock Requires: python-mox Requires: python-nose Requires: python-nose-exclude Requires: python-nosehtmloutput Requires: python-nosexcover Requires: python-openstack.nose_plugin +Requires: python-pep8 +Requires: python-testtools >= 0.9.22 Requires: python-tox -Requires: python-unittest2 %description test This package contains testsuite files for %{name}. %prep -%setup -q -n python-glanceclient-0.6.0.14.gc057fe4 +%setup -q -n python-glanceclient-0.8.0 +%patch0 -p1 %openstack_cleanup_prep # Our package versioning scheme is different (but we provide the correct thing) thus: sed -i "s|python-keystoneclient>=0.1.2,<1|python-keystoneclient|" tools/pip-requires %build python setup.py build -# Just a small index.rst so far, so no need to build the doc -#python setup.py build_sphinx -#python setup.py build_sphinx -b man +python setup.py build_sphinx %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} --install-data=%{python_sitelib} @@ -88,8 +96,7 @@ install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/bash_completion.d/ope %files %defattr(-,root,root,-) -%doc LICENSE README.rst -%doc doc/source/index.rst +%doc LICENSE README.rst doc/build/html %{_sysconfdir}/bash_completion.d/openstack-glance.sh %{_bindir}/glance %{python_sitelib}/%{component}/