/usr/lib/python2.6/site-packages/cinderclient/v2
NameSizeModeActions
contrib/-0755rm
availability_zones.py14270644editdlrm
availability_zones.pyc15960644editdlrm
capabilities.py12480644editdlrm
capabilities.pyc14810644editdlrm
cgsnapshots.py40040644editdlrm
cgsnapshots.pyc47790644editdlrm
client.py52680644editdlrm
client.pyc43340644editdlrm
consistencygroups.py60430644editdlrm
consistencygroups.pyc62410644editdlrm
limits.py27750644editdlrm
limits.pyc40970644editdlrm
pools.py22040644editdlrm
pools.pyc17030644editdlrm
qos_specs.py47890644editdlrm
qos_specs.pyc60440644editdlrm
quotas.py19180644editdlrm
quotas.pyc23830644editdlrm
quota_classes.py15710644editdlrm
quota_classes.pyc18700644editdlrm
services.py21860644editdlrm
services.pyc26390644editdlrm
shell.py829170644editdlrm
shell.pyc759990644editdlrm
volumes.py257360644editdlrm
volumes.pyc285530644editdlrm
volume_backups.py40510644editdlrm
volume_backups.pyc49900644editdlrm
volume_backups_restore.py15740644editdlrm
volume_backups_restore.pyc17800644editdlrm
volume_encryption_types.py37030644editdlrm
volume_encryption_types.pyc41430644editdlrm
volume_snapshots.py65760644editdlrm
volume_snapshots.pyc86400644editdlrm
volume_transfers.py32480644editdlrm
volume_transfers.pyc40140644editdlrm
volume_types.py48080644editdlrm
volume_types.pyc56250644editdlrm
volume_type_access.py18880644editdlrm
volume_type_access.pyc25310644editdlrm
__init__.py6940644editdlrm
__init__.pyc2250644editdlrm
Edit: /usr/lib/python2.6/site-packages/cinderclient/v2/volumes.pyc (28553B)
Ñò =vVc @s«dZddkZyddklZWn#ej oddklZnXddklZdZdZ hdd 6Z dei fd„ƒYZ dei fd„ƒYZdS(s Volume interface (v2 extension).iÿÿÿÿN(t urlencode(tbasetasctdesctidtstatustsizetavailability_zonetnametbootablet created_att display_nametVolumecBseZdZd„Zd„Zd„Zddd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„Zd„Zddd„Zd„Zd„Zd„Zd„Zd„Zddddded„Zd„Zd„Zd„Zd„ZRS(sDA volume is an extra block level storage to the OpenStack instances.cCs d|iS(Ns (R(tself((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyt__repr__%scCs|ii|ƒdS(sDelete this volume.N(tmanagertdelete(R ((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR(scKs|ii||dS(s/Update the name or description for this volume.N(Rtupdate(R tkwargs((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR,strwcCs|ii|||||ƒS(sSet attachment metadata. :param instance_uuid: uuid of the attaching instance. :param mountpoint: mountpoint on the attaching instance or host. :param mode: the access mode. :param host_name: name of the attaching host. (Rtattach(R t instance_uuidt mountpointtmodet host_name((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR0scCs|ii|ƒS(sClear attachment metadata.(Rtdetach(R ((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR;scCs|ii|ƒS(sReserve this volume.(Rtreserve(R tvolume((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR?scCs|ii|ƒS(sUnreserve this volume.(Rt unreserve(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRCscCs|ii|ƒS(sBegin detaching volume.(Rtbegin_detaching(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRGscCs|ii|ƒS(sRoll detaching volume.(Rtroll_detaching(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRKscCs|ii||ƒS(s]Initialize a volume connection. :param connector: connector dict from nova. (Rtinitialize_connection(R Rt connector((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyROscCs|ii||ƒS(s\Terminate a volume connection. :param connector: connector dict from nova. (Rtterminate_connection(R RR ((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR!VscCs|ii||ƒS(s§Set or Append metadata to a volume. :param volume : The :class: `Volume` to set metadata on :param metadata: A dict of key/value pairs to set (Rt set_metadata(R Rtmetadata((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR"]scCs|ii|||ƒS(s¢Set a volume's image metadata. :param volume : The :class: `Volume` to set metadata on :param metadata: A dict of key/value pairs to set (Rtset_image_metadata(R RR#((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR$escCs|ii|||ƒS(sœDelete specified keys from volume's image metadata. :param volume: The :class:`Volume`. :param keys: A list of keys to be removed. (Rtdelete_image_metadata(R Rtkeys((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR%mscCs|ii|||||ƒS(s-Upload a volume to image service as an image.(Rtupload_to_image(R tforcet image_nametcontainer_formatt disk_format((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR'uscCs|ii|ƒdS(s€Delete the specified volume ignoring its current state. :param volume: The UUID of the volume to force-delete. N(Rt force_delete(R ((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR,{scCs|ii||||ƒdS(s‰Update the volume with the provided state. :param state: The state of the volume to set. :param attach_status: The attach_status of the volume to be set, or None to keep the current status. :param migration_status: The migration_status of the volume to be set, or None to keep the current status. N(Rt reset_state(R tstatet attach_statustmigration_status((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR-‚s cCs|ii||ƒdS(s©Extend the size of the specified volume. :param volume: The UUID of the volume to extend :param new_size: The desired size to extend volume to. N(Rtextend(R Rtnew_size((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR1scCs|ii||||ƒdS(s!Migrate the volume to a new host.N(Rtmigrate_volume(R thosttforce_host_copyt lock_volume((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR3•scCs|ii|||ƒdS(sChange a volume's type.N(Rtretype(R t volume_typetpolicy((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR7™scCs|ii||ƒS(s#Update all metadata of this volume.(Rtupdate_all_metadata(R R#((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR:scCs|ii||ƒdS(sðUpdate the read-only access mode flag of the specified volume. :param volume: The UUID of the volume to update. :param read_only: The value to indicate whether to update volume to read-only access mode. N(Rtupdate_readonly_flag(R Rt read_only((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR;¡sc CsA|iid|d|d|d|d|d|d|d|ƒd S( sManage an existing volume.R4trefRt descriptionR8RR#R N(Rtmanage( R R4R=RR>R8RR#R ((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR?ªs cCs|ii|ƒdS(sUnmanage a volume.N(Rtunmanage(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR@³scCs|ii|ƒdS(s0Promote secondary to be primary in relationship.N(Rtpromote(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRA·scCs|ii|ƒdS(s:Sync the secondary volume with primary for a relationship.N(Rtreenable(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRB»scCs|ii|ƒdS(s#Show pool information for backends.N(Rt get_pools(R tdetail((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRC¿sN( t__name__t __module__t__doc__RRRtNoneRRRRRRRR!R"R$R%R'R,R-R1R3R7R:R;tFalseR?R@RARBRC(((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR #s<                         t VolumeManagercBs²eZdZeZd%d%d%d%d%d%d%d%d%d%d%d%d%ed„Zd„Zd„Z e d%d%d%d%d%d%d„Z d„Z d„Z d%d„Zdd%d „Zd%d „Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd%d%d„Zd„Zd„Zd„Z d„Z!d„Z"d„Z#d„Z$d„Z%d%d%d%d%d%ed „Z&d!„Z'd"„Z(d#„Z)d$„Z*RS(&s!Manage :class:`Volume` resources.cCsÂ| djo h}n| }hh|d6|d6|d6|d6|d6|d6|d6| d6| d 6d d 6d d 6|d6| d6|d6|d6|d6d6}| o| |dR8tuser_idt project_idRtcreatingRtdetachedR/R#timageReft source_volidtsource_replicat multiattachRsOS-SCH-HNT:scheduler_hintss/volumesN(RHt_create(R RRKRLRRRR>R8RMRNRR#RQtscheduler_hintsRSRTtvolume_metadatatbody((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pytcreateÈs,   cCs|id|dƒS(snGet a volume. :param volume_id: The ID of the volume to get. :rtype: :class:`Volume` s /volumes/%sR(t_get(R t volume_id((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pytgetÿsc Cso|pd St|tiƒo9g}|idƒD]}|o ||q3q3~}ng}x|D]ù}t|tƒo|d}|d}n|idƒ\}}}|iƒ}|tjot i ||ƒ}nt ddi tƒƒ‚|oW|iƒ}|t jo#ddi t ƒ} t | ƒ‚n|id||fƒqe|i|ƒqeWdi |ƒS( sÝFormats the sort information into the sort query string parameter. The input sort information can be any of the following: - Comma-separated string in the form of - List of strings in the form of - List of either string keys, or tuples of (key, dir) For example, the following import sort values are valid: - 'key1:dir1,key2,key3:dir3' - ['key1:dir1', 'key2', 'key3:dir3'] - [('key1', 'dir1'), 'key2', ('key3', dir3')] :param sort: Input sort information :returns: Formatted query string parameter or None :raise ValueError: If an invalid sort direction or invalid sort key is given t,iit:s*sort_key must be one of the following: %s.s, s*sort_dir must be one of the following: %s.s%s:%sN(RHt isinstancetsixt string_typestsplitttuplet partitiontstriptSORT_KEY_VALUEStSORT_KEY_MAPPINGSR\t ValueErrortjointSORT_DIR_VALUEStappend( R tsortt_[1]tst sort_arrayt sort_itemtsort_keytsort_dirt_septmsg((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyt_format_sort_params29     cCs¯|djo h}nh}x2ti|ƒD]!\} } | o| || |t jo||dmss?%sts/details /volumes%s%stvolumesN(RHR`t iteritemsRuRfRgR\RiRhRjtsortedtitemsRt_list(R tdetailedt search_optsRvRwRqRrRltqparamstopttvalRtt new_qparamst query_stringRD((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pytlist8sF         cCs|idti|ƒƒdS(sPDelete a volume. :param volume: The :class:`Volume` to delete. s /volumes/%sN(t_deleteRtgetid(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRyscKs:|pdSh|d6}|idti|ƒ|ƒdS(slUpdate the name or description for a volume. :param volume: The :class:`Volume` to update. NRs /volumes/%s(t_updateRRŠ(R RRRX((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR€s cKsLh||6}|id||dti|ƒ}|iii|d|ƒS(s#Perform a volume "action." tmodify_body_for_actions/volumes/%s/actionRX(t run_hooksRRŠtapitclienttpost(R tactionRtinfoRRXturl((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyt_actionŒs RcCsqh|d6|d6}|dj o|ih|d6ƒn|dj o|ih|d6ƒn|id||ƒS(smSet attachment metadata. :param volume: The :class:`Volume` (or its ID) you would like to attach. :param instance_uuid: uuid of the attaching instance. :param mountpoint: mountpoint on the attaching instance or host. :param mode: the access mode. :param host_name: name of the attaching host. RRRRs os-attachN(RHRR”(R RRRRRRX((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR”s   cCs|id|h|d6ƒS(sÏClear attachment metadata. :param volume: The :class:`Volume` (or its ID) you would like to detach. :param attachment_uuid: The uuid of the volume attachment. s os-detacht attachment_id(R”(R Rtattachment_uuid((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR¦s cCs|id|ƒS(s‡Reserve this volume. :param volume: The :class:`Volume` (or its ID) you would like to reserve. s os-reserve(R”(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR°scCs|id|ƒS(s‹Unreserve this volume. :param volume: The :class:`Volume` (or its ID) you would like to unreserve. s os-unreserve(R”(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR¸scCs|id|ƒS(sŽBegin detaching this volume. :param volume: The :class:`Volume` (or its ID) you would like to detach. sos-begin_detaching(R”(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRÀscCs|id|ƒS(s•Roll detaching this volume. :param volume: The :class:`Volume` (or its ID) you would like to roll detaching. sos-roll_detaching(R”(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRÈscCs"|id|h|d6ƒddS(s•Initialize a volume connection. :param volume: The :class:`Volume` (or its ID). :param connector: connector dict from nova. sos-initialize_connectionR itconnection_info(R”(R RR ((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRÐs cCs|id|h|d6ƒdS(s”Terminate a volume connection. :param volume: The :class:`Volume` (or its ID). :param connector: connector dict from nova. sos-terminate_connectionR N(R”(R RR ((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR!Ùs cCs-h|d6}|idti|ƒ|dƒS(s‡Update/Set a volumes metadata. :param volume: The :class:`Volume`. :param metadata: A list of keys to be set. R#s/volumes/%s/metadata(RURRŠ(R RR#RX((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR"âs cCs5x.|D]&}|idti|ƒ|fƒqWdS(s•Delete specified keys from volumes metadata. :param volume: The :class:`Volume`. :param keys: A list of keys to be removed. s/volumes/%s/metadata/%sN(R‰RRŠ(R RR&tk((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pytdelete_metadataìscCs|id|h|d6ƒS(s®Set a volume's image metadata. :param volume: The :class:`Volume`. :param metadata: keys and the values to be set with. :type metadata: dict sos-set_image_metadataR#(R”(R RR#((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR$õs cCs/x(|D] }|id|h|d6ƒqWdS(sœDelete specified keys from volume's image metadata. :param volume: The :class:`Volume`. :param keys: A list of keys to be removed. sos-unset_image_metadataRxN(R”(R RR&Rx((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR%ÿs cCs/|id|h|d6|d6|d6|d6ƒS(shUpload volume to image service as image. :param volume: The :class:`Volume` to upload. sos-volume_upload_imageR(R)R*R+(R”(R RR(R)R*R+((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR' s   cCs|idti|ƒƒS(s}Delete the specified volume ignoring its current state. :param volume: The :class:`Volume` to force-delete. sos-force_delete(R”RRŠ(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR,scCs^h|d6}|o|ih|d6ƒn|o|ih|d6ƒn|id||ƒS(sÒUpdate the provided volume with the provided state. :param volume: The :class:`Volume` to set the state. :param state: The state of the volume to be set. :param attach_status: The attach_status of the volume to be set, or None to keep the current status. :param migration_status: The migration_status of the volume to be set, or None to keep the current status. RR/R0sos-reset_status(RR”(R RR.R/R0RX((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR-s cCs#|idti|ƒh|d6ƒS(s¬Extend the size of the specified volume. :param volume: The UUID of the volume to extend. :param new_size: The requested size to extend volume to. s os-extendR2(R”RRŠ(R RR2((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR1/s  cCs|id|ƒiS(sÀ Retrieve the encryption metadata from the desired volume. :param volume_id: the id of the volume to query :return: a dictionary of volume encryption metadata s/volumes/%s/encryption(RZt_info(R R[((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pytget_encryption_metadata9scCs(|id|h|d6|d6|d6ƒS(s-Migrate volume to new host. :param volume: The :class:`Volume` to migrate :param host: The destination host :param force_host_copy: Skip driver optimizations :param lock_volume: Lock the volume and guarantee the migration to finish sos-migrate_volumeR4R5R6(R”(R RR4R5R6((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR3Bs cCs4ti|ƒ}|id|h|d6|d6ƒdS(s$Complete the migration from the old volume to the temp new one. :param old_volume: The original :class:`Volume` in the migration :param new_volume: The new temporary :class:`Volume` in the migration :param error: Inform of an error to cause migration cleanup sos-migrate_volume_completiont new_volumeterrori(RRŠR”(R t old_volumeRœRt new_volume_id((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pytmigrate_volume_completionPs cCs*h|d6}|idti|ƒ|ƒS(sUpdate all metadata of a volume. :param volume: The :class:`Volume`. :param metadata: A list of keys to be updated. R#s/volumes/%s/metadata(R‹RRŠ(R RR#RX((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR:\s cCs#|idti|ƒh|d6ƒS(Nsos-update_readonly_flagtreadonly(R”RRŠ(R Rtflag((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR;fs  cCs!|id|h|d6|d6ƒS(sÀChange a volume's type. :param volume: The :class:`Volume` to retype :param volume_type: New volume type :param policy: Policy for migration during the retype s os-retypetnew_typetmigration_policy(R”(R RR8R9((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR7ks  cCs#|idti|ƒh|d6ƒS(Nsos-set_bootableR (R”RRŠ(R RR¢((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyt set_bootablews  c CsXhh|d6|d6|d6|d6|d6|d6|d6|d6d 6} |id | d ƒS( sManage an existing volume.R4R=RR>R8RR#R Rs/os-volume-manage(RU( R R4R=RR>R8RR#R RX((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR?|s cCs|id|dƒS(sUnmanage a volume.s os-unmanageN(R”RH(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyR@‹scCs|id|dƒS(s0Promote secondary to be primary in relationship.sos-promote-replicaN(R”RH(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRAscCs|id|dƒS(s:Sync the secondary volume with primary for a relationship.sos-reenable-replicaN(R”RH(R R((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRB“scCs+d}|o d}n|id|dƒS(s#Show pool information for backends.R{s ?detail=Trues/scheduler-stats/get_pools%sN(RZRH(R RDR‡((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRC—s N(+RERFRGR tresource_classRHRIRYR\RutTrueRˆRRR”RRRRRRRR!R"R™R$R%R'R,R-R1R›R3R R:R;R7R¥R?R@RARBRC(((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyRJÄs^  2  1 @                (Rsdesc(sidsstatusssizesavailability_zonesnamesbootableR (RGR`turllibRt ImportErrort urllib.parset cinderclientRRjRfRgtResourceR tManagerWithFindRJ(((sD/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/v2/volumes.pyts  ¡