ó FRTc@s¤ddlmZddlmZddlmZddlZddl Z de fd„ƒYZ de fd„ƒYZ d e fd „ƒYZd e fd „ƒYZ dS( i˙˙˙˙(t ListElement(tBlockDeviceMapping(t ResultSetNtEbscBs5eZdddd„Zd„Zd„Zd„ZRS(cCs||_||_||_dS(N(t connectiont snapshot_idt volume_size(tselfRRR((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyt__init__"s  cCsd|j|jfS(Ns Ebs(%s, %s)(RR(R((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyt__repr__'scCsdS(N((RtnametattrsR((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyt startElement*scCs4|dkr||_n|dkr0||_ndS(Nt SnapshotIdt VolumeSize(RR(RR tvalueR((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyt endElement-s   N(t__name__t __module__tNoneRR R R(((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyR!s  tInstanceMonitoringcBs2eZddd„Zd„Zd„Zd„ZRS(tfalsecCs||_||_dS(N(Rtenabled(RRR((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyR5s cCs d|jS(NsInstanceMonitoring(%s)(R(R((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyR 9scCsdS(N((RR R R((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyR <scCs|dkr||_ndS(NtEnabled(R(RR RR((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyR?s N(RRRRR R R(((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyR4s  RcBs;eZdddddd„Zd„Zd„Zd„ZRS(cCs1||_||_||_||_||_dS(N(Rt device_namet virtual_nametebst no_device(RRRRRR((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyRHs     cCsd|j|jfS(NsBlockDeviceMapping(%s, %s)(RR(R((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyR Ps cCs&|dkr"t|ƒ|_|jSdS(NR(RR(RR R R((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyR Ts cCsR|dkr||_n6|dkr0||_n|dkrNt|ƒ|_ndS(Nt DeviceNamet VirtualNametNoDevice(RRtboolR(RR RR((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyRYs      N(RRRRR R R(((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyRGs    tLaunchConfigurationcBsneZddddddddddeddeddeded„Zd„Zd„Zd„Zd„Z RS(sm1.smallcCs÷||_||_||_| |_||_|p6g}t|ƒ|_||_| |_d|_ ||_ ||_ d|_ | |_ | |_| |_d|_||_||_||_||_||_||_|dk ró|j|_ndS(s  A launch configuration. :type name: str :param name: Name of the launch configuration to create. :type image_id: str :param image_id: Unique ID of the Amazon Machine Image (AMI) which was assigned during registration. :type key_name: str :param key_name: The name of the EC2 key pair. :type security_groups: list :param security_groups: Names or security group id's of the security groups with which to associate the EC2 instances or VPC instances, respectively. :type user_data: str :param user_data: The user data available to launched EC2 instances. :type instance_type: str :param instance_type: The instance type :type kernel_id: str :param kernel_id: Kernel id for instance :type ramdisk_id: str :param ramdisk_id: RAM disk id for instance :type block_device_mappings: list :param block_device_mappings: Specifies how block devices are exposed for instances :type instance_monitoring: bool :param instance_monitoring: Whether instances in group are launched with detailed monitoring. :type spot_price: float :param spot_price: The spot price you are bidding. Only applies if you are building an autoscaling group with spot instances. :type instance_profile_name: string :param instance_profile_name: The name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance. :type ebs_optimized: bool :param ebs_optimized: Specifies whether the instance is optimized for EBS I/O (true) or not (false). :type associate_public_ip_address: bool :param associate_public_ip_address: Used for Auto Scaling groups that launch instances into an Amazon Virtual Private Cloud. Specifies whether to assign a public IP address to each instance launched in a Amazon VPC. N(RR t instance_typetblock_device_mappingstkey_nameRtsecurity_groupstimage_idt ramdisk_idRt created_timet kernel_idt user_datatinstance_monitoringt spot_pricetinstance_profile_nametlaunch_configuration_arnt ebs_optimizedtassociate_public_ip_addresst volume_typetdelete_on_terminationtiopstuse_block_device_types(RRR R%R#R$R)R!R(R&R"R*R+R,R.R/R0R1R2R3t sec_groups((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyRcs2@                       cCs d|jS(NsLaunchConfiguration:%s(R (R((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyR žscCs||dkr|jS|dkrV|jr7tƒ|_ntdtfgƒ|_|jS|dkrxt|ƒ|_|jSdS(NtSecurityGroupstBlockDeviceMappingstmemberR(R$R3tBDMR"RRRR*(RR R R((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyR Ás    cCs<|dkr||_n |dkr0||_n|dkrH||_nđ|dkr`||_nŘ|dkr„tjj|ƒ|_n´|dkrœ||_nœ|dkr´||_ n„|dkröyt j |ƒ|_ Wq8t k rň||_ q8XnB|d kr||_n*|d kr&||_n|d krDt|ƒ|_nô|d kr\||_nÜ|d krŒ|jƒdkr€tnt|_nŹ|dkrź|jƒdkr°tnt|_n||dkrÔ||_nd|dkr |jƒdkrţt|_q8t|_n.|dkr(t|ƒ|_nt|||ƒdS(Nt InstanceTypetLaunchConfigurationNametKeyNametImageIdt CreatedTimetKernelIdt RamdiskIdtUserDatatLaunchConfigurationARNRt SpotPricetIamInstanceProfilet EbsOptimizedttruetAssociatePublicIpAddresst VolumeTypetDeleteOnTerminationtIops(R!R R#R%tbototutilstparse_tsR'R(R&tbase64t b64decodeR)t TypeErrorR-R*tfloatR+R,tlowertTruetFalseR.R/R0R1tintR2tsetattr(RR RR((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyRÎsP                       $ $      cCs|jj|jƒS(s# Delete this launch configuration. (Rtdelete_launch_configurationR (R((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pytdeleteúsN( RRRRSRRRR R RRW(((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyR bs  T  ,(tboto.ec2.elb.listelementRtboto.ec2.blockdevicemappingRR8tboto.resultsetRt boto.utilsRJRMtobjectRRR (((sL/opt/freeware/lib/python2.7/site-packages/boto/ec2/autoscale/launchconfig.pyts