debian/0000775000000000000000000000000012075726373007204 5ustar debian/control0000664000000000000000000000166012075726367010615 0ustar Source: python-rackspace-cloudservers Section: python Priority: optional Homepage: http://packages.python.org/python-cloudservers Maintainer: Soren Hansen Build-Depends: cdbs, debhelper (>= 5.0.38), python-all (>= 2.3.5-11), python-support, python-distribute, python-nose, python-prettytable, python-argparse, python-mock, python-httplib2 XS-Python-Version: >= 2.5 Standards-Version: 3.9.4 Package: python-rackspace-cloudservers Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python-pkg-resources, python-prettytable, python-argparse, python-httplib2, python (>= 2.6) | python-simplejson Replaces: python-cloudservers Conflicts: python-cloudservers XB-Python-Version: ${python:Versions} Description: client library for Rackspace's Cloud Servers API Python library and CLI tool for interacting with Rackspace's Cloud Servers, as well as a CLI tool. They implement and expose 100% of the Cloud Servers API. debian/watch0000664000000000000000000000020312075726367010233 0ustar version=3 opts=dversionmangle=s/~// http://pypi.python.org/packages/source/p/python-cloudservers/python-cloudservers-(.*)\.tar\.gz debian/source/0000775000000000000000000000000012075726373010504 5ustar debian/source/format0000664000000000000000000000001412075726367011715 0ustar 3.0 (quilt) debian/rules0000775000000000000000000000061112075726367010265 0ustar #!/usr/bin/make -f DEB_PYTHON_SYSTEM = pysupport include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/python-distutils.mk clean:: rm -f dist/python_cloudservers-1.0a5-py2.6.egg test-stamp || /bin/true find . -name '._*' -print0 | xargs -0 rm || /bin/true build/python-rackspace-cloudservers:: test-stamp test-stamp: # @nosetests $(CURDIR)/tests touch test-stamp debian/manpages0000664000000000000000000000002612075726367010723 0ustar debian/cloudservers.1 debian/compat0000664000000000000000000000000212075726367010405 0ustar 5 debian/cloudservers.10000664000000000000000000000434412075726367012016 0ustar .TH CLOUDSERVERS "1" "March 2010" "cloudservers" "User Commands" .SH NAME cloudservers \- Command-line interface to the Cloud Servers API. .SH SYNOPSIS .B "cloudservers" [ .I \-\-username USERNAME ] [ .I \-\-apikey APIKEY ] .I .SH DESCRIPTION cloudservers is a command line interface to the Rackspace Cloud Servers API. .PP .SH COMMAND OVERVIEW .TP .B "cloudservers backup\-schedule" Show or edit the backup schedule for a server. .TP .B "cloudservers backup\-schedule\-delete" Delete the backup schedule for a server. .TP .B "cloudservers boot" Boot a new server. .TP .B "cloudservers delete" Immediately shut down and delete a server. .TP .B "cloudservers flavor\-list" Print a list of available 'flavors' (sizes of servers). .TP .B "cloudservers help" Display help about this program or one of its subcommands. .TP .B "cloudservers image\-create" Create a new image by taking a snapshot of a running server. .TP .B "cloudservers image\-delete" Delete an image. .TP .B "cloudservers image\-list" Print a list of available images to boot from. .TP .B "cloudservers ip\-share" Share an IP address from the given IP group onto a server. .TP .B "cloudservers ip\-unshare" Stop sharing an given address with a server. .TP .B "cloudservers ipgroup\-create" Create a new IP group. .TP .B "cloudservers ipgroup\-delete" Delete an IP group. .TP .B "cloudservers ipgroup\-list" Show IP groups. .TP .B "cloudservers ipgroup\-show" Show details about a particular IP group. .TP .B "cloudservers list" List active servers. .TP .B "cloudservers reboot" Reboot a server. .TP .B "cloudservers rebuild" Shutdown, re\-image, and re\-boot a server. .TP .B "cloudservers rename" Rename a server. .TP .B "cloudservers resize" Resize a server. .TP .B "cloudservers resize\-confirm" Confirm a previous resize. .TP .B "cloudservers resize\-revert" Revert a previous resize (and return to the previous VM). .TP .B "cloudservers root\-password" Change the root password for a server. .TP .B "cloudservers show" Show details about the given server. .SS "Optional arguments:" .TP \fB\-\-username\fR USERNAME Defaults to env[CLOUD_SERVERS_USERNAME]. .TP \fB\-\-apikey\fR APIKEY Defaults to env[CLOUD_SERVERS_API_KEY]. .PP See "cloudservers help COMMAND" for help on a specific command. .PP debian/pycompat0000664000000000000000000000000212075726367010756 0ustar 2 debian/patches/0000775000000000000000000000000012075726373010633 5ustar debian/patches/fresh-api-responses0000664000000000000000000000467512075726367014472 0ustar Description: Ensure fresh API results from the backend server The Rackspace Cloud Servers API gives cached results by default. This patch adds a GET parameter to the appropriate requests so that the backend server is forced to give a fresh answer. Author: Soren Hansen Forwarded: http://github.com/sorenh/python-cloudservers/commit/0bcc42cc31718cfbe64cbf916968d4f8a8a18b96 --- python-cloudservers-1.0~a5.orig/tests/test_client.py +++ python-cloudservers-1.0~a5/tests/test_client.py @@ -17,7 +17,7 @@ def test_get(): cl = client() with mock.patch_object(httplib2.Http, "request", mock_request): resp, body = cl.get("/hi") - mock_request.assert_called_with("http://example.com/hi", "GET", + mock_request.assert_called_with("http://example.com/hi?", "GET", headers={"X-Auth-Token": "token", "User-Agent": cl.USER_AGENT}) # Automatic JSON parsing assert_equal(body, {"hi":"there"}) @@ -26,10 +26,10 @@ def test_post(): cl = client() with mock.patch_object(httplib2.Http, "request", mock_request): cl.post("/hi", body=[1, 2, 3]) - mock_request.assert_called_with("http://example.com/hi", "POST", + mock_request.assert_called_with("http://example.com/hi?", "POST", headers = { "X-Auth-Token": "token", "Content-Type": "application/json", "User-Agent": cl.USER_AGENT}, body = '[1, 2, 3]' - ) \ No newline at end of file + ) --- python-cloudservers-1.0~a5.orig/cloudservers/client.py +++ python-cloudservers-1.0~a5/cloudservers/client.py @@ -58,6 +58,11 @@ class CloudServersClient(httplib2.Http): raise ex def get(self, url, **kwargs): + # The Rackspace API returns cached results by default. + # We like our responses nice and fresh, though, so we + # stick a fake GET parameter on the URL. + if not '?' in url: + url += '?fresh' return self._cs_request(url, 'GET', **kwargs) def post(self, url, **kwargs): @@ -73,4 +78,4 @@ class CloudServersClient(httplib2.Http): headers = {'X-Auth-User': self.user, 'X-Auth-Key': self.apikey} resp, body = self.request(self.AUTH_URL, 'GET', headers=headers) self.management_url = resp['x-server-management-url'] - self.auth_token = resp['x-auth-token'] \ No newline at end of file + self.auth_token = resp['x-auth-token'] debian/patches/autogeneration-fallout0000664000000000000000000001610412075726367015253 0ustar Description: Autogenerated stuff changes during build Upstream tarball contains autogenerated stuff, which looks slightly different being built with our tool chain. Origin: other --- python-cloudservers-1.0~a5.orig/python_cloudservers.egg-info/PKG-INFO +++ python-cloudservers-1.0~a5/python_cloudservers.egg-info/PKG-INFO @@ -29,54 +29,54 @@ Description: Python bindings to the Rack with the ``--username`` and ``--apikey`` params, but it's easier to just set them as environment variables:: - export CLOUD_SERVERS_USERNAME=jacobian - export CLOUD_SERVERS_API_KEY=yadayada - + export CLOUD_SERVERS_USERNAME=jacobian + export CLOUD_SERVERS_API_KEY=yadayada + You'll find complete documentation on the shell by running ``cloudservers help``:: + + usage: cloudservers [--username USERNAME] [--apikey APIKEY] ... - usage: cloudservers [--username USERNAME] [--apikey APIKEY] ... - - Command-line interface to the Cloud Servers API. + Command-line interface to the Cloud Servers API. - Positional arguments: - - backup-schedule Show or edit the backup schedule for a server. - backup-schedule-delete - Delete the backup schedule for a server. - boot Boot a new server. - delete Immediately shut down and delete a server. - flavor-list Print a list of available 'flavors' (sizes of - servers). - help Display help about this program or one of its - subcommands. - image-create Create a new image by taking a snapshot of a running - server. - image-delete Delete an image. - image-list Print a list of available images to boot from. - ip-share Share an IP address from the given IP group onto a - server. - ip-unshare Stop sharing an given address with a server. - ipgroup-create Create a new IP group. - ipgroup-delete Delete an IP group. - ipgroup-list Show IP groups. - ipgroup-show Show details about a particular IP group. - list List active servers. - reboot Reboot a server. - rebuild Shutdown, re-image, and re-boot a server. - rename Rename a server. - resize Resize a server. - resize-confirm Confirm a previous resize. - resize-revert Revert a previous resize (and return to the previous - VM). - root-password Change the root password for a server. - show Show details about the given server. - - Optional arguments: - --username USERNAME Defaults to env[CLOUD_SERVERS_USERNAME]. - --apikey APIKEY Defaults to env[CLOUD_SERVERS_API_KEY]. - - See "cloudservers help COMMAND" for help on a specific command. + Positional arguments: + + backup-schedule Show or edit the backup schedule for a server. + backup-schedule-delete + Delete the backup schedule for a server. + boot Boot a new server. + delete Immediately shut down and delete a server. + flavor-list Print a list of available 'flavors' (sizes of + servers). + help Display help about this program or one of its + subcommands. + image-create Create a new image by taking a snapshot of a running + server. + image-delete Delete an image. + image-list Print a list of available images to boot from. + ip-share Share an IP address from the given IP group onto a + server. + ip-unshare Stop sharing an given address with a server. + ipgroup-create Create a new IP group. + ipgroup-delete Delete an IP group. + ipgroup-list Show IP groups. + ipgroup-show Show details about a particular IP group. + list List active servers. + reboot Reboot a server. + rebuild Shutdown, re-image, and re-boot a server. + rename Rename a server. + resize Resize a server. + resize-confirm Confirm a previous resize. + resize-revert Revert a previous resize (and return to the previous + VM). + root-password Change the root password for a server. + show Show details about the given server. + + Optional arguments: + --username USERNAME Defaults to env[CLOUD_SERVERS_USERNAME]. + --apikey APIKEY Defaults to env[CLOUD_SERVERS_API_KEY]. + See "cloudservers help COMMAND" for help on a specific command. + Python API ---------- @@ -86,32 +86,32 @@ Description: Python bindings to the Rack By way of a quick-start:: - >>> import cloudservers - >>> cs = cloudservers.CloudServers(USERNAME, API_KEY) - >>> cs.flavors.list() - [...] - >>> cs.servers.list() - [...] - >>> s = cs.servers.create(image=2, flavor=1, name='myserver') - - ... time passes ... - - >>> s.reboot() - - ... time passes ... - - >>> s.delete() + >>> import cloudservers + >>> cs = cloudservers.CloudServers(USERNAME, API_KEY) + >>> cs.flavors.list() + [...] + >>> cs.servers.list() + [...] + >>> s = cs.servers.create(image=2, flavor=1, name='myserver') + + ... time passes ... + + >>> s.reboot() + + ... time passes ... + + >>> s.delete() FAQ === What's wrong with libcloud? - Nothing! However, as a cross-service binding it's by definition lowest - common denominator; I needed access to the Rackspace-specific APIs (shared - IP groups, image snapshots, resizing, etc.). I also wanted a command-line - utility. - + Nothing! However, as a cross-service binding it's by definition lowest + common denominator; I needed access to the Rackspace-specific APIs (shared + IP groups, image snapshots, resizing, etc.). I also wanted a command-line + utility. + Platform: UNKNOWN Classifier: Development Status :: 3 - Alpha debian/patches/cleaner-sources.txt0000664000000000000000000000220412075726367014467 0ustar Description: Remove .pyc files and such from SOURCES.txt SOURCES.txt from upstream contains a bunch of artefacts, which we remove. Author: Soren Hansen --- python-cloudservers-1.0~a5.orig/python_cloudservers.egg-info/SOURCES.txt +++ python-cloudservers-1.0~a5/python_cloudservers.egg-info/SOURCES.txt @@ -31,29 +31,14 @@ python_cloudservers.egg-info/entry_point python_cloudservers.egg-info/requires.txt python_cloudservers.egg-info/top_level.txt tests/__init__.py -tests/__init__.pyc tests/fakeserver.py -tests/fakeserver.pyc -tests/livetests.pyc tests/test_auth.py -tests/test_auth.pyc tests/test_backup_schedules.py -tests/test_backup_schedules.pyc tests/test_base.py -tests/test_base.pyc tests/test_client.py -tests/test_client.pyc tests/test_flavors.py -tests/test_flavors.pyc tests/test_images.py -tests/test_images.pyc tests/test_ipgroups.py -tests/test_ipgroups.pyc -tests/test_live.pyc -tests/test_server_addresses.pyc tests/test_servers.py -tests/test_servers.pyc tests/test_shell.py -tests/test_shell.pyc -tests/utils.py -tests/utils.pyc \ No newline at end of file +tests/utils.py \ No newline at end of file debian/patches/series0000664000000000000000000000007712075726367012057 0ustar fresh-api-responses cleaner-sources.txt autogeneration-fallout debian/changelog0000664000000000000000000000146612075726367011070 0ustar python-rackspace-cloudservers (1.0~a5-0ubuntu3) raring; urgency=low * debian/control: - Add Homepage field. - Bump Standards-Version to 3.9.4. * debian/copyright: Remove reference to /usr/share/common-licenses/BSD, as the full text is included in debian/copyright due to its brevity. -- Logan Rosen Fri, 11 Jan 2013 00:22:27 -0500 python-rackspace-cloudservers (1.0~a5-0ubuntu2) lucid; urgency=low * debian/control: Rename to python-rackspace-cloudservers, since this is a Rackspace Cloud specific library (LP: #563434) -- Thierry Carrez Tue, 20 Apr 2010 09:03:29 +0200 python-cloudservers (1.0~a5-0ubuntu1) lucid; urgency=low * Initial upload. (FFe: LP: #559462) -- Soren Hansen Mon, 29 Mar 2010 22:22:49 -0500 debian/copyright0000664000000000000000000000346012075726367011145 0ustar This package was debianized by Soren Hansen on Tue, 30 Mar 2010 17:26:24 -0500. It was downloaded from http://pypi.python.org/pypi/python-cloudservers/ Copyright: Copyright 2009, Jacob Kaplan-Moss Authors: Jacob Kaplan-Moss License: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The same license applies to the Debian packaging.