/usr/lib/python2.6/site-packages/openstackclient/image/v1
NameSizeModeActions
image.py239210644editdlrm
image.pyc173560644editdlrm
__init__.py00644editdlrm
__init__.pyc1680644editdlrm
Edit: /usr/lib/python2.6/site-packages/openstackclient/image/v1/image.pyc (17356B)
Ñò ;vVc@s“dZddkZddkZddkZddkZddkZddkZeidjoddkZndZddk l Z ddk l Z ddk l Z ddklZddklZddklZddklZd Zd Zd „Zd e ifd „ƒYZde ifd„ƒYZde ifd„ƒYZde ifd„ƒYZde ifd„ƒYZde ifd„ƒYZ dS(sImage V1 Action ImplementationsiÿÿÿÿNtnt(tcommand(tlister(tshow(tutils(t parseractionstbaretrawcCs|odSdSdS(sºReturn a formatted visibility string :param data: The server's visibility (is_public) status value: True, False :rtype: A string formatted to public/private tpublictprivateN((tdata((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyt_format_visibility,s t CreateImagecBs3eZdZeiedƒZd„Zd„ZRS(sCreate/upload an images .CreateImagec Csctt|ƒi|ƒ}|idddddƒ|idddddƒ|id dd dd ƒ|id d tddddtƒ|idd tddddtƒ|idddddƒ|idddddƒ|iddddtddƒ|iddddtddƒ|id dd!dd"ƒ|id#dd!dd$ƒ|id%dd&dd'ƒ|id(dd)dd*ƒ|id+d,d-d.d/d tdd0ƒ|id1dd2dd3ƒ|iƒ}|id4d.d/dd5ƒ|id6d.d/dd7ƒ|iƒ}|id8d.d/dd9ƒ|id:d.d/dd;ƒ|id<d,d=dd>d.t i dd?ƒ|S(@Ntnametmetavars thelpsNew image names--idssImage ID to reserves--storessUpload image to this stores--container-formattdefaultss$Image container format (default: %s)s --disk-formats sImage disk format (default: %s)s--owners sImage owner project name or IDs--sizess@Image size, in bytes (only used with --location and --copy-from)s --min-disks ttypes4Minimum disk size needed to boot image, in gigabytess --min-ramss3Minimum RAM size needed to boot image, in megabytess --locations s#Download image from an existing URLs --copy-froms6Copy image from the data store (similar to --location)s--filessUpload image from local files--volumessCreate image from a volumes--forcetdesttforcetactiont store_truesHForce image creation if volume is in use (only meaningful with --volume)s --checksums s Image hash used for verifications --protecteds Prevent image from being deleteds --unprotecteds#Allow image to be deleted (default)s--publics!Image is accessible to the publics --privates-Image is inaccessible to the public (default)s --propertyt propertiess sGSet a property on this image (repeat option to set multiple properties)( tsuperR t get_parsert add_argumenttDEFAULT_CONTAINER_FORMATtDEFAULT_DISK_FORMATtinttFalsetadd_mutually_exclusive_groupRtKeyValueAction(tselft prog_nametparsertprotected_groupt public_group((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyR@s¼   c Cs‡|iid|ƒ|iii}h}d}xF|D]>}||jo+t||dƒ}|o|||tnargst+RsImage(s) to delete (name or ID)(RRhRR(R R!R"((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyRscCsb|iid|ƒ|iii}x9|iD].}ti|i|ƒ}|ii|i ƒq,WdS(Nstake_action(%s)( R5R6R7R8R9RLRR>tdeleteR%(R RWRXR9t image_obj((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyRbs  (RcRdReRfRgR5RRb(((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyRhs t ListImagecBs3eZdZeiedƒZd„Zd„ZRS(sList available imagess .ListImagec Cstt|ƒi|ƒ}|iƒ}|iddddddtddƒ|id dd dddtdd ƒ|id dd dddtdtiƒ|iddddti ddƒ|iddddtddƒ|iddddtiƒ|idddddƒ|S(Ns--publicRRRRRRsList only public imagess --privateR sList only private imagess--sharedtshareds --propertyRs sFilter output based on propertys--longs List additional fields in outputs --page-sizess--sorts[:]s‰Sort output by selected keys and directions(asc or desc) (default: asc), multiple keys and directions can be specified separated by comma( RRmRRRRtargparsetSUPPRESSRR(R R!R"R$((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyR#sN    c sp|iid|ƒ|iii}h}|iot|dœs ( RrsNames Disk FormatsContainer FormatsSizeRus is_publics protectedsowners properties( RrsNames Disk FormatsContainer FormatsSizeRuRvRwRxRy(RrsName(R5R6R7R8R9RR<R tbooltpropertytlongR;tapit image_listtextendtlisttitemst api_utilst simple_filterRt sort_itemstsort( R RWRXRYtcolumn_headersR RztpageR[R{((RsN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyRbYsf        (RcRdReRfRgR5RRb(((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyRms 6t SaveImagecBs3eZdZeiedƒZd„Zd„ZRS(sSave an image locallys .SaveImagecCsNtt|ƒi|ƒ}|idddddƒ|idddddƒ|S( Ns--fileRs Rs0Downloaded image save filename (default: stdout)R9ssImage to save (name or ID)(RRRR(R R!R"((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyR¬scCsc|iid|ƒ|iii}ti|i|iƒ}|ii|ƒ}t i ||i ƒdS(Nstake_action(%s)( R5R6R7R8R9RR>RLR tgc_utilst save_imageRA(R RWRXR9R ((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyRbºs (RcRdReRfRgR5RRb(((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyR§s tSetImagecBs3eZdZeiedƒZd„Zd„ZRS(sSet image propertiess .SetImagec CsÄtt|ƒi|ƒ}|idddddƒ|idddddƒ|id dd dd ƒ|id dd dtddƒ|iddddtddƒdddddg}|iddddd|d|ƒdddddddd d!g }|id"dd#dd$|d|ƒ|id%dd&dtdd'ƒ|iƒ}|id(d)d*dd+ƒ|id,d)d*dd-ƒ|iƒ}|id.d)d*dd/ƒ|id0d)d*dd1ƒ|id2d3d4dd5d)tidd6ƒ|id7dd8dd9ƒ|id:dd;dd<ƒ|id=dd;dd>ƒ|id?dd@ddAƒ|idBddCddDƒ|idEd3dFd)d*dGtddHƒ|idId3dJd)d*dGtddKƒ|idLddMddNƒ|S(ONR9RsRsImage to modify (name or ID)s--namessNew image names--owners s$New image owner project (name or ID)s --min-disks Rs4Minimum disk size needed to boot image, in gigabytess --min-rams s3Minimum RAM size needed to boot image, in megabytestamitaritakiRtovfs--container-formatss1Container format of image. Acceptable formats: %stchoicestvhdtvmdkRtqcow2tvditisos --disk-formats s,Disk format of image. Acceptable formats: %ss--sizessSize of image data (in bytes)s --protectedRRs Prevent image from being deleteds --unprotecteds#Allow image to be deleted (default)s--publics!Image is accessible to the publics --privates-Image is inaccessible to the public (default)s --propertyRRs sGSet a property on this image (repeat option to set multiple properties)s--storessUpload image to this stores --locations s#Download image from an existing URLs --copy-froms6Copy image from the data store (similar to --location)s--filessUpload image from local files--volumessCreate image from a volumes--forceRRsFForce image change if volume is in use (only meaningful with --volume)s--stdinREs#Read image data from standard inputs --checksums s Image hash used for verification( RR“RRRRRRR(R R!R"tcontainer_choicest disk_choicesR#R$((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyRÌsÎ     c CsF|iid|ƒ|iii}h}d}xF|D]>}||jo+t||dƒ}|o|||RLR-R.R/R?R@R%RR'R(RARBRCRDRERFRGRHRIRJRKtwarningRRORNR4RPRQRRRSRTRURV( R RWRXRYRZR[R\R9R]R^R_R`Ra((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyRbLsz             !(RcRdReRfRgR5RRb(((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyR“Çs €t ShowImagecBs3eZdZeiedƒZd„Zd„ZRS(sDisplay image detailss .ShowImagecCs5tt|ƒi|ƒ}|idddddƒ|S(NR9RsRsImage to display (name or ID)(RR¡RR(R R!R"((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyR¯s cCsˆ|iid|ƒ|iii}ti|i|iƒ}h}|i|i ƒti |i dhƒƒ|dRLRORPRQRRRSRTRURV(R RWRXR9Ra((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyRb¸s (RcRdReRfRgR5RRb(((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyR¡ªs (!ReRoRBRfRJRURDR RGR;tcliffRRRtglanceclient.commonRR‘topenstackclient.apiRŠtopenstackclient.commonRRRR tShowOneR tCommandRhtListerRmRR“R¡(((sN/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/image/v1/image.pyts2       ȉ ã