4484f4fce102eafa56762583ac0714d555750c6a
				
			
			
		
	While thinking about the type=Resource changes that we're undergoing, a common type that we could be improving for users are timestamps. If a user is going to use a timestamp for anything -- the common ones being the timestamp of when a resource was created or updated -- they're going to need to convert it to a datetime anyway in order to look into it. By far the most common timestamp format coming back in responses and being accepted in requests is an ISO 8601 string. We had previously been depending on the oslo_utils.timeutils library to handle a form of this type of behavior for the metric resource, but it was limited in its functionality as well as only being used by metric. This approach makes the idea more generally useful. Additionaly, this approach can be applied to the BoolStr class which had previously existed to handle the case of some services returning "true" and "false" in responses. This required a special case inside the prop code to look for a "parsed" attribute. Changing the BoolStr class to work with the Formatter base allows both BoolStr and ISO8601 to use the same code paths. This change doesn't make any wholesale changes to implement type=format.ISO8601. Those should be handled in a separate change once the implementation is approved. Change-Id: I37e99afcf3a0eca7c806e9dea984f3059f677ec4
OpenStack Python SDK
The python-openstacksdk is a collection of libraries for
building applications to work with OpenStack clouds. The project aims to
provide a consistent and complete set of interactions with OpenStack's
many services, along with complete documentation, examples, and
tools.
This SDK is under active development, and in the interests of providing a high-quality interface, the APIs provided in this release may differ from those provided in future release.
Usage
The following example simply connects to an OpenStack cloud and lists the containers in the Object Store service.:
from openstack import connection
conn = connection.Connection(auth_url="http://openstack:5000/v3",
                             project_name="big_project",
                             username="SDK_user",
                             password="Super5ecretPassw0rd")
for container in conn.object_store.containers():
   print(container.name)
Documentation
Documentation is available at http://developer.openstack.org/sdks/python/openstacksdk/
License
Apache 2.0
Description