Ñò ›ˆQc @sôdZddkZddklZddklZddkZddklZddkl Z ei Z e i Z dei fd„ƒYZ d e fd „ƒYZd e fd „ƒYZd e fd„ƒYZde eifd„ƒYZd„ZdS(sECommands for interacting with Google Compute Engine persistent disks.iÿÿÿÿN(tapp(t appcommands(t command_base(tgcutil_loggingt DiskCommandcBsheZdZdZddddddfZdddddddfZd Zd „Zd „Zd„Z RS(s3Base command for working with the disks collection.tnamet descriptiontzonetstatusssource-snapshottsourceSnapshotssize-gbtsizeGbs creation-timetcreationTimestamptdiskscCs6tt|ƒi||ƒtidddd|ƒdS(NRsThe zone for this request.t flag_values(tsuperRt__init__tflagst DEFINE_stringtNone(tselfRR ((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyR7s  cCs"|iƒ|_|iƒ|_dS(sœSet the Google Compute Engine API for the command. Args: api: The Google Compute Engine API used by this command. Returns: None. N(R t _disks_apitzonest _zones_api(Rtapi((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pytSetApi?s cKs|h|id6|i|ƒd6}|idƒo!|iio|ii|d ... RtREADYtFAILEDcCsštt|ƒi||ƒtidddd|ƒtidddd|ƒtidddd|ƒtid dd d|ƒtid td d|ƒdS( NRtsDisk description.R tsize_gbs&The size of the persistent disk in GB.tsource_snapshots"The source snapshot for this disk.t source_imagesThe source image for this disk.twait_until_completesIWhether the program should wait until the disk is restored from snapshot.( RR.RRRtDEFINE_integerRtDEFINE_booleantFalse(RRR ((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyRos*     cGsÐ|ptidƒ‚n|i|iiƒ|i_|i|id|iiƒ}|idƒ}d}|ii o"|i |id|ii ƒ}nd}|ii o"|i |id|ii ƒ}nh}|i dƒo|i |iiƒ|dcCstt|ƒi||ƒdS(N(RReR(RRR ((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyRscCsb|idƒo-|ii o|i|i|ƒ|i_n|ii|i|ƒ}|iƒS(sˆGet the specified disk. Args: disk_name: The name of the disk to get Returns: The result of getting the disk. R(RRRtGetZoneForResourceRRWR&RX(RR!RY((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyRV s  (R'R(R)RdRRV(((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyRes t DeleteDiskcBs,eZdZdZdZd„Zd„ZRS(stDelete one or more machine disks. If multiple disk names are specified, the disks will be deleted in parallel. s ... s Delete diskcCstt|ƒi||ƒdS(N(RRgR(RRR ((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyR$scGsÎ|idƒoZ|ii oLt|ƒdjo|iƒ|i_qj|i|i|dƒ|i_ng}x0|D](}|i|ii|i |ƒƒqwW|i |ƒ\}}|i |dƒ|fS(s¯Delete the specified disks. Args: *disk_names: The names of the disks to delete Returns: Tuple (results, exceptions) - result of deleting the disks. RiiR@( RRRtlenRBRfRRFtdeleteR&RLRN(RRORPR!RQRR((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyRV's  (R'R(R)Rdt safety_promptRRV(((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyRgs  t ListDiskscBs5eZdZeZeZd„Zd„Zd„Z RS(sList the disks for a project.cCstt|ƒi||ƒdS(N(RRkR(RRR ((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyRDscCs|idƒodS|iiS(s'Returns the function for listing disks.RN(RRRtlist(R((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pytListFuncGscCs |iiS(s1Returns the function for listing disks in a zone.(RRl(R((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyt ListZoneFuncMs( R'R(R)R8tis_global_level_collectionRKtis_zone_level_collectionRRmRn(((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyRk>s   cCsDtidtƒtidtƒtidtƒtidtƒdS(Ntadddisktgetdiskt deletediskt listdisks(RtAddCmdR.ReRgRk(((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyt AddCommandsRs(R)R\tgoogle.apputilsRRtgflagsRtgcutilRRtFLAGSRItGoogleComputeCommandRR.ReRgtGoogleComputeListCommandRkRv(((s^/Users/riccardo/git/gcloud/packages/gcutil-1.7.1/lib/google_compute_engine/gcutil/disk_cmds.pyts    Bž#