Skip to content

Commit

Permalink
Version 1.5.1 - lots of autoscale enhancements and other improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdLeafe committed Oct 4, 2013
1 parent 82aed39 commit 114f6d9
Show file tree
Hide file tree
Showing 179 changed files with 5,148 additions and 1,227 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
build/
dist/
rpm-build/
rpms/
*~
.DS_Store
*.swp
Expand Down
44 changes: 44 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
PACKAGE := $(shell basename *.spec .spec)
ARCH = noarch
RPMBUILD = rpmbuild --define "_topdir %(pwd)/rpm-build" \
--define "_builddir %{_topdir}" \
--define "_rpmdir %(pwd)/rpms" \
--define "_srcrpmdir %{_rpmdir}" \
--define "_sourcedir %{_topdir}"
PYTHON = $(which python)

all: rpms

clean:
rm -rf dist/ build/ rpm-build/ rpms/
rm -rf docs/*.gz MANIFEST *~
find . -name '*.pyc' -exec rm -f {} \;

build: clean
python setup.py build -f

install: build
python setup.py install -f

reinstall: uninstall install

uninstall: clean
rm -f /usr/bin/${PACKAGE}
rm -rf /usr/lib/python2.*/site-packages/${PACKAGE}

uninstall_rpms: clean
rpm -e ${PACKAGE}

sdist:
python setup.py sdist

