/usr/lib/python2.6/site-packages/openstack
NameSizeModeActions
block_store/-0755rm
cluster/-0755rm
compute/-0755rm
database/-0755rm
identity/-0755rm
image/-0755rm
key_manager/-0755rm
message/-0755rm
metric/-0755rm
network/-0755rm
object_store/-0755rm
orchestration/-0755rm
telemetry/-0755rm
tests/-0755rm
connection.py113370644editdlrm
connection.pyc106290644editdlrm
exceptions.py31140644editdlrm
exceptions.pyc47190644editdlrm
format.py46130644editdlrm
format.pyc41750644editdlrm
module_loader.py9890644editdlrm
module_loader.pyc7290644editdlrm
profile.py70080644editdlrm
profile.pyc79800644editdlrm
proxy.py136030644editdlrm
proxy.pyc129350644editdlrm
proxy2.py144540644editdlrm
proxy2.pyc141080644editdlrm
resource.py391070644editdlrm
resource.pyc382400644editdlrm
resource2.py297640644editdlrm
service_filter.py53330644editdlrm
service_filter.pyc69030644editdlrm
session.py41990644editdlrm
session.pyc42960644editdlrm
utils.py28640644editdlrm
utils.pyc28080644editdlrm
__init__.py6630644editdlrm
__init__.pyc2900644editdlrm
Edit: /usr/lib/python2.6/site-packages/openstack/connection.pyc (10629B)
Ñò 5 Wc @sÅdZddkZddkZddklZddkZddklZ ddkl Z ddkl Z ddkl Z ddklZeieƒZdddd „Zd efd „ƒYZdS( s– The :class:`~openstack.connection.Connection` class is the primary interface to the Python SDK it maintains a context for a connection to a cloud provider. The connection has an attribute to access each supported service. The service attributes are created dynamically based on user profiles and the service catalog. Examples -------- At a minimum, the :class:`~openstack.connection.Connection` class needs to be created with an authenticator or the parameters to build one. Create a connection ~~~~~~~~~~~~~~~~~~~ The following example constructor uses the identity authenticator using username and password. The default settings for the transport are used by this connection.:: from openstack import connection auth_args = { 'auth_url': 'http://172.20.1.108:5000/v3', 'project_name': 'admin', 'username': 'admin', 'password': 'admin', } conn = connection.Connection(**auth_args) List ~~~~ Services are accessed through an attribute named after the service. A list of all the projects is retrieved in this manner:: projects = conn.identity.list_projects() Find or create ~~~~~~~~~~~~~~ If you wanted to make sure you had a network named 'jenkins', you would first try to find it and if that fails, you would create it:: network = conn.network.find_network("jenkins") if network is None: network = conn.network.create_network({"name": "jenkins"}) iÿÿÿÿN(tbase(tprofile(tproxy(tproxy2(tsession(tutilscCséh}tiƒ}g}|iƒD]}||iq#~}x|D]}d||dt| ƒ} | idƒpd| } n|i|| ƒn|i|ƒ} | o|i|| ƒn|i|ƒ} | o|i|| ƒqºqûqûW|i|ƒ} | o%x"|D]}|i|| ƒqÛWn|id }|id |d ` and :class:`identity_v3 `. If this parameter is not passed in, the connection will create an authenticator. :type authenticator: :class:`~openstack.auth.base.BaseAuthPlugin` :param profile: If the user has any special profiles such as the service name, region, version or interface, they may be provided in the profile object. If no profiles are provided, the services that appear first in the service catalog will be used. :type profile: :class:`~openstack.profile.Profile` :param bool verify: If a transport is not provided to the connection, this parameter will be used to create a transport. If ``verify`` is set to true, which is the default, the SSL cert will be verified. It can also be set to a CA_BUNDLE path. :param cert: If a transport is not provided to the connection then this parameter will be used to create a transport. `cert` allows to provide a client certificate file path or a tuple with client certificate and key paths. :type cert: str or tuple :param str user_agent: If a transport is not provided to the connection, this parameter will be used when creating a transport. The value given here will be prepended to the default, which is specified in :attr:`~openstack.transport.USER_AGENT`. The resulting ``user_agent`` value is used for the ``User-Agent`` HTTP header. :param str auth_plugin: The name of authentication plugin to use. The default value is ``password``. :param auth_args: The rest of the parameters provided are assumed to be authentication arguments that are used by the authentication plugin. R RRt user_agentN( t_create_authenticatort authenticatorRRRt_sessiontSessionRt_open( tselfRRCRRRRARt auth_args((s:/tmp/pip-build-wCUybK/openstacksdk/openstack/connection.pyt__init__œs2   cKsp|o|Sti|ƒ}h}x?|iƒD]1}|i|iƒo||i||i;s   O