/usr/lib/python2.6/site-packages/keystoneauth1/loading
Edit: /usr/lib/python2.6/site-packages/keystoneauth1/loading/session.pyc (9460B)
Ñò
DVc @ sà d d k Z d d k Z y d d k l Z Wn e j
o
d Z n Xd d k l Z d d k l
Z
d d k l Z d d d d d
g Z d „ Z
d e
i f d
„ ƒ YZ d „ Z d „ Z d „ Z d „ Z d „ Z d S( iÿÿÿÿN( t cfg( t _utils( t base( t sessiont register_argparse_argumentst load_from_argparse_argumentst register_conf_optionst load_from_conf_optionst get_conf_optionsc C s | d j o d Sy t | ƒ } Wn, t j
o d | } t i | ƒ ‚ n X| d j o d | } t i | ƒ ‚ n | S( Ns %s must be a floati s %s must be greater than 0( t Nonet floatt
ValueErrort argparset ArgumentTypeError( t argument_valuet valuet msg( ( sD /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/loading/session.pyt _positive_non_zero_float! s
t Sessionc B sz e Z e d „ ƒ Z d „ Z e i d ƒ e d d d d d „ ƒ Z d „ Z
d „ Z d d „ Z d d „ Z
d „ Z RS(
c C s t i S( N( R R ( t self( ( sD /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/loading/session.pyt plugin_class1 s c C s g S( N( ( R ( ( sD /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/loading/session.pyt get_options5 s i c K so | d j o" | o
t } q/ | p t } n | o | o | | f } n t t | ƒ i d | d | | S( s
Create a session with individual certificate parameters.
Some parameters used to create a session don't lend themselves to be
loaded from config/CLI etc. Create a session by converting those
parameters into session __init__ parameters.
t verifyt certN( R t Falset Truet superR t load_from_options( R t insecureR t cacertR t keyt kwargs( ( sD /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/loading/session.pyR 8 s
c
C sÉ | i d d t d d d d ƒ| i d d d d t i i d
ƒ d d ƒ| i d d d
d t i i d ƒ d d ƒ| i d d d d t i i d ƒ d d ƒ| i d d d d t d d d d ƒd S( Ns
--insecuret defaultt actiont
store_truet helps¿ Explicitly allow client to perform "insecure" TLS (https) requests. The server's certificate will not be verified against any certificate authorities. This option should be used with caution.s --os-cacertt metavars
t OS_CACERTsj Specify a CA bundle file to use in verifying a TLS (https) server certificate. Defaults to env[OS_CACERT].s --os-certs
t OS_CERTs Defaults to env[OS_CERT].s --os-keys t OS_KEYs Defaults to env[OS_KEY].s --timeoutiX t types s! Set request timeout (in seconds).( t add_argumentR t ost environt getR ( R t parser( ( sD /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/loading/session.pyR U s* c K sl | i d | i ƒ | i d | i ƒ | i d | i ƒ | i d | i ƒ | i d | i ƒ | i | S( NR R R R t timeout( t
setdefaultR t os_cacertt os_certt os_keyR. R ( R t namespaceR ( ( sD /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/loading/session.pyR v s c C sÝ t p t d ƒ ‚ n | d j o
h } n t i d d | i d ƒ d d ƒt i d d | i d ƒ d d ƒt i d d | i d ƒ d d ƒt i d
d t d | i d
ƒ d d ƒt i d
d | i d
ƒ d d ƒg S( s Get the oslo_config options that are needed for a
:py:class:`.Session`.
These may be useful without being registered for config file generation
or to manipulate the options before registering them yourself.
The options that are set are:
:cafile: The certificate authority filename.
:certfile: The client certificate file to present.
:keyfile: The key for the client certificate.
:insecure: Whether to ignore SSL verification.
:timeout: The max time to wait for HTTP connections.
:param dict deprecated_opts: Deprecated options that should be included
in the definition of new options. This should be a dict from the
name of the new option to a list of oslo.DeprecatedOpts that
correspond to the new option. (optional)
For example, to support the ``ca_file`` option pointing to the new
``cafile`` option name::
old_opt = oslo_cfg.DeprecatedOpt('ca_file', 'old_group')
deprecated_opts={'cafile': [old_opt]}
:returns: A list of oslo_config options.
sœ oslo.config is not an automatic dependency of keystoneauth. If you wish to use oslo.config you need to import it into your application's requirements file. t cafilet deprecated_optsR# sJ PEM encoded Certificate Authority to use when verifying HTTPs connections.t certfiles( PEM encoded client certificate cert filet keyfiles' PEM encoded client certificate key fileR R s Verify HTTPS connections.R. s Timeout value for http requestsN( R t ImportErrorR t StrOptR, t BoolOptR t IntOpt( R R5 ( ( sD /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/loading/session.pyR s(
c C s? | i d | ƒ } | i t i | ƒ ƒ | i | d | ƒ| S( sy Register the oslo_config options that are needed for a session.
The options that are set are:
:cafile: The certificate authority filename.
:certfile: The client certificate file to present.
:keyfile: The key for the client certificate.
:insecure: Whether to ignore SSL verification.
:timeout: The max time to wait for HTTP connections.
:param oslo_config.Cfg conf: config object to register with.
:param string group: The ini group to register options in.
:param dict deprecated_opts: Deprecated options that should be included
in the definition of new options. This should be a dict from the
name of the new option to a list of oslo.DeprecatedOpts that
correspond to the new option. (optional)
For example, to support the ``ca_file`` option pointing to the new
``cafile`` option name::
old_opt = oslo_cfg.DeprecatedOpt('ca_file', 'old_group')
deprecated_opts={'cafile': [old_opt]}
:returns: The list of options that was registered.
R5 t group( R t register_groupR t OptGroupt
register_opts( R t confR<