HEX
Server: Apache
System: Linux fan.fanlow.com 3.10.0-1160.144.1.el7.tuxcare.els9.x86_64 #1 SMP Fri Jul 10 17:06:31 UTC 2026 x86_64
User: ssiacademy (1163)
PHP: 8.2.32
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python2.7/site-packages/euca2ools/commands/ec2/registerimage.pyo
�
��Xc@sZddlmZddlmZddlmZddlmZdefd��YZdS(i����(tArg(t
ArgumentError(tec2_block_device_mapping(t
EC2Requestt
RegisterImagecBsjeZdZeddddddd�edd	d
ddedd
�eddd
ddd�eddd
ddd>dd�edd
ddddd�edd
ddd dd!�ed"d
d#dd$dd%�ed&d'd(d?dd)�ed*d+dd,d
d-d.d/d0ed1gdd2�ed3d
d4dd@dd7�ed8d
d9dd:ddAdd;�gZd<�Zd=�Z	RS(BsRegister a new imaget
ImageLocationtmetavartMANIFESTtnargst?thelpsalocation of the image manifest in S3 storage
                (required for instance-store images)s-ns--nametdesttNametrequireds name of the new image (required)s-ds
--descriptiontDescriptionsdescription of the new images-as--architecturetArchitecturetchoicesti386tx86_64tarmhfs!CPU architecture of the new images--kerneltKernelIdtKERNELs0ID of the kernel to associate with the new images	--ramdiskt	RamdiskIdtRAMDISKs1ID of the ramdisk to associate with the new images--root-device-nametRootDeviceNametDEVICEs%root device name (default: /dev/sda1)s-ss
--snapshottroute_tos#snapshot to use for the root devices-bs--block-device-mappings
DEVICE=MAPPEDtBlockDeviceMappingtactiontappendttypetdefaults�define a block device mapping for the image, in the
                form DEVICE=MAPPED, where "MAPPED" is "none", "ephemeral(0-3)",
                or
                "[SNAP-ID]:[GiB]:[true|false]:[standard|VOLTYPE[:IOPS]]"s--virtualization-typetVirtualizationTypetparavirtualthvms%virtualization type for the new images
--platformtPlatformtwindowss/[Privileged] the new image's platform (windows)cCsO|jjd�rW|jjd�r3td��n|jjd�rKtd��qKn�|jjd�syd|jd<n|jjd�}x�|jdD]i}|jd�|jdkr�||jd	i�jd
�kr�|r�tdj|d���qPq�q�W|r?|jdji|jdd6i|d
6d	6�ntd��dS(
NRRs?argument --root-device-name: not allowed with argument MANIFESTtsnapshots7argument --snapshot: not allowed with argument MANIFESTs	/dev/sda1Rt
DeviceNametEbst
SnapshotIds\snapshot ID supplied with --snapshot conflicts with block device mapping for root device {0}sNeither a manifest location or a root device snapshot mapping must be specified(targstgetRtparamstformatR(tselfR%tmapping((sH/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/registerimage.pyt
preprocessEs,!
cCs!|jd|jd�f�GHdS(NtIMAGEtimageId(ttabifyR*(R-tresult((sH/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/registerimage.pytprint_resultks(RRRN(R!R"(R$(
t__name__t
__module__tDESCRIPTIONRtTruetNoneRtARGSR/R4(((sH/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/registerimage.pyR!s<	&N(	trequestbuilderRtrequestbuilder.exceptionsRteuca2ools.commands.argtypesRteuca2ools.commands.ec2RR(((sH/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/registerimage.pyt<module>s