/usr/lib/python2.6/site-packages/cinderclient/tests/unit/v2
NameSizeModeActions
contrib/-0755rm
fakes.py365140644editdlrm
fakes.pyc441220644editdlrm
test_auth.py126100644editdlrm
test_auth.pyc104750644editdlrm
test_availability_zone.py33000644editdlrm
test_availability_zone.pyc33640644editdlrm
test_capabilities.py14640644editdlrm
test_capabilities.pyc13870644editdlrm
test_cgsnapshots.py31000644editdlrm
test_cgsnapshots.pyc42320644editdlrm
test_consistencygroups.py65310644editdlrm
test_consistencygroups.pyc75220644editdlrm
test_limits.py61010644editdlrm
test_limits.pyc72830644editdlrm
test_pools.py17940644editdlrm
test_pools.pyc16970644editdlrm
test_qos.py29850644editdlrm
test_qos.pyc42730644editdlrm
test_quotas.py32320644editdlrm
test_quotas.pyc30770644editdlrm
test_quota_classes.py28610644editdlrm
test_quota_classes.pyc24250644editdlrm
test_services.py32000644editdlrm
test_services.pyc41100644editdlrm
test_shell.py487920644editdlrm
test_shell.pyc570230644editdlrm
test_snapshot_actions.py14690644editdlrm
test_snapshot_actions.pyc16200644editdlrm
test_types.py32980644editdlrm
test_types.pyc42500644editdlrm
test_type_access.py16260644editdlrm
test_type_access.pyc19270644editdlrm
test_volumes.py121990644editdlrm
test_volumes.pyc176760644editdlrm
test_volume_backups.py33210644editdlrm
test_volume_backups.pyc44280644editdlrm
test_volume_encryption_types.py45820644editdlrm
test_volume_encryption_types.pyc49580644editdlrm
test_volume_transfers.py17720644editdlrm
test_volume_transfers.pyc23140644editdlrm
__init__.py00644editdlrm
__init__.pyc1670644editdlrm
Edit: /usr/lib/python2.6/site-packages/cinderclient/tests/unit/v2/test_shell.pyc (57023B)
=vVc@sddkZddkZddklZddklZddklZddkl Z ddkl Z ddk l Z ddk l Z ddklZdd klZdd klZd eifd YZdS( iN(tfixture(tparse(tclient(t exceptions(tshell(tvolumes(tutils(tfakes(tkeystone_clientt ShellTestcBseZhdd6dd6dd6dd6eid6Zd Zd Zd Zd Zddd Z dddZ dZ dZ dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd Zd!Zd"Zd#Z d$Z!d%Z"d&Z#d'Z$d(Z%d)Z&d*Z'd+Z(d,Z)d-Z*d.Z+d/Z,d0Z-d1Z.d2Z/d3Z0d4Z1d5Z2d6Z3e4i5d7e4i5d8d9Z6d:Z7d;Z8d<Z9d=Z:d>Z;d?Z<d@Z=dAZ>dBZ?dCZ@dDZAdEZBdFZCdGZDdHZEdIZFdJZGdKZHdLZIdMZJdNZKdOZLdPZMdQZNdRZOdSZPdTZQdUZRdVZSdWZTdXZUdYZVdZZWd[ZXd\ZYd]ZZd^Z[d_Z\d`Z]daZ^dbZ_dcZ`ddZadeZbdfZcdgZddhZediZfdjZgdkZhdlZidmZjdnZkdoZldpZmdqZndrZodsZpdtZqduZrdvZsdwZtdxZudyZvdzZwd{Zxd|Zyd}Zzd~Z{dZ|dZ}dZ~dZdZddZdZdZdZdZRS(tusernametCINDER_USERNAMEtpasswordtCINDER_PASSWORDt project_idtCINDER_PROJECT_IDt2tOS_VOLUME_API_VERSIONt CINDER_URLcCstt|ix1|iD]&}|iti||i|qWti|_t i |_ dt _ |it i |_|iidtidtiti|_dS(sRun before each test.cWstiS((Rt FakeClient(t_((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt5stGETttextN(tsuperR tsetUptFAKE_ENVt useFixturetfixturestEnvironmentVariableRtOpenStackCinderShellRtget_client_classtold_get_client_classtrequests_mock_fixturetFixturetrequestst register_uriRtBASE_URLtkeystone_request_callbacktmocktMocktcs(tselftvar((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyR*s      cCs dtfdY}||S(NtArgscBseZdZRS(cSs|ii|dS(N(t__dict__tupdate(R*tentries((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt__init__@s(t__name__t __module__R0(((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyR,?s(tobject(R*targsR,((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt _make_args>scCsJt|ido|iiin|it_tt|i dS(NR)( thasattrRR)tclear_callstackR RRRR ttearDown(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyR8Es cCs|ii|idS(N(Rtmaintsplit(R*tcmd((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt run_commandQscKs|iii|||||S(N(RR)t assert_called(R*tmethodturltbodyt partial_bodytkwargs((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyR=TscCs|iii||||S(N(RR)tassert_called_anytime(R*R>R?R@RA((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyRCYscCs!|id|idddS(NtlistRs/volumes/detail(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt test_list^s cCs!|id|idddS(Ns!list --all-tenants=1 --tenant 123Rs,/volumes/detail?all_tenants=1&project_id=123(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt(test_list_filter_tenant_with_all_tenantscs  cCs!|id|idddS(Nslist --tenant 123Rs,/volumes/detail?all_tenants=1&project_id=123(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt+test_list_filter_tenant_without_all_tenantshs  cCs|id|iddhhdd6dd6dd6dd 6dd 6dd 6dd 6d d6dd6dd6dd6dd6hdd6d6dd6dd6td6d6}|idd|dS(Ns"create --metadata key1="--test1" 1Rs /volumes/1234timageRefRtcreatingtstatusitsizetuser_idtavailability_zonetsource_replicatdetachedt attach_statust source_volidtconsistencygroup_idtnamet snapshot_ids "--test1"tkey1tmetadatat volume_typet descriptiont multiattachtvolumetPOSTs/volumes(R<R=tNonetFalseRC(R*texpected((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_metadata_args_with_limiterms&  cCs|id|iddhhdd6dd6dd6dd 6dd 6dd 6dd 6d d6dd6dd6dd6dd6hdd6d6dd6dd6td6d6}|idd|dS(Ns*create --metadata key1="--t1" --name="t" 1Rs /volumes/1234RHRRIRJiRKRLRMRNRORPRQRRs"t"RSRTs"--t1"RURVRWRXRYRZR[s/volumes(R<R=R\R]RC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt'test_metadata_args_limiter_display_names&  cCs|idhhdd6dd6dd6dd6dd6dd 6dd 6d d 6dd 6dd6dd6dd6hdd6dd6d6dd6dd6td6d6}|idd|dS(Ns-create --metadata key1="test1" key2="test2" 1RHRRIRJiRKRLRMRNRORPRQRRRSRTs"test1"RUs"test2"tkey2RVRWRXRYRZR[s/volumes(R<R\R]RC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_delimit_metadata_argss&    cCs|id|iddhhdd6dd6dd6dd 6dd 6dd 6dd 6d d6dd6dd6dd6dd6hdd6d6dd6dd6td6d6}|idd|dS(Ns(create --metadata key1="t1" --name="t" 1Rs /volumes/1234RHRRIRJiRKRLRMRNRORPRQRRs"t"RSRTs"t1"RURVRWRXRYRZR[s/volumes(R<R=R\R]RC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt'test_delimit_metadata_args_display_names&  cCs!|id|idddS(Nslist --status=availableRs /volumes/detail?status=available(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_filter_statuss cCs!|id|idddS(Nslist --name=1234Rs/volumes/detail?name=1234(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_filter_names cCs!|id|idddS(Nslist --all-tenants=1Rs/volumes/detail?all_tenants=1(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_all_tenantss cCs!|id|idddS(Nslist --marker=1234Rs/volumes/detail?marker=1234(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_markers cCs!|id|idddS(Nslist --limit=10Rs/volumes/detail?limit=10(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_limits cCs!|id|idddS(Ns!list --sort_key=id --sort_dir=ascRs(/volumes/detail?sort_dir=asc&sort_key=id(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_sort_valids cCs!|id|idddS(Nslist --sort_key=nameRs%/volumes/detail?sort_key=display_name(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_sort_key_names cCs!|id|idddS(Nslist --sort=nameRs!/volumes/detail?sort=display_name(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_sort_names cCs|it|iddS(Ns"list --sort_key=foo --sort_dir=asc(t assertRaisest ValueErrorR<(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_sort_key_invalids cCs|it|iddS(Ns!list --sort_key=id --sort_dir=foo(RlRmR<(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_sort_dir_invalids cCs=dddg}x'|D]}|iti|i|qWdS(Ns'list --sort name:desc --sort_key=statuss$list --sort name:desc --sort_dir=ascs6list --sort name:desc --sort_key=status --sort_dir=asc(RlRt CommandErrorR<(R*tcmdsR;((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_mix_sort_argss  cCs!|id|idddS(Nslist --sort=idRs/volumes/detail?sort=id(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_sort_single_key_onlys cCs!|id|idddS(Nslist --sort=id:Rs/volumes/detail?sort=id(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt(test_list_sort_single_key_trailing_colons cCs7|iddtidg}|id|dS(Nslist --sort=id:ascs/volumes/detail?%stsortsid:ascR(ssortsid:asc(R<Rt urlencodeR=(R*R?((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt!test_list_sort_single_key_and_dirs cCs7|iddtidg}|id|dS(Nslist --sort=id,status,sizes/volumes/detail?%sRusid,status,sizeR(ssortsid,status,size(R<RRvR=(R*R?((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt!test_list_sort_multiple_keys_onlys cCs7|iddtidg}|id|dS(Ns#list --sort=id:asc,status,size:descs/volumes/detail?%sRusid:asc,status,size:descR(ssortsid:asc,status,size:desc(R<RRvR=(R*R?((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt%test_list_sort_multiple_keys_and_dirss c CsxxdddddgD]a}tidii}z<|~}|i||ititidtddWdQXqWdS( Nslist --sort_key=nameslist --sort_dir=ascs#list --sort_key=name --sort_dir=ascslist --sort=nameslist --sort=name:ascscinderclient.utils.print_listtexclude_unavailablet sortby_index( R'tpatcht__exit__t __enter__R<tassert_called_once_withtANYtTrueR\(R*R;t_[1]t mock_print((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_reorder_with_sort s& c CsvxoddgD]a}tidii}z<|~}|i||ititidtddWdQXq WdS(NRDslist --all-tenantsscinderclient.utils.print_listRzR{i(R'R|R}R~R<RRR(R*R;RR((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_reorder_without_sorts & cCs!|id|idddS(Nsavailability-zone-listRs/os-availability-zone(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_availability_zone#s cCshhdd6d6}d|dd<|id|iddd||id d d |dd<|id |iddd||id d dS( NRKRZt1234RTscreate --snapshot-id=1234R[s/volumesRARs /volumes/1234iscreate --snapshot-id=1234 2(R\R<RCR=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt test_create_volume_from_snapshot's  cCshhdd6d6}d|dd<|id|iddd||id d d |dd<|id |iddd||id d dS( NRKRZRRQscreate --source-volid=1234R[s/volumesRARs /volumes/1234iscreate --source-volid=1234 2(R\R<RCR=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_create_volume_from_volume4s  cCsYhhdd6d6}d|dd<|id|iddd||id d dS( NRKRZRRNscreate --source-replica=1234R[s/volumesRARs /volumes/1234(R\R<RCR=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_create_volume_from_replicaAs  cCs`hhdd6dd6dd6dd6d 6}|id |id d d ||idddS(NRIRJiRKRRHRORPRZscreate --image=1234 1R[s/volumesRARs /volumes/1234(R<RCR=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_create_volume_from_imageIs  cCs|it|iddS(Ntcreate(Rlt SystemExitR<(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt2test_create_size_required_if_not_snapshot_or_cloneRscCsRhhdd6dd6d6}|id|iddd ||id d dS( NRIRJiRKRZscreate 0R[s/volumesRARs /volumes/1234(R<RCR=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt.test_create_size_zero_if_not_snapshot_or_cloneUs   cCs!|id|idddS(Ns show 1234Rs /volumes/1234(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt test_show\s cCs!|id|idddS(Ns delete 1234tDELETEs /volumes/1234(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt test_delete`s cCs1|id|idd|idddS(Nsdelete sample-volumeRs0/volumes/detail?all_tenants=1&name=sample-volumeRs /volumes/1234(R<RCR=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_delete_by_nameds cCs1|id|idd|idddS(Nsdelete 1234 5678Rs /volumes/1234s /volumes/5678(R<RCR=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_delete_multiplejs cCs!|id|idddS(Nsbackup-create 1234R[s/backups(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt test_backupos cCs!|id|idddS(Ns backup-create 1234 --incrementalR[s/backups(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_backup_incrementalss cCs!|id|idddS(Nsbackup-create 1234 --forceR[s/backups(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_backup_forcews cCs!|id|idddS(Nsbackup-restore 1234R[s/backups/1234/restore(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt test_restore{s scinderclient.utils.print_dictscinderclient.utils.find_volumec Csd}d}h|d6|d6}|i|}tii|iidii}zf|~}ti |h|d6dt |_ t i |i||i|d||i|iWdQXdS(NRt5678tbackupRZtrestoretidtloaded(R5R'R|R3R)trestoresR}R~RtVolumeRt return_valuet test_shelltdo_backup_restoreRt assertTruetcalled( R*tmock_find_volumetmock_print_dictt backup_idt volume_idtinputR4Rtmocked_restore((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_do_backup_restores      cCs!|id|idddS(Nsbackup-export 1234Rs/backups/1234/export_record(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_record_exports cCs?|idhhdd6dd6d6}|idd|dS( Ns$backup-import fake.driver URL_STRINGs fake.drivertbackup_servicet URL_STRINGt backup_urls backup-recordR[s/backups/import_record(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_record_imports  cCs!|id|idddS(Nssnapshot-list --volume-id=1234Rs /snapshots/detail?volume_id=1234(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt#test_snapshot_list_filter_volume_ids cCs!|id|idddS(Ns1snapshot-list --status=available --volume-id=1234Rs1/snapshots/detail?status=available&volume_id=1234(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt.test_snapshot_list_filter_status_and_volume_ids cCs|idhhdd6d6}|iddd||idhhd d 6d6}|iddd||id hhdd6d d 6d6}|iddd||it|id dS( Nsrename 1234 new-namesnew-nameRSRZtPUTs /volumes/1234R@s)rename 1234 --description=new-descriptionsnew-descriptionRXs2rename 1234 new-name --description=new-descriptiontrename(R<R=RlR(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt test_renames   cCs|idhhdd6d6}|iddd||idhhd d 6d6}|iddd||id hhdd6d d 6d6}|iddd||it|id dS( Nssnapshot-rename 1234 new-namesnew-nameRStsnapshotRs/snapshots/1234R@s2snapshot-rename 1234 --description=new-descriptionsnew-descriptionRXs;snapshot-rename 1234 new-name --description=new-descriptionssnapshot-rename(R<R=RlR(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_rename_snapshots   cCs9|id|iddhhdd6dd6d6dS( Ns%metadata 1234 set key1=val1 key2=val2R[s/volumes/1234/metadatatval1RUtval2RaRV(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_set_metadata_sets  cCs7|id|idd|idddddS(Ns'metadata 1234 unset key1=val1 key2=val2Rs/volumes/1234/metadata/key1s/volumes/1234/metadata/key2tposi(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_set_metadata_delete_dicts cCs7|id|idd|idddddS(Nsmetadata 1234 unset key1 key2Rs/volumes/1234/metadata/key1s/volumes/1234/metadata/key2Ri(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_set_metadata_delete_keyss cCs;|idhhdd6d6}|iddd|dS(Nsreset-state 1234t availableRJsos-reset_statusR[s/volumes/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_reset_states cCs;|idhhdd6d6}|iddd|dS(Nsreset-state --state in-use 1234sin-useRJsos-reset_statusR[s/volumes/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_reset_state_attachs cCs;|idhhdd6d6}|iddd|dS(Nsreset-state --state error 1234terrorRJsos-reset_statusR[s/volumes/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_reset_state_with_flags cCsB|idhhdd6dd6d6}|iddd |dS( Ns)reset-state --attach-status detached 1234RRJRORPsos-reset_statusR[s/volumes/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt#test_reset_state_with_attach_statuss  cCsB|idhhdd6dd6d6}|iddd |dS( Ns8reset-state --state in-use --attach-status attached 1234sin-useRJtattachedRPsos-reset_statusR[s/volumes/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt-test_reset_state_with_attach_status_with_flags  cCsB|idhhdd6dd6d6}|iddd |dS( Ns)reset-state --reset-migration-status 1234RRJtnonetmigration_statussos-reset_statusR[s/volumes/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt,test_reset_state_with_reset_migration_statuss  cCsQ|idhhdd6d6}|iddd||iddd|dS( Ns#reset-state 1234 5678 --state errorRRJsos-reset_statusR[s/volumes/1234/actionR@s/volumes/5678/action(R<RC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_reset_state_multiples  cCsMd}|iti|i|hhdd6d6}|iddd|dS(Nsreset-state 1234 123456789RRJsos-reset_statusR[s/volumes/1234/actionR@(RlRRpR<RC(R*R;R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt)test_reset_state_two_with_one_nonexistents cCs#d}|iti|i|dS(Nsreset-state 123456789(RlRRpR<(R*R;((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt)test_reset_state_one_with_one_nonexistentscCs;|idhhdd6d6}|iddd|dS(Nssnapshot-reset-state 1234RRJsos-reset_statusR[s/snapshots/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_snapshot_reset_states cCs;|idhhdd6d6}|iddd|dS(Ns'snapshot-reset-state --state error 1234RRJsos-reset_statusR[s/snapshots/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt#test_snapshot_reset_state_with_flags cCsQ|idhhdd6d6}|iddd||iddd|dS( Nssnapshot-reset-state 1234 5678RRJsos-reset_statusR[s/snapshots/1234/actionR@s/snapshots/5678/action(R<RC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt"test_snapshot_reset_state_multiple#s  cCs!|id|idddS(Ns type-listRs/types?is_public=None(R<RC(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_type_list+s cCs!|id|idddS(Nstype-create test-type-1R[s/types(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_type_create/s cCsIhhdd6dd6td6d6}|id|idd d |dS( Ns test-type-1RSstest_type-1-descRXsos-volume-type-access:is_publicRWsGtype-create test-type-1 --description=test_type-1-desc --is-public=TrueR[s/typesR@(RR<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_type_create_public3s   cCsIhhdd6dd6td6d6}|id|idd d |dS( Ns test-type-3RSstest_type-3-descRXsos-volume-type-access:is_publicRWsHtype-create test-type-3 --description=test_type-3-desc --is-public=FalseR[s/typesR@(R]R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_type_create_private<s   cCs!|id|idddS(Ns type-access-list --volume-type 3Rs/types/3/os-volume-type-access(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_type_access_listEs cCsKhhdd6d6}|id|idd|iddd |dS( Nt101tprojecttaddProjectAccesss0type-access-add --volume-type 3 --project-id 101Rs/types/3R[s/types/3/actionR@(R<RCR=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_type_access_add_projectIs  cCshhdd6d6}tidii}z6|~}d|_|id|itidWdQX|idd d |dS( NRRRs cinderclient.utils.find_resourcet3sVtype-access-add --volume-type type_name --project-id 101t type_nameR[s/types/3/actionR@( R'R|R}R~RR<RRR=(R*R^Rt mock_find((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt$test_type_access_add_project_by_namePs& cCsKhhdd6d6}|id|idd|iddd |dS( NRRtremoveProjectAccesss3type-access-remove --volume-type 3 --project-id 101Rs/types/3R[s/types/3/actionR@(R<RCR=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_type_access_remove_projectZs  cCsA|id|idd|idd|idddS(s Test encryption-type-list shell command. Verify a series of GET requests are made: - one to get the volume type list information - one per volume type to retrieve the encryption type information sencryption-type-listRs/types?is_public=Nones/types/1/encryptions/types/2/encryptionN(R<RC(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_encryption_type_listbs cCs1|id|idd|idddS(s Test encryption-type-show shell command. Verify two GET requests are made per command invocation: - one to get the volume type information - one to get the encryption type information sencryption-type-show 1Rs/types/1/encryptions/types/1N(R<R=RC(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_encryption_type_showos cCs`hhdd6dd6dd6dd6d6}|id|id d d ||id d dS(s  Test encryption-type-create shell command. Verify GET and POST requests are made per command invocation: - one GET request to retrieve the relevant volume type information - one POST request to create the new encryption type tciphertkey_sizet TestProvidertproviders front-endtcontrol_locationt encryptions%encryption-type-create 2 TestProviderR[s/types/2/encryptionR@Rs/types/2N(R\R<R=RC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_encryption_type_create{s  cCshdd6dd6dd6dd6}d ig}|iD]\}}|d ||fq9~}hhdd 6dd 6dd 6dd6d6}|id||idd|idd|iddd|dS(s Test encryption-type-update shell command. Verify two GETs/one PUT requests are made per command invocation: - one GET request to retrieve the relevant volume type information - one GET request to retrieve the relevant encryption type information - one PUT request to update the encryption type information Verify that the PUT request correctly parses encryption-type-update parameters from sys.argv tEncryptionProviders --providertdess--cipheris --key-sizesback-ends--control-locationt s%s %sRRRRRsencryption-type-update 1 %sRs/types/1/encryptions/types/1Rs/types/1/encryption/providerR@N(tjointitemsR<R=RC(R*t parametersRtktvR4R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_encryption_type_updates @ cCsThhd6}|id|idd|idd|iddd|d S( se Test encryption-type-update shell command. Verify two GETs/one PUT requests are made per command invocation: - one GET request to retrieve the relevant volume type information - one GET request to retrieve the relevant encryption type information - one PUT request to update the encryption type information Rsencryption-type-update 1Rs/types/1/encryptions/types/1Rs/types/1/encryption/providerR@N(R<R=RC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt)test_encryption_type_update_no_attributess  c Csddg}dig}|D]}|d|q~}g}|D](}||ididddfqE~}ht|d6}|id||id d |id d |id d d|dS(s Test encryption-type-update shell command. Verify two GETs/one PUT requests are made per command invocation: - one GET request to retrieve the relevant volume type information - one GET request to retrieve the relevant encryption type information - one PUT request to update the encryption type information Verify that the encryption-type body produced contains default None values for all specified parameters. s--ciphers --key-sizeRs%st-RRsencryption-type-update 1 %sRs/types/1/encryptions/types/1Rs/types/1/encryption/providerR@N(RtstriptreplaceR\tdictR<R=RC( R*RRtpR4t_[2]Rtexpected_pairsR^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt.test_encryption_type_update_default_attributess .5cCs1|id|idd|idddS(s Test encryption-type-delete shell command. Verify one GET/one DELETE requests are made per command invocation: - one GET request to retrieve the relevant volume type information - one DELETE request to delete the encryption type information sencryption-type-delete 1Rs/types/1/encryption/providerRs/types/1N(R<R=RC(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_encryption_type_deletes cCsI|idhhdd6dd6dd6d6}|idd d |dS( Ns?migrate 1234 fakehost --force-host-copy=True --lock-volume=TrueRtforce_host_copyt lock_volumetfakehostthostsos-migrate_volumeR[s/volumes/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_migrate_volumes   cCsI|idhhtd6td6dd6d6}|iddd |dS( Ns5migrate 1234 fakehost --force-host-copy --lock-volumeRRRRsos-migrate_volumeR[s/volumes/1234/actionR@(R<RR=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_migrate_volume_bool_forces   cCs|idhhdd6dd6dd6d6}|idd d ||id hhtd6td6dd6d6}|idd d |dS( NsAmigrate 1234 fakehost --force-host-copy=False --lock-volume=FalseR]RRRRsos-migrate_volumeR[s/volumes/1234/actionR@smigrate 1234 fakehost(R<R=R](R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt$test_migrate_volume_bool_force_falses    cCs9|id|iddhhdd6dd6d6dS( Ns.snapshot-metadata 1234 set key1=val1 key2=val2R[s/snapshots/1234/metadataRRURRaRV(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_snapshot_metadata_sets  cCs1|id|idd|idddS(Ns0snapshot-metadata 1234 unset key1=val1 key2=val2Rs/snapshots/1234/metadata/key1s/snapshots/1234/metadata/key2(R<RC(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt!test_snapshot_metadata_unset_dicts cCs1|id|idd|idddS(Ns&snapshot-metadata 1234 unset key1 key2Rs/snapshots/1234/metadata/key1s/snapshots/1234/metadata/key2(R<RC(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt!test_snapshot_metadata_unset_keyss cCs9|id|iddhhdd6dd6d6dS( Ns-metadata-update-all 1234 key1=val1 key2=val2Rs/volumes/1234/metadataRRURRaRV(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_volume_metadata_update_all s  cCs9|id|iddhhdd6dd6d6dS( NsMsnapshot-metadata-update-all 1234 key1=val1 key2=val2Rs/snapshots/1234/metadataRRURRaRV(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt!test_snapshot_metadata_update_alls cCsr|idhhtd6d6}|iddd||idhhtd6d6}|iddd|dS(Nsreadonly-mode-update 1234 Truetreadonlysos-update_readonly_flagR[s/volumes/1234/actionR@sreadonly-mode-update 1234 False(R<RR=R](R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_readonly_mode_updates   cCs2|id|iddhdd6dd6dS(Ns"service-disable host cinder-volumeRs/os-services/disables cinder-volumetbinaryR(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_service_disable!s  cCsEd}|i|hdd6dd6dd6}|idd|dS( Ns5service-disable host cinder-volume --reason no_reasonRs cinder-volumeRt no_reasontdisabled_reasonRs/os-services/disable-log-reason(R<R=(R*R;R@((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt!test_services_disable_with_reason&s   cCs2|id|iddhdd6dd6dS(Ns!service-enable host cinder-volumeRs/os-services/enables cinder-volumeRR(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_service_enable-s  cCsB|idhhdd6dd6d6}|iddd |dS( Ns,retype 1234 foo --migration-policy=on-demandtfootnew_types on-demandtmigration_policys os-retypeR[s/volumes/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_retype_with_policy2s  cCsB|idhhdd6dd6d6}|iddd |dS( Nsretype 1234 fooRRtneverRs os-retypeR[s/volumes/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_retype_default_policy8s  cCs!|id|idddS(Nssnapshot-delete 1234Rs/snapshots/1234(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_snapshot_delete>s cCs!|id|idddS(Nsquota-delete 1234Rs/os-quota-sets/1234(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_quota_deleteBs cCs!|id|idddS(Nssnapshot-delete 5678Rs/snapshots/5678(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_snapshot_delete_multipleFs cCs|idhhdd6hdd6d6dd6d d 6d d 6d d6hdd6dd6d6td6d6}|iddd|dS(Nsxmanage host1 some_fake_name --name foo --description bar --volume-type baz --availability-zone az --metadata k1=v1 k2=v2thost1Rtsome_fake_names source-nametrefRRStbarRXtbazRWtazRMtv1tk1tv2tk2RVtbootableRZR[s/os-volume-manageR@(R<R]RC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_volume_manageJs  cCs|idhhdd6hdd6d6dd6d d 6d d 6d d6hdd6dd6d6td6d6}|iddd|dS(s Tests the --bootable option If this flag is specified, then the resulting POST should contain bootable: True. smanage host1 some_fake_name --name foo --description bar --bootable --volume-type baz --availability-zone az --metadata k1=v1 k2=v2RRRs source-nameRRRSRRXRRWRRMRRRR RVR!RZR[s/os-volume-manageR@N(R<RRC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_volume_manage_bootableYs  cCs|idhhdd6hdd6d6dd6d d 6d d 6d d6hdd6dd6d6td6d6}|iddd|dS(s Tests the --source-name option. Checks that the --source-name option correctly updates the ref structure that is passed in the HTTP POST sqmanage host1 VolName --name foo --description bar --volume-type baz --availability-zone az --metadata k1=v1 k2=v2RRtVolNames source-nameRRRSRRXRRWRRMRRRR RVR!RZR[s/os-volume-manageR@N(R<R]RC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_volume_manage_source_namens  cCs|idhhdd6hdd6d6dd6d d 6d d 6d d6hdd6dd6d6td6d6}|iddd|dS(s Tests the --source-id option. Checks that the --source-id option correctly updates the ref structure that is passed in the HTTP POST smanage host1 1234 --id-type source-id --name foo --description bar --volume-type baz --availability-zone az --metadata k1=v1 k2=v2RRRs source-idRRRSRRXRRWRRMRRRR RVR!RZR[s/os-volume-manageR@N(R<R]RC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_volume_manage_source_ids  cCs.|id|idddhdd6dS(Ns unmanage 1234R[s/volumes/1234/actionR@s os-unmanage(R<R=R\(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_volume_unmanages cCs.|id|idddhdd6dS(Nsreplication-promote 1234R[s/volumes/1234/actionR@sos-promote-replica(R<R=R\(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_replication_promotes cCs.|id|idddhdd6dS(Nsreplication-reenable 1234R[s/volumes/1234/actionR@sos-reenable-replica(R<R=R\(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_replication_reenables cCsPhhdd6hdd6dd6d6d6}|id |id d d |d S(s Tests create snapshot with --metadata parameter. Checks metadata params are set during create snapshot when metadata is passed iRRRRR RVRs8snapshot-create 1234 --metadata k1=v1 k2=v2 --force=TrueR[s /snapshotsRAN(R<RC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt.test_create_snapshot_from_volume_with_metadatas    cCsPhhdd6hdd6dd6d6d6}|id |id d d |d S(s Tests create snapshot with --metadata parameter. Checks metadata params are set during create snapshot when metadata is passed iRRRRR RVRs3snapshot-create 1234 --metadata k1=v1 k2=v2 --forceR[s /snapshotsRAN(R<RC(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt9test_create_snapshot_from_volume_with_metadata_bool_forces    cCs!|id|idddS(Ns get-poolsRs/scheduler-stats/get_pools(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_get_poolss cCs!|id|idddS(Nsget-pools --detailRs&/scheduler-stats/get_pools?detail=True(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_get_pools_details cCs!|id|idddS(Ns transfer-listRs/os-volume-transfer/detail(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_transfers cCs!|id|idddS(Nstransfer-list --all-tenants=1Rs(/os-volume-transfer/detail?all_tenants=1(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_list_transfer_all_tenantss cCsP|idhhdd6dd6dd6dd 6d 6}|id d d |dS(Nsmconsisgroup-update --name cg2 --description desc2 --add-volumes uuid1,uuid2 --remove-volumes uuid3,uuid4 1234tcg2RStdesc2RXs uuid1,uuid2t add_volumess uuid3,uuid4tremove_volumestconsistencygroupRs/consistencygroups/1234R@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_consistencygroup_updates  cCs|iti|iddS(Nsconsisgroup-update 1234(RlRt BadRequestR<(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt(test_consistencygroup_update_bad_requests cCsb|idhhdd6dd6dd6dd6dd6d d 6dd 6d 6}|id d|dS(Ns7consisgroup-create-from-src --name cg --cgsnapshot 1234tcgRSRt cgsnapshot_idRXRLRRIRJt source_cgidsconsistencygroup-from-srcR[s"/consistencygroups/create_from_src(R<R\R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt*test_consistencygroup_create_from_src_snaps  cCsb|idhhdd6dd6dd6dd6dd6dd 6d d 6d 6}|id d|dS(Ns6consisgroup-create-from-src --name cg --source-cg 1234R8RSR9RXRLRRIRJRR:sconsistencygroup-from-srcR[s"/consistencygroups/create_from_src(R<R\R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt(test_consistencygroup_create_from_src_cgs  cCs|iti|iddS(Ns%consisgroup-create-from-src --name cg(RlRR6R<(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt5test_consistencygroup_create_from_src_fail_no_snap_cg s cCs|iti|iddS(NsHconsisgroup-create-from-src --name cg --cgsnapshot 1234 --source-cg 5678(RlRR6R<(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt7test_consistencygroup_create_from_src_fail_both_snap_cgs cCsB|idhhhdd6d6d6}|iddd|dS( Ns!image-metadata 1234 set key1=val1RRURVsos-set_image_metadataR[s/volumes/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_set_image_metadatas cCs;|idhhdd6d6}|iddd|dS(Nsimage-metadata 1234 unset key1RUtkeysos-unset_image_metadataR[s/volumes/1234/actionR@(R<R=(R*R^((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_unset_image_metadatas icCsQ|iiii|dd!\}}ti|\}}ti|}||fS(Nii(RR)Rt callstackRt splitquerytparse_qs(R*RR>R?tpathtquerytparams((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyt_get_params_from_stack#s#cCs|idhdgd6dgd6dgd6dgd 6}|i\}}|id ||id t|x,|iD]}|i||||qWdS( NsIbackup-list --all-tenants=1 --name=bc --status=available --volume-id=1234t1t all_tenantstbcRSRRJRRs/backups/detaili(R<RHt assertEqualtlentkeys(R*R^RERGR((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_backup_list_all_tenants)s      cCs!|id|idddS(Nsbackup-list --volume-id=1234Rs/backups/detail?volume_id=1234(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_backup_list_volume_id;s cCs!|id|idddS(Ns backup-listRs/backups/detail(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_backup_list?s cCs!|id|idddS(Nsget-capabilities hostRs/capabilities/host(R<R=(R*((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyttest_get_capabilitiesCs N(R1R2RR%RRR5R8R<R\R=RCRERFRGR_R`RbRcRdReRfRgRhRiRjRkRnRoRrRsRtRwRxRyRRRRRRRRRRRRRRRRRR'R|RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR R R RRRRRR"R#R%R&R'R(R)R*R+R,R-R.R/R5R7R;R<R=R>R?RARHRORPRQRR(((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyR s                                                                                                               (RR'trequests_mock.contribRR!tsix.moves.urllibRt cinderclientRRRtcinderclient.v2RRtcinderclient.tests.unitRtcinderclient.tests.unit.v2Rt$cinderclient.tests.unit.fixture_dataRtTestCaseR (((sR/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/tests/unit/v2/test_shell.pyts