/usr/lib/python2.6/site-packages/cinderclient/tests/functional
NameSizeModeActions
hooks/-0755rm
base.py85580644editdlrm
base.pyc100650644editdlrm
test_cli.py27370644editdlrm
test_cli.pyc30940644editdlrm
test_readonly_cli.py41350644editdlrm
test_readonly_cli.pyc56900644editdlrm
__init__.py00644editdlrm
__init__.pyc1700644editdlrm
Edit: /usr/lib/python2.6/site-packages/cinderclient/tests/functional/base.pyc (10065B)
Ñò =vVc @s€ddkZddkZddkZddklZddklZddklZdZd„Z dei fd„ƒYZ dS( iÿÿÿÿN(tbase(t output_parser(t exceptionssfunctional_creds.confcCsòtiidƒ}tiidƒ}tiidƒ}tiidƒ}tiiiƒ}|itƒoh|p|iddƒ}|p|iddƒ}|p|iddƒ}|p|id d ƒ}nh|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_PASSWORDtOS_TENANT_NAMEt OS_AUTH_URLtadmintusertpassttenanttauthturitusernametpasswordt tenant_name( tostenvirontgettsixtmovest configparsertRawConfigParsertreadt _CREDS_FILE(R RRtauth_urltconfig((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyt credentialss tClientTestBasecBs³eZdZd„Zd„Zd„Zd„Zd„Zd„Zdd„Z d „Z dd „Z d „Z d „Z d „Zdd„Zdd„Zd„Zd„Zd„ZRS(s6Cinder base class, issues calls to cinderclient. cCs/tt|ƒiƒ|iƒ|_t|_dS(N(tsuperRtsetUpt _get_clientstclientsRtparser(tself((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyR;scCsFtiidtiitiidƒdƒƒ}tid|tƒS(NtOS_CINDERCLIENT_EXEC_DIRt.s.tox/functional/bintcli_dir( RRRtpathtjointabspathRt CLIClientR(R"R%((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyR@s $cOs|ii||ŽS(N(R tcinder(R"targstkwargs((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyR*Gs cCsA|ii|ƒ}|d}x|D]}|i||ƒq#WdS(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 theadersN(R!ttabletassertIn(R"t output_linest field_namesR.R-tfield((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pytassertTableHeadersKs  cCs6x/|D]'}x|D]}|i||ƒqWqWdS(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"titemsR1titemR2((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pytassertTableStructVs c Cs+d}x|D]}|i||ƒq WdS(s]Check presence of common volume properties. :param items: volume properties t attachmentstavailability_zonetbootablet created_att descriptiont encryptedtidtmetadatatnametsizetstatustuser_idt volume_typeN( R7R8R9R:s descriptionR<sidsmetadatasnamessizesstatusRBRC(R/(R"R4tvaluestvalue((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pytassert_volume_detailsds i<cCsjtiƒ}xWtiƒ||jo%||idd|ƒjoPqqW|id|||fƒdS(sÀWait until volume reaches given status. :param volume_id: uuid4 id of given volume :param status: expected status of volume :param timeout: timeout in seconds tshowtparamss3Volume %s did not reach status %s after %d seconds.N(ttimeR*tfail(R"t volume_idRAttimeoutt start_time((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pytwait_for_volume_statusps   cCs |i|idd|ƒƒdS(sVCheck that volume exists. :param volume_id: uuid4 id of given volume RGRHN(t assertTrueR*(R"RK((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pytcheck_volume_not_deletedscCs„yPtiƒ}x=tiƒ||jo%||idd|ƒjoPqqWWntij onX|id||fƒdS(sCheck that volume deleted successfully. :param volume_id: uuid4 id of given volume :param timeout: timeout in seconds RGRHs'Volume %s not deleted after %d seconds.N(RIR*Rt CommandFailedRJ(R"RKRLRM((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pytcheck_volume_deleted†s  cCsS|idd|ƒ}|i|ƒ}|i|i|dƒ|i|ddƒ|S(soCreate volume. :param params: parameters to cinder command :return: volume dictionary tcreateRHR=t available(R*t_get_property_from_outputt addCleanupt volume_deleteRN(R"RHtoutputtvolume((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyt volume_create—s cCs1||idƒjo|idd|ƒndS(s[Delete specified volume by ID. :param volume_id: uuid4 id of given volume tlisttdeleteRHN(R*(R"RK((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyRW£scCsHh}|ii|ƒ}x)|D]!}ti|dƒ||dR?R@RARKN(s created_ats descriptionsidsmetadatasnamessizesstatuss volume_id(R/(R"R4RDRE((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pytassert_snapshot_details×s cCsS|idd|ƒ}|i|ƒ}|i|i|dƒ|i|ddƒ|S(syCreate a volume snapshot from the volume id. :param volume_id: the given volume id to create a snapshot ssnapshot-createRHR=RT(R*RURVtsnapshot_deleteRc(R"RKRXtsnapshot((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pytsnapshot_createâs cCs1||idƒjo|idd|ƒndS(s\Delete specified snapshot by ID. :param snapshot_id: the given snapshot id s snapshot-listssnapshot-deleteRHN(R*(R"Rb((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyRfís(t__name__t __module__t__doc__RRR*R3R6RFRNRPRRRZRWRURcRdReRhRf(((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyR7s$           ( RRIRttempest_lib.cliRRt tempest_libRRRR(((sO/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/functional/base.pyt s