/usr/lib/python2.6/site-packages/cinderclient/tests/functional
Edit: /usr/lib/python2.6/site-packages/cinderclient/tests/functional/base.pyc (10065B)
Ñò
=vVc @ s€ d d k Z d d k Z d d k Z d d k l Z d d k l Z d d k l Z d Z d „ Z d e i
f d „ ƒ YZ
d S( iÿÿÿÿN( t base( t
output_parser( t
exceptionss functional_creds.confc C sò t i i d ƒ } t i i d ƒ } t i i d ƒ } t i i d ƒ } t i i i ƒ } | i t ƒ oh | p | i d d ƒ } | p | i d d ƒ } | p | i d d ƒ } | p | i d d
ƒ } n h | d 6| d 6| d
6| d
6S( s` Retrieves credentials to run functional tests
Credentials are either read from the environment or from a config file
('functional_creds.conf'). Environment variables override those from the
config file.
The 'functional_creds.conf' file is the clean and new way to use (by
default tox 2.0 does not pass environment variables).
t OS_USERNAMEt OS_PASSWORDt OS_TENANT_NAMEt OS_AUTH_URLt admint usert passt tenantt autht urit usernamet passwordt tenant_name( t ost environt gett sixt movest configparsert RawConfigParsert readt _CREDS_FILE( R
R R t auth_urlt config( ( sO /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyt credentials s t ClientTestBasec B s³ e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d d „ Z d „ Z
d d
„ Z d „ Z d „ Z
d
„ Z d d „ Z d d „ Z d „ Z d „ Z d „ Z RS( s6 Cinder base class, issues calls to cinderclient.
c C s/ t t | ƒ i ƒ | i ƒ | _ t | _ d S( N( t superR t setUpt _get_clientst clientsR t parser( t self( ( sO /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyR ; s c C sF t i i d t i i t i i d ƒ d ƒ ƒ } t i d | t ƒ S( Nt OS_CINDERCLIENT_EXEC_DIRt .s .tox/functional/bint cli_dir( R R R t patht joint abspathR t CLIClientR ( R" R% ( ( sO /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyR @ s $c O s | i i | | Ž S( N( R t cinder( R" t argst kwargs( ( sO /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyR* G s c C sA | i i | ƒ } | d } x | D] } | i | | ƒ q# Wd S( sÆ Verify that output table has headers item listed in field_names.
:param output_lines: output table from cmd
:param field_names: field names from the output table of the cmd
t headersN( R! t tablet assertIn( R" t output_linest field_namesR. R- t field( ( sO /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyt assertTableHeadersK s
c C s6 x/ | D]' } x | D] } | i | | ƒ q Wq Wd S( s Verify that all items has keys listed in field_names.
:param items: items to assert are field names in the output table
:type items: list
:param field_names: field names from the output table of the cmd
:type field_names: list
N( R/ ( R" t itemsR1 t itemR2 ( ( sO /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyt assertTableStructV s
c
C s+ d } x | D] } | i | | ƒ q
Wd S( s] Check presence of common volume properties.
:param items: volume properties
t attachmentst availability_zonet bootablet
created_att descriptiont encryptedt idt metadatat namet sizet statust user_idt volume_typeN(
R7 R8 R9 R: s descriptionR<