/usr/lib/python2.6/site-packages/glanceclient/v1
NameSizeModeActions
client.py15650644editdlrm
client.pyc14520644editdlrm
images.py141070644editdlrm
images.pyc122410644editdlrm
image_members.py35920644editdlrm
image_members.pyc42440644editdlrm
shell.py188800644editdlrm
shell.pyc172070644editdlrm
versions.py9330644editdlrm
versions.pyc8030644editdlrm
__init__.py6900644editdlrm
__init__.pyc2250644editdlrm
Edit: /usr/lib/python2.6/site-packages/glanceclient/v1/shell.pyc (17207B)
Ñò ƒe id?d(d0d,edd@ƒdA„ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒZedBdC„Z dD„Z!e idEddFddGƒe id/d(d0d,edd1ƒe idHddId,dBddJƒdK„ƒƒƒZ"e idLddMddNƒe idEddFddOƒe idPd(d0d,eddQƒdR„ƒƒƒZ#e idSddTddUƒe idddddVƒe idWddXddYƒe idddddZeƒe iddddd[eƒe id<dd=dd\ƒe id]dd d!edd^ƒe id_dd`d!eddaƒe idbddcd!edddƒe ideddfddgƒe idLddMddhƒe ididdjddkƒe idlddfddmƒe id9d!edd:ddnƒe idod!edd:ddpƒe idqddrd(d)d,gddsƒe id/d(d0d,edd1ƒe idPd(d0d,eddtƒe i$eƒdu„ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒZ%dv„Z&e idEddFddwƒe idddddVƒe idddddZeƒe iddddd[eƒe id<dd=dd\ƒe id]dd d!eddxƒe id_dd`d!eddaƒe idbddcd!edddƒe ideddfddyƒe idLddMddzƒe ididdjdd{ƒe idlddfdd|ƒe id9d!edd:ddnƒe idod!edd:ddpƒe idqddrd(d)d,gddsƒe id}d(d0d,edd~ƒe id/d(d0d,edd1ƒe idPd(d0d,eddtƒd„ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒZ'e id€ddFdd‚ddƒƒd„„ƒZ(e id…ddTdd†ƒe id‡dd=ddˆƒd‰„ƒƒZ)e idEddFddŠƒe id‹dd=ddŒƒe idd(d0d,eddŽƒd„ƒƒƒZ*e idEddFddƒe id‹dd=dd‘ƒd’„ƒƒZ+dS(”iÿÿÿÿ(tprint_functionN(t encodeutils(tstrutils(t progressbar(tutils(texcs1Acceptable formats: ami, ari, aki, bare, and ovf.sGAcceptable formats: ami, ari, aki, vhd, vmdk, raw, qcow2, vdi, and iso.tlocationt copy_fromtfiletstricts--nametmetavarsthelps+Filter images to those that have this name.s--statusss-Filter images to those that have this status.s--changes-sincess`Filter images to those that changed since the given time, which will include the deleted images.s--container-formatss8Filter images to those that have this container format. s --disk-formats s3Filter images to those that have this disk format. s --size-minsttypes5Filter images to those with a size greater than this.s --size-maxs2Filter images to those with a size less than this.s--property-filters s/Filter images by a user-defined image property.tactiontappendtdestt propertiestdefaults --page-sizes6Number of images to request in each paginated request.s--human-readablet store_trues,Print image size in a human-friendly format.s --sort-keytnametchoicess#Sort image list by specified field.s --sort-dirtascs'Sort image list in specified direction.s --is-publics {True,False}sCAllows the user to select a listing of public or non public images.s--owners sYDisplay only images owned by this tenant id. Filtering occurs on the client side so may be inefficient. This option is mainly intended for admin use. Use an empty string ('') to list images with no owner. Note: This option overrides the --is-public argument if present. Note: the v2 API supports more efficient server-side owner based filtering.s --all-tenantss^Allows the admin user to list all images irrespective of the image's owner or is_public value.c sddddddddg}g}|D]}||t||ƒfq)~}tg}|D]"}|d dj o ||q\q\~ƒ}d|jo|idƒ|d `s sFArgument --property-filter requires properties in the format KEY=VALUERtfilterst page_sizetsort_keytsort_dirtownercSsti|iƒ|_|S(N(Rtmake_size_human_readabletsize(timage((sB/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v1/shell.pyt convert_sizessc3sx|]}ˆ|ƒVqWdS(N((RR((R)(sB/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v1/shell.pys ws tIDtNames Disk FormatsContainer FormattSizetStatusN(tgetattrtdicttNonetpopRtsplittanyRtexitR"R#R$R%t all_tenantstTruetimagestlistthuman_readablet print_list(tgctargst filter_keyst_[1]tkeyt filter_itemst_[2]titemR!t_[3]tptproperty_filter_itemstkwargsR7tcolumns((R)sB/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v1/shell.pyt do_image_list(s4. 0<  0        iPcCs‚ti|iƒ}|oti|dƒ|ds Name or ID of image to describe.s--max-column-widths s*The max column width of the printed table.cCsPti|i|iƒi}|ii|ƒ}t||idt|i ƒƒdS(sDescribe a specific image.RIN( Rt find_resourceR7R(tidtgetRSR9tintRI(R;R<timage_idR(((sB/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v1/shell.pyt do_image_showŽss--filess†Local file to save downloaded image data to. If this is not specified and there is no redirection the image data will be not be saved.s Name or ID of image to download.s --progresssShow download progress bar.cCsti|i|iƒ}|iƒ}|ioti|t|ƒƒ}nt i i ƒo |i djpti||i ƒn tdƒdS(sDownload a specific image.s¨No redirection or local file specified for downloaded image data. Please specify a local file with --file to save downloaded image or redirect output to another source.N(RRXR7R(RTtprogressRtVerboseIteratorWrapperRtsyststdouttisattyRR0t save_imagetprint(R;R<R(tbody((sB/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v1/shell.pytdo_image_download›s    s--ids sID of image to reserve.sName of image.s--storessStore to upload image to.sDisk format of image. sContainer format of image. sTenant who should own image.s--sizesMSize of image data (in bytes). Only used with '--location' and '--copy_from'.s --min-disks s9Minimum size of disk needed to boot image (in gigabytes).s --min-rams s:Minimum amount of ram needed to boot image (in megabytes).s --locations sÜURL where the data for this image already resides. For example, if the image data is stored in swift, you could specify 'swift+http://tenant%%3Aaccount:key@auth_url/v2.0/container/obj'. (Note: '%%3A' is ':' URL encoded.)s€Local file that contains disk image to be uploaded during creation. Alternatively, images can be passed to the client via stdin.s --checksums sUHash of image data used Glance can use for verification. Provide a md5 checksum here.s --copy-froms˜Similar to '--location' in usage, but this indicates that the Glance server should immediately copy the data and store it in its configured image store.s$Make image accessible to the public.s--is-protecteds!Prevent image from being deleted.s --propertys sGArbitrary property to associate with image. May be used multiple times.sShow upload progress bar.c smttd„t|ƒiƒƒƒ}|idƒ|dåsRt is_protectedt protectedtpropertyRRics|dˆjS(i((Rg(t CREATE_PARAMS(sB/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v1/shell.pyRhôsRTN(R/tfiltertvarstitemsRZR1R2t glanceclienttv1R7RlRWR^Rt get_file_sizeR0RtVerboseFileWrappertcreateRSR9( R;R<RVtraw_propertiestdatumR?tvaluetfilesizeR(((RlsB/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v1/shell.pytdo_image_create°s(5$  $  cCsJytidƒWntj otSXtiiƒ p|ip|iS(sEReturn True if some image data has probably been provided by the useri( tostfstattOSErrortFalseR`tstdinRbRR(R<((sB/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v1/shell.pyt_is_image_data_provideds sName or ID of image to modify.sSize of image data (in bytes).sURL where the data for this image already resides. For example, if the image data is stored in swift, you could specify 'swift+http://tenant%%3Aaccount:key@auth_url/v2.0/container/obj'. (Note: '%%3A' is ':' URL encoded.) This option only works for images in 'queued' status.s~Local file that contains disk image to be uploaded during update. Alternatively, images can be passed to the client via stdin.s8Hash of image data used Glance can use for verification.sÎSimilar to '--location' in usage, but this indicates that the Glance server should immediately copy the data and store it in its configured image store. This option only works for images in 'queued' status.s --purge-propss˜If this flag is present, delete all image properties not explicitly set in the update request. Otherwise, those properties not referenced are preserved.c s¢ttd„t|ƒiƒƒƒ}|idƒ}ti|i|ƒ}d|jo|idƒ|ds8        <,        N%       E)