/usr/lib/python2.6/site-packages/boto/manage
NameSizeModeActions
cmdshell.py147390644editdlrm
cmdshell.pyc163510644editdlrm
cmdshell.pyo163510644editdlrm
propget.py25020644editdlrm
propget.pyc12960644editdlrm
propget.pyo12960644editdlrm
server.py218630644editdlrm
server.pyc217100644editdlrm
server.pyo217100644editdlrm
task.py67810644editdlrm
task.pyc65480644editdlrm
task.pyo65480644editdlrm
test_manage.py8060644editdlrm
test_manage.pyc10040644editdlrm
test_manage.pyo10040644editdlrm
volume.py162960644editdlrm
volume.pyc162220644editdlrm
volume.pyo162220644editdlrm
__init__.py11080644editdlrm
__init__.pyc1430644editdlrm
__init__.pyo1430644editdlrm
Edit: /usr/lib/python2.6/site-packages/boto/manage/volume.pyo (16222B)
Ñò Å-õSc@säddklZddklZddklZlZlZlZl Z ddk l Z ddk l Z ddkZddkZddkZddkZddklZddkZdefd „ƒYZd efd „ƒYZdS( iÿÿÿÿ(tprint_function(tModel(tStringPropertytIntegerPropertyt ListPropertytReferencePropertytCalculatedProperty(tServer(tpropgetN(tclosingtCommandLineGettercBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCsL|iddƒp5|iidƒ}ti|dtiiƒ|dÅs(RFtget_all_snapshotsR4tpast_volume_idstprogressRtutilstparse_tst start_timeRTtTruetkeeptappendtsort(RRR?tall_volstsnapsRC((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pyRA·s   cCsl|idjotdƒdS|o||_|iƒn|iƒ}|i|i|ii|i ƒdS(Ntattachedsalready attached( RLtprintRRHR6RFt attach_volumeR4t instance_idR#(RRHR((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytattachÈs   cCs„|i}|djp|djp |djotdƒdS|iƒ}|i|i|ii|i|ƒd|_|i ƒdS(Nt availablet detachingsalready detached( RLRReRFt detach_volumeR4RHRgR#R6(RtforcetstateR((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytdetachÒs '  " cCsˆ|idjotdƒ‚n|o |}n|iiƒ}|id|iƒ}|p|iƒn|didƒotSt S(Ns0server attribute must be set to run this commands xfs_check %sisbad superblock magic number 0( RHRt ValueErrort get_cmdshelltrunR#tcloset startswithtFalseR^(Rtuse_cmdtcmdtstatus((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytcheckfsÜs cCs¤|idjotdƒ‚nt|iiƒƒiiƒ}z[|~}|iiƒ}x<|i|iƒp(t i i d|iƒt i dƒq^WWdQXdS(Ns0server attribute must be set to run this commands+%s still does not exist, waiting 10 secondsi (RHRRoR Rpt__exit__t __enter__texistsR#Rtlogtinfottimetsleep(Rt_[1]Rv((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytwaitës,cCs–|idjotdƒ‚nd}t|iiƒƒiiƒ}zG|~}|i|ƒp*ti i dƒ|i d|i ƒ}nWdQX|S(Ns0server attribute must be set to run this commands make_fs...smkfs -t xfs %s( RHRRoR RpRyRzRxRR|R}RqR#(RRwR€Rv((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytformatõs, c Csž|idjotdƒ‚ntiidƒt|iiƒƒii ƒ}zE|~}|iiƒ}|i |i ƒp(tiidƒ|i d|i ƒn¾tiidƒ|i dƒ}|di dƒ}xˆ|D]€}|i ƒ}|og|d |i joS|d |ijo;|i d |i ƒ|i d |d ƒ|i d ƒPq_qßqßW|i d|i|i fƒ|i d|i ƒWdQXdS(Ns0server attribute must be set to run this commandthandle_mount_pointsmaking directorysmkdir %ssdirectory exists alreadysmount -lis iis umount %ss mount %s /tmpschmod 777 /tmps mount %s %ss xfs_growfs %s(RHRRoRR|R}R RpRyRztisdirR!RqtsplitR#(RR€RvRwtlinestlinett((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytmountÿs,,   cCsI||_|iƒ|iƒ|iƒ|iƒ|iƒ|iƒdS(N(RHR6RRRhRR‚R‰(RRH((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pyt make_readys      cCs&|io|iid|iƒSdS(Ns/usr/sbin/xfs_freeze -f %s(RHRqR!(R((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytfreeze$s cCs&|io|iid|iƒSdS(Ns/usr/sbin/xfs_freeze -u %s(RHRqR!(R((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytunfreeze(s c CsÃz¯yo|iƒ|itjo|iƒi|iƒ}n|iii|iƒ}tii d|i |fƒWn9t j o-tii dƒtii t i ƒƒnXWd|iƒ}|SX(Ns!Snapshot of Volume %s created: %ssSnapshot error(R‹RHRRFtcreate_snapshotR4RRR|R}Rt Exceptiont tracebackt format_excRŒ(RRCRw((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pyRC,s ! cCsÃg}x¶|D]®}|o<|o5|i|jo!|i|jo|i|ƒq»q |o%|i|jo|i|ƒq»q |o%|i|jo|i|ƒq»q |i|ƒq W|S(N(RTR`(RRct start_datetend_datetltsnap((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytget_snapshot_range=s cCsí|iƒ}t|ƒdjo|S|dd!}tii|diiƒ}tid|id|id|id|iƒ}ti d d d dƒ}t |||ƒ|i ||||ƒ}t |ƒ|p|Sd}xA|D]9}|o ||iijo t |_qâ|ii}qâW|oJ|di} | iƒdjo&ti d | iƒƒ} | | } qpn|i || |diƒ} t| ƒdjo"x| dD]}t |_qªWnxotdd ƒD]^} |i || || ƒ} t| ƒdjo"x| dD]}t |_qWn| |} qÑW|i |d| ƒ}d}xA|D]9}|o ||iijo t |_qU|ii}qUW|oPxM|D]A}|ip1tiid||i|ifƒ|iƒq q Wn|S(s1 Trim the number of snapshots for this volume. This method always keeps the oldest snapshot. It then uses the parameters passed in to determine how many others should be kept. The algorithm is to keep all snapshots from the current day. Then it will keep the first snapshot of the day for the previous seven days. Then, it will keep the first snapshot of the week for the previous four weeks. After than, it will keep the first snapshot of the month for as many months as there are. iiiÿÿÿÿityeartmonthtdayttzinfotdaysitsecondsi<iR’sDeleting %s(%s) for %siN(RAR=tdatetimetnowRTR™R–R—R˜t timedeltaReR•RRtR_tweekdaytrangeRR|R}Rtdelete(RR¡RcRtmidnighttone_weekt previous_weekt current_dayR”t week_boundarytdeltat partial_weektit weeks_wortht remaindert current_month((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pyttrim_snapshotsMsf         #cCsdS(N((RR((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytgrowscCsdS(N((RRC((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytcopy“scCsdS(N((RRT((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytget_snapshot_from_date–scCsH|o*|iƒ|iƒ}|i|iƒntt|ƒiƒdS(N(RnRFt delete_volumeR4tsuperR(R¡(Rtdelete_ebs_volumeR((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pyR¡™s   cCsdS(N((R((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pytarchive sN(3R&R'RR^RR R5R!R#R4RtstrRYRRRHRRJRLtintRt classmethodR:R@RRDRBRFRKRMRPRRRARhRtRnRxRR‚R‰RŠR‹RŒRCR•R­R®R¯R°R¡R´(((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pyR(NsT                  C    (t __future__Rtboto.sdb.db.modelRtboto.sdb.db.propertyRRRRRtboto.manage.serverRt boto.manageRt boto.utilsRtboto.ec2R~Rt contextlibR RœtobjectR R((((s6/usr/lib/python2.6/site-packages/boto/manage/volume.pyts(     +