ó ¡ôXc@ søddlmZddlZddlZddlZddlZddlmZmZddl m Z ddl m Z ddl mZmZddlmZddlmZdd lmZdd lmZddlZd eee fd „ƒYZdS( iÿÿÿÿ(tdivisionN(tArgtMutuallyExclusiveArgList(t ArgumentError(tFileTransferProgressBarMixin(tb64encoded_file_contentstfilesize(t EC2Request(t S3AccessMixin(t ResumeImport(t GetObjecttImportInstancecB sAeZdZedddddlddƒedddd d ed d dd ƒeddd dddd eddƒeddddd ed dddƒeddd dd eddmddƒeedd ddldd!ƒed"dd#d d$dd%ƒƒjƒed&ddldd'ƒed(d)dd*d+ed,d-ddldd.ƒed/d0d1ddldd2ƒed3d4d d5dd6ƒed7d8dd9d d:dd;ƒed<d=dd>d d?dd@ƒedAdBddCd+ed dDddEƒedFd dGddHd+e ddIƒeedJddKd+e j d dLddMƒedNddd+e d dOddPƒƒedQddRd dSddTƒedUddVd dWddXƒedYd0d1d dZdd[ƒed\d d]ddndd`ƒedad dbddcdddƒeded0d1ddlde jƒedfd0d1ddlde jƒedgd0d1ddlde jƒgZdhgZdi„Zdj„Zdk„ZRS(os!Import an instance into the cloudtsourcetmetavartFILEtroute_tothelps3file containing the disk image to import (required)s-ts--instance-typet INSTANCETYPEtrequiredtdests LaunchSpecification.InstanceTypes,the type of instance to import to (required)s-fs--formatsDiskImage.1.Image.FormattFORMATsGthe image's format ("vmdk", "raw", or "vhd") (required)s-as--architecturetARCHs LaunchSpecification.Architectures0the instance's processor architecture (required)s-ps --platformtPlatformtchoicestWindowstLinuxs*the instance's operating system (required)s-bs--buckets"the bucket to upload the volume tos--manifest-urltURLs#DiskImage.1.Image.ImportManifestUrlsNa pre-signed URL that points to the import manifest to uses--prefixsUa prefix to add to the names of the volume parts as they are uploadeds-xs --expirestDAYSttypetdefaultis\how long the import manifest should remain valid, in days (default: 30 days)s --no-uploadtactiont store_trueshstart the import process, but do not actually upload the volume (see euca-resume-import)s-ds --descriptiont Descriptions2a description for the import task (not the volume)s-gs--grouptGROUPsLaunchSpecification.GroupName.1s4name of the security group to create the instance ins-zs--availability-zonetZONEs.LaunchSpecification.Placement.AvailabilityZones(the zone in which to create the instances-ss --volume-sizetGiBsDiskImage.1.Volume.Sizes'size of the volume to import to, in GiBs --image-sizesDiskImage.1.Image.BytestBYTESs-size of the image (required for non-raw filess --user-datatDATAs!LaunchSpecification.UserData.Datas#user data to supply to the instances--user-data-filesLaunchSpecification.UserDatasGfile containing user data to supply to the instances--subnettSUBNETsLaunchSpecification.SubnetIdsO[VPC only] subnet to create the instance's network interface ins--private-ip-addresstADDRESSs$LaunchSpecification.PrivateIpAddresssc[VPC only] assign a specific primary private IP address to the instance's interfaces --monitors&LaunchSpecification.Monitoring.Enableds+enable detailed monitoring for the instances&--instance-initiated-shutdown-behaviors5LaunchSpecification.InstanceInitiatedShutdownBehaviortstopt terminatesXwhether to "stop" (default) or terminate the instance when it shuts downs--keysLaunchSpecification.KeyNametKEYPAIRsW[Eucalyptus only] name of the key pair to use when running the instances--ignore-region-affinitys --dry-runs--dont-verify-formattvolumescC s€tj|ƒ|jƒ|jdjƒdkrM|jdjƒ|jdt manifest_keytgetobjtdaystget_urltresulttresume((sI/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/importinstance.pyRXžs6    cC s|j|dƒdS(NRK(tprint_conversion_task(R>R]((sI/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/importinstance.pyt print_resultÁsN(RR(sstopR)(t__name__t __module__t DESCRIPTIONRtNonetTrueRRR=Rtbase64t b64encodeRtargparsetSUPPRESStARGSt LIST_TAGSR0RXR`(((sI/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/importinstance.pyR -s–         #(t __future__RRhRfR;ROtrequestbuilderRRtrequestbuilder.exceptionsRtrequestbuilder.mixinsRteuca2ools.commands.argtypesRRteuca2ools.commands.ec2Rteuca2ools.commands.ec2.mixinsRt#euca2ools.commands.ec2.resumeimportR teuca2ools.commands.s3.getobjectR teuca2ools.utilR5R (((sI/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/importinstance.pyts