Brian Curtin 9524fdf7a6 Only log text strings in requests
As was exposed by object_store.create_object, we were attempting to mix
text and bytes in log messages, which was causing _logger.debug to choke
when combining the parts of the message, specifically the --data piece.

This is an issue for two reasons:
1. It's binary data in general
2. It's a very large amount of binary data

The fix is to not log byte strings that come in as `data` unless we can
decode them to ascii. This will allow us to continue logging some data
such as auth credentials, but we won't be logging megabytes or gigabytes
worth of binary data - such as objects being uploaded to Swift - into
the log file.

Change-Id: Iba49552b8ebc58a46cedf826751193a1fa7feb11
Partial-Bug: 1485054
2015-08-14 12:14:08 -05:00
2015-07-31 18:40:15 +00:00
2015-07-18 09:55:48 -06:00
2015-05-22 17:19:16 -07:00
2015-05-22 17:19:16 -07:00
2015-07-15 01:39:03 +00:00
2015-07-17 11:39:43 -06:00

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://python-openstacksdk.readthedocs.org/en/latest/

Requirements

  • Python 2.7, Python 3.3+
  • pbr
  • requests
  • six
  • stevedore
  • oslo.utils

License

Apache 2.0

Description
Unified SDK for OpenStack
Readme 78 MiB
Languages
Python 99.9%