Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python2.7
/
site-packages
/
boto
/
ec2
/
File Content:
snapshot.pyc
� �vWc @ sV d Z d d l m Z d d l m Z d e f d � � YZ d e f d � � YZ d S( s0 Represents an EC2 Elastic Block Store Snapshot i����( t TaggedEC2Object( t Zonet Snapshotc B s� e Z d Z d Z d d � Z d � Z d � Z d � Z e e d � Z e d � Z e d � Z d d e d � Z d d e d � Z e d � Z d d d e d � Z RS( s� Represents an EBS snapshot. :ivar id: The unique ID of the snapshot. :ivar volume_id: The ID of the volume this snapshot was created from. :ivar status: The status of the snapshot. :ivar progress: The percent complete of the snapshot. :ivar start_time: The timestamp of when the snapshot was created. :ivar owner_id: The id of the account that owns the snapshot. :ivar owner_alias: The alias of the account that owns the snapshot. :ivar volume_size: The size (in GB) of the volume the snapshot was created from. :ivar description: The description of the snapshot. :ivar encrypted: True if this snapshot is encrypted t createVolumePermissionc C st t t | � j | � d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d | _ d S( N( t superR t __init__t Nonet idt volume_idt statust progresst start_timet owner_idt owner_aliast volume_sizet descriptiont encrypted( t selft connection( ( s5 /usr/lib/python2.7/site-packages/boto/ec2/snapshot.pyR 0 s c C s d | j S( Ns Snapshot:%s( R ( R ( ( s5 /usr/lib/python2.7/site-packages/boto/ec2/snapshot.pyt __repr__= s c C s | d k r | | _ n� | d k r0 | | _ n� | d k rH | | _ n� | d k r` | | _ n� | d k rx | | _ n� | d k r� | | _ n� | d k r� y t | � | _ Wq| | _ qXnL | d k r� | | _ n4 | d k r| j � d k | _ n t | | | � d S( Nt snapshotIdt volumeIdR t startTimet ownerIdt ownerAliast volumeSizeR R t true( R R R R R R t intR R t lowerR t setattr( R t namet valueR ( ( s5 /usr/lib/python2.7/site-packages/boto/ec2/snapshot.pyt endElement@ s, c C s | j | _ | j | _ d S( N( R R ( R t updated( ( s5 /usr/lib/python2.7/site-packages/boto/ec2/snapshot.pyt _updateY s c C sg | j j | j g d | �} t | � d k rD | j | d � n | r` t d | j � � n | j S( s� Update the data associated with this snapshot by querying EC2. :type validate: bool :param validate: By default, if EC2 returns no data about the snapshot the update method returns quietly. If the validate param is True, however, it will raise a ValueError exception if no data is returned from EC2. t dry_runi s %s is not a valid Snapshot ID( R t get_all_snapshotsR t lenR"