prep_rpmbuild: build sdist
mkdir -p rpm-build
mkdir -p rpms
cp dist/*.gz rpm-build/

rpms: prep_rpmbuild
${RPMBUILD} -ba ${PACKAGE}.spec

srpm: prep_rpmbuild
${RPMBUILD} -bs ${PACKAGE}.spec
40 changes: 40 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# Release Notes for pyrax

###2013.10.04 - Version 1.5.1
- Pyrax in general:
- Moved the `get_limits()` behavior to the base client (Nate House)
- Added ability to call a full URL from the client.
- Added HEAD methods to base client and manager classes.
- Removed unused imports. GitHub #189
- Improved handling of 400 errors in `identity.create_user()`
- Fixed issue with password auth failing with Rackspace identity.
GitHub #190
- Added utility method for RFC 2822-compliant dates.
- Refactored the `_create_body()` method into the BaseManager class.
- Improved handling of default regions in the service catalog.
- Added support for different auth endpoints for Rackspace auth.
- Added files to allow creating RPMs. (Greg Swift)
- Cloud Files:
- Added the `bulk_delete()` method.
- Added support for "bare" metadata keys. GitHub #164
- Added cache override capability. GitHub #191
- Added copy/move methods to Container and StorageObject classes.
GitHub #192
- Added listing of pseudo-subdirectories. GitHub #174
- Added the `list()` method to generate a list of container objects.
GitHub #186
- Autoscale improvements, thanks to Christopher Armstrong:
- Added additional arguments for launch configurations.
GitHub #207, #209, #212
- Added support for group metadata. GitHub #202
- Added suppport for desired_capacity in policies. GitHub #208
- Added `args` to expand capabilities in webhook policy updates.
GitHub #204, #205
- Monitoring:
- Workaround the odd requirement to use millisecond timestamps in
`get_metric_data_points()` GitHub #176
- Unix timestamps are now supported in addition to Python date/datetimes.
- Load Balancers:
- Fixed VirtualIP `to_dict()` method to use the ID if available. (Vaibhav)
- Add node type to the dict passed to the API (Troy C)
- DNS:
- Domains can now be specified by name, not just ID. GitHub #180

###2013.09.04 - Version 1.5.0
- Added support for the Rackspace Cloud Monitoring service
- Added support for the Rackspace Autoscale service
Expand Down
4 changes: 2 additions & 2 deletions docs/autoscaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ It is important to remember that Autoscale does not configure anything within a


## Using Autoscaling in pyrax
Once you have authenticated, you can reference the Autoscaling service via `pyrax.autoscaling`. That is a lot to type over and over in your code, so it is easier if you include the following line at the beginning of your code:
Once you have authenticated, you can reference the Autoscaling service via `pyrax.autoscale`. That is a lot to type over and over in your code, so it is easier if you include the following line at the beginning of your code:

au = pyrax.autoscaling
au = pyrax.autoscale

Then you can simply use the alias `au` to reference the service. All of the code samples in this document assume that `au` has been defined this way.

Expand Down
15 changes: 15 additions & 0 deletions docs/cloud_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,21 @@ The following example illustrates object deletion:
print "It took %4.2f seconds to appear as deleted." % (time.time() - start)


### Bulk Deletion
The methods above describe how to delete a single object, or every object in a container. But what about the case where you want to delete several objects at once? Sure, you could call `delete()` for each object, but if you had more than a few that would be very inefficient, as each deletion would require a separate API call and response.

For this situation, Cloud Files offers the `bulk_delete()` method. You pass the name of the container along with a list containing the names of all the objects you wish to delete, and they are all deleted with a single API call. The `bulk_delete()` method returns a dictionary (described below) with the results of the process. Please note that while this is faster than many individual calls, it does take some time to complete, depending on how many objects are to be deleted. If you want your program to continue execution without waiting for the bulk deletion to complete, `bulk_delete()` takes an optional third parameter: including `async=True` in the call results in the method returning immediately. Instead of the dictionary that is returned by the synchronous call, it returns an object that can be used to query the status of the bulk deletion by checking its `completed` attribute. When `completed` is True, its `results` attribute contains the same dictionary that is returned from the synchronous call.

The returned dictionary contains the following keys:

Key | Value
---- | ----
**deleted** | the number of objects deleted
**not_found** | the number of objects not found
**status** | the HTTP return status code. '200 OK' indicates success
**errors** | a list of any errors returned by the bulk delete call


### Setting an Object's Expiration
You can mark a storage object for deletion in the future by calling its `delete_in_seconds()` method. This method accepts an integer number of seconds after which you wish the object to be deleted from Cloud Files.

Expand Down
11 changes: 8 additions & 3 deletions docs/html/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,24 @@
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td class="indexvalue">The base class for all pyrax clients </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1manager_1_1BaseManager.html">BaseManager</a></td><td class="indexvalue">Managers interact with a particular type of API (servers, databases, dns, etc.) and provide CRUD operations for them </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1resource_1_1BaseResource.html">BaseResource</a></td><td class="indexvalue">A resource represents a particular instance of an object (server, flavor, etc) </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1cf__wrapper_1_1client_1_1BulkDeleter.html">BulkDeleter</a></td><td class="indexvalue">Threading class to allow for bulk deletion of objects from a container </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1exceptions_1_1CDNFailed.html">CDNFailed</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1cf__wrapper_1_1client_1_1CFClient.html">CFClient</a></td><td class="indexvalue">Wraps the calls to swiftclient with objects representing Containers and StorageObjects </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1exceptions_1_1ClientException.html">ClientException</a></td><td class="indexvalue">The base exception class for all exceptions this library raises </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1cloudblockstorage_1_1CloudBlockStorageClient.html">CloudBlockStorageClient</a></td><td class="indexvalue">This is the primary class for interacting with Cloud Block Storage </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1cloudblockstorage_1_1CloudBlockStorageManager.html">CloudBlockStorageManager</a></td><td class="indexvalue">Manager class for Cloud Block Storage </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1cloudblockstorage_1_1CloudBlockStorageSnapshot.html">CloudBlockStorageSnapshot</a></td><td class="indexvalue">This class represents a Snapshot (copy) of a Block Storage Volume </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1cloudblockstorage_1_1CloudBlockStorageSnapshotManager.html">CloudBlockStorageSnapshotManager</a></td><td class="indexvalue">Manager class for Cloud Block Storage </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1cloudblockstorage_1_1CloudBlockStorageVolume.html">CloudBlockStorageVolume</a></td><td class="indexvalue">This class represents a Block Storage volume </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1cloudblockstorage_1_1CloudBlockStorageVolumeType.html">CloudBlockStorageVolumeType</a></td><td class="indexvalue">This class represents a Block Storage Volume Type </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseClient.html">CloudDatabaseClient</a></td><td class="indexvalue">This is the primary class for interacting with Cloud Databases </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseDatabase.html">CloudDatabaseDatabase</a></td><td class="indexvalue">This class represents a database on a <a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseInstance.html" title="This class represents a MySQL instance in the cloud.">CloudDatabaseInstance</a> </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseDatabaseManager.html">CloudDatabaseDatabaseManager</a></td><td class="indexvalue">This class manages communication with databases on Cloud Database instances </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseFlavor.html">CloudDatabaseFlavor</a></td><td class="indexvalue">This class represents the available instance configurations, or 'flavors', which you use to define the memory and CPU size of your instance </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseInstance.html">CloudDatabaseInstance</a></td><td class="indexvalue">This class represents a MySQL instance in the cloud </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseManager.html">CloudDatabaseManager</a></td><td class="indexvalue">This class manages communication with Cloud Database resources </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseManager.html">CloudDatabaseManager</a></td><td class="indexvalue">This class manages communication with Cloud Database instances </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseUser.html">CloudDatabaseUser</a></td><td class="indexvalue">This class represents a user on a <a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseInstance.html" title="This class represents a MySQL instance in the cloud.">CloudDatabaseInstance</a> </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseUserManager.html">CloudDatabaseUserManager</a></td><td class="indexvalue">This class handles operations on the users in a Cloud Database </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseUserManager.html">CloudDatabaseUserManager</a></td><td class="indexvalue">This class handles operations on the users in a database on a Cloud Database instance </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddatabases_1_1CloudDatabaseVolume.html">CloudDatabaseVolume</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddns_1_1CloudDNSClient.html">CloudDNSClient</a></td><td class="indexvalue">This is the primary class for interacting with Cloud DNS </td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1clouddns_1_1CloudDNSDomain.html">CloudDNSDomain</a></td><td class="indexvalue">This class represents a DNS domain </td></tr>
Expand Down Expand Up @@ -164,6 +168,7 @@
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1exceptions_1_1InvalidCredentialFile.html">InvalidCredentialFile</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1exceptions_1_1InvalidDateTimeString.html">InvalidDateTimeString</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1exceptions_1_1InvalidDeviceType.html">InvalidDeviceType</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1exceptions_1_1InvalidEmail.html">InvalidEmail</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1exceptions_1_1InvalidLoadBalancer.html">InvalidLoadBalancer</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1exceptions_1_1InvalidLoadBalancerParameters.html">InvalidLoadBalancerParameters</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="classpyrax_1_1exceptions_1_1InvalidMonitoringCheckDetails.html">InvalidMonitoringCheckDetails</a></td><td class="indexvalue"></td></tr>
Expand Down Expand Up @@ -266,7 +271,7 @@


<hr class="footer"/><address class="footer"><small>
Generated on Wed Sep 4 2013 09:52:00 for pyrax by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Fri Oct 4 2013 13:36:40 for pyrax by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
Expand Down
4 changes: 3 additions & 1 deletion docs/html/cf__wrapper_2client_8py.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This class wraps the swiftclient connection, adding support for CDN. <a href="classpyrax_1_1cf__wrapper_1_1client_1_1Connection.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpyrax_1_1cf__wrapper_1_1client_1_1FolderUploader.html">FolderUploader</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Threading class to allow for uploading multiple files in the background. <a href="classpyrax_1_1cf__wrapper_1_1client_1_1FolderUploader.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpyrax_1_1cf__wrapper_1_1client_1_1BulkDeleter.html">BulkDeleter</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Threading class to allow for bulk deletion of objects from a container. <a href="classpyrax_1_1cf__wrapper_1_1client_1_1BulkDeleter.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="namespaces"></a>
Packages</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepyrax_1_1cf__wrapper_1_1client.html">pyrax::cf_wrapper::client</a></td></tr>
Expand Down Expand Up @@ -131,7 +133,7 @@


<hr class="footer"/><address class="footer"><small>
Generated on Tue Aug 6 2013 12:51:13 for pyrax by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Fri Oct 4 2013 13:36:35 for pyrax by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
Expand Down
Loading

0 comments on commit 114f6d9

Please sign in to comment.