Repository URL to install this package:
| 
      
        
        
        Version: 
        
         
          
          3.4.51  ▾
        
         | 
| 
    
    contego
  
    /
        
    home
  
        /
        
    tvault
  
        /
        
    .virtenv
  
        /
        
    lib
  
        /
        
    python2.7
  
        /
        
    site-packages
  
        /
        
    cinderclient
  
        /
        
    v3
  
        /
        groups.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   Group interface (v3 extension).iÿÿÿÿ(   t   api_versions(   t   base(   t   utilst   Groupc           B   s5   e  Z d  Z d   Z e d  Z d   Z d   Z RS(   s   A Group of volumes.c         C   s   d |  j  S(   Ns   <Group: %s>(   t   id(   t   self(    (    sK   /home/tvault/.virtenv/lib/python2.7/site-packages/cinderclient/v3/groups.pyt   __repr__   s    c         C   s   |  j  j |  |  S(   s   Delete this group.(   t   managert   delete(   R   t   delete_volumes(    (    sK   /home/tvault/.virtenv/lib/python2.7/site-packages/cinderclient/v3/groups.pyR      s    c         K   s   |  j  j |  |  S(   s.   Update the name or description for this group.(   R   t   update(   R   t   kwargs(    (    sK   /home/tvault/.virtenv/lib/python2.7/site-packages/cinderclient/v3/groups.pyR
   !   s    c         C   s   |  j  j |  |  S(   s*   Reset the group's state with specified one(   R   t   reset_state(   R   t   state(    (    sK   /home/tvault/.virtenv/lib/python2.7/site-packages/cinderclient/v3/groups.pyR   %   s    (   t   __name__t
   __module__t   __doc__R   t   FalseR   R
   R   (    (    (    sK   /home/tvault/.virtenv/lib/python2.7/site-packages/cinderclient/v3/groups.pyR      s
   		t   GroupManagerc           B   s   e  Z d  Z e Z d
 d
 d
 d
 d
 d  Z e j d  d    Z	 d
 d
 d
 d
 d  Z
 d   Z e d
 d  Z
 e d  Z d   Z d
 d	  Z RS(   s    Manage :class:`Group` resources.c   	      C   sa   i i | d 6| d 6| d 6| j  d  d 6| d 6| d 6| d 6d	 d
 6d 6} |  j d | d  S(
   s  Creates a group.
        :param group_type: Type of the Group
        :param volume_types: Types of volume
        :param name: Name of the Group
        :param description: Description of the Group
        :param user_id: User id derived from context
        :param project_id: Project id derived from context
        :param availability_zone: Availability Zone to use
        :rtype: :class:`Group`
        t   namet   descriptiont
   group_typet   ,t   volume_typest   user_idt
   project_idt   availability_zonet   creatingt   statust   groups   /groups(   t   splitt   _create(	   R   R   R   R   R   R   R   R   t   body(    (    sK   /home/tvault/.virtenv/lib/python2.7/site-packages/cinderclient/v3/groups.pyt   create.   s    
s   3.20c         C   s,   | r i | d 6n i  } |  j  d | |  S(   s¯   Update the provided group with the provided state.
        :param group: The :class:`Group` to set the state.
        :param state: The state of the group to be set.
        R   t   reset_status(   t   _action(   R   R   R
   R    (    (    sK   /home/tvault/.virtenv/lib/python2.7/site-packages/cinderclient/v3/groups.pyR   H   s    c   	      C   s   i i | d 6| d 6| d 6| d 6| d 6| d 6d d 6d	 6} |  j  d
 | d	  |  j j j d d | \ } } t j | d
 |  S(   s¶  Creates a group from a group snapshot or a source group.
        :param group_snapshot_id: UUID of a GroupSnapshot
        :param source_group_id: UUID of a source Group
        :param name: Name of the Group
        :param description: Description of the Group
        :param user_id: User id derived from context
        :param project_id: Project id derived from context
        :rtype: A dictionary containing Group metadata
        R   R   t   group_snapshot_idt   source_group_idR   R   R   R   s   create-from-srct   modify_body_for_actions   /groups/actionR    R   (   t	   run_hookst   apit   clientt   postt   common_baset   DictWithMeta(	   R   R$   R%   R   R   R   R   R    t   resp(    (    sK   /home/tvault/.virtenv/lib/python2.7/site-packages/cinderclient/v3/groups.pyt   create_from_srcR   s    
c         C   s   |  j  d | d  S(   sj   Get a group.
        :param group_id: The ID of the group to get.
        :rtype: :class:`Group`
        s
   /groups/%sR   (   t   _get(   R   t   group_id(    (    sK   /home/tvault/.virtenv/lib/python2.7/site-packages/cinderclient/v3/groups.pyt   getm   s    
c         C   s>