diff -Nru glance-2012.1~e4/Authors glance-2012.1~rc1~20120309.1315/Authors --- glance-2012.1~e4/Authors 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/Authors 2012-03-09 16:01:13.000000000 +0000 @@ -20,6 +20,7 @@ Jason Koelker Jay Pipes James E. Blair +Jesse Andrews Jinwoo 'Joseph' Suh Johannes Erdfelt Josh Durgin @@ -32,6 +33,7 @@ Major Hayden Mark McLoughlin Mark Washenberger +Maru Newby Matt Dietz Mike Lundy Monty Taylor diff -Nru glance-2012.1~e4/bin/glance glance-2012.1~rc1~20120309.1315/bin/glance --- glance-2012.1~e4/bin/glance 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/bin/glance 2012-03-09 16:01:13.000000000 +0000 @@ -221,7 +221,8 @@ print "Please specify a name for the image using name=VALUE" return FAILURE - image_meta = {'name': fields.pop('name'), + image_meta = {'id': fields.pop('id', None), + 'name': fields.pop('name'), 'is_public': utils.bool_from_string( fields.pop('is_public', False)), 'protected': utils.bool_from_string( diff -Nru glance-2012.1~e4/debian/changelog glance-2012.1~rc1~20120309.1315/debian/changelog --- glance-2012.1~e4/debian/changelog 2012-03-06 14:30:56.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/debian/changelog 2012-03-09 16:33:19.000000000 +0000 @@ -1,3 +1,13 @@ +glance (2012.1~rc1~20120309.1315-0ubuntu1) precise; urgency=low + + * New upstream version. + * debian/control, debian/glance-client.install, + glance-common.install: Add glance-client package. (LP: #928378) + * debian/watch: Fix watch file. + * Fix lintian warnings. + + -- Chuck Short Fri, 09 Mar 2012 11:33:12 -0500 + glance (2012.1~e4-0ubuntu1) precise; urgency=low * New upstream release. diff -Nru glance-2012.1~e4/debian/control glance-2012.1~rc1~20120309.1315/debian/control --- glance-2012.1~e4/debian/control 2012-03-06 14:30:56.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/debian/control 2012-03-09 16:33:19.000000000 +0000 @@ -27,7 +27,7 @@ python-iso8601, curl, pep8 -Standards-Version: 3.9.2 +Standards-Version: 3.9.3 XS-Python-Version: >= 2.6 Homepage: http://launchpad.net/glance Vcs-Browser: http://bazaar.launchpad.net/~ubuntu-server-dev/glance/essex/files @@ -114,6 +114,7 @@ Section: python Replaces: glance (<< 2012.1~e1~20110919.1021-0ubuntu2) Depends: ${python:Depends}, ${misc:Depends}, glance-common (= ${source:Version}) +Recommends: glance-client Description: OpenStack Image Registry and Delivery Service - API The Glance project provides an image registration, discovery and delivery service. These services may be used as stand-along services, and @@ -127,6 +128,7 @@ Section: python Replaces: glance (<< 2012.1~e1~20110919.1021-0ubuntu2) Depends: ${python:Depends}, ${misc:Depends}, glance-common (= ${source:Version}) +Recommends: glance-client Description: OpenStack Image Registry and Delivery Service - Registry The Glance project provides an image registration, discovery and delivery service. These services may be used as stand-along services, and @@ -135,3 +137,15 @@ . This package contains the glance registry server. +Package: glance-client +Architecture: all +Section: python +Replaces: glance (<< 2012.1~e1~20110919.1021-0ubuntu2) +Depends: ${python:Depends}, ${misc:Depends}, glance-common (= ${source:Version}) +Description: OpenStack Image Registry and Delivery Service - Registry + The Glance project provides an image registration, discovery and + delivery service. These services may be used as stand-along services, and + they may also be used by Nova to deliver images from object stores, such as + OpenStack's Swift service, to Nova's compute nodes. + . + This package contains the glance client. diff -Nru glance-2012.1~e4/debian/glance-client.install glance-2012.1~rc1~20120309.1315/debian/glance-client.install --- glance-2012.1~e4/debian/glance-client.install 1970-01-01 00:00:00.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/debian/glance-client.install 2012-03-09 16:33:19.000000000 +0000 @@ -0,0 +1 @@ +usr/bin/glance diff -Nru glance-2012.1~e4/debian/glance-common.install glance-2012.1~rc1~20120309.1315/debian/glance-common.install --- glance-2012.1~e4/debian/glance-common.install 2012-03-06 14:30:56.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/debian/glance-common.install 2012-03-09 16:33:19.000000000 +0000 @@ -1,3 +1,2 @@ -usr/bin/glance usr/bin/glance-manage usr/bin/glance-control diff -Nru glance-2012.1~e4/debian/watch glance-2012.1~rc1~20120309.1315/debian/watch --- glance-2012.1~e4/debian/watch 2012-03-06 14:30:56.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/debian/watch 2012-03-09 16:33:19.000000000 +0000 @@ -1,2 +1,3 @@ version=3 https://launchpad.net/glance/+download http://launchpad.net/glance/.*/glance-(.*)\.tar\.gz +http://glance.openstack.org/tarballs/ glance-(.*).tar.gz diff -Nru glance-2012.1~e4/doc/source/client.rst glance-2012.1~rc1~20120309.1315/doc/source/client.rst --- glance-2012.1~e4/doc/source/client.rst 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/client.rst 2012-03-09 16:01:13.000000000 +0000 @@ -67,7 +67,7 @@ ---------------------------------------------------------------------------- Both the ``get_images()`` and ``get_images_detailed()`` methods take query -parameters that serve to filter the returned list of images. +parameters that serve to filter the returned list of images. When calling, simply pass an optional dictionary to the method containing the filters by which you wish to limit results, with the filter keys being one @@ -219,7 +219,7 @@ glance.client.Client.add_image(image_meta, image_data=None) -The `image_meta` argument is a mapping containing various image metadata. +The `image_meta` argument is a mapping containing various image metadata. The `image_data` argument is the disk image data and is an optional argument. The list of metadata that `image_meta` can contain are listed below. @@ -234,7 +234,7 @@ * `id` - This key/value is optional. + This key/value is optional. When present, Glance will use the supplied identifier for the image. If the identifier already exists in that Glance node, then a diff -Nru glance-2012.1~e4/doc/source/community.rst glance-2012.1~rc1~20120309.1315/doc/source/community.rst --- glance-2012.1~e4/doc/source/community.rst 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/community.rst 2012-03-09 16:01:13.000000000 +0000 @@ -17,7 +17,7 @@ Getting Involved ================ -The Glance community is a very friendly group and there are places online to join in with the +The Glance community is a very friendly group and there are places online to join in with the community. Feel free to ask questions. This document points you to some of the places where you can communicate with people. @@ -26,14 +26,14 @@ Our community welcomes all people interested in open source cloud computing, and there are no formal membership requirements. The best way to join the community is to talk with others online or at a meetup -and offer contributions through Launchpad, the wiki, or blogs. We welcome all types of contributions, -from blueprint designs to documentation to testing to deployment scripts. +and offer contributions through Launchpad, the wiki, or blogs. We welcome all types of contributions, +from blueprint designs to documentation to testing to deployment scripts. Contributing Code ----------------- To contribute code, sign up for a Launchpad account and sign a contributor license agreement, -available on the ``_. Once the CLA is signed you +available on the ``_. Once the CLA is signed you can contribute code through the Bazaar version control system which is related to your Launchpad account. #openstack on Freenode IRC Network @@ -41,8 +41,8 @@ There is a very active chat channel at ``_. This is usually the best place to ask questions and find your way around. IRC stands for Internet Relay -Chat and it is a way to chat online in real time. You can also ask a question and come back to the -log files to read the answer later. Logs for the #openstack IRC channel are stored at +Chat and it is a way to chat online in real time. You can also ask a question and come back to the +log files to read the answer later. Logs for the #openstack IRC channel are stored at ``_. OpenStack Wiki @@ -58,7 +58,7 @@ ------------------- Launchpad is a code hosting service that hosts the Glance source code. From -Launchpad you can report bugs, ask questions, and register blueprints (feature requests). +Launchpad you can report bugs, ask questions, and register blueprints (feature requests). * `Learn about how to use bzr with launchpad `_ * `Launchpad Glance Page `_ @@ -79,5 +79,5 @@ Twitter ------- -Because all the cool kids do it: `@openstack `_. Also follow the +Because all the cool kids do it: `@openstack `_. Also follow the `#openstack `_ tag for relevant tweets. diff -Nru glance-2012.1~e4/doc/source/configuring.rst glance-2012.1~rc1~20120309.1315/doc/source/configuring.rst --- glance-2012.1~e4/doc/source/configuring.rst 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/configuring.rst 2012-03-09 16:01:13.000000000 +0000 @@ -278,7 +278,7 @@ Sets the authentication URL supplied to Swift when making calls to its storage system. For more information about the Swift authentication system, please -see the `Swift auth `_ +see the `Swift auth `_ documentation and the `overview of Swift authentication `_. @@ -366,7 +366,7 @@ Sets the main service URL supplied to S3 when making calls to its storage system. For more information about the S3 authentication system, please -see the `S3 documentation `_ +see the `S3 documentation `_ * ``s3_store_access_key=ACCESS_KEY`` diff -Nru glance-2012.1~e4/doc/source/conf.py glance-2012.1~rc1~20120309.1315/doc/source/conf.py --- glance-2012.1~e4/doc/source/conf.py 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/conf.py 2012-03-09 16:01:13.000000000 +0000 @@ -190,6 +190,8 @@ # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' +git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1" +html_last_updated_fmt = os.popen(git_cmd).read() # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. diff -Nru glance-2012.1~e4/doc/source/controllingservers.rst glance-2012.1~rc1~20120309.1315/doc/source/controllingservers.rst --- glance-2012.1~e4/doc/source/controllingservers.rst 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/controllingservers.rst 2012-03-09 16:01:13.000000000 +0000 @@ -66,7 +66,7 @@ Here is an example showing how you can manually start the ``glance-api`` server and ``glance-registry`` in a shell.:: - $ sudo glance-api glance-api.conf --debug & + $ sudo glance-api glance-api.conf --debug & jsuh@mc-ats1:~$ 2011-04-13 14:50:12 DEBUG [glance-api] ******************************************************************************** 2011-04-13 14:50:12 DEBUG [glance-api] Configuration options gathered from config file: 2011-04-13 14:50:12 DEBUG [glance-api] /home/jsuh/glance-api.conf @@ -83,7 +83,7 @@ 2011-04-13 14:50:12 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True 2011-04-13 14:50:12 DEBUG [eventlet.wsgi.server] (21354) wsgi starting up on http://65.114.169.29:9292/ - $ sudo glance-registry glance-registry.conf & + $ sudo glance-registry glance-registry.conf & jsuh@mc-ats1:~$ 2011-04-13 14:51:16 INFO [sqlalchemy.engine.base.Engine.0x...feac] PRAGMA table_info("images") 2011-04-13 14:51:16 INFO [sqlalchemy.engine.base.Engine.0x...feac] () 2011-04-13 14:51:16 DEBUG [sqlalchemy.engine.base.Engine.0x...feac] Col ('cid', 'name', 'type', 'notnull', 'dflt_value', 'pk') @@ -171,7 +171,7 @@ root 20039 6.0 0.1 25188 13356 ? Ss 12:51 0:00 /usr/bin/python /usr/bin/glance-registry /home/jsuh/glance-registry.conf jsuh 20042 0.0 0.0 3368 744 pts/1 S+ 12:51 0:00 grep glance - + The same configuration files are used by ``glance-control`` to start the Glance server programs, and you can specify (as the example above shows) a configuration file when starting the server. diff -Nru glance-2012.1~e4/doc/source/formats.rst glance-2012.1~rc1~20120309.1315/doc/source/formats.rst --- glance-2012.1~e4/doc/source/formats.rst 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/formats.rst 2012-03-09 16:01:13.000000000 +0000 @@ -51,7 +51,7 @@ * **iso** - An archive format for the data contents of an optical disc (e.g. CDROM). + An archive format for the data contents of an optical disc (e.g. CDROM). * **qcow2** diff -Nru glance-2012.1~e4/doc/source/glanceapi.rst glance-2012.1~rc1~20120309.1315/doc/source/glanceapi.rst --- glance-2012.1~e4/doc/source/glanceapi.rst 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/glanceapi.rst 2012-03-09 16:01:13.000000000 +0000 @@ -385,7 +385,7 @@ checksum of the image file data. When present, Glance will verify the checksum generated from the backend - store when storing your image against this value and return a + store when storing your image against this value and return a **400 Bad Request** if the values do not match. * ``x-image-meta-is-public`` diff -Nru glance-2012.1~e4/doc/source/glance.rst glance-2012.1~rc1~20120309.1315/doc/source/glance.rst --- glance-2012.1~e4/doc/source/glance.rst 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/glance.rst 2012-03-09 16:01:13.000000000 +0000 @@ -410,9 +410,9 @@ The 'limit' and 'marker' options are used by the index and details commands to control pagination. The 'marker' indicates the last record that was seen by the user. The page of results returned will begin after the provided image -ID. The 'limit' param indicates the page size. Each request to the api will be +ID. The 'limit' param indicates the page size. Each request to the api will be restricted to returning a maximum number of results. Without the 'force' -option, the user will be prompted before each page of results is fetched +option, the user will be prompted before each page of results is fetched from the API. Results from index and details commands may be ordered using the 'sort_key' @@ -474,7 +474,7 @@ The ``show`` command -------------------- -The ``show`` command displays detailed information about a specific image, +The ``show`` command displays detailed information about a specific image, specified with ````, as shown below:: $> glance show 771c0223-27b4-4789-a83d-79eb9c166578 --host=65.114.169.29 diff -Nru glance-2012.1~e4/doc/source/installing.rst glance-2012.1~rc1~20120309.1315/doc/source/installing.rst --- glance-2012.1~e4/doc/source/installing.rst 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/installing.rst 2012-03-09 16:01:13.000000000 +0000 @@ -89,12 +89,12 @@ to install the python-sphinx package 2. Clone Glance's trunk branch from GitHub:: - + $> git clone git://github.com/openstack/glance $> cd glance 3. Install Glance:: - + $> sudo python setup.py install Red Hat, Fedora diff -Nru glance-2012.1~e4/doc/source/man/glancecachemanage.rst glance-2012.1~rc1~20120309.1315/doc/source/man/glancecachemanage.rst --- glance-2012.1~e4/doc/source/man/glancecachemanage.rst 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/man/glancecachemanage.rst 2012-03-09 16:01:13.000000000 +0000 @@ -56,7 +56,7 @@ **-h, --help** show this help message and exit - + **-v, --verbose** Print more verbose output diff -Nru glance-2012.1~e4/doc/source/man/glance.rst glance-2012.1~rc1~20120309.1315/doc/source/man/glance.rst --- glance-2012.1~e4/doc/source/man/glance.rst 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/man/glance.rst 2012-03-09 16:01:13.000000000 +0000 @@ -125,7 +125,7 @@ Prevent select actions from requesting user confirmation **--dry-run** - Don't actually execute the command, just print output showing what + Don't actually execute the command, just print output showing what WOULD happen. **--can-share** diff -Nru glance-2012.1~e4/doc/source/registries.rst glance-2012.1~rc1~20120309.1315/doc/source/registries.rst --- glance-2012.1~e4/doc/source/registries.rst 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/registries.rst 2012-03-09 16:01:13.000000000 +0000 @@ -95,7 +95,7 @@ Results will be sorted in the direction ``DIR``. Accepted values are ``asc`` for ascending or ``desc`` (default) for descending. - + ``POST /images`` ---------------- diff -Nru glance-2012.1~e4/doc/source/_static/jquery.tweet.js glance-2012.1~rc1~20120309.1315/doc/source/_static/jquery.tweet.js --- glance-2012.1~e4/doc/source/_static/jquery.tweet.js 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/doc/source/_static/jquery.tweet.js 2012-03-09 16:01:13.000000000 +0000 @@ -1,5 +1,5 @@ (function($) { - + $.fn.tweet = function(o){ var s = { username: ["seaofclouds"], // [string] required, unless you want to display our tweets. :) it can be an array, just do ["username1","username2","etc"] @@ -17,9 +17,9 @@ loading_text: null, // [string] optional loading text, displayed while tweets load query: null // [string] optional search query }; - + if(o) $.extend(s, o); - + $.fn.extend({ linkUrl: function() { var returning = []; diff -Nru glance-2012.1~e4/etc/glance-api-paste.ini glance-2012.1~rc1~20120309.1315/etc/glance-api-paste.ini --- glance-2012.1~e4/etc/glance-api-paste.ini 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/etc/glance-api-paste.ini 2012-03-09 16:01:13.000000000 +0000 @@ -71,7 +71,9 @@ auth_port = 35357 auth_protocol = http auth_uri = http://127.0.0.1:5000/ -admin_token = 999888777666 +admin_tenant_name = %SERVICE_TENANT_NAME% +admin_user = %SERVICE_USER% +admin_password = %SERVICE_PASSWORD% [filter:auth-context] paste.filter_factory = glance.common.wsgi:filter_factory diff -Nru glance-2012.1~e4/etc/glance-registry-paste.ini glance-2012.1~rc1~20120309.1315/etc/glance-registry-paste.ini --- glance-2012.1~e4/etc/glance-registry-paste.ini 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/etc/glance-registry-paste.ini 2012-03-09 16:01:13.000000000 +0000 @@ -28,7 +28,9 @@ auth_port = 35357 auth_protocol = http auth_uri = http://127.0.0.1:5000/ -admin_token = 999888777666 +admin_tenant_name = %SERVICE_TENANT_NAME% +admin_user = %SERVICE_USER% +admin_password = %SERVICE_PASSWORD% [filter:auth-context] context_class = glance.registry.context.RequestContext diff -Nru glance-2012.1~e4/glance/api/v1/images.py glance-2012.1~rc1~20120309.1315/glance/api/v1/images.py --- glance-2012.1~e4/glance/api/v1/images.py 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/api/v1/images.py 2012-03-09 16:01:13.000000000 +0000 @@ -187,8 +187,8 @@ params = {'filters': self._get_filters(req)} for PARAM in SUPPORTED_PARAMS: - if PARAM in req.str_params: - params[PARAM] = req.str_params.get(PARAM) + if PARAM in req.params: + params[PARAM] = req.params.get(PARAM) return params def _get_filters(self, req): @@ -199,9 +199,9 @@ :retval a dict of key/value filters """ query_filters = {} - for param in req.str_params: + for param in req.params: if param in SUPPORTED_FILTERS or param.startswith('property-'): - query_filters[param] = req.str_params.get(param) + query_filters[param] = req.params.get(param) if not filters.validate(param, query_filters[param]): raise HTTPBadRequest('Bad value passed to filter %s ' 'got %s' % (param, diff -Nru glance-2012.1~e4/glance/registry/api/v1/images.py glance-2012.1~rc1~20120309.1315/glance/registry/api/v1/images.py --- glance-2012.1~e4/glance/registry/api/v1/images.py 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/registry/api/v1/images.py 2012-03-09 16:01:13.000000000 +0000 @@ -156,12 +156,12 @@ else: filters['is_public'] = True - for param in req.str_params: + for param in req.params: if param in SUPPORTED_FILTERS: - filters[param] = req.str_params.get(param) + filters[param] = req.params.get(param) if param.startswith('property-'): _param = param[9:] - properties[_param] = req.str_params.get(param) + properties[_param] = req.params.get(param) if 'changes-since' in filters: isotime = filters['changes-since'] @@ -196,7 +196,7 @@ def _get_limit(self, req): """Parse a limit query param into something usable.""" try: - limit = int(req.str_params.get('limit', + limit = int(req.params.get('limit', self.conf.limit_param_default)) except ValueError: raise exc.HTTPBadRequest(_("limit param must be an integer")) @@ -208,7 +208,7 @@ def _get_marker(self, req): """Parse a marker query param into something usable.""" - marker = req.str_params.get('marker', None) + marker = req.params.get('marker', None) if marker and not utils.is_uuid_like(marker): msg = _('Invalid marker format') @@ -218,7 +218,7 @@ def _get_sort_key(self, req): """Parse a sort key query param from the request object.""" - sort_key = req.str_params.get('sort_key', None) + sort_key = req.params.get('sort_key', None) if sort_key is not None and sort_key not in SUPPORTED_SORT_KEYS: _keys = ', '.join(SUPPORTED_SORT_KEYS) msg = _("Unsupported sort_key. Acceptable values: %s") % (_keys,) @@ -227,7 +227,7 @@ def _get_sort_dir(self, req): """Parse a sort direction query param from the request object.""" - sort_dir = req.str_params.get('sort_dir', None) + sort_dir = req.params.get('sort_dir', None) if sort_dir is not None and sort_dir not in SUPPORTED_SORT_DIRS: _keys = ', '.join(SUPPORTED_SORT_DIRS) msg = _("Unsupported sort_dir. Acceptable values: %s") % (_keys,) @@ -245,7 +245,7 @@ def _get_is_public(self, req): """Parse is_public into something usable.""" - is_public = req.str_params.get('is_public', None) + is_public = req.params.get('is_public', None) if is_public is None: # NOTE(vish): This preserves the default value of showing only @@ -263,7 +263,7 @@ def _parse_deleted_filter(self, req): """Parse deleted into something usable.""" - deleted = req.str_params.get('deleted') + deleted = req.params.get('deleted') if deleted is None: return None return utils.bool_from_string(deleted) diff -Nru glance-2012.1~e4/glance/registry/db/migrate_repo/versions/001_add_images_table.py glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/001_add_images_table.py --- glance-2012.1~e4/glance/registry/db/migrate_repo/versions/001_add_images_table.py 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/001_add_images_table.py 2012-03-09 16:01:13.000000000 +0000 @@ -37,7 +37,7 @@ Column('deleted', Boolean(), nullable=False, default=False, index=True), mysql_engine='InnoDB', - useexisting=True) + extend_existing=True) return images diff -Nru glance-2012.1~e4/glance/registry/db/migrate_repo/versions/002_add_image_properties_table.py glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/002_add_image_properties_table.py --- glance-2012.1~e4/glance/registry/db/migrate_repo/versions/002_add_image_properties_table.py 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/002_add_image_properties_table.py 2012-03-09 16:01:13.000000000 +0000 @@ -42,7 +42,7 @@ index=True), UniqueConstraint('image_id', 'key'), mysql_engine='InnoDB', - useexisting=True) + extend_existing=True) Index('ix_image_properties_image_id_key', image_properties.c.image_id, image_properties.c.key) diff -Nru glance-2012.1~e4/glance/registry/db/migrate_repo/versions/003_sqlite_downgrade.sql glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/003_sqlite_downgrade.sql --- glance-2012.1~e4/glance/registry/db/migrate_repo/versions/003_sqlite_downgrade.sql 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/003_sqlite_downgrade.sql 2012-03-09 16:01:13.000000000 +0000 @@ -2,16 +2,16 @@ /* Make changes to the base images table */ CREATE TEMPORARY TABLE images_backup ( - id INTEGER NOT NULL, - name VARCHAR(255), - size INTEGER, - status VARCHAR(30) NOT NULL, - is_public BOOLEAN NOT NULL, - location TEXT, - created_at DATETIME NOT NULL, - updated_at DATETIME, - deleted_at DATETIME, - deleted BOOLEAN NOT NULL, + id INTEGER NOT NULL, + name VARCHAR(255), + size INTEGER, + status VARCHAR(30) NOT NULL, + is_public BOOLEAN NOT NULL, + location TEXT, + created_at DATETIME NOT NULL, + updated_at DATETIME, + deleted_at DATETIME, + deleted BOOLEAN NOT NULL, PRIMARY KEY (id) ); @@ -22,19 +22,19 @@ DROP TABLE images; CREATE TABLE images ( - id INTEGER NOT NULL, - name VARCHAR(255), - size INTEGER, + id INTEGER NOT NULL, + name VARCHAR(255), + size INTEGER, type VARCHAR(30), - status VARCHAR(30) NOT NULL, - is_public BOOLEAN NOT NULL, - location TEXT, - created_at DATETIME NOT NULL, - updated_at DATETIME, - deleted_at DATETIME, - deleted BOOLEAN NOT NULL, - PRIMARY KEY (id), - CHECK (is_public IN (0, 1)), + status VARCHAR(30) NOT NULL, + is_public BOOLEAN NOT NULL, + location TEXT, + created_at DATETIME NOT NULL, + updated_at DATETIME, + deleted_at DATETIME, + deleted BOOLEAN NOT NULL, + PRIMARY KEY (id), + CHECK (is_public IN (0, 1)), CHECK (deleted IN (0, 1)) ); CREATE INDEX ix_images_deleted ON images (deleted); diff -Nru glance-2012.1~e4/glance/registry/db/migrate_repo/versions/003_sqlite_upgrade.sql glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/003_sqlite_upgrade.sql --- glance-2012.1~e4/glance/registry/db/migrate_repo/versions/003_sqlite_upgrade.sql 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/003_sqlite_upgrade.sql 2012-03-09 16:01:13.000000000 +0000 @@ -17,16 +17,16 @@ /* Make changes to the base images table */ CREATE TEMPORARY TABLE images_backup ( - id INTEGER NOT NULL, - name VARCHAR(255), - size INTEGER, - status VARCHAR(30) NOT NULL, - is_public BOOLEAN NOT NULL, - location TEXT, - created_at DATETIME NOT NULL, - updated_at DATETIME, - deleted_at DATETIME, - deleted BOOLEAN NOT NULL, + id INTEGER NOT NULL, + name VARCHAR(255), + size INTEGER, + status VARCHAR(30) NOT NULL, + is_public BOOLEAN NOT NULL, + location TEXT, + created_at DATETIME NOT NULL, + updated_at DATETIME, + deleted_at DATETIME, + deleted BOOLEAN NOT NULL, PRIMARY KEY (id) ); @@ -37,20 +37,20 @@ DROP TABLE images; CREATE TABLE images ( - id INTEGER NOT NULL, - name VARCHAR(255), - size INTEGER, - status VARCHAR(30) NOT NULL, - is_public BOOLEAN NOT NULL, - location TEXT, - created_at DATETIME NOT NULL, - updated_at DATETIME, - deleted_at DATETIME, - deleted BOOLEAN NOT NULL, + id INTEGER NOT NULL, + name VARCHAR(255), + size INTEGER, + status VARCHAR(30) NOT NULL, + is_public BOOLEAN NOT NULL, + location TEXT, + created_at DATETIME NOT NULL, + updated_at DATETIME, + deleted_at DATETIME, + deleted BOOLEAN NOT NULL, disk_format VARCHAR(20), container_format VARCHAR(20), - PRIMARY KEY (id), - CHECK (is_public IN (0, 1)), + PRIMARY KEY (id), + CHECK (is_public IN (0, 1)), CHECK (deleted IN (0, 1)) ); CREATE INDEX ix_images_deleted ON images (deleted); diff -Nru glance-2012.1~e4/glance/registry/db/migrate_repo/versions/004_add_checksum.py glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/004_add_checksum.py --- glance-2012.1~e4/glance/registry/db/migrate_repo/versions/004_add_checksum.py 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/004_add_checksum.py 2012-03-09 16:01:13.000000000 +0000 @@ -45,7 +45,7 @@ index=True), Column('checksum', String(32)), mysql_engine='InnoDB', - useexisting=True) + extend_existing=True) return images diff -Nru glance-2012.1~e4/glance/registry/db/migrate_repo/versions/006_sqlite_downgrade.sql glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/006_sqlite_downgrade.sql --- glance-2012.1~e4/glance/registry/db/migrate_repo/versions/006_sqlite_downgrade.sql 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/006_sqlite_downgrade.sql 2012-03-09 16:01:13.000000000 +0000 @@ -5,14 +5,14 @@ BEGIN TRANSACTION; CREATE TEMPORARY TABLE image_properties_backup ( - id INTEGER NOT NULL, - image_id INTEGER NOT NULL, - key VARCHAR(255) NOT NULL, - value TEXT, - created_at DATETIME NOT NULL, - updated_at DATETIME, - deleted_at DATETIME, - deleted BOOLEAN NOT NULL, + id INTEGER NOT NULL, + image_id INTEGER NOT NULL, + key VARCHAR(255) NOT NULL, + value TEXT, + created_at DATETIME NOT NULL, + updated_at DATETIME, + deleted_at DATETIME, + deleted BOOLEAN NOT NULL, PRIMARY KEY (id) ); @@ -23,17 +23,17 @@ DROP TABLE image_properties; CREATE TABLE image_properties ( - id INTEGER NOT NULL, - image_id INTEGER NOT NULL, - key VARCHAR(255) NOT NULL, - value TEXT, - created_at DATETIME NOT NULL, - updated_at DATETIME, - deleted_at DATETIME, - deleted BOOLEAN NOT NULL, - PRIMARY KEY (id), - CHECK (deleted IN (0, 1)), - UNIQUE (image_id, key), + id INTEGER NOT NULL, + image_id INTEGER NOT NULL, + key VARCHAR(255) NOT NULL, + value TEXT, + created_at DATETIME NOT NULL, + updated_at DATETIME, + deleted_at DATETIME, + deleted BOOLEAN NOT NULL, + PRIMARY KEY (id), + CHECK (deleted IN (0, 1)), + UNIQUE (image_id, key), FOREIGN KEY(image_id) REFERENCES images (id) ); CREATE INDEX ix_image_properties_key ON image_properties (key); diff -Nru glance-2012.1~e4/glance/registry/db/migrate_repo/versions/006_sqlite_upgrade.sql glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/006_sqlite_upgrade.sql --- glance-2012.1~e4/glance/registry/db/migrate_repo/versions/006_sqlite_upgrade.sql 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/006_sqlite_upgrade.sql 2012-03-09 16:01:13.000000000 +0000 @@ -5,14 +5,14 @@ BEGIN TRANSACTION; CREATE TEMPORARY TABLE image_properties_backup ( - id INTEGER NOT NULL, - image_id INTEGER NOT NULL, - name VARCHAR(255) NOT NULL, - value TEXT, - created_at DATETIME NOT NULL, - updated_at DATETIME, - deleted_at DATETIME, - deleted BOOLEAN NOT NULL, + id INTEGER NOT NULL, + image_id INTEGER NOT NULL, + name VARCHAR(255) NOT NULL, + value TEXT, + created_at DATETIME NOT NULL, + updated_at DATETIME, + deleted_at DATETIME, + deleted BOOLEAN NOT NULL, PRIMARY KEY (id) ); @@ -23,17 +23,17 @@ DROP TABLE image_properties; CREATE TABLE image_properties ( - id INTEGER NOT NULL, - image_id INTEGER NOT NULL, - name VARCHAR(255) NOT NULL, - value TEXT, - created_at DATETIME NOT NULL, - updated_at DATETIME, - deleted_at DATETIME, - deleted BOOLEAN NOT NULL, - PRIMARY KEY (id), - CHECK (deleted IN (0, 1)), - UNIQUE (image_id, name), + id INTEGER NOT NULL, + image_id INTEGER NOT NULL, + name VARCHAR(255) NOT NULL, + value TEXT, + created_at DATETIME NOT NULL, + updated_at DATETIME, + deleted_at DATETIME, + deleted BOOLEAN NOT NULL, + PRIMARY KEY (id), + CHECK (deleted IN (0, 1)), + UNIQUE (image_id, name), FOREIGN KEY(image_id) REFERENCES images (id) ); CREATE INDEX ix_image_properties_name ON image_properties (name); diff -Nru glance-2012.1~e4/glance/registry/db/migrate_repo/versions/007_add_owner.py glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/007_add_owner.py --- glance-2012.1~e4/glance/registry/db/migrate_repo/versions/007_add_owner.py 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/007_add_owner.py 2012-03-09 16:01:13.000000000 +0000 @@ -47,7 +47,7 @@ Column('checksum', String(32)), Column('owner', String(255)), mysql_engine='InnoDB', - useexisting=True) + extend_existing=True) return images diff -Nru glance-2012.1~e4/glance/registry/db/migrate_repo/versions/008_add_image_members_table.py glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/008_add_image_members_table.py --- glance-2012.1~e4/glance/registry/db/migrate_repo/versions/008_add_image_members_table.py 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/008_add_image_members_table.py 2012-03-09 16:01:13.000000000 +0000 @@ -61,7 +61,7 @@ index=True), UniqueConstraint('image_id', 'member'), mysql_engine='InnoDB', - useexisting=True) + extend_existing=True) Index('ix_image_members_image_id_member', image_members.c.image_id, image_members.c.member) diff -Nru glance-2012.1~e4/glance/registry/db/migrate_repo/versions/009_add_mindisk_and_minram.py glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/009_add_mindisk_and_minram.py --- glance-2012.1~e4/glance/registry/db/migrate_repo/versions/009_add_mindisk_and_minram.py 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/registry/db/migrate_repo/versions/009_add_mindisk_and_minram.py 2012-03-09 16:01:13.000000000 +0000 @@ -47,7 +47,7 @@ Column('min_disk', Integer(), default=0), Column('min_ram', Integer(), default=0), mysql_engine='InnoDB', - useexisting=True) + extend_existing=True) return images diff -Nru glance-2012.1~e4/glance/tests/functional/test_bin_glance.py glance-2012.1~rc1~20120309.1315/glance/tests/functional/test_bin_glance.py --- glance-2012.1~e4/glance/tests/functional/test_bin_glance.py 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/tests/functional/test_bin_glance.py 2012-03-09 16:01:13.000000000 +0000 @@ -47,6 +47,62 @@ msg = 'expected "%s" to start with "%s"' % (str, prefix) self.assertTrue(str.startswith(prefix), msg) + def test_add_with_location_and_id(self): + self.cleanup() + self.start_servers(**self.__dict__.copy()) + + api_port = self.api_port + registry_port = self.registry_port + + # 0. Verify no public images + cmd = "bin/glance --port=%d index" % api_port + + exitcode, out, err = execute(cmd) + + self.assertEqual(0, exitcode) + self.assertEqual('', out.strip()) + + image_id = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" + + # 1a. Add public image + cmd = minimal_add_command(api_port, + 'MyImage', + 'id=%s' % image_id, + 'location=http://example.com') + exitcode, out, err = execute(cmd) + + self.assertEqual(0, exitcode) + expected = 'Added new image with ID: %s' % image_id + self.assertTrue(expected in out) + + # 1b. Add public image with non-uuid id + cmd = minimal_add_command(api_port, + 'MyImage', + 'id=12345', + 'location=http://example.com') + exitcode, out, err = execute(cmd, expected_exitcode=1) + + self.assertEqual(1, exitcode) + self.assertTrue('Invalid image id format' in out) + + # 2. Verify image added as public image + cmd = "bin/glance --port=%d index" % api_port + + exitcode, out, err = execute(cmd) + + self.assertEqual(0, exitcode) + lines = out.split("\n")[2:-1] + self.assertEqual(1, len(lines)) + + line = lines[0] + + image_id, name, disk_format, container_format, size = \ + [c.strip() for c in line.split()] + self.assertEqual('MyImage', name) + + self.assertEqual('0', size, "Expected image to be 0 bytes in size, " + "but got %s. " % size) + def test_add_with_location(self): self.cleanup() self.start_servers(**self.__dict__.copy()) diff -Nru glance-2012.1~e4/glance/vcsversion.py glance-2012.1~rc1~20120309.1315/glance/vcsversion.py --- glance-2012.1~e4/glance/vcsversion.py 2012-03-01 13:47:54.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance/vcsversion.py 2012-03-09 16:03:56.000000000 +0000 @@ -2,6 +2,6 @@ # This file is automatically generated by setup.py, So don't edit it. :) version_info = { 'branch_nick': '(no', - 'revision_id': '1de0cec728b1e73b8accfc2eb9e4936fd62ca284', - 'revno': 1305 + 'revision_id': '7041f19696e75c38c27e8dacaa7bbc8d56144af8', + 'revno': 1315 } diff -Nru glance-2012.1~e4/glance.egg-info/SOURCES.txt glance-2012.1~rc1~20120309.1315/glance.egg-info/SOURCES.txt --- glance-2012.1~e4/glance.egg-info/SOURCES.txt 2012-03-01 13:47:55.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/glance.egg-info/SOURCES.txt 2012-03-09 16:03:57.000000000 +0000 @@ -110,6 +110,7 @@ glance/image_cache/drivers/base.py glance/image_cache/drivers/sqlite.py glance/image_cache/drivers/xattr.py +glance/locale/__init__.py glance/notifier/__init__.py glance/notifier/notify_kombu.py glance/notifier/notify_log.py diff -Nru glance-2012.1~e4/setup.cfg glance-2012.1~rc1~20120309.1315/setup.cfg --- glance-2012.1~e4/setup.cfg 2012-03-01 13:47:55.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/setup.cfg 2012-03-09 16:03:57.000000000 +0000 @@ -8,6 +8,20 @@ tag_date = 0 tag_svn_revision = 0 +[compile_catalog] +directory = glance/locale +domain = glance + +[update_catalog] +domain = glance +output_dir = glance/locale +input_file = glance/locale/glance.pot + +[extract_messages] +keywords = _ gettext ngettext l_ lazy_gettext +mapping_file = babel.cfg +output_file = glance/locale/glance.pot + [nosetests] verbosity = 2 detailed-errors = 1 diff -Nru glance-2012.1~e4/setup.py glance-2012.1~rc1~20120309.1315/setup.py --- glance-2012.1~e4/setup.py 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/setup.py 2012-03-09 16:01:13.000000000 +0000 @@ -21,19 +21,6 @@ from setuptools import setup, find_packages from setuptools.command.sdist import sdist -# In order to run the i18n commands for compiling and -# installing message catalogs, we use DistUtilsExtra. -# Don't make this a hard requirement, but warn that -# i18n commands won't be available if DistUtilsExtra is -# not installed... -try: - from DistUtilsExtra.auto import setup -except ImportError: - from setuptools import setup - print "Warning: DistUtilsExtra required to use i18n builders. " - print "To build glance with support for message catalogs, you need " - print " https://launchpad.net/python-distutils-extra >= 2.18" - gettext.install('glance', unicode=1) from glance import version diff -Nru glance-2012.1~e4/tools/test-requires glance-2012.1~rc1~20120309.1315/tools/test-requires --- glance-2012.1~e4/tools/test-requires 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/tools/test-requires 2012-03-09 16:01:13.000000000 +0000 @@ -1,6 +1,9 @@ # Packages needed for dev testing distribute>=0.6.24 +# For translations processing +Babel + # Needed for testing mox nose diff -Nru glance-2012.1~e4/tox.ini glance-2012.1~rc1~20120309.1315/tox.ini --- glance-2012.1~e4/tox.ini 2012-03-01 13:45:51.000000000 +0000 +++ glance-2012.1~rc1~20120309.1315/tox.ini 2012-03-09 16:01:13.000000000 +0000 @@ -17,8 +17,11 @@ [testenv:venv] commands = {posargs} -[testenv:hudson] +[testenv:jenkins] downloadcache = ~/cache/pip +commands = + pip freeze + nosetests [testenv:jenkins26] basepython = python2.6