ó FRTc@s˜ddlmZmZddlmZdefd„ƒYZdefd„ƒYZdefd„ƒYZd e fd „ƒYZ d e fd „ƒYZ d S(iÿÿÿÿ(t EC2ObjecttTaggedEC2Object(tBlockDeviceMappingt ProductCodescBseZd„Zd„ZRS(cCsdS(N((tselftnametattrst connection((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyt startElementscCs |dkr|j|ƒndS(Nt productCode(tappend(RRtvalueR((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyt endElements (t__name__t __module__RR (((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyRs tBillingProductscBseZd„Zd„ZRS(cCsdS(N((RRRR((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyR%scCs |dkr|j|ƒndS(NtbillingProduct(R (RRR R((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyR (s (R RRR (((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyR$s tImagecBsþeZdZdd„Zd„Zd„Zd„Zd„Ze e d„Z dddddddddde dde dddddddde d „Z e e d „Z e d „Z dde d „Zdde d „Ze d„Ze d„Ze d„ZRS(s! Represents an EC2 Image cCsïtt|ƒj|ƒd|_d|_d|_d|_d|_d|_ t |_ d|_ d|_ d|_d|_d|_d|_d|_tƒ|_tƒ|_d|_d|_d|_d|_d|_d|_d|_dS(N(tsuperRt__init__tNonetidtlocationtstatetownerIdtowner_idt owner_aliastFalset is_publict architecturetplatformttypet kernel_idt ramdisk_idRt descriptionRt product_codesRtbilling_productstblock_device_mappingtroot_device_typetroot_device_nametvirtualization_typet hypervisortinstance_lifecycletsriov_net_support(RR((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyR2s0                      cCs d|jS(NsImage:%s(R(R((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyt__repr__LscCs{tt|ƒj|||ƒ}|dk r.|S|dkrMtƒ|_|jS|dkr`|jS|dkrs|jSdSdS(NtblockDeviceMappingt productCodestbillingProducts(RRRRRR%R#R$(RRRRtretval((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyROs     cCs%|dkr||_n |dkr0||_nñ|dkrH||_nÙ|dkri||_||_n¸|dkrÁ|dkrt|_q!|dkr¥t|_q!td||jfƒ‚n`|d krÙ||_ nH|d krñ||_ n0|d kr ||_ n|d kr!||_ n|d kr9||_ nè|dkrQ||_nÐ|dkri||_n¸|dkr||_n |dkr™||_nˆ|dkr±||_np|dkrÉ||_nX|dkrá||_n@|dkrù||_n(|dkr||_nt|||ƒdS(NtimageIdt imageLocationt imageStatet imageOwnerIdtisPublictfalsettrues,Unexpected value of isPublic %s for image %sRt imageTypetkernelIdt ramdiskIdtimageOwnerAliasRRR"trootDeviceTypetrootDeviceNametvirtualizationTypeR)tinstanceLifecycletsriovNetSupport(RRRRRRRtTruet ExceptionRRR R!RRRR"R&R'R(R)R*R+tsetattr(RRR R((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyR ]s^                                          cCs|jj|jƒdS(N(t__dict__tupdate(Rtupdated((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyt_update’scCs‚|jj|jgd|ƒ}t|ƒdkr_|d}|j|jkr{|j|ƒq{n|r{td|jƒ‚n|jS(sç Update the image's state information by making a call to fetch the current image attributes from the service. :type validate: bool :param validate: By default, if EC2 returns no data about the image the update method returns quietly. If the validate param is True, however, it will raise a ValueError exception if no data is returned from EC2. tdry_runis%s is not a valid Image ID(Rtget_all_imagesRtlenRGt ValueErrorR(RtvalidateRHtrstimg((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyRE•s  ism1.smallcCsj|jj|j||||||||| | | | | ||||d|d|d|d|d|d|ƒS(sà Runs this instance. :type min_count: int :param min_count: The minimum number of instances to start :type max_count: int :param max_count: The maximum number of instances to start :type key_name: string :param key_name: The name of the key pair with which to launch instances. :type security_groups: list of strings :param security_groups: The names of the security groups with which to associate instances. :type user_data: string :param user_data: The Base64-encoded MIME user data to be made available to the instance(s) in this reservation. :type instance_type: string :param instance_type: The type of instance to run: * t1.micro * m1.small * m1.medium * m1.large * m1.xlarge * m3.medium * m3.large * m3.xlarge * m3.2xlarge * c1.medium * c1.xlarge * m2.xlarge * m2.2xlarge * m2.4xlarge * cr1.8xlarge * hi1.4xlarge * hs1.8xlarge * cc1.4xlarge * cg1.4xlarge * cc2.8xlarge * g2.2xlarge * c3.large * c3.xlarge * c3.2xlarge * c3.4xlarge * c3.8xlarge * i2.xlarge * i2.2xlarge * i2.4xlarge * i2.8xlarge * t2.micro * t2.small * t2.medium :type placement: string :param placement: The Availability Zone to launch the instance into. :type kernel_id: string :param kernel_id: The ID of the kernel with which to launch the instances. :type ramdisk_id: string :param ramdisk_id: The ID of the RAM disk with which to launch the instances. :type monitoring_enabled: bool :param monitoring_enabled: Enable CloudWatch monitoring on the instance. :type subnet_id: string :param subnet_id: The subnet ID within which to launch the instances for VPC. :type private_ip_address: string :param private_ip_address: If you're using VPC, you can optionally use this parameter to assign the instance a specific available IP address from the subnet (e.g., 10.0.0.25). :type block_device_map: :class:`boto.ec2.blockdevicemapping.BlockDeviceMapping` :param block_device_map: A BlockDeviceMapping data structure describing the EBS volumes associated with the Image. :type disable_api_termination: bool :param disable_api_termination: If True, the instances will be locked and will not be able to be terminated via the API. :type instance_initiated_shutdown_behavior: string :param instance_initiated_shutdown_behavior: Specifies whether the instance stops or terminates on instance-initiated shutdown. Valid values are: * stop * terminate :type placement_group: string :param placement_group: If specified, this is the name of the placement group in which the instance(s) will be launched. :type additional_info: string :param additional_info: Specifies additional information to make available to the instance(s). :type security_group_ids: list of strings :param security_group_ids: The ID of the VPC security groups with which to associate instances. :type instance_profile_name: string :param instance_profile_name: The name of the IAM Instance Profile (IIP) to associate with the instances. :type instance_profile_arn: string :param instance_profile_arn: The Amazon resource name (ARN) of the IAM Instance Profile (IIP) to associate with the instances. :type tenancy: string :param tenancy: The tenancy of the instance you want to launch. An instance with a tenancy of 'dedicated' runs on single-tenant hardware and can only be launched into a VPC. Valid values are:"default" or "dedicated". NOTE: To use dedicated tenancy you MUST specify a VPC subnet-ID as well. :rtype: Reservation :return: The :class:`boto.ec2.instance.Reservation` associated with the request for machines tsecurity_group_idstadditional_infotinstance_profile_nametinstance_profile_arnttenancyRH(Rt run_instancesR(Rt min_countt max_counttkey_nametsecurity_groupst user_datataddressing_typet instance_typet placementR R!tmonitoring_enabledt subnet_idtblock_device_maptdisable_api_terminationt$instance_initiated_shutdown_behaviortprivate_ip_addresstplacement_groupRORPRQRRRSRH((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pytrunªs’ cCs|jj|j|d|ƒS(NRH(Rtderegister_imageR(Rtdelete_snapshotRH((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyt deregisterKs cCs%|jj|jdd|ƒ}|jS(NtlaunchPermissionRH(Rtget_image_attributeRR(RRHt img_attrs((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pytget_launch_permissionsRs   cCs%|jj|jdd||d|ƒS(NRhtaddRH(Rtmodify_image_attributeR(Rtuser_idst group_namesRH((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pytset_launch_permissionsZs cCs%|jj|jdd||d|ƒS(NRhtremoveRH(RRmR(RRnRoRH((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pytremove_launch_permissionscs cCs|jj|jdd|ƒS(NRhRH(Rtreset_image_attributeR(RRH((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pytreset_launch_attributesls cCs%|jj|jdd|ƒ}|jS(NtkernelRH(RRiRRu(RRHRj((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyt get_kernelss   cCs%|jj|jdd|ƒ}|jS(NtramdiskRH(RRiRRw(RRHRj((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyt get_ramdisk{s   N(R Rt__doc__RRR,RR RGRRERdRgRkRpRrRtRvRx(((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyR-s8    5   –     tImageAttributecBs&eZdd„Zd„Zd„ZRS(cCs(d|_d|_d|_i|_dS(N(RRRuRwR(Rtparent((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyR…s   cCs/|dkr'tƒ|jd<|jdSdSdS(NR-R%(RRR(RRRR((s;/opt/freeware/lib/python2.7/site-packages/boto/ec2/image.pyR‹s  cCsC|dkrd|_n'|dkr]d|jkrJ|jdj|ƒq?|g|jds  ÿX*