Skip to content

Commit

Permalink
Version 1.7.1 - new HTTP module; bug fixes; doc updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdLeafe committed Mar 28, 2014
1 parent c1fe246 commit c211270
Show file tree
Hide file tree
Showing 140 changed files with 1,537 additions and 721 deletions.
13 changes: 13 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
We welcome pull requests! Please be sure that *all* pull requests are made
against the **working** branch of the project, as we reserve the **master**
branch for full releases.

For style guidelines, please see the HACKING document in the root of this
repository.

If you find any bugs, or have ideas for improving pyrax, please create an issue
at:

https://github.com/rackspace/pyrax/issues

Thanks!
26 changes: 26 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Release Notes for pyrax

###2014.03.28 - Version 1.7.1
- General
- Added a CONTRIBUTING.rst file, following the suggestion of @justinclift
in GitHub #327.
- Removed dependecy on the httplib2 library; pyrax now only relies on the
'requests' module for HTTP communication.
- Fixed a bug in folder size calculations. GitHub #302
- Removed a limit that only handled Rackspace vendor extensions. GitHub #315
- Updated the setup.py version requirements for the 'requests' and 'six'
libraries. GitHub #314
- Updated utility calls to reflect new names. GitHub #312

- Documentation
- Minor typo correction. GitHub #326
- Updated docs for better region coverage. GitHub #324 and #316
- Updated network limits in docs. GitHub #322

- Images
- Sample code for accepting images that were shared add_image_member.py.
GitHub #318

- Cloud Files
- Fixed (yet again) the ability to turn on/off debug output after another
change in the underlying swiftclient library. GitHub #317


###2014.03.12 - Version 1.7.0
- New:
- Added support for **Cloud Images** (Glance).
Expand Down
2 changes: 1 addition & 1 deletion docs/cloud_blockstorage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
****# Cloud Block Storage
# Cloud Block Storage

## Basic Concepts
Rackspace Cloud Block Storage (**CBS**) is a block level storage solution that allows customers to mount drives or volumes to their Rackspace Next Generation Cloud Servers™. The two primary use cases are (1) to allow customers to scale their storage independently from their compute resources, and (2) to allow customers to utilize high performance storage to serve database or I/O-intensive applications.
Expand Down
2 changes: 1 addition & 1 deletion docs/cloud_networks.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ This server's `networks` attribute shows all three networks:
## Limitations of Cloud Networks
Please note that there are several limitations regarding Cloud Networks:

* You can create a maximum of **three** isolated networks.
* You can create a maximum of **10** isolated networks. Please create a Rackspace support ticket if you'll need more than 10 networks.
* You can attach an isolated network to a maximum of **60** servers.
* A server instance can have a maximum of **15** virtual interfaces (VIFs).
* You cannot attach an isolated network to an existing server.
Expand Down
2 changes: 1 addition & 1 deletion docs/cloud_servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ You can override any of these defaults in the call to `wait_for_build()`. For ex


### Additional Parameters to Create()
There are several optional parameters that you can include when creating a server. Here are the two most common:
There are several optional parameters that you can include when creating a server. Here are the most common:

`meta` - An arbitrary dict of up to 5 key/value pairs that can be stored with the server. Note that the keys and values must be simple strings, and not numbers, datetimes, tuples, or anything else.

Expand Down
12 changes: 7 additions & 5 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To upgrade your installation in the future, re-run the same command, but this ti
## Set up Authentication
You need to submit your username and password in order to authenticate. If you are using the Rackspace Public Cloud, that would be your account username and API key. If you are using another OpenStack cloud, you also need to include your tenant ID, which you should be able to get from your provider.

Please note that **all versions of pyrax beginning with 1.4.0 require that you define what type of authentication system you are working with**. Previous versions only worked with Rackspace authentication, so this was not an issue. To do this, you have three options, listed below. In all cases the examples use `keystone` as the identity_type, but if you're using the Rackspace Cloud, change this to `rackspace`.
Please note that **all versions of pyrax beginning with 1.4.0 require that you define what type of authentication system you are working with**. Previous versions only worked with Rackspace authentication, so this was not an issue. To do this, you have three options, listed below. In all cases the examples use `keystone` as the identity_type, but if you're using the Rackspace Cloud, change this to `rackspace`.

