Accepting request 139813 from Virtualization:Cloud:OpenStack:SUSE
We want that OBS-URL: https://build.opensuse.org/request/show/139813 OBS-URL: https://build.opensuse.org/package/show/Cloud:OpenStack:Essex/python-glanceclient?expand=0&rev=1
This commit is contained in:
commit
b8eb009cfa
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
22
_service
Normal file
22
_service
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<services>
|
||||||
|
<service name="tar_scm" mode="disabled">
|
||||||
|
<param name="url">git://github.com/openstack/python-glanceclient.git</param>
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="exclude">.git</param>
|
||||||
|
<param name="exclude">.gitreview</param>
|
||||||
|
<param name="version">git-master</param>
|
||||||
|
<param name="versionformat">2012.1+git.%at.%h</param>
|
||||||
|
|
||||||
|
<!-- Use this if you want a specific revision. -->
|
||||||
|
<param name="revision">71a0caece87727e07bc34ae265dda58ca3e1e6d2</param>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service name="recompress" mode="disabled">
|
||||||
|
<param name="file">python-*git*.tar</param>
|
||||||
|
<param name="compression">gz</param>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<service name="set_version" mode="disabled">
|
||||||
|
<param name="basename">python-glanceclient</param>
|
||||||
|
</service>
|
||||||
|
</services>
|
61
add-handler-for-logger.patch
Normal file
61
add-handler-for-logger.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
Index: python-glanceclient-2012.1+git.1342772282.71a0cae/glanceclient/common/http.py
|
||||||
|
===================================================================
|
||||||
|
--- python-glanceclient-2012.1+git.1342772282.71a0cae.orig/glanceclient/common/http.py
|
||||||
|
+++ python-glanceclient-2012.1+git.1342772282.71a0cae/glanceclient/common/http.py
|
||||||
|
@@ -41,11 +41,7 @@ class HTTPClient(httplib2.Http):
|
||||||
|
self.disable_ssl_certificate_validation = insecure
|
||||||
|
|
||||||
|
def http_log(self, args, kwargs, resp, body):
|
||||||
|
- if os.environ.get('GLANCECLIENT_DEBUG', False):
|
||||||
|
- ch = logging.StreamHandler()
|
||||||
|
- logger.setLevel(logging.DEBUG)
|
||||||
|
- logger.addHandler(ch)
|
||||||
|
- elif not logger.isEnabledFor(logging.DEBUG):
|
||||||
|
+ if not logger.isEnabledFor(logging.DEBUG):
|
||||||
|
return
|
||||||
|
|
||||||
|
string_parts = ['curl -i']
|
||||||
|
@@ -84,7 +80,7 @@ class HTTPClient(httplib2.Http):
|
||||||
|
self.http_log((url, method,), kwargs, resp, body)
|
||||||
|
|
||||||
|
if 400 <= resp.status < 600:
|
||||||
|
- logger.exception("Request returned failure status.")
|
||||||
|
+ logger.error("Request returned failure status.")
|
||||||
|
raise exc.from_response(resp, body)
|
||||||
|
elif resp.status in (301, 302, 305):
|
||||||
|
# Redirected. Reissue the request to the new location.
|
||||||
|
Index: python-glanceclient-2012.1+git.1342772282.71a0cae/glanceclient/shell.py
|
||||||
|
===================================================================
|
||||||
|
--- python-glanceclient-2012.1+git.1342772282.71a0cae.orig/glanceclient/shell.py
|
||||||
|
+++ python-glanceclient-2012.1+git.1342772282.71a0cae/glanceclient/shell.py
|
||||||
|
@@ -19,6 +19,7 @@ Command-line interface to the OpenStack
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import httplib2
|
||||||
|
+import logging
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
@@ -48,9 +49,9 @@ class OpenStackImagesShell(object):
|
||||||
|
)
|
||||||
|
|
||||||
|
parser.add_argument('--debug',
|
||||||
|
- default=False,
|
||||||
|
+ default=bool(utils.env('GLANCECLIENT_DEBUG')),
|
||||||
|
action='store_true',
|
||||||
|
- help=argparse.SUPPRESS)
|
||||||
|
+ help='Defaults to env[GLANCECLIENT_DEBUG]')
|
||||||
|
|
||||||
|
parser.add_argument('--insecure',
|
||||||
|
default=False,
|
||||||
|
@@ -239,6 +240,10 @@ class OpenStackImagesShell(object):
|
||||||
|
if args.debug:
|
||||||
|
httplib2.debuglevel = 1
|
||||||
|
|
||||||
|
+ LOG = logging.getLogger('glanceclient')
|
||||||
|
+ LOG.addHandler(logging.StreamHandler())
|
||||||
|
+ LOG.setLevel(logging.DEBUG if args.debug else logging.INFO)
|
||||||
|
+
|
||||||
|
# Short-circuit and deal with help command right away.
|
||||||
|
if args.func == self.do_help:
|
||||||
|
self.do_help(args)
|
10
glanceclient-setup-no-requires.patch
Normal file
10
glanceclient-setup-no-requires.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- python-glanceclient-2012.1+git.1342772282.71a0cae/setup.py.orig 2012-08-02 14:22:43.000000000 +0200
|
||||||
|
+++ python-glanceclient-2012.1+git.1342772282.71a0cae/setup.py 2012-08-02 14:22:52.000000000 +0200
|
||||||
|
@@ -38,7 +38,6 @@
|
||||||
|
'Programming Language :: Python',
|
||||||
|
],
|
||||||
|
cmdclass=setup.get_cmdclass(),
|
||||||
|
- install_requires=requires,
|
||||||
|
dependency_links=dependency_links,
|
||||||
|
tests_require=tests_require,
|
||||||
|
setup_requires=['setuptools-git>=0.4'],
|
23
honor-insecure-flag-keystone.patch
Normal file
23
honor-insecure-flag-keystone.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
diff -ruN a/glanceclient/shell.py b/glanceclient/shell.py
|
||||||
|
--- a/glanceclient/shell.py 2012-07-26 16:27:05.393086964 +0200
|
||||||
|
+++ b/glanceclient/shell.py 2012-07-26 16:41:07.376042262 +0200
|
||||||
|
@@ -206,7 +206,8 @@
|
||||||
|
password=kwargs.get('password'),
|
||||||
|
tenant_id=kwargs.get('tenant_id'),
|
||||||
|
tenant_name=kwargs.get('tenant_name'),
|
||||||
|
- auth_url=kwargs.get('auth_url'))
|
||||||
|
+ auth_url=kwargs.get('auth_url'),
|
||||||
|
+ insecure=kwargs.get('insecure'))
|
||||||
|
service_type = kwargs.get('service_type') or 'image'
|
||||||
|
endpoint_type = kwargs.get('endpoint_type') or 'publicURL'
|
||||||
|
endpoint = _ksclient.service_catalog.url_for(
|
||||||
|
@@ -272,7 +273,8 @@
|
||||||
|
'tenant_name': args.os_tenant_name,
|
||||||
|
'auth_url': args.os_auth_url,
|
||||||
|
'service_type': args.os_service_type,
|
||||||
|
- 'endpoint_type': args.os_endpoint_type
|
||||||
|
+ 'endpoint_type': args.os_endpoint_type,
|
||||||
|
+ 'insecure': args.insecure
|
||||||
|
}
|
||||||
|
endpoint, token = self._authenticate(**kwargs)
|
||||||
|
|
3
python-glanceclient-2012.1+git.1342772282.71a0cae.tar.gz
Normal file
3
python-glanceclient-2012.1+git.1342772282.71a0cae.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cda8260d6283c360b644de19b1ea4951bf292488036b36eb2dc38005b8689c10
|
||||||
|
size 35701
|
52
python-glanceclient.changes
Normal file
52
python-glanceclient.changes
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 13 09:18:30 UTC 2012 - vuntz@suse.com
|
||||||
|
|
||||||
|
- Add add-handler-for-logger.patch: remove cryptic "No handlers
|
||||||
|
could be found for logger" error message. Fix bnc#780048.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 14 11:37:34 UTC 2012 - bwiedemann@suse.com
|
||||||
|
|
||||||
|
- Do not conflict with openstack-glance
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 2 14:26:54 CEST 2012 - iartarisi@suse.cz
|
||||||
|
|
||||||
|
- Add patch to remove strict dependency checks in setup.py
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 27 10:12:09 UTC 2012 - saschpe@suse.de
|
||||||
|
|
||||||
|
- Add requirement on python-warlock
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 26 14:25:39 UTC 2012 - saschpe@suse.de
|
||||||
|
|
||||||
|
- Honor '--insecure' commandline flag also for keystone authentication
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 26 10:37:47 UTC 2012 - saschpe@suse.de
|
||||||
|
|
||||||
|
- Require python-distribute, /usr/bin/glance needs it
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 23 09:34:05 UTC 2012 - bwiedemann@suse.com
|
||||||
|
|
||||||
|
- Require python-keystoneclient
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 10 13:11:34 UTC 2012 - saschpe@suse.de
|
||||||
|
|
||||||
|
- Add '--insecure' commandline argument to ignore (amongst others)
|
||||||
|
self-signed certificate errors
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 3 11:41:55 UTC 2012 - saschpe@suse.de
|
||||||
|
|
||||||
|
- Conflict on openstack-glance, it also ships /usr/bin/glance
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 29 13:40:46 UTC 2012 - saschpe@suse.de
|
||||||
|
|
||||||
|
- Initial version
|
||||||
|
|
104
python-glanceclient.spec
Normal file
104
python-glanceclient.spec
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-glanceclient
|
||||||
|
#
|
||||||
|
# Copyright (c) 2012 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
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Option to (forcefully) build without tarballs from VCS:
|
||||||
|
%bcond_without from_vcs
|
||||||
|
|
||||||
|
Name: python-glanceclient
|
||||||
|
%if %{with from_vcs}
|
||||||
|
# set_version source service will automatically change this to
|
||||||
|
# the version detected within the checked out git repo:
|
||||||
|
Version: 2012.1+git.1342772282.71a0cae
|
||||||
|
%else
|
||||||
|
Version: 2012.1
|
||||||
|
%endif
|
||||||
|
Release: 0
|
||||||
|
License: Apache-2.0
|
||||||
|
Summary: Openstack Image (Glance) API Client Library
|
||||||
|
Url: https://github.com/openstack/python-glanceclient
|
||||||
|
Group: Development/Languages/Python
|
||||||
|
# Please note that the official release tarball has to be downloaded once,
|
||||||
|
# but the URL can be used to verify it later on:
|
||||||
|
Source: https://launchpad.net/glance/essex/%{version}/+download/%{name}-%{version}.tar.gz
|
||||||
|
# Patch-FIX-UPSTREAM: '--insecure' flag should be checked when talking to keystone
|
||||||
|
Patch0: honor-insecure-flag-keystone.patch
|
||||||
|
# Don't specify requires in setup.py
|
||||||
|
# https://bugs.launchpad.net/python-glanceclient/+bug/1032155
|
||||||
|
Patch1: glanceclient-setup-no-requires.patch
|
||||||
|
# PATCH-FIX-UPSTREAM add-handler-for-logger.patch bnc#780048 vuntz@suse.com -- Remove cryptic "No handlers could be found for logger" error message
|
||||||
|
Patch2: add-handler-for-logger.patch
|
||||||
|
BuildRequires: python-devel
|
||||||
|
BuildRequires: python-distribute
|
||||||
|
Requires: python >= 2.6.8
|
||||||
|
# /usr/bin/glance uses pkg_resources, thus:
|
||||||
|
Requires: python-distribute
|
||||||
|
Requires: python-httplib2
|
||||||
|
Requires: python-prettytable
|
||||||
|
Requires: python-keystoneclient
|
||||||
|
Requires: python-warlock
|
||||||
|
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()")}
|
||||||
|
%else
|
||||||
|
BuildArch: noarch
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description
|
||||||
|
This is a client for the Glance which uses the OpenStack Image API. There's
|
||||||
|
a Python API (the glanceclient module), and a command-line script (glance).
|
||||||
|
|
||||||
|
%package test
|
||||||
|
Summary: Openstack Image (Glance) API Client Library - Testsuite
|
||||||
|
Group: System/Management
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
Requires: python-mock
|
||||||
|
Requires: python-mox
|
||||||
|
Requires: python-nose
|
||||||
|
Requires: python-unittest2
|
||||||
|
|
||||||
|
%description test
|
||||||
|
The %{name} testsuite.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
sed -i "s/setuptools-git>=0.4//" setup.py # We don't need that
|
||||||
|
|
||||||
|
%build
|
||||||
|
python setup.py build
|
||||||
|
cd docs && sphinx-build -b html . build/html
|
||||||
|
|
||||||
|
%install
|
||||||
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
|
|
||||||
|
# test package
|
||||||
|
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}-test
|
||||||
|
cp -av tests run_tests.sh %{buildroot}%{_localstatedir}/lib/%{name}-test
|
||||||
|
ln -s %{python_sitelib}/glanceclient %{buildroot}%{_localstatedir}/lib/%{name}-test/glanceclient
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc LICENSE README.rst
|
||||||
|
%{_bindir}/glance
|
||||||
|
%{python_sitelib}/glanceclient/
|
||||||
|
%{python_sitelib}/python_glanceclient-*.egg-info
|
||||||
|
|
||||||
|
%files test
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc HACKING.rst
|
||||||
|
%{_localstatedir}/lib/%{name}-test
|
||||||
|
|
||||||
|
%changelog
|
Loading…
x
Reference in New Issue
Block a user