Repository URL to install this package:
|
Version:
2.5 ▾
|
ó
µEYc @ s± d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d Z d Z d e j
f d
YZ d Z d Z
d Z d Z d Z d S( iÿÿÿÿN( t
positional( t _utils( t base( t sessiont register_argparse_argumentst load_from_argparse_argumentst register_conf_optionst load_from_conf_optionst get_conf_optionsc C sy | d k r d Sy t | } Wn* t k
rL d | } t j | n X| d k ru d | } t j | 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( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/keystoneauth1/loading/session.pyt _positive_non_zero_float s
t Sessionc B sw e Z e d Z d Z e 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 j S( N( R R ( t self( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/keystoneauth1/loading/session.pyt plugin_class. s c C s g S( N( ( R ( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/keystoneauth1/loading/session.pyt get_options2 s i c K sg | d k r* | r t } q* | p$ t } n | rE | rE | | f } n t t | j 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( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/keystoneauth1/loading/session.pyR 5 s c
C sÛ | j d d } | j d d t d d d d | j d d
d d t j j d d d
| j d d
d d t j j d d d | j d d
d d t j j d d d | j d d d d t d
d d d d S( Ns API Connection Optionss, Options controlling the HTTP API Connectionss
--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 <ca-certificate>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
<certificate>t OS_CERTs Defaults to env[OS_CERT].s --os-keys <key>t OS_KEYs Defaults to env[OS_KEY].s --timeoutiX t types <seconds>s! Set request timeout (in seconds).( t add_argument_groupt add_argumentR t ost environt getR ( R t parsert
session_group( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/keystoneauth1/loading/session.pyR R s: c K sl | j d | j | j d | j | j d | j | j d | j | j d | j | j | S( NR R R R t timeout( t
setdefaultR t os_cacertt os_certt os_keyR0 R ( R t namespaceR ( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/keystoneauth1/loading/session.pyR | s c C sÐ t j } | d k r! i } n | j d d | j d d d | j d d | j d d d | j d d | j d d d | j d d
t d | j d d d | j d d | j d d d
g S( s Get 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.
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.R0 s Timeout value for http requestsN( R t get_oslo_configR t StrOptR- t BoolOptR t IntOpt( R R7 t cfg( ( sR /home/tvault/.virtenv/lib/python2.7/site-packages/keystoneauth1/loading/session.pyR
s&