diff --git a/.gitignore b/.gitignore index 4577d9d9..93f468dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +build/ +dist/ +rpm-build/ +rpms/ *~ .DS_Store *.swp diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..2508d553 --- /dev/null +++ b/Makefile @@ -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 diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 983880f5..55ba10d5 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -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 diff --git a/docs/autoscaling.md b/docs/autoscaling.md index 568c3420..e87c471f 100644 --- a/docs/autoscaling.md +++ b/docs/autoscaling.md @@ -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. diff --git a/docs/cloud_files.md b/docs/cloud_files.md index 541e579c..1b2ae7dd 100644 --- a/docs/cloud_files.md +++ b/docs/cloud_files.md @@ -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. diff --git a/docs/html/annotated.html b/docs/html/annotated.html index 70c7a1ca..600d96d8 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -97,20 +97,24 @@
[static]
None
, False
False
, None
, None
None
None
, None
False
False
, None
, None
False
False
, None
, None
None
, False
False
, None
, None
None
None
, None
False
False
, None
, None
None
, False
False
, None
, None
None
None
, None
False
False
, None
, None
__init__ | BaseAuth | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auth_endpoint | BaseAuth | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auth_endpoint | BaseAuth | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auth_token | BaseAuth | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
auth_with_token | BaseAuth | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
authenticate | BaseAuth | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Simple alias to self.token. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | auth_endpoint | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Abstracts out the logic for connecting to different auth endpoints. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | auth_endpoint | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | get_default_region | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In cases where the region has not been specified, return the value to use. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | set_credentials |
def auth_endpoint | +( | ++ | self, | +
+ | + | + | val | +
+ | ) | ++ |
Using the supplied credentials, connects to the specified authentication endpoint and attempts to log in.
If successful, records the token information.
+Reimplemented in RaxIdentity.
+ @@ -1519,7 +1549,7 @@
+ pyrax
+
+
+ Python Bindings for the Rackspace Cloud
+ |
+
+
+
+
__init__ | BulkDeleter | |
client | BulkDeleter | |
completed | BulkDeleter | [static] |
container | BulkDeleter | |
object_names | BulkDeleter | |
results | BulkDeleter | [static] |
run | BulkDeleter |
+ pyrax
+
+
+ Python Bindings for the Rackspace Cloud
+ |
+
+
+
+
Threading class to allow for bulk deletion of objects from a container. + More...
+ + ++Public Member Functions | |
def | __init__ |
def | run |
+Public Attributes | |
client | |
container | |
object_names | |
+Static Public Attributes | |
completed = False | |
results = None |
Threading class to allow for bulk deletion of objects from a container.
+def __init__ | +( | ++ | self, | +
+ | + | + | client, | +
+ | + | + | container, | +
+ | + | + | object_names | +
+ | ) | ++ |
def run | +( | ++ | self | ) | ++ |
client | +
completed = False [static] |
+
container | +
object_names | +
results = None [static] |
+
__init__ | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
account_meta_prefix | CFClient | [static] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
bulk_delete | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bulk_delete_interval | CFClient | [static] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
cancel_folder_upload | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cdn_connection | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cdn_enabled | CFClient | [static] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
get_temp_url_key | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
get_uploaded | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
http_log_debug | CFClient | [static] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
list | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
list_container_subdirs | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
list_containers | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
list_containers_info | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
list_public_containers | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
move_object | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object_meta_prefix | CFClient | [static] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
purge_cdn_object | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
remove_container_from_cache | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
remove_container_metadata_key | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
remove_object_metadata_key | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
set_account_metadata | CFClient | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Creates a container with the specified name. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | delete_container | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deletes the specified container. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | remove_container_from_cache | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Removes the container from the cache. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | delete_object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deletes the specified object from the container. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | bulk_delete | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deletes multiple objects from a container in a single call. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | get_object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a StorageObject instance for the object in the container. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | store_object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Fetches the object from storage, and writes it to the specified directory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | get_all_containers | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | get_container | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a reference to the specified container. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | get_container_objects | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Return a list of StorageObjects representing the objects in the container. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | get_container_object_names | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | list_container_subdirs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Return a list of StorageObjects representing the pseudo-subdirectories in the specified container. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | get_info | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a tuple for the number of containers and total bytes in the account. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | list | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a list of all container objects. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | list_containers | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns a list of all container names as strings. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def | list_containers_info | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
int | default_cdn_ttl = 86400 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
int | max_file_size = 5368709119 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dictionary | folder_upload_status = {} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
int | bulk_delete_interval = 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
user_agent = property(_get_user_agent, _set_user_agent) |
def bulk_delete | +( | ++ | self, | +
+ | + | + | container, | +
+ | + | + | object_names, | +
+ | + | + | async = False |
+
+ | ) | ++ |
Deletes multiple objects from a container in a single call.
+The bulk deletion call does not return until all of the specified objects have been processed. For large numbers of objects, this can take quite a while, so there is an 'async' parameter to give you the option to have this call return immediately. If 'async' is True, an object is returned with a 'completed' attribute that will be set to True as soon as the bulk deletion is complete, and a 'results' attribute that will contain a dictionary (described below) with the results of the bulk deletion.
+When deletion is complete the bulk deletion object's 'results' attribute will be populated with the information returned from the API call. In synchronous mode this is the value that is returned when the call completes. It is a dictionary with the following keys:
+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
+This isn't available in swiftclient yet, so it's using code patterned after the client code in that library.
+ +Creates a container with the specified name.
-extra_info is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
+'extra_info' is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
Deletes the specified container.
This will fail if the container still has objects stored in it; if that's the case and you want to delete the container anyway, set del_objects to True, and the container's objects will be deleted before the container is deleted.
-extra_info is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
+'extra_info' is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
Deletes the specified object from the container.
-extra_info is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
+'extra_info' is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
If 'include_meta' is False, only the bytes representing the file is returned.
Note: if 'chunk_size' is defined, you must fully read the object's contents before making another request.
When 'include_meta' is True, what is returned from this method is a 2-tuple: Element 0: a dictionary containing metadata about the file. Element 1: a stream of bytes representing the object's contents.
-extra_info is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
+'extra_info' is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
@@ -796,7 +851,13 @@True
Returns a reference to the specified container.
+By default, if a reference to that container has already been retrieved, a cached reference will be returned. If you need to get an updated version of the container, pass `cached=False` to the method call.
+None
Returns the number of bytes uploaded for the specified process.
+ + + +def list | +( | ++ | self, | +
+ | + | + | limit = None , |
+
+ | + | + | marker = None , |
+
+ | + | + | parms | +
+ | ) | ++ |
Returns a list of all container objects.
+ +def list_container_subdirs | +( | ++ | self, | +
+ | + | + | container, | +
+ | + | + | marker = None , |
+
+ | + | + | limit = None , |
+
+ | + | + | prefix = None , |
+
+ | + | + | delimiter = None , |
+
+ | + | + | full_listing = False |
+
+ | ) | ++ |
Return a list of StorageObjects representing the pseudo-subdirectories in the specified container.
+You can use the marker and limit params to handle pagination, and the prefix and delimiter params to filter the objects returned.
+None
None
, None
def remove_container_from_cache | +( | ++ | self, | +
+ | + | + | container | +
+ | ) | ++ |
Removes the container from the cache.
+None
None
, None
Accepts a dictionary of metadata key/value pairs and updates the specified account metadata with them.
If 'clear' is True, any existing metadata is deleted and only the passed metadata is retained. Otherwise, the values passed here update the account's metadata.
-extra_info is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
+'extra_info' is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
+By default, the standard account metadata prefix ('X-Account-Meta-') is prepended to the header name if it isn't present. For non-standard headers, you must include a non-None prefix, such as an empty string.
@@ -1715,7 +1928,13 @@None
None
, None
Accepts a dictionary of metadata key/value pairs and updates the specified container metadata with them.
If 'clear' is True, any existing metadata is deleted and only the passed metadata is retained. Otherwise, the values passed here update the container's metadata.
-extra_info is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
+'extra_info' is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
+By default, the standard container metadata prefix ('X-Container-Meta-') is prepended to the header name if it isn't present. For non-standard headers, you must include a non-None prefix, such as an empty string.
@@ -1842,7 +2062,13 @@None
None
, None
Accepts a dictionary of metadata key/value pairs and updates the specified object metadata with them.
If 'clear' is True, any existing metadata is deleted and only the passed metadata is retained. Otherwise, the values passed here update the object's metadata.
-extra_info is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
+'extra_info; is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
+By default, the standard object metadata prefix ('X-Object-Meta-') is prepended to the header name if it isn't present. For non-standard headers, you must include a non-None prefix, such as an empty string.
@@ -1965,7 +2192,7 @@Creates a new object in the specified container, and populates it with the given data.
A StorageObject reference to the uploaded file will be returned, unless 'return_none' is set to True.
-extra_info is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
+'extra_info' is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
@@ -2183,6 +2410,19 @@int bulk_delete_interval = 1 [static] |
+
[static]
Copies object to itself, but applies a new content-type.
The guess feature requires the container to be CDN-enabled. If not then the content-type must be supplied. If using guess with a CDN-enabled container, new_ctype can be set to None. Failure during the put will result in a swift exception.
+ + + +def copy_object | +( | ++ | self, | +
+ | + | + | obj, | +
+ | + | + | new_container, | +
+ | + | + | new_obj_name = None , |
+
+ | + | + | extra_info = None |
+
+ | ) | ++ |
Copies the object to the new container, optionally giving it a new name.
+If you copy to the same container, you must supply a different name.
+False
Deletes all objects from this container.
+By default the call will block until all objects have been deleted. By passing True for the 'async' parameter, this method will not block, and instead return an object that can be used to follow the progress of the deletion. When deletion is complete the bulk deletion object's 'results' attribute will be populated with the information returned from the API call. In synchronous mode this is the value that is returned when the call completes. It is a dictionary with the following keys:
+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
Returns a dictionary containing the metadata for the container.
+True
Return the StorageObject in this container with the specified name.
+By default, if a reference to that object has already been retrieved, a cached reference will be returned. If you need to get an updated version of the object, pass `cached=False` to the method call.
The URL will expire after `seconds` seconds.
The only methods supported are GET and PUT. Anything else will raise an InvalidTemporaryURLMethod exception.
+ + + +def list_subdirs | +( | ++ | self, | +
+ | + | + | marker = None , |
+
+ | + | + | limit = None , |
+
+ | + | + | prefix = None , |
+
+ | + | + | delimiter = None , |
+
+ | + | + | full_listing = False |
+
+ | ) | ++ |
Return a list of StorageObjects representing the pseudo-subdirectories in this container.
+You can use the marker and limit params to handle pagination, and the prefix and delimiter params to filter the objects returned.
+Enables CDN access for the specified container.
+ + + +def move_object | +( | ++ | self, | +
+ | + | + | obj, | +
+ | + | + | new_container, | +
+ | + | + | new_obj_name = None , |
+
+ | + | + | extra_info = None |
+
+ | ) | ++ |
Works just like copy_object, except that the source object is deleted after a successful copy.
+False
False
, None
Accepts a dictionary of metadata key/value pairs and updates the specified container metadata with them.
+If 'clear' is True, any existing metadata is deleted and only the passed metadata is retained. Otherwise, the values passed here update the container's metadata.
+'extra_info' is an optional dictionary which will be populated with 'status', 'reason', and 'headers' keys from the underlying swiftclient call.
+By default, the standard container metadata prefix ('X-Container-Meta-') is prepended to the header name if it isn't present. For non-standard headers, you must include a non-None prefix, such as an empty string.
+None
None
, False
, None
Copies object to itself, but applies a new content-type.
The guess feature requires the container to be CDN-enabled. If not then the content-type must be supplied. If using guess with a CDN-enabled container, new_ctype can be set to None. Failure during the put will result in a swift exception.
+ + + +def copy | +( | ++ | self, | +
+ | + | + | new_container, | +
+ | + | + | new_obj_name = None , |
+
+ | + | + | extra_info = None |
+
+ | ) | ++ |
Copies this object to the new container, optionally giving it a new name.
+If you copy to the same container, you must supply a different name.
+The URL will expire after `seconds` seconds.
The only methods supported are GET and PUT. Anything else will raise an InvalidTemporaryURLMethod exception.
+ + + +def move | +( | ++ | self, | +
+ | + | + | new_container, | +
+ | + | + | new_obj_name = None , |
+
+ | + | + | extra_info = None |
+
+ | ) | ++ |
Works just like copy_object, except that this object is deleted after a successful copy.
+This means that this storage_object reference will no longer be valid.
+False
False
, None
[static]
Reimplemented in CloudMonitorClient.
+ + + +def get_limits | +( | ++ | self | ) | ++ |
Returns a dict with the resource and rate limits for the account.
+ +Reimplemented in CloudDatabaseClient.
+Method used to make GET requests.
+ + + +def method_head | +( | ++ | self, | +
+ | + | + | uri, | +
+ | + | + | kwargs | +
+ | ) | ++ |
Method used to make HEAD requests.
+Reimplemented in CloudLoadBalancerClient, CloudDNSClient, CloudMonitorClient, AutoScaleClient, CloudDatabaseClient, CloudBlockStorageClient, and CloudNetworkClient.
+Reimplemented in CloudLoadBalancerClient, CloudDNSClient, AutoScaleClient, CloudMonitorClient, CloudDatabaseClient, CloudBlockStorageClient, and CloudNetworkClient.
[static]
+ pyrax
+
+
+ Python Bindings for the Rackspace Cloud
+ |
+
+
+
+
__init__ | BaseManager | |
action | BaseManager | |
add_hook | BaseManager | |
api | BaseManager | |
create | BaseManager | |
create_snapshot | CloudBlockStorageManager | |
delete | BaseManager | |
find | BaseManager | |
findall | BaseManager | |
get | BaseManager | |
head | BaseManager | |
list | BaseManager | |
list_snapshots | CloudBlockStorageManager | |
plural_response_key | BaseManager | [static] |
resource_class | BaseManager | [static] |
response_key | BaseManager | [static] |
run_hooks | BaseManager | |
uri_base | BaseManager | [static] |
+ pyrax
+
+
+ Python Bindings for the Rackspace Cloud
+ |
+
+
+
+
Manager class for Cloud Block Storage. + More...
++Public Member Functions | |
def | list_snapshots |
Pass-through method to allow the list_snapshots() call to be made directly on a volume. | |
def | create_snapshot |
Pass-through method to allow the create_snapshot() call to be made directly on a volume. |
Manager class for Cloud Block Storage.
+def create_snapshot | +( | ++ | self, | +
+ | + | + | volume, | +
+ | + | + | name, | +
+ | + | + | description = None , |
+
+ | + | + | force = False |
+
+ | ) | ++ |
Pass-through method to allow the create_snapshot() call to be made directly on a volume.
+ +def list_snapshots | +( | ++ | self | ) | ++ |
Pass-through method to allow the list_snapshots() call to be made directly on a volume.
+ +
+ pyrax
+
+
+ Python Bindings for the Rackspace Cloud
+ |
+
+
+
+
__init__ | BaseManager | |
action | BaseManager | |
add_hook | BaseManager | |
api | BaseManager | |
create | CloudBlockStorageSnapshotManager | |
pyrax::manager::BaseManager.create | BaseManager | |
delete | BaseManager | |
find | BaseManager | |
findall | BaseManager | |
get | BaseManager | |
head | BaseManager | |
list | BaseManager | |
plural_response_key | BaseManager | [static] |
resource_class | BaseManager | [static] |
response_key | BaseManager | [static] |
run_hooks | BaseManager | |
uri_base | BaseManager | [static] |
+ pyrax
+
+
+ Python Bindings for the Rackspace Cloud
+ |
+
+
+
+
Manager class for Cloud Block Storage. + More...
++Public Member Functions | |
def | create |
Adds exception handling to the default create() call. |
Manager class for Cloud Block Storage.
+def create | +( | ++ | self, | +
+ | + | + | name, | +
+ | + | + | volume, | +
+ | + | + | description = None , |
+
+ | + | + | force = False |
+
+ | ) | ++ |
Adds exception handling to the default create() call.
+ + [static]
[static]
[static]
[static]
Returns a specific Flavor object by ID.
+ + + +def get_limits | +( | ++ | self | ) | ++ |
Not implemented in Cloud Databases.
+ +Reimplemented from BaseClient.
+
+ pyrax
+
+
+ Python Bindings for the Rackspace Cloud
+ |
+
+
+
+
__init__ | BaseManager | |
action | BaseManager | |
add_hook | BaseManager | |
api | BaseManager | |
create | BaseManager | |
delete | BaseManager | |
find | BaseManager | |
findall | BaseManager | |
get | BaseManager | |
head | BaseManager | |
list | BaseManager | |
plural_response_key | BaseManager | [static] |
resource_class | BaseManager | [static] |
response_key | BaseManager | [static] |
run_hooks | BaseManager | |
uri_base | BaseManager | [static] |
+ pyrax
+
+
+ Python Bindings for the Rackspace Cloud
+ |
+
+
+
+
This class manages communication with databases on Cloud Database instances. + More...
+This class manages communication with databases on Cloud Database instances.
+ [static]
[static]
This class manages communication with Cloud Database resources. +
This class manages communication with Cloud Database instances. More...
This class manages communication with Cloud Database resources.
+This class manages communication with Cloud Database instances.
[static]
This class handles operations on the users in a Cloud Database. +
This class handles operations on the users in a database on a Cloud Database instance. More...
This class handles operations on the users in a Cloud Database.
+This class handles operations on the users in a database on a Cloud Database instance.
[static]
Returns a dict with the current rate limit information for domain and status requests.
+def get_record | +( | ++ | self, | +
+ | + | + | domain, | +
+ | + | + | record | +
+ | ) | ++ |
Gets the full information for an existing record or record ID for the specified domain.
+ [static]
[static]
[static]
def get_limits | -( | -- | self | ) | -- |
Returns a dict with the resource and rate limits for the account.
- [static]
[static]
[static]
[static]
[static]
+ pyrax
+
+
+ Python Bindings for the Rackspace Cloud
+ |
+
+
+
+
__init__ | BaseAuth | ||||
auth_endpoint | BaseAuth | ||||
auth_endpoint | BaseAuth | ||||
auth_token | BaseAuth | ||||
auth_with_token | BaseAuth | ||||
authenticate | BaseAuth |
__init__ | BaseAuth | ||||
auth_endpoint | BaseAuth | ||||
auth_endpoint | BaseAuth | ||||
auth_token | BaseAuth | ||||
auth_with_token | RaxIdentity | ||||
authenticate | BaseAuth | ||||
authenticate | RaxIdentity | ||||
authenticated | RaxIdentity | ||||
check_token | BaseAuth | ||||
create_tenant | BaseAuth | ||||
create_user | BaseAuth | ||||
default_region | RaxIdentity | [static] | |||
delete_tenant | BaseAuth | ||||
delete_user | BaseAuth | ||||
expires | BaseAuth | [static] |
Public Member Functions | |
def | authenticate |
If the user's credentials include an API key, the default behavior will work. | |
def | auth_with_token |
If a valid token is already known, this call will use it to generate the service catalog. | |
def | find_user_by_name |
def | find_user_by_id |
Returns a User object by searching for the supplied user ID. | |
def | update_user |
Allows you to update settings for a given user. | |
def | list_credentials |
Returns a user's non-password credentials. | |
def | get_user_credentials |
username | |
password | |
authenticated | |
-Static Public Attributes | |
string | default_region = "SYD" |
This class handles all of the authentication requirements for working with the Rackspace Cloud.
@@ -189,6 +188,28 @@Reimplemented from BaseAuth.
+def authenticate | +( | ++ | self | ) | ++ |
If the user's credentials include an API key, the default behavior will work.
+But if they are using a password, the initial attempt will fail, so try again, but this time using the standard password format.
+ +Reimplemented from BaseAuth.
+Allows you to update settings for a given user.
+Reimplemented from BaseAuth.
- - - -string default_region = "SYD" [static] |
-
[static]
[static]
Reimplemented in CloudDatabaseManager.
+ + + +def head | +( | ++ | self, | +
+ | + | + | item | +
+ | ) | ++ |
Makes a HEAD request on a specific item.
+Deletes the object.
-Reimplemented in AutoScaleWebhook, CloudMonitorCheck, AutoScalePolicy, CloudDatabaseUser, CloudDatabaseDatabase, CloudNetwork, CloudBlockStorageSnapshot, and CloudDNSRecord.
+Reimplemented in AutoScaleWebhook, AutoScalePolicy, CloudMonitorCheck, CloudDatabaseUser, CloudDatabaseDatabase, CloudDNSRecord, CloudBlockStorageSnapshot, and CloudNetwork.
@@ -339,7 +339,7 @@Gets the details for the object.
-Reimplemented in CloudMonitorAlarm, AutoScaleWebhook, AutoScalePolicy, CloudMonitorCheck, CloudDatabaseInstance, CloudDNSRecord, and CloudNetwork.
+Reimplemented in AutoScaleWebhook, CloudMonitorAlarm, AutoScalePolicy, CloudMonitorCheck, CloudDatabaseInstance, CloudDNSRecord, and CloudNetwork.
@@ -482,7 +482,7 @@
+ pyrax
+
+
+ Python Bindings for the Rackspace Cloud
+ |
+
+
+
+
Generates a random name; useful for testing.
By default it will return an encoded string containing unicode values up to code point 1000. If you only need or want ASCII values, pass True to the ascii_only parameter.
+ + + +def pyrax.utils.rfc2822_format | +( | ++ | val | ) | ++ |
Takes either a date, a datetime, or a string, and returns a string that represents the value in RFC 2822 format.
+If a string is passed it is returned unchanged.
+Variables | |
string | version = "1.5.0" |
string | version = "1.5.1" |
string description = "Python language bindings for the Rackspace Cloud." | +string description = "Python language bindings for OpenStack Clouds." |