Repository URL to install this package:
Version:
3.4.35 ▾
|
contego
/
home
/
tvault
/
.virtenv
/
lib
/
python2.7
/
site-packages
/
cinderclient
/
v3
/
volumes.pyc
|
---|
ó ³EYc @ s| d Z d d l m Z d d l m Z d d l m Z d d l m Z d e j f d YZ d e j f d YZ d S( s Volume interface (v3 extension).iÿÿÿÿ( t base( t api_versions( t volumest Volumec B s e Z d d d Z RS( c C s | j j t j d k rm | d k r- d n | } | d k rE t n | } | j j | | | | | | | S| j j | | | | | S( s? Upload a volume to image service as an image. :param force: Boolean to enables or disables upload of a volume that is attached to an instance. :param image_name: The new image name. :param container_format: Container format type. :param disk_format: Disk format type. :param visibility: The accessibility of image (allowed for 3.1-latest). :param protected: Boolean to decide whether prevents image from being deleted (allowed for 3.1-latest). s 3.1t privateN( t managert api_versionR t APIVersiont Nonet Falset upload_to_image( t selft forcet image_namet container_formatt disk_formatt visibilityt protected( ( sL /home/tvault/.virtenv/lib/python2.7/site-packages/cinderclient/v3/volumes.pyR s N( t __name__t __module__R R ( ( ( sL /home/tvault/.virtenv/lib/python2.7/site-packages/cinderclient/v3/volumes.pyR s t VolumeManagerc B sþ e Z e Z d d d d d d d d d d d d d d e d Z e j d d Z e j d d Z e j d d Z e j d d Z e j d e d d d d d Z e j d d d Z e j d d Z RS( c C sÕ | d k r i } n | } i i | d 6| d 6| d 6| d 6| d 6| d 6| d 6| d 6| d 6d d 6d d 6| d 6| d 6| d 6| d 6| d 6d 6} | r¯ | | d d <n | r | | d <n | j d | d S( sE Create a volume. :param size: Size of volume in GB :param consistencygroup_id: ID of the consistencygroup :param group_id: ID of the group :param snapshot_id: ID of the snapshot :param name: Name of the volume :param description: Description of the volume :param volume_type: Type of volume :param user_id: User id derived from context :param project_id: Project id derived from context :param availability_zone: Availability Zone to use :param metadata: Optional metadata to set on volume creation :param imageRef: reference to an image stored in glance :param source_volid: ID of source volume to clone from :param source_replica: ID of source volume to clone replica :param scheduler_hints: (optional extension) arbitrary key-value pairs specified by the client to help boot an instance :param multiattach: Allow the volume to be attached to more than one instance :rtype: :class:`Volume` t sizet consistencygroup_idt snapshot_idt namet descriptiont volume_typet user_idt project_idt availability_zonet creatingt statust detachedt attach_statust metadatat imageReft source_volidt source_replicat multiattacht volumet group_ids OS-SCH-HNT:scheduler_hintss /volumesN( R t _create( R R R R( R R$ R R R R R R R" R# t scheduler_hintsR% R&