1. **Configuration File**: make sure that the line `identity_type = keystone` is in your [configuration file](#pyrax-configuration).
1. **Environment Variable** - If you don't have a configuration file, pyrax checks for the environment variable `CLOUD_ID_TYPE`. Set this by executing `export CLOUD_ID_TYPE=keystone` in a bash shell, or by setting it in the System section of the Control Panel in Windows.
Expand Down Expand Up @@ -73,7 +73,7 @@ To authenticate, run the following code using one of these authentication method

# Using credentials file
pyrax.set_credential_file("/path/to/credential/file")

# Using keychain
pyrax.keyring_auth("my_username")
# Using keychain with username set in configuration file
Expand Down Expand Up @@ -153,7 +153,7 @@ Setting | Affects | Default | Notes | Env. Variable
**identity_type** | The system used for authentication. | -none- | This should be "rackspace" (for the Rackspace Public Cloud) or "keystone" (for all Keystone-based auth systems). Any other system needs a class defined to handle that auth system, and its script added to the pyrax/identity directory. The entry for such custom classes should be in the format of 'module_name.ClassName'. | CLOUD_ID_TYPE
**auth_endpoint** | The URI of the authentication service | -none- | Not required for the Rackspace Public Cloud, where it can be determined from the region. For everything else it is required. | CLOUD_AUTH_ENDPOINT
**keyring_username** | User name used when fetching password from keyring. | -none- | Without setting this, you need to supply the username every time you use keyring_auth(). | CLOUD_KEYRING_USER
**region** | Regional datacenter to connect to; either 'DFW', 'ORD', or 'LON' for Rackspace; typically 'RegionOne' in Keystone. | DFW | This must be specified for all non-Rackspace environments. | CLOUD_REGION
**region** | Regional datacenter to connect to; for instance '**DFW**', '**ORD**', '**IAD**' for Rackspace ([full list](http://www.rackspace.com/about/datacenters/)); typically '**RegionOne**' in Keystone. | Depends on account settings | Required. | CLOUD_REGION
**tenant_id** | The tenant ID used for authentication. | -none- | Not used in the Rackspace Public Cloud. | CLOUD_TENANT_ID
**tenant_name** | The tenant name used for authentication. | -none- | Not used in the Rackspace Public Cloud. | CLOUD_TENANT_NAME
**encoding** | The encoding to use when working with non-ASCII values. Unless you have a specific need, the default should work fine. | utf-8 | | CLOUD_ENCODING
Expand Down Expand Up @@ -201,13 +201,15 @@ Sometimes when developing an application, the results received from the server a
## Working with Rackspace's Multiple Regions
Rackspace divides its cloud infrastructure into "regions", and some interactions are only possible if the entities share a region. For example, if you wish to access a Cloud Database from a Cloud Server, that is only possible if the two are in the same region. Furthermore, if you connect to a region and call `pyrax.cloudservers.list()`, you only get a list of servers in that region. To get a list of all your servers, you have to query each region separately. This is simple to do in pyrax.

As of this writing, Rackspace has two cloud regions in the US: "DFW" and "ORD". It also has one UK region: "LON", which has separate login credentials. To get a list of all your US servers, you can do the following
As of this writing, Rackspace has three cloud regions in the US: "DFW" (Dallas-Fort Worth), "ORD" (Chicago), and "IAD" (Virginia). Your US credentials will also work with two international regions: "SYD" (Sydney) and "HKG" (Hong Kong). Rackspace also has one UK region: "LON" (London), which has separate login credentials. To get a list of all your US servers, you can do the following:

cs_dfw = pyrax.connect_to_cloudservers(region="DFW")
cs_ord = pyrax.connect_to_cloudservers(region="ORD")
cs_iad = pyrax.connect_to_cloudservers(region="IAD")
dfw_servers = cs_dfw.servers.list()
ord_servers = cs_ord.servers.list()
all_servers = dfw_servers + ord_servers
iad_servers = cs_iad.servers.list()
all_servers = dfw_servers + ord_servers + iad_servers

The important point to keep in mind when dealing with multiple regions is that all of pyrax's `connect_to_*` methods take a region parameter, and return a region-specific object. If you do not explicitly include a region, the default region you defined in your config file is used. If you did not define a default region, pyrax defaults to the "DFW" region.

Expand Down
3 changes: 2 additions & 1 deletion docs/html/____init_____8py.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
<tr><td class="memItemLeft" align="right" valign="top">dictionary&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepyrax.html#a4eef1d8d29581de251687dd30b035f3a">_client_classes</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">tuple&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepyrax.html#ae6512f1802b7f1f9cc6f196a0938db60">config_file</a> = os.path.join(os.path.expanduser(&quot;~&quot;), &quot;.pyrax.cfg&quot;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">tuple&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepyrax.html#a4c919e19877c5868fcd9f7662c236649">debug</a> = get_setting(&quot;http_debug&quot;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">tuple&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepyrax.html#a3dc8af5344de2f338dad97aa36a08561">_logger</a> = logging.getLogger(&quot;pyrax&quot;)</td></tr>
</table>
</div><!-- contents -->
<!-- window showing the filter options -->
Expand All @@ -198,7 +199,7 @@


<hr class="footer"/><address class="footer"><small>
Generated on Wed Mar 12 2014 16:01:43 for pyrax by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Fri Mar 28 2014 08:11:50 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
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,10 @@
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#ab48bde70a0927a83d62464cb0627c34b">delete</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html#abdafb5a55ff1bb75ff43db8bf644f276">delete_policy</a></td><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html">AutoScaleClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html#ae0dc92290d6e28a9f163bce15d037bf9">delete_webhook</a></td><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html">AutoScaleClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#ab68d33259ff2e1cddcb96b885679bb21">disable_ssl_certificate_validation</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#a3bd93a44d4f767d114caabe620f7e772">endpoint_type</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html#a34e31ecc0ff1fc06f15621d89ef81aa6">execute_policy</a></td><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html">AutoScaleClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#a01f90f57b7acd55e177611f5d0f7df23">find</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#a1bae9ed7d134ea1c1e9a39726adea1e1">findall</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#a3e15723c0bdd0c672e7d4179ed42570a">force_exception_to_status_code</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#a444a1328efb32d5d9d2dcb2efe855d3b">get</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html#a4765b6651625ae1a9e0b6170c0cfe447">get_configuration</a></td><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html">AutoScaleClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html#ae370445e311ea96ab9b0bdfbc3eafa38">get_launch_config</a></td><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html">AutoScaleClient</a></td><td></td></tr>
Expand All @@ -113,8 +111,6 @@
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#ac6afa2de729057e4864e897292b3f9cb">get_timings</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html#a2d724ad561fe9d53d1cbf1a86ecf5bfa">get_webhook</a></td><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html">AutoScaleClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#a80b9e3606456b3ebde43de9500b1fcbb">http_log_debug</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#a1d196f692455d5ea3eafe3d08178b131">http_log_req</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#ac3cd5495847543298c0440645432b5db">http_log_resp</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#a9b522b4ef7526bfa60b78fe735caa55c">list</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html#a2a31cdad32539c5616c914d25747a74a">list_policies</a></td><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html">AutoScaleClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html#afee49b8fd7dc0cf9aed47e709db7364b">list_webhooks</a></td><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html">AutoScaleClient</a></td><td></td></tr>
Expand All @@ -137,7 +133,7 @@
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#ac8ac904919fa009e510cc25731bc20f8">reset_timings</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html#a4a0c86a5f484661cd399a28e4ac1c779">resume</a></td><td><a class="el" href="classpyrax_1_1autoscale_1_1AutoScaleClient.html">AutoScaleClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#ad71253c9267916c12cb3b7521e588151">service_name</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#a4613550f73f11538014f2c577af27bc3">service_type</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#aee145bfca8e9b2eaf3cd3c47157be9a3">timeout</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#ac150111bafc331bafb353619452c5c5c">times</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#a941dfe76ad38cb3692eac6ef7f0aec9b">timings</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html#a143a677947f3597dc3cc3055a0eae66e">unauthenticate</a></td><td><a class="el" href="classpyrax_1_1client_1_1BaseClient.html">BaseClient</a></td><td></td></tr>
Expand Down Expand Up @@ -169,7 +165,7 @@


<hr class="footer"/><address class="footer"><small>
Generated on Thu Oct 24 2013 09:26:02 for pyrax by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Fri Mar 28 2014 08:11:50 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
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
<tr class="memlist"><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html#a1132703a22def73f131d037165a971aa">method_delete</a></td><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html">BaseAuth</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html#ac1f6b6211af6452ff038fbb8a25f4822">method_get</a></td><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html">BaseAuth</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html#a2b66a305940ec13628995f2a93c55b89">method_head</a></td><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html">BaseAuth</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html#a8212f8a94b29f7c39e38a9b6d8741322">method_patch</a></td><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html">BaseAuth</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html#a248efd43b254ea67d11575531bad3247">method_post</a></td><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html">BaseAuth</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html#a49de945eec86f955f4ac7d1487dcf286">method_put</a></td><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html">BaseAuth</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html#ac0d6a26a6e1c25921ff65ba7790ee92d">password</a></td><td><a class="el" href="classpyrax_1_1base__identity_1_1BaseAuth.html">BaseAuth</a></td><td><code> [static]</code></td></tr>
Expand Down Expand Up @@ -158,7 +159,7 @@


<hr class="footer"/><address class="footer"><small>
Generated on Fri Oct 4 2013 13:36:36 for pyrax by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Fri Mar 28 2014 08:11:50 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 c211270

Please sign in to comment.