Viewing File: /usr/lib/python2.7/site-packages/euca2ools/commands/ec2/runinstances.pyc

ó
¡ôXc@s„ddlZddlZddlmZmZddlmZddlm	Z	m
Z
mZddlm
Z
de
fd„ƒYZdS(iÿÿÿÿN(tArgtMutuallyExclusiveArgList(t
ArgumentError(tec2_block_device_mappingt
flexible_boolt
vpc_interface(t
EC2RequesttRunInstancesc"Bs˜eZdZedddddƒedddd	dd
ddd
dddƒedddddgd
dddƒeddddddddƒeeddddd
dddƒedddd
dddƒedd dd!d
ddd"ƒƒed#dd$d%d‚dd(ƒed)d*dd+dd,ƒed-d.dd/dd0ƒed1dd2dd3dd4ƒed5dd6dd7dd8ƒed9d:dd;dd<ddd=edgdd>ƒed?d@ddAddBdCdDddEƒedFddGddBdCdDddHƒedIddJd%dƒddMƒedNddOddPddQƒedRddSd%d„ddUƒedVddWddXddYƒedZd[dd\d
ddd]ƒed^d=ed
ddd_ƒed`ddad
dddbƒeedcddddaddd
dddeƒedfdgddhd=ed
dddiƒƒedjdkddlddmddd=e	ddnƒedodpddqd
dddrƒedsddtddBdCdDdduƒgZ
dvdwdxdydzd{d|d}gZd~„Zd„Z
d€„ZRS(…s#Launch instances of a machine imagetImageIdtmetavartIMAGEthelps)ID of the image to instantiate (required)s-ns--instance-counttdesttcounts	MIN[-MAX]tdefaultt1troute_tosGnumber of instances to launch. If this number of
                        instances cannot be launched, no instances will launch.
                        If specified as a range (min-max), the server will
                        attempt to launch the maximum number, but no fewer
                        than the minimum number.s-gs--grouptactiontappends2security group(s) in which to launch the instancess-ks--keytKeyNametKEYPAIRsname of the key pair to uses-ds--user-datatDATAsXuser data to make available to instances in this
                            reservations--user-data-forcesdsame as -d/--user-data, but without checking if a
                    file by that name exists firsts-fs--user-data-filetFILEsdfile containing user data to make available to the
                    instances in this reservations--addressingtAddressingTypetchoicestpublictprivates¨[Eucalyptus only, non-VPC only]
                addressing scheme to launch the instance with.  Use "private"
                to run an instance with no public address.s-ts--instance-typetInstanceTypestype of instance to launchs-zs--availability-zonetZONEsPlacement.AvailabilityZones--kerneltKernelIdtKERNELs/ID of the kernel to launch the instance(s) withs	--ramdiskt	RamdiskIdtRAMDISKs0ID of the ramdisk to launch the instance(s) withs-bs--block-device-mappings
DEVICE=MAPPEDtBlockDeviceMappingttypesãdefine a block device mapping for the instances, in the
                form DEVICE=MAPPED, where "MAPPED" is "none", "ephemeral(0-3)",
                or
                "[SNAP-ID]:[GiB]:[true|false]:[standard|VOLTYPE[:IOPS]]"s-ms	--monitorsMonitoring.Enabledtstore_consttconstttrues.enable detailed monitoring for the instance(s)s--disable-api-terminationtDisableApiTerminations2prevent API users from terminating the instance(s)s&--instance-initiated-shutdown-behaviort!InstanceInitiatedShutdownBehaviortstopt	terminatesJwhether to "stop" (default) or terminate EBS instances when they shut downs--placement-groupsPlacement.GroupNametPLGROUPs8name of a placement group to launch
                intos	--tenancysPlacement.Tenancyt	dedicatedsG[VPC only]
                "dedicated" to run on single-tenant hardwares--client-tokentClientTokentTOKENs/unique identifier to ensure request idempotencys-ss--subnettSUBNETsO[VPC only] subnet to create the instance's network
                interface ins--associate-public-ip-addresssh[VPC only] whether or not to assign a
                public address to the instance's network interfaces--private-ip-addresstADDRESSsb[VPC only] assign a specific primary private IP address
                to an instance's interfaces--secondary-addresss--secondary-private-ip-addresssÂ[VPC only] assign a specific secondary private IP
                    address to an instance's network interface.  Use this
                    option multiple times to add additional addresses.s--secondary-counts$--secondary-private-ip-address-counttCOUNTsž[VPC only] automatically
                    assign a specific number of secondary private IP addresses
                    to an instance's network interfaces-as--network-interfacetNetworkInterfacet	INTERFACEsn[VPC only] add a network interface to the new instance.  If the interface already exists, supply its ID and a numeric index for it, separated by ":", in the form "eni-NNNNNNNN:INDEX".  To create a new interface, supply a numeric index and subnet ID for it, along with (in order) an optional description, a primary private IP address, a list of security group IDs to associate with the interface, whether to delete the interface upon instance termination ("true" or "false"), a number of secondary private IP addresses to create automatically, and a list of secondary private IP addresses to assign to the interface, separated by ":", in the form ":INDEX:SUBNET:[DESCRIPTION]:[PRIV_IP]:[GROUP1,GROUP2,...]:[true|false]:[SEC_IP_COUNT|:SEC_IP1,SEC_IP2,...]".  You cannot specify both of the latter two.  This option may be used multiple times.  Each adds another network interface.s-ps
--iam-profiletIPROFILEs]name or ARN of the IAM instance profile to associate
                with the new instance(s)s--ebs-optimizedtEbsOptimizeds(optimize the new instance(s) for EBS I/OtreservationSettinstancesSettgroupSetttagSettblockDeviceMappingtproductCodestnetworkInterfaceSettprivateIpAddressesSetcCs@tj|ƒ|jjdƒrgtjj|jdƒrGtdƒ‚qætj	|jdƒ|j
d<n|jjdƒr™tj	|jdƒ|j
d<nM|jjdƒræt|jdƒ#}tj	|jƒƒ|j
d<WdQXn|jjdƒdkr<|jjdƒ}|r<|jjd|ƒ||j
d<q<ndS(	Nt	user_datasÎargument -d/--user-data: to pass the contents of a file as user data, use -f/--user-data-file.  To pass the literal value '{0}' as user data even though it matches the name of a file, use --user-data-force.tUserDatatuser_data_forcetuser_data_fileRsec2-default-keypairsusing default key pair '%s'(Rt	configuretargstgettostpathtisfileRtbase64t	b64encodetparamstopentreadtNonetconfigtget_region_optiontlogtinfo(tselfR@tdefault_key_name((sG/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/runinstances.pyRA˜s(
		cCs{|jdjdƒ}t|ƒdkr}y2t|dƒ|jd<t|dƒ|jd<Wqðtk
rytdƒ‚qðXnst|ƒdkräy2t|dƒ|jd<t|dƒ|jd<Wqðtk
ràtd	ƒ‚qðXntd
ƒ‚|jddks|jddkr%tdƒ‚n|jd|jdkr~|jjdƒ|jj	i|jdd6|jdd6ƒn|jj
d
ƒ}|rÅ|jdƒrµ||jd<qÅ||jd<n|jj
dƒs|jj
dƒs|jj
dƒdk	rái}xT|jdD]E}|jdƒs9tdƒ‚n|j
dgƒ|dj|ƒqW|jj
dƒdk	rŠ|jd|d<n|jj
dƒrÁi|jdd6dd6g|d<n|jj
dƒr*g|jdD]}i|d6^qá}|j
dƒsg|d<n|dj|ƒn|jj
dƒrV|jd}||d <n|jj
dƒr||jd|d!<n|rÅd|d"<|jj
dƒs®g|jd<n|jdj|ƒn|jjd#j|ƒƒn–x“|jdD]„}|jdƒr=|jj
dƒs&g|jd<n|jdj|ƒqï|jj
d$ƒs_g|jd$<n|jd$j|ƒqïWdS(%NR
t-iitMinCounttMaxCounts?argument -n/--instance-count: instance count must be an integerisXargument -n/--instance-count: instance count range must be must be comprised of integerssAargument -n/--instance-count: value must have format "1" or "1-2"s=argument -n/--instance-count: instance count must be positivesMinCount > MaxCount; swappingtiam_profilesarn:sIamInstanceProfile.ArnsIamInstanceProfile.NametsubnetR1tassociate_public_ip_addresstgroupssg-sBargument -g/--group: groups must be specified by ID when using VPCtSecurityGroupIdtAssociatePublicIpAddresstprivate_ip_addresstPrivateIpAddressR%tPrimarytPrivateIpAddressestsecondary_addresstsecondary_counttSecondaryPrivateIpAddressCounttSubnetIdtDeviceIndexs-built network interface from CLI options: {0}t
SecurityGroup(RBtsplittlentintRIt
ValueErrorRROtdebugtupdateRCt
startswithRLt
setdefaultRtextendtformat(RQtcountstiprofilet	cli_ifaceRYtaddrtsec_ipstsec_ip_count((sG/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/runinstances.pyt
preprocess´s€

&$$




cCs|j|ƒdS(N(tprint_reservation(RQtresult((sG/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/runinstances.pytprint_result
sN(RR(sstopR)(RR+(t__name__t
__module__tDESCRIPTIONRRLRRRRhRtARGSt	LIST_TAGSRARvRy(((sG/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/runinstances.pyR%sœ							V(RGtos.pathRDtrequestbuilderRRtrequestbuilder.exceptionsRteuca2ools.commands.argtypesRRRteuca2ools.commands.ec2RR(((sG/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/runinstances.pyt<module>s
Back to Directory File Manager