pax_global_header00006660000000000000000000000064122224173020014505gustar00rootroot0000000000000052 comment=62ee82942cd216828e19ba3641a258d8d6797eff euca2ools-3.0.2/000077500000000000000000000000001222241730200134035ustar00rootroot00000000000000euca2ools-3.0.2/.gitignore000066400000000000000000000002011222241730200153640ustar00rootroot00000000000000.project .nfs* *~ .sw* .*.sw* .DS_Store core core.* *.egg_info *.pyc *.pyo __pycache__ /.idea /build /dist /*.egg-info /MANIFEST euca2ools-3.0.2/COPYING000066400000000000000000000025121222241730200144360ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, with or # without modification, are permitted provided that the following conditions # are met: # # Redistributions of source code must retain the above # copyright notice, this list of conditions and the # following disclaimer. # # Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the # following disclaimer in the documentation and/or other # materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. euca2ools-3.0.2/INSTALL000066400000000000000000000030021222241730200144270ustar00rootroot00000000000000Euca2ools 3 Installation ======================== This file describes the steps needed to install euca2ools from source. Your operating system vendor may already offer euca2ools in packaged form that use can install using yum, apt-get, or a similar tool. Requirements ------------ Euca2ools currently work with python versions 2.6 and 2.7. Work is ongoing to port the suite to version 3.3. You must also have the following python libraries installed. All of them are available on PyPi: - lxml (http://lxml.de/) - requestbuilder (https://github.com/boto/requestbuilder) - requests (http://www.python-requests.org/) - setuptools (https://pypi.python.org/pypi/setuptools) - six (http://pythonhosted.org/six/) The bundle-related tools require several other executables as well: - blkid - dd - gzip or pigz - mkfs - mount - openssl - sync - umount Finally, euca-get-password requires openssl. Installation ------------ To install from a source tarball: $ tar xzf euca2ools-3.0.0.tar.gz $ cd euca2ools-3.0.0 $ python setup.py install To install directly from git: $ git clone git://github.com/eucalyptus/euca2ools $ cd euca2ools $ python setup.py install The euca2ools suite also ships with a default configuration file and certificates that you may find useful. To use them we recommend copying them onto your system like so: # mkdir /etc/euca2ools # cp conf/euca2ools.ini /etc/euca2ools/euca2ools.ini # mkdir /usr/share/euca2ools # cp -R certs /usr/share/euca2ools/certs euca2ools-3.0.2/MANIFEST.in000066400000000000000000000001721222241730200151410ustar00rootroot00000000000000include COPYING include INSTALL include README recursive-include certs * recursive-include conf * recursive-include man * euca2ools-3.0.2/README000066400000000000000000000025651222241730200142730ustar00rootroot00000000000000Euca2ools are command line tools used to interact with Amazon Web Services (AWS) as well as other services that are compatible with AWS, such as Eucalyptus. They aim to use the same input as similar tools provided by AWS for each service individually along with several enhancements that make them easier to use against both AWS and Eucalyptus. Euca2ools provide the functionality of AWS's REST-based and Query-based APIs for the following services: - Auto Scaling (2011-01-01) (commands start with "euscale") - CloudWatch (2010-08-01) (commands start with "euwatch") - EC2 (2013-02-01) (commands start with "euca") - Elastic Load Balancing (2012-06-01) (commands start with "eulb") - IAM (2010-05-08) (commands start with "euare") The source code comes with man pages that provide basic documentation. Running a command with --help will also provide information on how to use that specific command. For more detailed documentation, see the online euca2ools documentation: http://www.eucalyptus.com/docs For installation instructions, consult the INSTALL file that accompanies the source code. Euca2ools are distributed under a 2-clause BSD license, a copy of which is included in the file called COPYING. To obtain the latest source code for euca2ools, visit the project's GitHub page: https://github.com/eucalyptus/euca2ools euca2ools-3.0.2/bin/000077500000000000000000000000001222241730200141535ustar00rootroot00000000000000euca2ools-3.0.2/bin/euare-accountaliascreate000077500000000000000000000002571222241730200210360ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.createaccountalias if __name__ == '__main__': euca2ools.commands.euare.createaccountalias.CreateAccountAlias.run() euca2ools-3.0.2/bin/euare-accountaliasdelete000077500000000000000000000002571222241730200210350ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.deleteaccountalias if __name__ == '__main__': euca2ools.commands.euare.deleteaccountalias.DeleteAccountAlias.run() euca2ools-3.0.2/bin/euare-accountaliaslist000077500000000000000000000002571222241730200205460ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.listaccountaliases if __name__ == '__main__': euca2ools.commands.euare.listaccountaliases.ListAccountAliases.run() euca2ools-3.0.2/bin/euare-accountcreate000077500000000000000000000002401222241730200200140ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.createaccount if __name__ == '__main__': euca2ools.commands.euare.createaccount.CreateAccount.run() euca2ools-3.0.2/bin/euare-accountdel000077500000000000000000000002401222241730200173150ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.deleteaccount if __name__ == '__main__': euca2ools.commands.euare.deleteaccount.DeleteAccount.run() euca2ools-3.0.2/bin/euare-accountdelpolicy000077500000000000000000000002621222241730200205410ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.deleteaccountpolicy if __name__ == '__main__': euca2ools.commands.euare.deleteaccountpolicy.DeleteAccountPolicy.run() euca2ools-3.0.2/bin/euare-accountgetpolicy000077500000000000000000000002511222241730200205520ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.getaccountpolicy if __name__ == '__main__': euca2ools.commands.euare.getaccountpolicy.GetAccountPolicy.run() euca2ools-3.0.2/bin/euare-accountgetsummary000077500000000000000000000002541222241730200207530ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.getaccountsummary if __name__ == '__main__': euca2ools.commands.euare.getaccountsummary.GetAccountSummary.run() euca2ools-3.0.2/bin/euare-accountlist000077500000000000000000000002351222241730200175300ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.listaccounts if __name__ == '__main__': euca2ools.commands.euare.listaccounts.ListAccounts.run() euca2ools-3.0.2/bin/euare-accountlistpolicies000077500000000000000000000002621222241730200212600ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.listaccountpolicies if __name__ == '__main__': euca2ools.commands.euare.listaccountpolicies.ListAccountPolicies.run() euca2ools-3.0.2/bin/euare-accountuploadpolicy000077500000000000000000000002511222241730200212570ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.putaccountpolicy if __name__ == '__main__': euca2ools.commands.euare.putaccountpolicy.PutAccountPolicy.run() euca2ools-3.0.2/bin/euare-getldapsyncstatus000077500000000000000000000002541222241730200207620ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.getldapsyncstatus if __name__ == '__main__': euca2ools.commands.euare.getldapsyncstatus.GetLdapSyncStatus.run() euca2ools-3.0.2/bin/euare-groupaddpolicy000077500000000000000000000002431222241730200202240ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.addgrouppolicy if __name__ == '__main__': euca2ools.commands.euare.addgrouppolicy.AddGroupPolicy.run() euca2ools-3.0.2/bin/euare-groupadduser000077500000000000000000000002431222241730200177030ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.addusertogroup if __name__ == '__main__': euca2ools.commands.euare.addusertogroup.AddUserToGroup.run() euca2ools-3.0.2/bin/euare-groupcreate000077500000000000000000000002321222241730200175150ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.creategroup if __name__ == '__main__': euca2ools.commands.euare.creategroup.CreateGroup.run() euca2ools-3.0.2/bin/euare-groupdel000077500000000000000000000002321222241730200170160ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.deletegroup if __name__ == '__main__': euca2ools.commands.euare.deletegroup.DeleteGroup.run() euca2ools-3.0.2/bin/euare-groupdelpolicy000077500000000000000000000002541222241730200202420ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.deletegrouppolicy if __name__ == '__main__': euca2ools.commands.euare.deletegrouppolicy.DeleteGroupPolicy.run() euca2ools-3.0.2/bin/euare-groupgetpolicy000077500000000000000000000002431222241730200202530ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.getgrouppolicy if __name__ == '__main__': euca2ools.commands.euare.getgrouppolicy.GetGroupPolicy.run() euca2ools-3.0.2/bin/euare-grouplistbypath000077500000000000000000000002271222241730200204410ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.listgroups if __name__ == '__main__': euca2ools.commands.euare.listgroups.ListGroups.run() euca2ools-3.0.2/bin/euare-grouplistpolicies000077500000000000000000000002541222241730200207610ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.listgrouppolicies if __name__ == '__main__': euca2ools.commands.euare.listgrouppolicies.ListGroupPolicies.run() euca2ools-3.0.2/bin/euare-grouplistusers000077500000000000000000000002211222241730200203050ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.getgroup if __name__ == '__main__': euca2ools.commands.euare.getgroup.GetGroup.run() euca2ools-3.0.2/bin/euare-groupmod000077500000000000000000000002321222241730200170310ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.updategroup if __name__ == '__main__': euca2ools.commands.euare.updategroup.UpdateGroup.run() euca2ools-3.0.2/bin/euare-groupremoveuser000077500000000000000000000002621222241730200204510ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.removeuserfromgroup if __name__ == '__main__': euca2ools.commands.euare.removeuserfromgroup.RemoveUserFromGroup.run() euca2ools-3.0.2/bin/euare-groupuploadpolicy000077500000000000000000000002431222241730200207600ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.putgrouppolicy if __name__ == '__main__': euca2ools.commands.euare.putgrouppolicy.PutGroupPolicy.run() euca2ools-3.0.2/bin/euare-servercertdel000077500000000000000000000002761222241730200200560ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.deleteservercertificate if __name__ == '__main__': euca2ools.commands.euare.deleteservercertificate.DeleteServerCertificate.run() euca2ools-3.0.2/bin/euare-servercertgetattributes000077500000000000000000000002651222241730200221760ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.getservercertificate if __name__ == '__main__': euca2ools.commands.euare.getservercertificate.GetServerCertificate.run() euca2ools-3.0.2/bin/euare-servercertlistbypath000077500000000000000000000002731222241730200214720ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.listservercertificates if __name__ == '__main__': euca2ools.commands.euare.listservercertificates.ListServerCertificates.run() euca2ools-3.0.2/bin/euare-servercertmod000077500000000000000000000002761222241730200200710ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.updateservercertificate if __name__ == '__main__': euca2ools.commands.euare.updateservercertificate.UpdateServerCertificate.run() euca2ools-3.0.2/bin/euare-servercertupload000077500000000000000000000002761222241730200205760ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.uploadservercertificate if __name__ == '__main__': euca2ools.commands.euare.uploadservercertificate.UploadServerCertificate.run() euca2ools-3.0.2/bin/euare-useraddcert000077500000000000000000000003011222241730200174770ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.uploadsigningcertificate if __name__ == '__main__': euca2ools.commands.euare.uploadsigningcertificate.UploadSigningCertificate.run() euca2ools-3.0.2/bin/euare-useraddkey000077500000000000000000000002461222241730200173420ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.createaccesskey if __name__ == '__main__': euca2ools.commands.euare.createaccesskey.CreateAccessKey.run() euca2ools-3.0.2/bin/euare-useraddloginprofile000077500000000000000000000002571222241730200212450ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.createloginprofile if __name__ == '__main__': euca2ools.commands.euare.createloginprofile.CreateLoginProfile.run() euca2ools-3.0.2/bin/euare-useraddpolicy000077500000000000000000000002401222241730200200430ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.adduserpolicy if __name__ == '__main__': euca2ools.commands.euare.adduserpolicy.AddUserPolicy.run() euca2ools-3.0.2/bin/euare-usercreate000077500000000000000000000002271222241730200173430ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.createuser if __name__ == '__main__': euca2ools.commands.euare.createuser.CreateUser.run() euca2ools-3.0.2/bin/euare-usercreatecert000077500000000000000000000003011222241730200202120ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.createsigningcertificate if __name__ == '__main__': euca2ools.commands.euare.createsigningcertificate.CreateSigningCertificate.run() euca2ools-3.0.2/bin/euare-userdeactivatemfadevice000077500000000000000000000002621222241730200220540ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.deactivatemfadevice if __name__ == '__main__': euca2ools.commands.euare.deactivatemfadevice.DeactivateMFADevice.run() euca2ools-3.0.2/bin/euare-userdel000077500000000000000000000002271222241730200166440ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.deleteuser if __name__ == '__main__': euca2ools.commands.euare.deleteuser.DeleteUser.run() euca2ools-3.0.2/bin/euare-userdelcert000077500000000000000000000003011222241730200175130ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.deletesigningcertificate if __name__ == '__main__': euca2ools.commands.euare.deletesigningcertificate.DeleteSigningCertificate.run() euca2ools-3.0.2/bin/euare-userdelkey000077500000000000000000000002461222241730200173560ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.deleteaccesskey if __name__ == '__main__': euca2ools.commands.euare.deleteaccesskey.DeleteAccessKey.run() euca2ools-3.0.2/bin/euare-userdelloginprofile000077500000000000000000000002571222241730200212610ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.deleteloginprofile if __name__ == '__main__': euca2ools.commands.euare.deleteloginprofile.DeleteLoginProfile.run() euca2ools-3.0.2/bin/euare-userdelpolicy000077500000000000000000000002511222241730200200610ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.deleteuserpolicy if __name__ == '__main__': euca2ools.commands.euare.deleteuserpolicy.DeleteUserPolicy.run() euca2ools-3.0.2/bin/euare-userenablemfadevice000077500000000000000000000002461222241730200211730ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.enablemfadevice if __name__ == '__main__': euca2ools.commands.euare.enablemfadevice.EnableMFADevice.run() euca2ools-3.0.2/bin/euare-usergetattributes000077500000000000000000000002161222241730200207640ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.getuser if __name__ == '__main__': euca2ools.commands.euare.getuser.GetUser.run() euca2ools-3.0.2/bin/euare-usergetinfo000077500000000000000000000002321222241730200175270ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.getuserinfo if __name__ == '__main__': euca2ools.commands.euare.getuserinfo.GetUserInfo.run() euca2ools-3.0.2/bin/euare-usergetloginprofile000077500000000000000000000002461222241730200212720ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.getloginprofile if __name__ == '__main__': euca2ools.commands.euare.getloginprofile.GetLoginProfile.run() euca2ools-3.0.2/bin/euare-usergetpolicy000077500000000000000000000002401222241730200200720ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.getuserpolicy if __name__ == '__main__': euca2ools.commands.euare.getuserpolicy.GetUserPolicy.run() euca2ools-3.0.2/bin/euare-userlistbypath000077500000000000000000000002241222241730200202600ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.listusers if __name__ == '__main__': euca2ools.commands.euare.listusers.ListUsers.run() euca2ools-3.0.2/bin/euare-userlistcerts000077500000000000000000000002761222241730200201200ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.listsigningcertificates if __name__ == '__main__': euca2ools.commands.euare.listsigningcertificates.ListSigningCertificates.run() euca2ools-3.0.2/bin/euare-userlistgroups000077500000000000000000000002541222241730200203130ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.listgroupsforuser if __name__ == '__main__': euca2ools.commands.euare.listgroupsforuser.ListGroupsForUser.run() euca2ools-3.0.2/bin/euare-userlistkeys000077500000000000000000000002431222241730200177450ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.listaccesskeys if __name__ == '__main__': euca2ools.commands.euare.listaccesskeys.ListAccessKeys.run() euca2ools-3.0.2/bin/euare-userlistmfadevices000077500000000000000000000002431222241730200211000ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.listmfadevices if __name__ == '__main__': euca2ools.commands.euare.listmfadevices.ListMFADevices.run() euca2ools-3.0.2/bin/euare-userlistpolicies000077500000000000000000000002511222241730200206000ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.listuserpolicies if __name__ == '__main__': euca2ools.commands.euare.listuserpolicies.ListUserPolicies.run() euca2ools-3.0.2/bin/euare-usermod000077500000000000000000000002271222241730200166570ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.updateuser if __name__ == '__main__': euca2ools.commands.euare.updateuser.UpdateUser.run() euca2ools-3.0.2/bin/euare-usermodcert000077500000000000000000000003011222241730200175260ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.updatesigningcertificate if __name__ == '__main__': euca2ools.commands.euare.updatesigningcertificate.UpdateSigningCertificate.run() euca2ools-3.0.2/bin/euare-usermodkey000077500000000000000000000002461222241730200173710ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.updateaccesskey if __name__ == '__main__': euca2ools.commands.euare.updateaccesskey.UpdateAccessKey.run() euca2ools-3.0.2/bin/euare-usermodloginprofile000077500000000000000000000002571222241730200212740ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.updateloginprofile if __name__ == '__main__': euca2ools.commands.euare.updateloginprofile.UpdateLoginProfile.run() euca2ools-3.0.2/bin/euare-userresyncmfadevice000077500000000000000000000002461222241730200212500ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.resyncmfadevice if __name__ == '__main__': euca2ools.commands.euare.resyncmfadevice.ResyncMFADevice.run() euca2ools-3.0.2/bin/euare-userupdateinfo000077500000000000000000000002431222241730200202340ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.updateuserinfo if __name__ == '__main__': euca2ools.commands.euare.updateuserinfo.UpdateUserInfo.run() euca2ools-3.0.2/bin/euare-useruploadpolicy000077500000000000000000000002401222241730200205770ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euare.putuserpolicy if __name__ == '__main__': euca2ools.commands.euare.putuserpolicy.PutUserPolicy.run() euca2ools-3.0.2/bin/euca-allocate-address000077500000000000000000000002441222241730200202230ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.allocateaddress if __name__ == '__main__': euca2ools.commands.euca.allocateaddress.AllocateAddress.run() euca2ools-3.0.2/bin/euca-associate-address000077500000000000000000000002471222241730200204150ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.associateaddress if __name__ == '__main__': euca2ools.commands.euca.associateaddress.AssociateAddress.run() euca2ools-3.0.2/bin/euca-attach-volume000077500000000000000000000002331222241730200175630ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.attachvolume if __name__ == '__main__': euca2ools.commands.euca.attachvolume.AttachVolume.run() euca2ools-3.0.2/bin/euca-authorize000077500000000000000000000002221222241730200170220ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.authorize if __name__ == '__main__': euca2ools.commands.euca.authorize.Authorize.run() euca2ools-3.0.2/bin/euca-bundle-image000077500000000000000000000002341222241730200173440ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.bundle.bundleimage if __name__ == '__main__': euca2ools.commands.bundle.bundleimage.BundleImage.run() euca2ools-3.0.2/bin/euca-bundle-instance000077500000000000000000000002411222241730200200640ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.bundleinstance if __name__ == '__main__': euca2ools.commands.euca.bundleinstance.BundleInstance.run() euca2ools-3.0.2/bin/euca-bundle-upload000077500000000000000000000002401222241730200175430ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.nc.commands.bundleandupload if __name__ == '__main__': euca2ools.nc.commands.bundleandupload.BundleAndUpload.run() euca2ools-3.0.2/bin/euca-bundle-vol000077500000000000000000000002261222241730200170630ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.bundle.bundlevol if __name__ == '__main__': euca2ools.commands.bundle.bundlevol.BundleVol.run() euca2ools-3.0.2/bin/euca-cancel-bundle-task000077500000000000000000000002471222241730200204530ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.cancelbundletask if __name__ == '__main__': euca2ools.commands.euca.cancelbundletask.CancelBundleTask.run() euca2ools-3.0.2/bin/euca-check-bucket000077500000000000000000000002241222241730200173420ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.nc.commands.checkbucket if __name__ == '__main__': euca2ools.nc.commands.checkbucket.CheckBucket.run() euca2ools-3.0.2/bin/euca-confirm-product-instance000077500000000000000000000002711222241730200217310ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.confirmproductinstance if __name__ == '__main__': euca2ools.commands.euca.confirmproductinstance.ConfirmProductInstance.run() euca2ools-3.0.2/bin/euca-copy-image000077500000000000000000000002221222241730200170420ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.copyimage if __name__ == '__main__': euca2ools.commands.euca.copyimage.CopyImage.run() euca2ools-3.0.2/bin/euca-create-group000077500000000000000000000002601222241730200174070ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.createsecuritygroup if __name__ == '__main__': euca2ools.commands.euca.createsecuritygroup.CreateSecurityGroup.run() euca2ools-3.0.2/bin/euca-create-image000077500000000000000000000002301222241730200173320ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.createimage if __name__ == '__main__': euca2ools.commands.euca.createimage.CreateImage.run() euca2ools-3.0.2/bin/euca-create-keypair000077500000000000000000000002361222241730200177220ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.createkeypair if __name__ == '__main__': euca2ools.commands.euca.createkeypair.CreateKeyPair.run() euca2ools-3.0.2/bin/euca-create-snapshot000077500000000000000000000002411222241730200201110ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.createsnapshot if __name__ == '__main__': euca2ools.commands.euca.createsnapshot.CreateSnapshot.run() euca2ools-3.0.2/bin/euca-create-tags000077500000000000000000000002331222241730200172110ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.createtags if __name__ == '__main__': cmd = euca2ools.commands.euca.createtags.CreateTags.run() euca2ools-3.0.2/bin/euca-create-volume000077500000000000000000000002331222241730200175620ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.createvolume if __name__ == '__main__': euca2ools.commands.euca.createvolume.CreateVolume.run() euca2ools-3.0.2/bin/euca-delete-bundle000077500000000000000000000002371222241730200175270ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.bundle.deletebundle if __name__ == '__main__': euca2ools.commands.bundle.deletebundle.DeleteBundle.run() euca2ools-3.0.2/bin/euca-delete-group000077500000000000000000000002601222241730200174060ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.deletesecuritygroup if __name__ == '__main__': euca2ools.commands.euca.deletesecuritygroup.DeleteSecurityGroup.run() euca2ools-3.0.2/bin/euca-delete-keypair000077500000000000000000000002361222241730200177210ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.deletekeypair if __name__ == '__main__': euca2ools.commands.euca.deletekeypair.DeleteKeyPair.run() euca2ools-3.0.2/bin/euca-delete-snapshot000077500000000000000000000002411222241730200201100ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.deletesnapshot if __name__ == '__main__': euca2ools.commands.euca.deletesnapshot.DeleteSnapshot.run() euca2ools-3.0.2/bin/euca-delete-tags000077500000000000000000000002251222241730200172110ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.deletetags if __name__ == '__main__': euca2ools.commands.euca.deletetags.DeleteTags.run() euca2ools-3.0.2/bin/euca-delete-volume000077500000000000000000000002331222241730200175610ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.deletevolume if __name__ == '__main__': euca2ools.commands.euca.deletevolume.DeleteVolume.run() euca2ools-3.0.2/bin/euca-deregister000077500000000000000000000002441222241730200171510ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.deregisterimage if __name__ == '__main__': euca2ools.commands.euca.deregisterimage.DeregisterImage.run() euca2ools-3.0.2/bin/euca-describe-addresses000077500000000000000000000002521222241730200205460ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describeaddresses if __name__ == '__main__': euca2ools.commands.euca.describeaddresses.DescribeAddresses.run() euca2ools-3.0.2/bin/euca-describe-availability-zones000077500000000000000000000003021222241730200223730ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describeavailabilityzones if __name__ == '__main__': euca2ools.commands.euca.describeavailabilityzones.DescribeAvailabilityZones.run() euca2ools-3.0.2/bin/euca-describe-bundle-tasks000077500000000000000000000002601222241730200211640ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describebundletasks if __name__ == '__main__': euca2ools.commands.euca.describebundletasks.DescribeBundleTasks.run() euca2ools-3.0.2/bin/euca-describe-group000077500000000000000000000002711222241730200177260ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describesecuritygroups if __name__ == '__main__': euca2ools.commands.euca.describesecuritygroups.DescribeSecurityGroups.run() euca2ools-3.0.2/bin/euca-describe-groups000077700000000000000000000000001222241730200236512euca-describe-groupustar00rootroot00000000000000euca2ools-3.0.2/bin/euca-describe-image-attribute000077500000000000000000000002711222241730200216550ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describeimageattribute if __name__ == '__main__': euca2ools.commands.euca.describeimageattribute.DescribeImageAttribute.run() euca2ools-3.0.2/bin/euca-describe-images000077500000000000000000000002411222241730200200340ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describeimages if __name__ == '__main__': euca2ools.commands.euca.describeimages.DescribeImages.run() euca2ools-3.0.2/bin/euca-describe-instance-attribute000077500000000000000000000003021222241730200223720ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describeinstanceattribute if __name__ == '__main__': euca2ools.commands.euca.describeinstanceattribute.DescribeInstanceAttribute.run() euca2ools-3.0.2/bin/euca-describe-instance-types000077500000000000000000000002661222241730200215440ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describeinstancetypes if __name__ == '__main__': euca2ools.commands.euca.describeinstancetypes.DescribeInstanceTypes.run() euca2ools-3.0.2/bin/euca-describe-instances000077500000000000000000000002521222241730200205600ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describeinstances if __name__ == '__main__': euca2ools.commands.euca.describeinstances.DescribeInstances.run() euca2ools-3.0.2/bin/euca-describe-keypairs000077500000000000000000000002471222241730200204240ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describekeypairs if __name__ == '__main__': euca2ools.commands.euca.describekeypairs.DescribeKeyPairs.run() euca2ools-3.0.2/bin/euca-describe-regions000077500000000000000000000002441222241730200202400ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describeregions if __name__ == '__main__': euca2ools.commands.euca.describeregions.DescribeRegions.run() euca2ools-3.0.2/bin/euca-describe-snapshots000077500000000000000000000002521222241730200206130ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describesnapshots if __name__ == '__main__': euca2ools.commands.euca.describesnapshots.DescribeSnapshots.run() euca2ools-3.0.2/bin/euca-describe-tags000077500000000000000000000002331222241730200175260ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describetags if __name__ == '__main__': euca2ools.commands.euca.describetags.DescribeTags.run() euca2ools-3.0.2/bin/euca-describe-volumes000077500000000000000000000002451222241730200202650ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.describevolumes if __name__ == '__main__': euca2ools.commands.euca.describevolumes.DescribeVolumes.run() euca2ools-3.0.2/bin/euca-detach-volume000077500000000000000000000002331222241730200175470ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.detachvolume if __name__ == '__main__': euca2ools.commands.euca.detachvolume.DetachVolume.run() euca2ools-3.0.2/bin/euca-disassociate-address000077500000000000000000000002601222241730200211100ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.disassociateaddress if __name__ == '__main__': euca2ools.commands.euca.disassociateaddress.DisassociateAddress.run() euca2ools-3.0.2/bin/euca-download-bundle000077500000000000000000000002451222241730200200730ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.bundle.downloadbundle if __name__ == '__main__': euca2ools.commands.bundle.downloadbundle.DownloadBundle.run() euca2ools-3.0.2/bin/euca-get-console-output000077500000000000000000000002471222241730200205740ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.getconsoleoutput if __name__ == '__main__': euca2ools.commands.euca.getconsoleoutput.GetConsoleOutput.run() euca2ools-3.0.2/bin/euca-get-password000077500000000000000000000002301222241730200174260ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.getpassword if __name__ == '__main__': euca2ools.commands.euca.getpassword.GetPassword.run() euca2ools-3.0.2/bin/euca-get-password-data000077500000000000000000000002441222241730200203420ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.getpassworddata if __name__ == '__main__': euca2ools.commands.euca.getpassworddata.GetPasswordData.run() euca2ools-3.0.2/bin/euca-import-keypair000077500000000000000000000002361222241730200177710ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.importkeypair if __name__ == '__main__': euca2ools.commands.euca.importkeypair.ImportKeyPair.run() euca2ools-3.0.2/bin/euca-modify-image-attribute000077500000000000000000000002631222241730200213650ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.modifyimageattribute if __name__ == '__main__': euca2ools.commands.euca.modifyimageattribute.ModifyImageAttribute.run() euca2ools-3.0.2/bin/euca-modify-instance-type000077500000000000000000000003101222241730200210560ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.modifyinstancetypeattribute if __name__ == '__main__': euca2ools.commands.euca.modifyinstancetypeattribute.ModifyInstanceTypeAttribute.run() euca2ools-3.0.2/bin/euca-modify-snapshot-attribute000077500000000000000000000002741222241730200221440ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.modifysnapshotattribute if __name__ == '__main__': euca2ools.commands.euca.modifysnapshotattribute.ModifySnapshotAttribute.run() euca2ools-3.0.2/bin/euca-monitor-instances000077500000000000000000000002471222241730200204730ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.monitorinstances if __name__ == '__main__': euca2ools.commands.euca.monitorinstances.MonitorInstances.run() euca2ools-3.0.2/bin/euca-reboot-instances000077500000000000000000000002441222241730200202730ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.rebootinstances if __name__ == '__main__': euca2ools.commands.euca.rebootinstances.RebootInstances.run() euca2ools-3.0.2/bin/euca-register000077500000000000000000000002361222241730200166410ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.registerimage if __name__ == '__main__': euca2ools.commands.euca.registerimage.RegisterImage.run() euca2ools-3.0.2/bin/euca-release-address000077500000000000000000000002411222241730200200540ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.releaseaddress if __name__ == '__main__': euca2ools.commands.euca.releaseaddress.ReleaseAddress.run() euca2ools-3.0.2/bin/euca-reset-image-attribute000077500000000000000000000002601222241730200212150ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.resetimageattribute if __name__ == '__main__': euca2ools.commands.euca.resetimageattribute.ResetImageAttribute.run() euca2ools-3.0.2/bin/euca-revoke000077500000000000000000000002111222241730200163010ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.revoke if __name__ == '__main__': euca2ools.commands.euca.revoke.Revoke.run() euca2ools-3.0.2/bin/euca-run-instances000077500000000000000000000002331222241730200176030ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.runinstances if __name__ == '__main__': euca2ools.commands.euca.runinstances.RunInstances.run() euca2ools-3.0.2/bin/euca-start-instances000077500000000000000000000002411222241730200201330ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.startinstances if __name__ == '__main__': euca2ools.commands.euca.startinstances.StartInstances.run() euca2ools-3.0.2/bin/euca-stop-instances000077500000000000000000000002361222241730200177670ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.stopinstances if __name__ == '__main__': euca2ools.commands.euca.stopinstances.StopInstances.run() euca2ools-3.0.2/bin/euca-terminate-instances000077500000000000000000000002551222241730200207730ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.terminateinstances if __name__ == '__main__': euca2ools.commands.euca.terminateinstances.TerminateInstances.run() euca2ools-3.0.2/bin/euca-unbundle000077500000000000000000000002231222241730200166250ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.bundle.unbundle if __name__ == '__main__': euca2ools.commands.bundle.unbundle.Unbundle.run() euca2ools-3.0.2/bin/euca-unmonitor-instances000077500000000000000000000002551222241730200210350ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.euca.unmonitorinstances if __name__ == '__main__': euca2ools.commands.euca.unmonitorinstances.UnmonitorInstances.run() euca2ools-3.0.2/bin/euca-upload-bundle000077500000000000000000000002371222241730200175510ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.bundle.uploadbundle if __name__ == '__main__': euca2ools.commands.bundle.uploadbundle.UploadBundle.run() euca2ools-3.0.2/bin/euca-version000077500000000000000000000002021222241730200164730ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands import sys print >> sys.stderr, euca2ools.commands.Euca2ools().format_version() euca2ools-3.0.2/bin/eulb-apply-security-groups-to-lb000077500000000000000000000003721222241730200223520ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.applysecuritygroupstoloadbalancer if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.applysecuritygroupstoloadbalancer.ApplySecurityGroupsToLoadBalancer.run() euca2ools-3.0.2/bin/eulb-attach-lb-to-subnets000077500000000000000000000003501222241730200207640ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.attachloadbalancertosubnets if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.attachloadbalancertosubnets.AttachLoadBalancerToSubnets.run() euca2ools-3.0.2/bin/eulb-configure-healthcheck000077500000000000000000000003231222241730200212460ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.configurehealthcheck if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.configurehealthcheck.ConfigureHealthCheck.run() euca2ools-3.0.2/bin/eulb-create-app-cookie-stickiness-policy000077500000000000000000000003641222241730200237730ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.createappcookiestickinesspolicy if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.createappcookiestickinesspolicy.CreateAppCookieStickinessPolicy.run() euca2ools-3.0.2/bin/eulb-create-lb000077500000000000000000000003151222241730200166630ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.createloadbalancer if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.createloadbalancer.CreateLoadBalancer.run() euca2ools-3.0.2/bin/eulb-create-lb-cookie-stickiness-policy000077500000000000000000000003611222241730200236050ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.createlbcookiestickinesspolicy if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.createlbcookiestickinesspolicy.CreateLBCookieStickinessPolicy.run() euca2ools-3.0.2/bin/eulb-create-lb-listeners000077500000000000000000000003501222241730200206700ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.createloadbalancerlisteners if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.createloadbalancerlisteners.CreateLoadBalancerListeners.run() euca2ools-3.0.2/bin/eulb-create-lb-policy000077500000000000000000000003371222241730200201640ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.createloadbalancerpolicy if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.createloadbalancerpolicy.CreateLoadBalancerPolicy.run() euca2ools-3.0.2/bin/eulb-delete-lb000077500000000000000000000003151222241730200166620ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.deleteloadbalancer if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.deleteloadbalancer.DeleteLoadBalancer.run() euca2ools-3.0.2/bin/eulb-delete-lb-listeners000077500000000000000000000003501222241730200206670ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.deleteloadbalancerlisteners if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.deleteloadbalancerlisteners.DeleteLoadBalancerListeners.run() euca2ools-3.0.2/bin/eulb-delete-lb-policy000077500000000000000000000003371222241730200201630ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.deleteloadbalancerpolicy if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.deleteloadbalancerpolicy.DeleteLoadBalancerPolicy.run() euca2ools-3.0.2/bin/eulb-deregister-instances-from-lb000077500000000000000000000004001222241730200224760ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.deregisterinstancesfromloadbalancer if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.deregisterinstancesfromloadbalancer.DeregisterInstancesFromLoadBalancer.run() euca2ools-3.0.2/bin/eulb-describe-instance-health000077500000000000000000000003311222241730200216500ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.describeinstancehealth if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.describeinstancehealth.DescribeInstanceHealth.run() euca2ools-3.0.2/bin/eulb-describe-lb-policies000077500000000000000000000003531222241730200210070ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.describeloadbalancerpolicies if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.describeloadbalancerpolicies.DescribeLoadBalancerPolicies.run() euca2ools-3.0.2/bin/eulb-describe-lb-policy-types000077500000000000000000000003641222241730200216430ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.describeloadbalancerpolicytypes if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.describeloadbalancerpolicytypes.DescribeLoadBalancerPolicyTypes.run() euca2ools-3.0.2/bin/eulb-describe-lbs000077500000000000000000000003261222241730200173650ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.describeloadbalancers if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.describeloadbalancers.DescribeLoadBalancers.run() euca2ools-3.0.2/bin/eulb-detach-lb-from-subnets000077500000000000000000000003561222241730200212770ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.detachloadbalancerfromsubnets if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.detachloadbalancerfromsubnets.DetachLoadBalancerFromSubnets.run() euca2ools-3.0.2/bin/eulb-disable-zones-for-lb000077500000000000000000000004141222241730200207430ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.disableavailabilityzonesforloadbalancer if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.disableavailabilityzonesforloadbalancer.DisableAvailabilityZonesForLoadBalancer.run() euca2ools-3.0.2/bin/eulb-enable-zones-for-lb000077500000000000000000000004111222241730200205630ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.enableavailabilityzonesforloadbalancer if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.enableavailabilityzonesforloadbalancer.EnableAvailabilityZonesForLoadBalancer.run() euca2ools-3.0.2/bin/eulb-register-instances-with-lb000077500000000000000000000003721222241730200222050ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.registerinstanceswithloadbalancer if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.registerinstanceswithloadbalancer.RegisterInstancesWithLoadBalancer.run() euca2ools-3.0.2/bin/eulb-set-lb-listener-ssl-cert000077500000000000000000000004061222241730200215710ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.setloadbalancerlistenersslcertificate if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.setloadbalancerlistenersslcertificate.SetLoadBalancerListenerSSLCertificate.run() euca2ools-3.0.2/bin/eulb-set-lb-policies-for-backend-server000077500000000000000000000004141222241730200234750ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.setloadbalancerpoliciesforbackendserver if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.setloadbalancerpoliciesforbackendserver.SetLoadBalancerPoliciesForBackendServer.run() euca2ools-3.0.2/bin/eulb-set-lb-policies-of-listener000077500000000000000000000003721222241730200222500ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.elasticloadbalancing.setloadbalancerpoliciesoflistener if __name__ == '__main__': euca2ools.commands.elasticloadbalancing.setloadbalancerpoliciesoflistener.SetLoadBalancerPoliciesOfListener.run() euca2ools-3.0.2/bin/euscale-create-auto-scaling-group000077500000000000000000000003071222241730200225010ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.createautoscalinggroup if __name__ == '__main__': euca2ools.commands.autoscaling.createautoscalinggroup.CreateAutoScalingGroup.run() euca2ools-3.0.2/bin/euscale-create-launch-config000077500000000000000000000003201222241730200214710ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.createlaunchconfiguration if __name__ == '__main__': euca2ools.commands.autoscaling.createlaunchconfiguration.CreateLaunchConfiguration.run() euca2ools-3.0.2/bin/euscale-create-or-update-tags000077500000000000000000000002731222241730200216170ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.createorupdatetags if __name__ == '__main__': euca2ools.commands.autoscaling.createorupdatetags.CreateOrUpdateTags.run() euca2ools-3.0.2/bin/euscale-delete-auto-scaling-group000077500000000000000000000003071222241730200225000ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.deleteautoscalinggroup if __name__ == '__main__': euca2ools.commands.autoscaling.deleteautoscalinggroup.DeleteAutoScalingGroup.run() euca2ools-3.0.2/bin/euscale-delete-launch-config000077500000000000000000000003201222241730200214700ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.deletelaunchconfiguration if __name__ == '__main__': euca2ools.commands.autoscaling.deletelaunchconfiguration.DeleteLaunchConfiguration.run() euca2ools-3.0.2/bin/euscale-delete-notification-configuration000077500000000000000000000003421222241730200243120ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.deletenotificationconfiguration if __name__ == '__main__': euca2ools.commands.autoscaling.deletenotificationconfiguration.DeleteNotificationConfiguration.run() euca2ools-3.0.2/bin/euscale-delete-policy000077500000000000000000000002511222241730200202550ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.deletepolicy if __name__ == '__main__': euca2ools.commands.autoscaling.deletepolicy.DeletePolicy.run() euca2ools-3.0.2/bin/euscale-delete-scheduled-action000077500000000000000000000003041222241730200221700ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.deletescheduledaction if __name__ == '__main__': euca2ools.commands.autoscaling.deletescheduledaction.DeleteScheduledAction.run() euca2ools-3.0.2/bin/euscale-delete-tags000077500000000000000000000002431222241730200177150ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.deletetags if __name__ == '__main__': euca2ools.commands.autoscaling.deletetags.DeleteTags.run() euca2ools-3.0.2/bin/euscale-describe-adjustment-types000077500000000000000000000003121222241730200226120ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describeadjustmenttypes if __name__ == '__main__': euca2ools.commands.autoscaling.describeadjustmenttypes.DescribeAdjustmentTypes.run() euca2ools-3.0.2/bin/euscale-describe-auto-scaling-groups000077500000000000000000000003201222241730200231740ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describeautoscalinggroups if __name__ == '__main__': euca2ools.commands.autoscaling.describeautoscalinggroups.DescribeAutoScalingGroups.run() euca2ools-3.0.2/bin/euscale-describe-auto-scaling-instances000077500000000000000000000003311222241730200236460ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describeautoscalinginstances if __name__ == '__main__': euca2ools.commands.autoscaling.describeautoscalinginstances.DescribeAutoScalingInstances.run() euca2ools-3.0.2/bin/euscale-describe-auto-scaling-notification-types000077500000000000000000000003611222241730200255120ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describeautoscalingnotificationtypes if __name__ == '__main__': euca2ools.commands.autoscaling.describeautoscalingnotificationtypes.DescribeAutoScalingNotificationTypes.run() euca2ools-3.0.2/bin/euscale-describe-launch-configs000077500000000000000000000003311222241730200221730ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describelaunchconfigurations if __name__ == '__main__': euca2ools.commands.autoscaling.describelaunchconfigurations.DescribeLaunchConfigurations.run() euca2ools-3.0.2/bin/euscale-describe-metric-collection-types000077500000000000000000000003341222241730200240540ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describemetriccollectiontypes if __name__ == '__main__': euca2ools.commands.autoscaling.describemetriccollectiontypes.DescribeMetricCollectionTypes.run() euca2ools-3.0.2/bin/euscale-describe-notification-configurations000077500000000000000000000003531222241730200250150ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describenotificationconfigurations if __name__ == '__main__': euca2ools.commands.autoscaling.describenotificationconfigurations.DescribeNotificationConfigurations.run() euca2ools-3.0.2/bin/euscale-describe-policies000077500000000000000000000002651222241730200211100ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describepolicies if __name__ == '__main__': euca2ools.commands.autoscaling.describepolicies.DescribePolicies.run() euca2ools-3.0.2/bin/euscale-describe-process-types000077500000000000000000000003261222241730200221170ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describescalingprocesstypes if __name__ == '__main__': euca2ools.commands.autoscaling.describescalingprocesstypes.DescribeScalingProcessTypes.run() euca2ools-3.0.2/bin/euscale-describe-scaling-activities000077500000000000000000000003201222241730200230530ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describescalingactivities if __name__ == '__main__': euca2ools.commands.autoscaling.describescalingactivities.DescribeScalingActivities.run() euca2ools-3.0.2/bin/euscale-describe-scheduled-actions000077500000000000000000000003151222241730200226730ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describescheduledactions if __name__ == '__main__': euca2ools.commands.autoscaling.describescheduledactions.DescribeScheduledActions.run() euca2ools-3.0.2/bin/euscale-describe-tags000077500000000000000000000002511222241730200202320ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describetags if __name__ == '__main__': euca2ools.commands.autoscaling.describetags.DescribeTags.run() euca2ools-3.0.2/bin/euscale-describe-termination-policy-types000077500000000000000000000003371222241730200242710ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.describeterminationpolicytypes if __name__ == '__main__': euca2ools.commands.autoscaling.describeterminationpolicytypes.DescribeTerminationPolicyTypes.run() euca2ools-3.0.2/bin/euscale-disable-metrics-collection000077500000000000000000000003151222241730200227170ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.disablemetricscollection if __name__ == '__main__': euca2ools.commands.autoscaling.disablemetricscollection.DisableMetricsCollection.run() euca2ools-3.0.2/bin/euscale-enable-metrics-collection000077500000000000000000000003121222241730200225370ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.enablemetricscollection if __name__ == '__main__': euca2ools.commands.autoscaling.enablemetricscollection.EnableMetricsCollection.run() euca2ools-3.0.2/bin/euscale-execute-policy000077500000000000000000000002541222241730200204600ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.executepolicy if __name__ == '__main__': euca2ools.commands.autoscaling.executepolicy.ExecutePolicy.run() euca2ools-3.0.2/bin/euscale-put-notification-configuration000077500000000000000000000003311222241730200236560ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.putnotificationconfiguration if __name__ == '__main__': euca2ools.commands.autoscaling.putnotificationconfiguration.PutNotificationConfiguration.run() euca2ools-3.0.2/bin/euscale-put-scaling-policy000077500000000000000000000002651222241730200212460ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.putscalingpolicy if __name__ == '__main__': euca2ools.commands.autoscaling.putscalingpolicy.PutScalingPolicy.run() euca2ools-3.0.2/bin/euscale-put-scheduled-update-group-action000077500000000000000000000003341222241730200241530ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.putscheduledupdategroupaction if __name__ == '__main__': euca2ools.commands.autoscaling.putscheduledupdategroupaction.PutScheduledUpdateGroupAction.run() euca2ools-3.0.2/bin/euscale-resume-processes000077500000000000000000000002621222241730200210240ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.resumeprocesses if __name__ == '__main__': euca2ools.commands.autoscaling.resumeprocesses.ResumeProcesses.run() euca2ools-3.0.2/bin/euscale-set-desired-capacity000077500000000000000000000002731222241730200215250ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.setdesiredcapacity if __name__ == '__main__': euca2ools.commands.autoscaling.setdesiredcapacity.SetDesiredCapacity.run() euca2ools-3.0.2/bin/euscale-set-instance-health000077500000000000000000000002701222241730200213570ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.setinstancehealth if __name__ == '__main__': euca2ools.commands.autoscaling.setinstancehealth.SetInstanceHealth.run() euca2ools-3.0.2/bin/euscale-suspend-processes000077500000000000000000000002651222241730200212100ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.suspendprocesses if __name__ == '__main__': euca2ools.commands.autoscaling.suspendprocesses.SuspendProcesses.run() euca2ools-3.0.2/bin/euscale-terminate-instance-in-auto-scaling-group000077500000000000000000000003561222241730200254400ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.terminateinstanceinautoscalinggroup if __name__ == '__main__': euca2ools.commands.autoscaling.terminateinstanceinautoscalinggroup.TerminateInstanceInAutoScalingGroup.run() euca2ools-3.0.2/bin/euscale-update-auto-scaling-group000077500000000000000000000003071222241730200225200ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.autoscaling.updateautoscalinggroup if __name__ == '__main__': euca2ools.commands.autoscaling.updateautoscalinggroup.UpdateAutoScalingGroup.run() euca2ools-3.0.2/bin/eustore-describe-images000077500000000000000000000002471222241730200206130ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.eustore.describeimages if __name__ == '__main__': euca2ools.commands.eustore.describeimages.DescribeImages.run() euca2ools-3.0.2/bin/eustore-install-image000077500000000000000000000002411222241730200203100ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.eustore.installimage if __name__ == '__main__': euca2ools.commands.eustore.installimage.InstallImage.run() euca2ools-3.0.2/bin/euwatch-delete-alarms000077500000000000000000000002471222241730200202610ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.monitoring.deletealarms if __name__ == '__main__': euca2ools.commands.monitoring.deletealarms.DeleteAlarms.run() euca2ools-3.0.2/bin/euwatch-describe-alarm-history000077500000000000000000000002771222241730200221160ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.monitoring.describealarmhistory if __name__ == '__main__': euca2ools.commands.monitoring.describealarmhistory.DescribeAlarmHistory.run() euca2ools-3.0.2/bin/euwatch-describe-alarms000077500000000000000000000002551222241730200205760ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.monitoring.describealarms if __name__ == '__main__': euca2ools.commands.monitoring.describealarms.DescribeAlarms.run() euca2ools-3.0.2/bin/euwatch-describe-alarms-for-metric000077500000000000000000000003101222241730200226330ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.monitoring.describealarmsformetric if __name__ == '__main__': euca2ools.commands.monitoring.describealarmsformetric.DescribeAlarmsForMetric.run() euca2ools-3.0.2/bin/euwatch-disable-alarm-actions000077500000000000000000000002741222241730200216750ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.monitoring.disablealarmactions if __name__ == '__main__': euca2ools.commands.monitoring.disablealarmactions.DisableAlarmActions.run() euca2ools-3.0.2/bin/euwatch-enable-alarm-actions000077500000000000000000000002711222241730200215150ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.monitoring.enablealarmactions if __name__ == '__main__': euca2ools.commands.monitoring.enablealarmactions.EnableAlarmActions.run() euca2ools-3.0.2/bin/euwatch-get-stats000077500000000000000000000002741222241730200174550ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.monitoring.getmetricstatistics if __name__ == '__main__': euca2ools.commands.monitoring.getmetricstatistics.GetMetricStatistics.run() euca2ools-3.0.2/bin/euwatch-list-metrics000077500000000000000000000002441222241730200201560ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.monitoring.listmetrics if __name__ == '__main__': euca2ools.commands.monitoring.listmetrics.ListMetrics.run() euca2ools-3.0.2/bin/euwatch-put-data000077500000000000000000000002521222241730200172550ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.monitoring.putmetricdata if __name__ == '__main__': euca2ools.commands.monitoring.putmetricdata.PutMetricData.run() euca2ools-3.0.2/bin/euwatch-put-metric-alarm000077500000000000000000000002551222241730200207240ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.monitoring.putmetricalarm if __name__ == '__main__': euca2ools.commands.monitoring.putmetricalarm.PutMetricAlarm.run() euca2ools-3.0.2/bin/euwatch-set-alarm-state000077500000000000000000000002521222241730200205410ustar00rootroot00000000000000#!/usr/bin/python -tt import euca2ools.commands.monitoring.setalarmstate if __name__ == '__main__': euca2ools.commands.monitoring.setalarmstate.SetAlarmState.run() euca2ools-3.0.2/certs/000077500000000000000000000000001222241730200145235ustar00rootroot00000000000000euca2ools-3.0.2/certs/cert-ec2-gov.pem000066400000000000000000000017651222241730200174340ustar00rootroot00000000000000-----BEGIN CERTIFICATE----- MIICvzCCAigCCQD3V6lFvX6dzDANBgkqhkiG9w0BAQUFADCBozELMAkGA1UEBhMC VVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMRMwEQYDVQQKEwpBbWF6 b24uY29tMRYwFAYDVQQLEw1FQzIgQXV0aG9yaXR5MRowGAYDVQQDExFFQzIgQU1J IEF1dGhvcml0eTEsMCoGCSqGSIb3DQEJARYdZWMyLWFtaS1nb3Ytd2VzdC0xQGFt YXpvbi5jb20wHhcNMTEwODEyMTcyNjE1WhcNMjEwODA5MTcyNjE1WjCBozELMAkG A1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMRMwEQYDVQQK EwpBbWF6b24uY29tMRYwFAYDVQQLEw1FQzIgQXV0aG9yaXR5MRowGAYDVQQDExFF QzIgQU1JIEF1dGhvcml0eTEsMCoGCSqGSIb3DQEJARYdZWMyLWFtaS1nb3Ytd2Vz dC0xQGFtYXpvbi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANshKnhw DUZ2/6VJwVTsXMUI1CGd5rpSpSLUCHGuqII+BDUvnp/sPxd1u6+I1QrbaaBAOm6+ evM77M7vNJXY3+JW00VOs9NgPEXBmn6UV4R1P7DljKurWGmRp8Fj1yVU4sSgZqqv 74SyhD0Z4ASczVcOiTZICeuQoJwmeZ8F20oLAgMBAAEwDQYJKoZIhvcNAQEFBQAD gYEAH3vpkD80ngP1e18UYSVBCODArik+aeUPAzJrPDYorrnffbamks50IMTktyiu za1JuplrvVsAKcQhyoPOq69bwRDg4L8VOXSCjjvsNuEhHL603h8jn6ghEouPCPl7 8s4Sr5XikmAgwFcPb/frNnLuZsSol08tISgPOlFg4KLv/bo= -----END CERTIFICATE----- euca2ools-3.0.2/certs/cert-ec2.pem000066400000000000000000000025431222241730200166360ustar00rootroot00000000000000-----BEGIN CERTIFICATE----- MIIDzjCCAzegAwIBAgIJALDnZV+lpZdSMA0GCSqGSIb3DQEBBQUAMIGhMQswCQYD VQQGEwJaQTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRv d24xJzAlBgNVBAoTHkFtYXpvbiBEZXZlbG9wbWVudCBDZW50cmUgKFNBKTEMMAoG A1UECxMDQUVTMREwDwYDVQQDEwhBRVMgVGVzdDEdMBsGCSqGSIb3DQEJARYOYWVz QGFtYXpvbi5jb20wHhcNMDUwODA5MTYwMTA5WhcNMDYwODA5MTYwMTA5WjCBoTEL MAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2Fw ZSBUb3duMScwJQYDVQQKEx5BbWF6b24gRGV2ZWxvcG1lbnQgQ2VudHJlIChTQSkx DDAKBgNVBAsTA0FFUzERMA8GA1UEAxMIQUVTIFRlc3QxHTAbBgkqhkiG9w0BCQEW DmFlc0BhbWF6b24uY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8v/X5 zZv8CAVfNmvBM0br/RUcf1wU8xC5d2otFQQsQKB3qiWoj3oHeOWskOlTPFVZ8N+/ hEaMjyOUkg2+g6XEagCQtFCEBzUVoMjiQIBPiWj5CWkFtlav2zt33LZ0ErTND4xl j7FQFqbaytHU9xuQcFO2p12bdITiBs5Kwoi9bQIDAQABo4IBCjCCAQYwHQYDVR0O BBYEFPQnsX1kDVzPtX+38ACV8RhoYcw8MIHWBgNVHSMEgc4wgcuAFPQnsX1kDVzP tX+38ACV8RhoYcw8oYGnpIGkMIGhMQswCQYDVQQGEwJaQTEVMBMGA1UECBMMV2Vz dGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xJzAlBgNVBAoTHkFtYXpvbiBE ZXZlbG9wbWVudCBDZW50cmUgKFNBKTEMMAoGA1UECxMDQUVTMREwDwYDVQQDEwhB RVMgVGVzdDEdMBsGCSqGSIb3DQEJARYOYWVzQGFtYXpvbi5jb22CCQCw52VfpaWX UjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAJJlWll4uGlrqBzeIw7u M3RvomlxMESwGKb9gI+ZeORlnHAyZxvd9XngIcjPuU+8uc3wc10LRQUCn45a5hFs zaCp9BSewLCCirn6awZn2tP8JlagSbjrN9YShStt8S3S/Jj+eBoRvc7jJnmEeMkx O0wHOzp5ZHRDK7tGULD6jCfU -----END CERTIFICATE----- euca2ools-3.0.2/certs/cert-ecc.pem000066400000000000000000000021731222241730200167160ustar00rootroot00000000000000-----BEGIN CERTIFICATE----- MIIDITCCAgmgAwIBAgIGEROw40+qMA0GCSqGSIb3DQEBDQUAMEcxCzAJBgNVBAYT AlVTMQ4wDAYDVQQKEwVDbG91ZDETMBEGA1UECxMKRXVjYWx5cHR1czETMBEGA1UE AxMKZXVjYWx5cHR1czAeFw0xMjA0MDUyMTExMzFaFw0xNzA0MDUyMTExMzFaMEcx CzAJBgNVBAYTAlVTMQ4wDAYDVQQKEwVDbG91ZDETMBEGA1UECxMKRXVjYWx5cHR1 czETMBEGA1UEAxMKZXVjYWx5cHR1czCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC AQoCggEBAJ+nw2K6kaA9RwIa2/m+wYeo4oj1aRqCjV+Jho9vb6urlNKBXC0KYBh5 DFycHV2P0H4rt7HSqzBZ5XDSkL8mjAPVYVHz4OJxkBnIGlQCWdI5q3TnnlcttwR6 DD8tcayNkLSjgwfftdb3G7X3CM7tSRmuhxjcFm4vRiHYV1Y6r/Cz+8NZCm64GppT QAj9ieBNbzriuDUiNlmF/7PbxEhFhGNrdQlJPfjcn8pYCF5JSgXxjttfW0b0H0P7 eICDdItJAiMnrnFSuWAR7zSdHxcHLATN+aPhMV94ARkJSzsmA98vf5QKKWoF2K9m n0mVe9w6+Vll7Gygx1iD5K8vD1Ee4UsCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB /zANBgkqhkiG9w0BAQ0FAAOCAQEAI0g/caYBr0WepIJsgMGiW2jQGBKIyOX0YtC5 uDDKqVDGJJj6DxoevYZyo3SyDTyvq2oqzuL0EPVFrX27wr9Vb7a1zsLIJ8WrmT4j w9sRZgtLFOGa3H5U6zTRmPh/B2WBo2keWfT1ralBS46Dwp0g4Mc07on17itFohrN N3bkRxAKNKQZElW3OR3Rjswxa5cYIgtCHLJ5gH1nYtHBJmoj+BPjx+aGfRVudD3c uV38uhvJTlkIB949Efzb6l9XldO2P8bmZ1aY+iIs7L+x6UZW1lvfRwiQBsUB7VKy 1euypJA33cRg86/AvDx56tniJ9c7czR2CIoFhE2WNwXRiNtKag== -----END CERTIFICATE----- euca2ools-3.0.2/conf/000077500000000000000000000000001222241730200143305ustar00rootroot00000000000000euca2ools-3.0.2/conf/euca2ools.ini000066400000000000000000000140521222241730200167270ustar00rootroot00000000000000; Main euca2ools configuration file ; ; Euca2ools get their configuration from the following sources, on order of ; lowest to highest priority: ; - /etc/euca2ools/euca2ools.ini (this file) ; - /etc/euca2ools/conf.d/*.ini ; - ~/.euca/*.ini ; ; The settings in this file alone are not enough to use a cloud -- you will ; also need to obtain credentials from your cloud of choice and supply them ; either at the command line or in a section like the following in a ; configuration file: ; ; [user example] ; key-id = AKIAIOSF0DNN7EXAMPLE ; secret-key = vrwAGfda90v/FDASFEO4/498qADFAeefEXAMPLE ; ; After doing so, you can add a "user" option to a "region" section, which ; causes the region to connect as a specific user by default: ; ; [region localhost] ; user = example [global] default-region = aws:us-east-1 [region localhost] ; Eucalyptus (all services on localhost) autoscaling-url = http://127.0.0.1:8773/services/AutoScaling/ ec2-url = http://127.0.0.1:8773/services/Eucalyptus/ elasticloadbalancing-url = http://127.0.0.1:8773/services/LoadBalancing/ iam-url = http://127.0.0.1:8773/services/Euare/ monitoring-url = http://127.0.0.1:8773/services/CloudWatch/ s3-url = http://127.0.0.1:8773/services/Walrus/ sts-url = http://127.0.0.1:8773/services/Tokens/ ; Eucalyptus-specific services, most of which are cloud admin-only configuration-url = http://127.0.0.1:8773/services/Configuration/ empyrean-url = http://127.0.0.1:8773/services/Empyrean/ properties-url = http://127.0.0.1:8773/services/Properties/ reporting-url = http://127.0.0.1:8773/services/Reporting/ certificate = /var/lib/eucalyptus/keys/cloud-cert.pem [region ecc] ; Eucalyptus Community Cloud autoscaling-url = https://communitycloud.eucalyptus.com:8773/services/AutoScaling/ ec2-url = https://communitycloud.eucalyptus.com:8773/services/Eucalyptus/ elasticloadbalancing-url = https://communitycloud.eucalyptus.com:8773/services/LoadBalancing/ iam-url = https://communitycloud.eucalyptus.com:8773/services/Euare/ monitoring-url = https://communitycloud.eucalyptus.com:8773/services/CloudWatch/ s3-url = https://communitycloud.eucalyptus.com:8773/services/Walrus/ sts-url = https://communitycloud.eucalyptus.com:8773/services/Tokens/ certificate = /usr/share/euca2ools/certs/cert-ecc.pem [region aws:*] ; AWS (shared by all regions) iam-url = use aws:us-east-1 sts-url = use aws:us-east-1 certificate = /usr/share/euca2ools/certs/cert-ec2.pem verify-ssl = true [region aws:us-east-1] ; AWS (Northern Virginia, USA) autoscaling-url = https://autoscaling.us-east-1.amazonaws.com/ ec2-url = https://ec2.us-east-1.amazonaws.com/ elasticloadbalancing-url = https://elasticloadbalancing.us-east-1.amazonaws.com/ iam-url = https://iam.amazonaws.com/ monitoring-url = https://monitoring.us-east-1.amazonaws.com/ s3-url = https://s3.amazonaws.com/ sts-url = https://sts.amazonaws.com/ [region aws:us-west-1] ; AWS (Northern California, USA) autoscaling-url = https://autoscaling.us-west-1.amazonaws.com/ ec2-url = https://ec2.us-west-1.amazonaws.com/ elasticloadbalancing-url = https://elasticloadbalancing.us-west-1.amazonaws.com/ monitoring-url = https://monitoring.us-west-1.amazonaws.com/ s3-url = https://s3-us-west-1.amazonaws.com/ s3-location-constraint = us-west-1 [region aws:us-west-2] ; AWS (Oregon, USA) autoscaling-url = https://autoscaling.us-west-2.amazonaws.com/ ec2-url = https://ec2.us-west-2.amazonaws.com/ elasticloadbalancing-url = https://elasticloadbalancing.us-west-2.amazonaws.com/ monitoring-url = https://monitoring.us-west-2.amazonaws.com/ s3-url = https://s3-us-west-2.amazonaws.com/ s3-location-constraint = us-west-2 [region aws:eu-west-1] ; AWS (Ireland) autoscaling-url = https://autoscaling.eu-west-1.amazonaws.com/ ec2-url = https://ec2.eu-west-1.amazonaws.com/ elasticloadbalancing-url = https://elasticloadbalancing.eu-west-1.amazonaws.com/ monitoring-url = https://monitoring.eu-west-1.amazonaws.com/ s3-url = https://s3-eu-west-1.amazonaws.com/ s3-location-constraint = EU [region aws:ap-southeast-1] ; AWS (Singapore) autoscaling-url = https://autoscaling.ap-southeast-1.amazonaws.com/ ec2-url = https://ec2.ap-southeast-1.amazonaws.com/ elasticloadbalancing-url = https://elasticloadbalancing.ap-southeast-1.amazonaws.com/ monitoring-url = https://monitoring.ap-southeast-1.amazonaws.com/ s3-url = https://s3-ap-southeast-1.amazonaws.com/ s3-location-constraint = ap-southeast-1 [region aws:ap-southeast-2] ; AWS (Sydney, Australia) autoscaling-url = https://autoscaling.ap-southeast-2.amazonaws.com/ ec2-url = https://ec2.ap-southeast-2.amazonaws.com/ elasticloadbalancing-url = https://elasticloadbalancing.ap-southeast-2.amazonaws.com/ monitoring-url = https://monitoring.ap-southeast-2.amazonaws.com/ s3-url = https://s3-ap-southeast-2.amazonaws.com/ s3-location-constraint = ap-southeast-2 [region aws:ap-northeast-1] ; AWS (Tokyo, Japan) autoscaling-url = https://autoscaling.ap-northeast-1.amazonaws.com/ ec2-url = https://ec2.ap-northeast-1.amazonaws.com/ elasticloadbalancing-url = https://elasticloadbalancing.ap-northeast-1.amazonaws.com/ monitoring-url = https://monitoring.ap-northeast-1.amazonaws.com/ s3-url = https://s3-ap-northeast-1.amazonaws.com/ s3-location-constraint = ap-northeast-1 [region aws:sa-east-1] ; AWS (São Paulo, Brazil) autoscaling-url = https://autoscaling.sa-east-1.amazonaws.com/ ec2-url = https://ec2.sa-east-1.amazonaws.com/ elasticloadbalancing-url = https://elasticloadbalancing.sa-east-1.amazonaws.com/ monitoring-url = https://monitoring.sa-east-1.amazonaws.com/ s3-url = https://s3-sa-east-1.amazonaws.com/ s3-location-constraint = sa-east-1 [region aws:us-gov-west-1] ; AWS (GovCloud) autoscaling-url = https://autoscaling.us-gov-west-1.amazonaws.com/ ec2-url = https://ec2.us-gov-west-1.amazonaws.com/ elasticloadbalancing-url = https://elasticloadbalancing.us-gov-west-1.amazonaws.com/ iam-url = https://iam.us-gov.amazonaws.com/ monitoring-url = https://monitoring.us-gov-west-1.amazonaws.com/ s3-url = https://s3-us-gov-west-1.amazonaws.com/ sts-url = https://sts.us-gov-west-1.amazonaws.com/ certificate = /usr/share/euca2ools/certs/cert-ec2-gov.pem s3-location-constraint = us-gov-west-1 euca2ools-3.0.2/euca2ools/000077500000000000000000000000001222241730200152775ustar00rootroot00000000000000euca2ools-3.0.2/euca2ools/__init__.py000066400000000000000000000041651222241730200174160ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import os.path import subprocess __version__ = '3.0.1' if '__file__' in globals(): # Check if this is a git repo; maybe we can get more precise version info try: repo_path = os.path.join(os.path.dirname(__file__), '..') # noinspection PyUnresolvedReferences git = subprocess.Popen(['git', 'describe'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env={'GIT_DIR': os.path.join(repo_path, '.git')}) git.wait() git.stderr.read() if git.returncode == 0: __version__ = git.stdout.read().strip() if type(__version__).__name__ == 'bytes': __version__ = __version__.decode() except: # Not really a bad thing; we'll just use what we had pass euca2ools-3.0.2/euca2ools/commands/000077500000000000000000000000001222241730200171005ustar00rootroot00000000000000euca2ools-3.0.2/euca2ools/commands/__init__.py000066400000000000000000000104371222241730200212160ustar00rootroot00000000000000# Copyright 2009-2012 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools import __version__ import glob import os.path import platform import requestbuilder import requests import sys class Euca2ools(object): """ A class with attributes and methods that define the entire euca2ools suite """ CONFIG_PATHS = ('/etc/euca2ools/euca2ools.ini', '/etc/euca2ools/conf.d/*.ini', '~/.euca/*.ini') def __init__(self): self.__user_agent = None # noinspection PyBroadException @staticmethod def format_version(): version_lines = ['euca2ools {0} (Sparta)'.format(__version__)] try: if os.path.isfile('/etc/eucalyptus/eucalyptus-version'): with open('/etc/eucalyptus/eucalyptus-version') as ver_file: euca_version = ver_file.readline().strip() version_lines.append('eucalyptus {0}'.format(euca_version)) except: # Those were just more crunchy bits. If they don't work, oh well! pass return '\n'.join(version_lines) def list_config_files(self): config_files = [] if 'EUCA_CONFIG_PATH' in os.environ: config_globs = os.getenv('EUCA_CONFIG_PATH').split(':') else: config_globs = self.CONFIG_PATHS for config_glob in config_globs: expanded = os.path.expanduser(os.path.expandvars(config_glob)) config_files.extend(sorted(glob.glob(expanded))) return config_files def get_user_agent(self): if self.__user_agent is None: user_agent_bits = ['euca2ools/{0}'.format(__version__)] tokens = [] impl = platform.python_implementation() if impl == 'PyPy': impl_version = '{0}.{1}.{2}'.format( sys.pypy_version_info.major, sys.pypy_version_info.minor, sys.pypy_version_info.micro) if sys.pypy_version_info.releaselevel != 'final': impl_version += sys.pypy_version_info.releaselevel else: # I'm guessing for non-CPython implementations; feel free to # submit patches or the needed implementation-specific API # references. impl_version = platform.python_version() tokens.append('{0} {1}'.format(impl, impl_version)) plat = [] try: plat.append(platform.system()) plat.append(platform.release()) except IOError: pass if plat: tokens.append(' '.join(plat)) tokens.append(platform.machine()) user_agent_bits.append('({0})'.format('; '.join(tokens))) user_agent_bits.append('requestbuilder/{0}'.format( requestbuilder.__version__)) user_agent_bits.append('requests/{0}'.format(requests.__version__)) self.__user_agent = ' '.join(user_agent_bits) return self.__user_agent euca2ools-3.0.2/euca2ools/commands/argtypes.py000066400000000000000000000251441222241730200213160ustar00rootroot00000000000000# Copyright 2012-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse import base64 from requestbuilder import EMPTY import sys def manifest_block_device_mappings(mappings_as_str): mappings = {} mapping_strs = mappings_as_str.split(',') for mapping_str in mapping_strs: if mapping_str.strip(): bits = mapping_str.strip().split('=') if len(bits) == 2: mappings[bits[0].strip()] = bits[1].strip() else: raise argparse.ArgumentTypeError( "invalid device mapping '{0}' (must have format " "'VIRTUAL=DEVICE')".format(mapping_str)) return mappings def ec2_block_device_mapping(map_as_str): """ Parse a block device mapping from an image registration command line. """ try: (device, mapping) = map_as_str.split('=') except ValueError: raise argparse.ArgumentTypeError( 'block device mapping "{0}" must have form DEVICE=MAPPED' .format(map_as_str)) map_dict = {'DeviceName': device} if mapping.lower() == 'none': map_dict['NoDevice'] = 'true' elif mapping.startswith('ephemeral'): map_dict['VirtualName'] = mapping elif (mapping.startswith('snap-') or mapping.startswith('vol-') or mapping.startswith(':')): map_bits = mapping.split(':') while len(map_bits) < 5: map_bits.append(None) if len(map_bits) != 5: raise argparse.ArgumentTypeError( 'EBS block device mapping "{0}" must have form ' 'DEVICE=[SNAP-ID]:[SIZE]:[true|false]:[standard|TYPE[:IOPS]]' .format(map_as_str)) map_dict['Ebs'] = {} if map_bits[0]: map_dict['Ebs']['SnapshotId'] = map_bits[0] if map_bits[1]: try: map_dict['Ebs']['VolumeSize'] = int(map_bits[1]) except ValueError: raise argparse.ArgumentTypeError( 'second element of EBS block device mapping "{0}" must be ' 'an integer'.format(map_as_str)) if map_bits[2]: if map_bits[2].lower() not in ('true', 'false'): raise argparse.ArgumentTypeError( 'third element of EBS block device mapping "{0}" must be ' '"true" or "false"'.format(map_as_str)) map_dict['Ebs']['DeleteOnTermination'] = map_bits[2].lower() if map_bits[3]: map_dict['Ebs']['VolumeType'] = map_bits[3] if map_bits[4]: if map_bits[3] == 'standard': raise argparse.ArgumentTypeError( 'fifth element of EBS block device mapping "{0}" is not ' 'allowed with volume type "standard"'.format(map_as_str)) map_dict['Ebs']['Iops'] = map_bits[4] if not map_dict['Ebs']: raise argparse.ArgumentTypeError( 'EBS block device mapping "{0}" must specify at least one ' 'element. Use "{1}=none" to suppress an existing mapping.' .format(map_as_str, device)) elif not mapping: raise argparse.ArgumentTypeError( 'invalid block device mapping "{0}". Use "{1}=none" to suppress ' 'an existing mapping.'.format(map_as_str, device)) else: raise argparse.ArgumentTypeError( 'invalid block device mapping "{0}"'.format(map_as_str)) return map_dict def filesize(size): suffixes = 'kmgt' s_size = size.lower().rstrip('b') if len(s_size) > 0 and s_size[-1] in suffixes: multiplier = 1024 ** (suffixes.find(s_size[-1]) + 1) s_size = s_size[:-1] else: multiplier = 1 return multiplier * int(s_size) def vpc_interface(iface_as_str): """ Nine-part VPC network interface definition: [INTERFACE]:INDEX:[SUBNET]:[DESCRIPTION]:[PRIV_IP]:[GROUP1,GROUP2,...]: [true|false]:[SEC_IP_COUNT|:SEC_IP1,SEC_IP2,...] """ if len(iface_as_str) == 0: raise argparse.ArgumentTypeError( 'network interface definitions must be non-empty'.format( iface_as_str)) bits = iface_as_str.split(':') iface = {} if len(bits) < 2: raise argparse.ArgumentTypeError( 'network interface definition "{0}" must consist of at least 2 ' 'elements ({1} provided)'.format(iface_as_str, len(bits))) elif len(bits) > 9: raise argparse.ArgumentTypeError( 'network interface definition "{0}" must consist of at most 9 ' 'elements ({1} provided)'.format(iface_as_str, len(bits))) while len(bits) < 9: bits.append(None) if bits[0]: # Preexisting NetworkInterfaceId if bits[0].startswith('eni-') and len(bits[0]) == 12: iface['NetworkInterfaceId'] = bits[0] else: raise argparse.ArgumentTypeError( 'first element of network interface definition "{0}" must be ' 'a network interface ID'.format(iface_as_str)) if bits[1]: # DeviceIndex try: iface['DeviceIndex'] = int(bits[1]) except ValueError: raise argparse.ArgumentTypeError( 'second element of network interface definition "{0}" must be ' 'an integer'.format(iface_as_str)) else: raise argparse.ArgumentTypeError( 'second element of network interface definition "{0}" must be ' 'non-empty'.format(iface_as_str)) if bits[2]: # SubnetId if bits[2].startswith('subnet-'): iface['SubnetId'] = bits[2] else: raise argparse.ArgumentTypeError( 'third element of network interface definition "{0}" must be ' 'a subnet ID'.format(iface_as_str)) if bits[3]: # Description iface['Description'] = bits[3] if bits[4]: # PrivateIpAddresses.n.PrivateIpAddress # PrivateIpAddresses.n.Primary iface.setdefault('PrivateIpAddresses', []) iface['PrivateIpAddresses'].append({'PrivateIpAddress': bits[4], 'Primary': 'true'}) if bits[5]: # SecurityGroupId.n groups = filter(None, bits[5].split(',')) if not all(group.startswith('sg-') for group in groups): raise argparse.ArgumentTypeError( 'sixth element of network interface definition "{0}" must ' 'refer to security groups by IDs, not names' .format(iface_as_str)) iface['SecurityGroupId'] = groups if bits[6]: # DeleteOnTermination if bits[6] in ('true', 'false'): iface['DeleteOnTermination'] = bits[6] else: raise argparse.ArgumentTypeError( 'seventh element of network interface definition "{0}" ' 'must be "true" or "false"'.format(iface_as_str)) if bits[7]: # SecondaryPrivateIpAddressCount if bits[8]: raise argparse.ArgumentTypeError( 'eighth and ninth elements of network interface definition ' '"{0}" must not both be non-empty'.format(iface_as_str)) try: iface['SecondaryPrivateIpAddressCount'] = int(bits[7]) except ValueError: raise argparse.ArgumentTypeError( 'eighth element of network interface definition "{0}" must be ' 'an integer'.format(iface_as_str)) if bits[8]: # PrivateIpAddresses.n.PrivateIpAddress sec_ips = [{'PrivateIpAddress': addr} for addr in bits[8].split(',') if addr] iface.setdefault('PrivateIpAddresses', []) iface['PrivateIpAddresses'].extend(sec_ips) return iface def file_contents(filename): if filename == '-': return sys.stdin.read() else: with open(filename) as arg_file: return arg_file.read() def b64encoded_file_contents(filename): if filename == '-': return base64.b64encode(sys.stdin.read()) else: with open(filename) as arg_file: return base64.b64encode(arg_file.read()) def binary_tag_def(tag_str): """ Parse a tag definition from the command line. Return a dict that depends on the format of the string given: - 'key=value': {'Key': key, 'Value': value} - 'key=': {'Key': key, 'Value': EMPTY} - 'key': {'Key': key, 'Value': EMPTY} """ if '=' in tag_str: (key, val) = tag_str.split('=', 1) return {'Key': key, 'Value': val or EMPTY} else: return {'Key': tag_str, 'Value': EMPTY} def ternary_tag_def(tag_str): """ Parse a tag definition from the command line. Return a dict that depends on the format of the string given: - 'key=value': {'Key': key, 'Value': value} - 'key=': {'Key': key, 'Value': EMPTY} - 'key': {'Key': key} """ if '=' in tag_str: (key, val) = tag_str.split('=', 1) return {'Key': key, 'Value': val or EMPTY} else: return {'Key': tag_str} def delimited_list(delimiter, item_type=str): def _concrete_delimited_list(list_as_str): if isinstance(list_as_str, str) and len(list_as_str) > 0: return [item_type(item.strip()) for item in list_as_str.split(delimiter) if len(item.strip()) > 0] else: return [] return _concrete_delimited_list euca2ools-3.0.2/euca2ools/commands/autoscaling/000077500000000000000000000000001222241730200214115ustar00rootroot00000000000000euca2ools-3.0.2/euca2ools/commands/autoscaling/__init__.py000066400000000000000000000054021222241730200235230ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands import Euca2ools from euca2ools.exceptions import AWSError from requestbuilder import Arg, MutuallyExclusiveArgList import requestbuilder.auth import requestbuilder.service import requestbuilder.request class AutoScaling(requestbuilder.service.BaseService): NAME = 'autoscaling' DESCRIPTION = 'Auto-scaling service' API_VERSION = '2011-01-01' AUTH_CLASS = requestbuilder.auth.QuerySigV2Auth REGION_ENVVAR = 'EUCA_REGION' URL_ENVVAR = 'AWS_AUTO_SCALING_URL' ARGS = [MutuallyExclusiveArgList( Arg('--region', dest='userregion', metavar='USER@REGION', help='''name of the region and/or user in config files to use to connect to the service'''), Arg('-U', '--url', metavar='URL', help='auto-scaling service endpoint URL'))] def handle_http_error(self, response): raise AWSError(response) class AutoScalingRequest(requestbuilder.request.AWSQueryRequest): SUITE = Euca2ools SERVICE_CLASS = AutoScaling METHOD = 'POST' def parse_response(self, response): response_dict = requestbuilder.request.AWSQueryRequest.parse_response( self, response) useful_keys = list(filter(lambda x: x != 'ResponseMetadata', response_dict.keys())) if len(useful_keys) == 1: return response_dict[useful_keys[0]] or {} else: return response_dict euca2ools-3.0.2/euca2ools/commands/autoscaling/arghelpers.py000066400000000000000000000045221222241730200241220ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling.argtypes import autoscaling_tag_def from requestbuilder import Arg class TagArg(Arg): def __init__(self, required=False): helpstr = '''attributes of a tag to affect. Tags follow the following format: "id=resource-name, t=resource-type, k=tag-key, v=tag-val, p=propagate-at-launch-flag", where k is the tag's name, v is the tag's value, id is a resource ID, t is a resource type, and p is whether to propagate tags to instances created by the group. A value for 'k=' is required for each tag. The rest are optional. This argument may be used more than once. Each time affects a different tag.''' if required: helpstr += ' (at least 1 required)' Arg.__init__(self, '--tag', dest='Tags.member', required=required, action='append', type=autoscaling_tag_def, help=helpstr, metavar=('"k=VALUE, id=VALUE, t=VALUE, v=VALUE, ' 'p={true,false}"')) euca2ools-3.0.2/euca2ools/commands/autoscaling/argtypes.py000066400000000000000000000061411222241730200236230ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from argparse import ArgumentTypeError def autoscaling_filter_def(filter_str): filter_dict = {} pieces = filter_str.split(',') for piece in pieces: piece = piece.strip() if '=' not in piece: raise ArgumentTypeError( "invalid filter: each segment of '{0}' must have format " "KEY=VALUE".format(piece)) key, val = piece.split('=', 1) filter_dict.setdefault(key.strip(), []) filter_dict[key.strip()].append(val.strip()) filter_list = [] for key, values in filter_dict.iteritems(): filter_list.append({'Name': key, 'Values': values}) return filter_list def autoscaling_tag_def(tag_str): tag_dict = {} pieces = tag_str.split(',') for piece in pieces: piece = piece.strip() if '=' not in piece: raise ArgumentTypeError( "invalid tag definition: each segment of '{0}' must have " "format KEY=VALUE".format(piece)) key, val = piece.split('=', 1) if key == 'k': tag_dict['Key'] = val elif key == 'id': tag_dict['ResourceId'] = val elif key == 't': tag_dict['ResourceType'] = val elif key == 'v': tag_dict['Value'] = val elif key == 'p': if val.lower() in ('true', 'false'): tag_dict['PropagateAtLaunch'] = val.lower() else: raise ArgumentTypeError( "value for to 'p=' must be 'true' or 'false'") else: raise ArgumentTypeError( "unrecognized tag segment '{0}'".format(piece)) if not tag_dict.get('Key'): raise ArgumentTypeError( "tag '{0}' must contain a 'k=' segment with a non-empty value") return tag_dict euca2ools-3.0.2/euca2ools/commands/autoscaling/createautoscalinggroup.py000066400000000000000000000105711222241730200265410ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.autoscaling import AutoScalingRequest from euca2ools.commands.autoscaling.arghelpers import TagArg from requestbuilder import Arg class CreateAutoScalingGroup(AutoScalingRequest): DESCRIPTION = 'Create a new auto-scaling group' ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP', help='name of the new auto-scaling group (required)'), Arg('-l', '--launch-configuration', dest='LaunchConfigurationName', metavar='LAUNCHCONFIG', required=True, help='''name of the launch configuration to use with the new group (required)'''), Arg('-M', '--max-size', dest='MaxSize', metavar='COUNT', type=int, required=True, help='maximum group size (required)'), Arg('-m', '--min-size', dest='MinSize', metavar='COUNT', type=int, required=True, help='minimum group size (required)'), Arg('--default-cooldown', dest='DefaultCooldown', metavar='SECONDS', type=int, help='''amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities may start'''), Arg('--desired-capacity', dest='DesiredCapacity', metavar='COUNT', type=int, help='number of running instances the group should contain'), Arg('--grace-period', dest='HealthCheckGracePeriod', metavar='SECONDS', type=int, help='''number of seconds to wait before starting health checks on newly-created instances'''), Arg('--health-check-type', dest='HealthCheckType', choices=('EC2', 'ELB'), help='service to obtain health check status from'), Arg('--load-balancers', dest='LoadBalancerNames.member', metavar='ELB1,ELB2,...', type=delimited_list(','), help='comma-separated list of load balancers to use'), Arg('--placement-group', dest='PlacementGroup', help='placement group in which to launch new instances'), TagArg(required=False), Arg('--termination-policies', dest='TerminationPolicies.member', metavar='POLICY1,POLICY2,...', type=delimited_list(','), help='''ordered list of termination policies. The first has the highest precedence.'''), Arg('--vpc-zone-identifier', dest='VPCZoneIdentifier', metavar='ZONE1,ZONE2,...', help='''comma-separated list of subnet identifiers. If you specify availability zones as well, ensure the subnets' availability zones match the ones you specified'''), Arg('-z', '--availability-zones', dest='AvailabilityZones.member', metavar='ZONE1,ZONE2,...', type=delimited_list(','), help='''comma-separated list of availability zones for the new group (required unless subnets are supplied)''')] euca2ools-3.0.2/euca2ools/commands/autoscaling/createlaunchconfiguration.py000066400000000000000000000135241222241730200272160ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import base64 import os.path from euca2ools.commands.argtypes import (delimited_list, ec2_block_device_mapping) from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg, MutuallyExclusiveArgList from requestbuilder.exceptions import ArgumentError class CreateLaunchConfiguration(AutoScalingRequest): DESCRIPTION = 'Create a new auto-scaling instance launch configuration' ARGS = [Arg('LaunchConfigurationName', metavar='LAUNCHCONFIG', help='name of the new launch configuration (required)'), Arg('-i', '--image-id', dest='ImageId', metavar='IMAGE', required=True, help='machine image to use for instances (required)'), Arg('-t', '--instance-type', dest='InstanceType', metavar='TYPE', required=True, help='instance type for use for instances (required)'), Arg('--block-device-mapping', dest='BlockDeviceMappings.member', metavar='DEVICE1=MAPPED1,DEVICE2=MAPPED2,...', type=delimited_list(',', item_type=ec2_block_device_mapping), help='''a comma-separated list of block device mappings for the image, in the form DEVICE=MAPPED, where "MAPPED" is "none", "ephemeral(0-3)", or "[SNAP-ID]:[SIZE]:[true|false]'''), Arg('--ebs-optimized', dest='EbsOptimized', action='store_const', const='true', help='whether the instance is optimized for EBS I/O'), Arg('--group', dest='SecurityGroups.member', metavar='GROUP1,GROUP2,...', type=delimited_list(','), help='''a comma-separated list of security groups with which to associate instances. Either all group names or all group IDs are allowed, but not both.'''), Arg('--iam-instance-profile', dest='IamInstanceProfile', metavar='PROFILE', help='''ARN of the instance profile associated with instances' IAM roles'''), Arg('--kernel', dest='KernelId', metavar='KERNEL', help='kernel image to use for instances'), Arg('--key', dest='KeyName', metavar='KEYPAIR', help='name of the key pair to use for instances'), Arg('--monitoring-enabled', dest='InstanceMonitoring.Enabled', action='store_const', const='true', help='enable detailed monitoring (enabled by default)'), Arg('--monitoring-disabled', dest='InstanceMonitoring.Enabled', action='store_const', const='false', help='disable detailed monitoring (enabled by default)'), Arg('--ramdisk', dest='RamdiskId', metavar='RAMDISK', help='ramdisk image to use for instances'), Arg('--spot-price', dest='SpotPrice', metavar='PRICE', help='maximum hourly price for any spot instances launched'), MutuallyExclusiveArgList( Arg('-d', '--user-data', metavar='DATA', route_to=None, help='user data to make available to instances'), Arg('--user-data-force', metavar='DATA', route_to=None, help='''same as -d/--user-data, but without checking if a file by that name exists first'''), Arg('-f', '--user-data-file', metavar='FILE', route_to=None, help='''file containing user data to make available to instances'''))] # noinspection PyExceptionInherit def configure(self): AutoScalingRequest.configure(self) if self.args.get('user_data'): if os.path.isfile(self.args['user_data']): raise ArgumentError( '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.') else: self.params['UserData'] = base64.b64encode( self.args['user_data']) elif self.args.get('user_data_force'): self.params['UserData'] = base64.b64encode( self.args['user_data_force']) elif self.args.get('user_data_file'): with open(self.args['user_data_file']) as user_data_file: self.params['UserData'] = base64.b64encode( user_data_file.read()) euca2ools-3.0.2/euca2ools/commands/autoscaling/createorupdatetags.py000066400000000000000000000031131222241730200256470ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from euca2ools.commands.autoscaling.arghelpers import TagArg class CreateOrUpdateTags(AutoScalingRequest): DESCRIPTION = 'Create or update one or more resource tags' ARGS = [TagArg(required=True)] euca2ools-3.0.2/euca2ools/commands/autoscaling/deleteautoscalinggroup.py000066400000000000000000000040211222241730200265310ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class DeleteAutoScalingGroup(AutoScalingRequest): DESCRIPTION = 'Delete an auto-scaling group' ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP', help='name of the auto-scaling group to delete (required)'), Arg('-d', '--force-delete', dest='ForceDelete', action='store_const', const='true', help='''delete the group and all of its instances without waiting for all instances to terminate'''), Arg('-f', '--force', action='store_true', route_to=None, help=argparse.SUPPRESS)] # for compatibility euca2ools-3.0.2/euca2ools/commands/autoscaling/deletelaunchconfiguration.py000066400000000000000000000035001222241730200272060ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class DeleteLaunchConfiguration(AutoScalingRequest): DESCRIPTION = 'Delete an auto-scaling instance launch configuration' ARGS = [Arg('LaunchConfigurationName', metavar='LAUNCHCONFIG', help='name of the launch configuration to delete (required)'), Arg('-f', '--force', action='store_true', route_to=None, help=argparse.SUPPRESS)] # For compatibility euca2ools-3.0.2/euca2ools/commands/autoscaling/deletenotificationconfiguration.py000066400000000000000000000040051222241730200304230ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class DeleteNotificationConfiguration(AutoScalingRequest): DESCRIPTION = "Delete an auto-scaling group's notification configuration" ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP', help='name of the auto-scaling group to update (required)'), Arg('-t', '--topic-arn', dest='TopicARN', metavar='TOPIC', required=True, help='''ARN of the SNS topic associated with the configuration to delete'''), Arg('-f', '--force', route_to=None, action='store_true', help=argparse.SUPPRESS)] # for compatibility euca2ools-3.0.2/euca2ools/commands/autoscaling/deletepolicy.py000066400000000000000000000037471222241730200244600ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class DeletePolicy(AutoScalingRequest): DESCRIPTION = 'Delete a scaling policy' ARGS = [Arg('PolicyName', metavar='POLICY', help='name of the policy to delete (required)'), Arg('-g', '--auto-scaling-group', dest='AutoScalingGroupName', metavar='ASGROUP', required=True, help='''name of the auto-scaling group the policy is associated with (required)'''), Arg('-f', '--force', route_to=None, action='store_true', help=argparse.SUPPRESS)] # for compatibility euca2ools-3.0.2/euca2ools/commands/autoscaling/deletescheduledaction.py000066400000000000000000000040171222241730200263060ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class DeleteScheduledAction(AutoScalingRequest): DESCRIPTION = 'Delete a scheduled action' ARGS = [Arg('ScheduledActionName', metavar='ACTION', help='name of the scheduled action to delete (required)'), Arg('-g', '--auto-scaling-group', dest='AutoScalingGroupName', metavar='ASGROUP', required=True, help='''name of the auto-scaling group the scheduled action is associated with (required)'''), Arg('-f', '--force', route_to=None, action='store_true', help=argparse.SUPPRESS)] # for compatibility euca2ools-3.0.2/euca2ools/commands/autoscaling/deletetags.py000066400000000000000000000030711222241730200241050ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from euca2ools.commands.autoscaling.arghelpers import TagArg class DeleteTags(AutoScalingRequest): DESCRIPTION = 'Delete one or more resource tags' ARGS = [TagArg(required=True)] euca2ools-3.0.2/euca2ools/commands/autoscaling/describeadjustmenttypes.py000066400000000000000000000035221222241730200267310ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder.mixins import TabifyingMixin class DescribeAdjustmentTypes(AutoScalingRequest, TabifyingMixin): DESCRIPTION = ('Describe policy adjustment types usable with scaling ' 'policies') LIST_TAGS = ['AdjustmentTypes'] def print_result(self, result): for adj_type in result.get('AdjustmentTypes', []): print self.tabify(('ADJUSTMENT-TYPE', adj_type.get('AdjustmentType'))) euca2ools-3.0.2/euca2ools/commands/autoscaling/describeautoscalinggroups.py000066400000000000000000000124211222241730200272350ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class DescribeAutoScalingGroups(AutoScalingRequest, TabifyingMixin): DESCRIPTION = 'Describe auto-scaling groups' ARGS = [Arg('AutoScalingGroupNames.member', metavar='ASGROUP', nargs='*', help='limit results to specific auto-scaling groups'), Arg('--show-long', action='store_true', route_to=None, help="show all of the groups' info")] LIST_TAGS = ['AutoScalingGroups', 'AvailabilityZones', 'EnabledMetrics', 'Instances', 'LoadBalancerNames', 'SuspendedProcesses', 'Tags', 'TerminationPolicies'] def main(self): return PaginatedResponse(self, (None,), ('AutoScalingGroups',)) def prepare_for_page(self, page): # Pages are defined by NextToken self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): lines = [] for group in result.get('AutoScalingGroups', []): bits = ['AUTO-SCALING-GROUP', group.get('AutoScalingGroupName'), group.get('LaunchConfigurationName'), ','.join(group.get('AvailabilityZones'))] if self.args['show_long']: bits.append(group.get('CreatedTime')) balancers = group.get('LoadBalancerNames') if balancers: bits.append(','.join(balancers)) else: bits.append(None) if self.args['show_long']: bits.append(group.get('HealthCheckType')) bits.append(group.get('MinSize')) bits.append(group.get('MaxSize')) bits.append(group.get('DesiredCapacity')) if self.args['show_long']: bits.append(group.get('DefaultCooldown')) bits.append(group.get('HealthCheckGracePeriod')) bits.append(group.get('VPCZoneIdentifier')) bits.append(group.get('PlacementGroup')) bits.append(group.get('AutoScalingGroupARN')) policies = group.get('TerminationPolicies') if policies: bits.append(','.join(policies)) else: bits.append(None) lines.append(self.tabify(bits)) for instance in group.get('Instances', []): lines.append(self._get_tabified_instance(instance)) scale_group = group.get('AutoScalingGroupName') for process in group.get('SuspendedProcesses', []): lines.append(self._get_tabified_suspended_process(process, scale_group)) for metric in group.get('EnabledMetrics', []): lines.append(self._get_tabified_metric(metric)) for line in lines: print line def _get_tabified_instance(self, instance): return self.tabify(['INSTANCE', instance.get('InstanceId'), instance.get('AvailabilityZone'), instance.get('LifecycleState'), instance.get('HealthStatus'), instance.get('LaunchConfigurationName') ]) def _get_tabified_suspended_process(self, process, scale_group): return self.tabify(['SUSPENDED-PROCESS', process.get('ProcessName'), process.get('SuspensionReason'), scale_group ]) def _get_tabified_metric(self, metric): return self.tabify(['ENABLED-METRICS', metric.get('Metric'), metric.get('Granularity') ]) euca2ools-3.0.2/euca2ools/commands/autoscaling/describeautoscalinginstances.py000066400000000000000000000055511222241730200277130ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class DescribeAutoScalingInstances(AutoScalingRequest, TabifyingMixin): DESCRIPTION = 'Describe instances in auto-scaling groups' ARGS = [Arg('InstanceIds.member', metavar='INSTANCE', nargs='*', help='limit results to specific instances'), Arg('--show-long', action='store_true', route_to=None, help=argparse.SUPPRESS)] # doesn't actually do anything, but # people will use it out of habit LIST_TAGS = ['AutoScalingInstances'] def main(self): return PaginatedResponse(self, (None,), ('AutoScalingInstances',)) def prepare_for_page(self, page): # Pages are defined by NextToken self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): for instance in result.get('AutoScalingInstances', []): print self.tabify(('INSTANCE', instance.get('InstanceId'), instance.get('AutoScalingGroupName'), instance.get('AvailabilityZone'), instance.get('LifecycleState'), instance.get('HealthStatus'), instance.get('LaunchConfigurationName'))) euca2ools-3.0.2/euca2ools/commands/autoscaling/describeautoscalingnotificationtypes.py000066400000000000000000000035241222241730200314750ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder.mixins import TabifyingMixin class DescribeAutoScalingNotificationTypes(AutoScalingRequest, TabifyingMixin): DESCRIPTION = 'List all notification types supported by the service' LIST_TAGS = ['AutoScalingNotificationTypes'] def print_result(self, result): for notif_type in result.get('AutoScalingNotificationTypes', []): print self.tabify(('NOTIFICATION-TYPE', notif_type)) euca2ools-3.0.2/euca2ools/commands/autoscaling/describelaunchconfigurations.py000066400000000000000000000101201222241730200277030ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class DescribeLaunchConfigurations(AutoScalingRequest, TabifyingMixin): DESCRIPTION = 'Describe auto-scaling instance launch configurations' ARGS = [Arg('LaunchConfigurationNames.member', metavar='LAUNCHCONFIG', nargs='*', help='limit results to specific launch configurations'), Arg('--show-long', action='store_true', route_to=None, help="show all of the launch configurations' info")] LIST_TAGS = ['LaunchConfigurations', 'SecurityGroups', 'BlockDeviceMappings'] def main(self): return PaginatedResponse(self, (None,), ('LaunchConfigurations',)) def prepare_for_page(self, page): # Pages are defined by NextToken self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): for config in result.get('LaunchConfigurations', []): bits = ['LAUNCH-CONFIG', config.get('LaunchConfigurationName'), config.get('ImageId'), config.get('InstanceType')] if self.args['show_long']: bits.append(config.get('KeyName')) bits.append(config.get('KernelId')) bits.append(config.get('RamdiskId')) block_maps = [convert_block_mapping_to_str(mapping) for mapping in config.get('BlockDeviceMappings', [])] if len(block_maps) > 0: bits.append('{' + ','.join(block_maps) + '}') else: bits.append(None) bits.append(','.join(config.get('SecurityGroups', [])) or None) bits.append(config.get('CreatedTime')) bits.append(config.get('InstanceMonitoring', {}).get( 'Enabled')) bits.append(config.get('LaunchConfigurationARN')) bits.append(config.get('SpotPrice')) bits.append(config.get('IamInstanceProfile')) if self.args['show_long']: bits.append(config.get('EbsOptimized')) print self.tabify(bits) def convert_block_mapping_to_str(mapping): if mapping.get('Ebs'): mapped = ':'.join((mapping['Ebs'].get('SnapshotId') or '', mapping['Ebs'].get('VolumeSize') or '')) elif mapping.get('VirtualName'): mapped = mapping['VirtualName'] else: raise ValueError('unexpected block device mapping: {0}'.format( mapping)) return mapping['DeviceName'] + '=' + mapped euca2ools-3.0.2/euca2ools/commands/autoscaling/describemetriccollectiontypes.py000066400000000000000000000037051222241730200301150ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder.mixins import TabifyingMixin class DescribeMetricCollectionTypes(AutoScalingRequest, TabifyingMixin): DESCRIPTION = 'Describe auto-scaling metrics and granularities' LIST_TAGS = ['Metrics', 'Granularities'] def print_result(self, result): for metric in result.get('Metrics', []): print self.tabify(('METRIC-COLLECTION-TYPE', metric.get('Metric'))) for granularity in result.get('Granularities', []): print self.tabify(('METRIC-GRANULARITY-TYPE', granularity.get('Granularity'))) euca2ools-3.0.2/euca2ools/commands/autoscaling/describenotificationconfigurations.py000066400000000000000000000051051222241730200311260ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class DescribeNotificationConfigurations(AutoScalingRequest, TabifyingMixin): DESCRIPTION = ('Describe notification actions associated with ' 'auto-scaling groups') ARGS = [Arg('AutoScalingGroupNames.member', metavar='ASGROUP', nargs='*', help='limit results to specific auto-scaling groups')] LIST_TAGS = ['NotificationConfigurations'] def main(self): return PaginatedResponse(self, (None,), ('NotificationConfigurations',)) def prepare_for_page(self, page): # Pages are defined by NextToken self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): for config in result.get('NotificationConfigurations', []): print self.tabify(('NOTIFICATION-CONFIG', config.get('AutoScalingGroupName'), config.get('TopicARN'), config.get('NotificationType'))) euca2ools-3.0.2/euca2ools/commands/autoscaling/describepolicies.py000066400000000000000000000056541222241730200253050ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class DescribePolicies(AutoScalingRequest, TabifyingMixin): DESCRIPTION = 'Describe auto-scaling policies' ARGS = [Arg('PolicyNames.member', metavar='POLICY', nargs='*', help='limit results to specific auto-scaling policies'), Arg('-g', '--auto-scaling-group', dest='AutoScalingGroupName', metavar='ASGROUP'), Arg('--show-long', action='store_true', route_to=None, help="show all of the policies' info")] LIST_TAGS = ['ScalingPolicies', 'Alarms'] def main(self): return PaginatedResponse(self, (None,), ('ScalingPolicies',)) def prepare_for_page(self, page): # Pages are defined by NextToken self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): for policy in result.get('ScalingPolicies', []): bits = ['SCALING-POLICY', policy.get('AutoScalingGroupName'), policy.get('PolicyName'), policy.get('ScalingAdjustment')] if self.args['show_long']: bits.append(policy.get('MinAdjustmentStep')) bits.append(policy.get('AdjustmentType')) if self.args['show_long']: bits.append(policy.get('Cooldown')) bits.append(policy.get('PolicyARN')) print self.tabify(bits) euca2ools-3.0.2/euca2ools/commands/autoscaling/describescalingactivities.py000066400000000000000000000066141222241730200272000ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class DescribeScalingActivities(AutoScalingRequest, TabifyingMixin): DESCRIPTION = 'Describe past and current auto-scaling activities' ARGS = [Arg('ActivityIds.member', metavar='ACTIVITY', nargs='*', help='limit results to specific auto-scaling activities'), Arg('-g', '--auto-scaling-group', dest='AutoScalingGroupName', metavar='ASGROUP', help='''name of an Auto Scaling group by which to filter the request'''), Arg('--show-long', action='store_true', route_to=None, help="show all of the activities' info")] LIST_TAGS = ['Activities'] def main(self): return PaginatedResponse(self, (None,), ('Activities',)) def prepare_for_page(self, page): # Pages are defined by NextToken self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): for activity in result.get('Activities', []): bits = ['ACTIVITY', activity.get('ActivityId'), activity.get('EndTime'), activity.get('AutoScalingGroupName'), activity.get('StatusCode'), activity.get('StatusMessage')] if self.args['show_long']: bits.append(activity.get('Cause')) bits.append(activity.get('Progress')) bits.append(activity.get('Description')) # The AWS tool refers to this as "UPDATE-TIME", but seeing as # the API doesn't actually have anything like that, the process # of elimination dictates that this be the Details element in # the response instead. bits.append(activity.get('Details')) bits.append(activity.get('StartTime')) print self.tabify(bits) euca2ools-3.0.2/euca2ools/commands/autoscaling/describescalingprocesstypes.py000066400000000000000000000033541222241730200275750ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder.mixins import TabifyingMixin class DescribeScalingProcessTypes(AutoScalingRequest, TabifyingMixin): DESCRIPTION = 'List all types of scaling processes' LIST_TAGS = ['Processes'] def print_result(self, result): for process in result.get('Processes', []): print self.tabify(('PROCESS', process.get('ProcessName'))) euca2ools-3.0.2/euca2ools/commands/autoscaling/describescheduledactions.py000066400000000000000000000067471222241730200270230ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class DescribeScheduledActions(AutoScalingRequest, TabifyingMixin): DESCRIPTION = 'Describe scheduled auto-scaling group actions' ARGS = [Arg('ScheduledActionNames.member', metavar='ACTION', nargs='*', help='limit results to specific actions'), Arg('-g', '--group', dest='AutoScalingGroupName', metavar='ASGROUP'), Arg('--start-time', dest='StartTime', metavar='YYYY-MM-DDThh:mm:ssZ', help='''earliest start time to return scheduled actions for. This is ignored when specific action names are provided.'''), Arg('--end-time', dest='EndTime', metavar='YYYY-MM-DDThh:mm:ssZ', help='''latest start time to return scheduled actions for. This is ignored when specific action names are provided.'''), Arg('--show-long', action='store_true', route_to=None, help="show all of the scheduled actions' info")] LIST_TAGS = ['ScheduledUpdateGroupActions'] def main(self): return PaginatedResponse(self, (None,), ('ScheduledUpdateGroupActions',)) def prepare_for_page(self, page): # Pages are defined by NextToken self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): for action in result.get('ScheduledUpdateGroupActions', []): bits = ['UPDATE-GROUP-ACTION', action.get('AutoScalingGroupName'), action.get('ScheduledActionName'), action.get('StartTime'), action.get('Recurrence'), action.get('MinSize'), action.get('MaxSize'), action.get('DesiredCapacity')] if self.args['show_long']: bits.append(action.get('ScheduledActionARN')) print self.tabify(bits) euca2ools-3.0.2/euca2ools/commands/autoscaling/describetags.py000066400000000000000000000047461222241730200244350ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from euca2ools.commands.autoscaling.argtypes import autoscaling_filter_def from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class DescribeTags(AutoScalingRequest, TabifyingMixin): DESCRIPTION = 'Describe auto-scaling tags' ARGS = [Arg('--filter', dest='Filters.member', type=autoscaling_filter_def, metavar='NAME=VALUE,...', action='append', help='restrict results to those that meet criteria')] LIST_TAGS = ['Tags'] def main(self): return PaginatedResponse(self, (None,), ('Tags',)) def prepare_for_page(self, page): # Pages are defined by NextToken self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): for tag in result.get('Tags', []): print self.tabify(('TAG', tag.get('ResourceId'), tag.get('ResourceType'), tag.get('Key'), tag.get('Value'), tag.get('PropagateAtLaunch'))) euca2ools-3.0.2/euca2ools/commands/autoscaling/describeterminationpolicytypes.py000066400000000000000000000034311222241730200303230ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder.mixins import TabifyingMixin class DescribeTerminationPolicyTypes(AutoScalingRequest, TabifyingMixin): DESCRIPTION = 'List all termination policies supported by the service' LIST_TAGS = ['TerminationPolicyTypes'] def print_result(self, result): for tp_type in result.get('TerminationPolicyTypes', []): print self.tabify(('TERMINATION-POLICY-TYPE', tp_type)) euca2ools-3.0.2/euca2ools/commands/autoscaling/disablemetricscollection.py000066400000000000000000000036561222241730200270430ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class DisableMetricsCollection(AutoScalingRequest): DESCRIPTION = "Disable monitoring of an auto-scaling group's group metrics" ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP', help='name of the auto-scaling group to update (required)'), Arg('-m', '--metrics', dest='Metrics.member', metavar='METRIC1,METRIC2,...', type=delimited_list(','), help='list of metrics to disable (default: all metrics)')] euca2ools-3.0.2/euca2ools/commands/autoscaling/enablemetricscollection.py000066400000000000000000000041501222241730200266540ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class EnableMetricsCollection(AutoScalingRequest): DESCRIPTION = "Enable monitoring of an auto-scaling group's group metrics" ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP', help='name of the auto-scaling group to update (required)'), Arg('-g', '--granularity', dest='Granularity', required=True, help='''granularity at which to collect metrics (e.g., '1Minute') (required)'''), Arg('-m', '--metrics', dest='Metrics.member', metavar='METRIC1,METRIC2,...', type=delimited_list(','), help='list of metrics to collect (default: all metrics)')] euca2ools-3.0.2/euca2ools/commands/autoscaling/executepolicy.py000066400000000000000000000043561222241730200246550ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class ExecutePolicy(AutoScalingRequest): DESCRIPTION = "Manually set an auto-scaling instance's health status" ARGS = [Arg('PolicyName', metavar='POLICY', help='name or ARN of the policy to run (required)'), Arg('-g', '--auto-scaling-group', dest='AutoScalingGroupName', metavar='ASGROUP', help='name or ARN of the auto-scaling group'), Arg('-h', '--honor-cooldown', dest='HonorCooldown', action='store_const', const='true', help='''reject the request if the group is in cooldown (default: override any cooldown period)'''), Arg('-H', '--no-honor-cooldown', dest='HonorCooldown', action='store_const', const='false', help='override any cooldown period (this is the default)')] euca2ools-3.0.2/euca2ools/commands/autoscaling/putnotificationconfiguration.py000066400000000000000000000043441222241730200277770ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class PutNotificationConfiguration(AutoScalingRequest): DESCRIPTION = ("Create or replace an auto-scaling group's notification " "configuration") ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP', help='name of the auto-scaling group to update (required)'), Arg('-n', '--notification-types', dest='NotificationTypes.member', metavar='TYPE1,TYPE2,...', type=delimited_list(','), required=True, help=('''comma-separated list of event types that will trigger notification (required)''')), Arg('-t', '--topic-arn', dest='TopicARN', metavar='TOPIC', required=True, help='''ARN of the SNS topic to publish notifications to (required)''')] euca2ools-3.0.2/euca2ools/commands/autoscaling/putscalingpolicy.py000066400000000000000000000063561222241730200253660ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class PutScalingPolicy(AutoScalingRequest): DESCRIPTION = "Create or update an auto-scaling group's scaling policy" ARGS = [Arg('PolicyName', metavar='POLICY', help='name of the policy to create or update (required)'), Arg('-g', '--auto-scaling-group', dest='AutoScalingGroupName', metavar='ASGROUP', required=True, help='''name of the auto-scaling group the policy is associated with (required)'''), Arg('-a', '--adjustment', dest='ScalingAdjustment', metavar='SCALE', type=int, required=True, help='''amount to scale the group's capacity of the group. Use a negative value, as in "--adjustment=-1", to decrease capacity. (required)'''), Arg('-t', '--type', dest='AdjustmentType', required=True, choices=('ChangeInCapacity', 'ExactCapacity', 'PercentChangeInCapacity'), help='''whether the adjustment is the new desired size or an increment to the group's current capacity. An increment can either be a fixed number or a percentage of current capacity. (required)'''), Arg('--cooldown', dest='Cooldown', metavar='SECONDS', type=int, help='''waiting period after successful auto-scaling activities during which later auto-scaling activities will not execute'''), Arg('-s', '--min-adjustment-step', dest='MinAdjustmentStep', type=int, metavar='PERCENT', help='''for a PercentChangeInCapacity type policy, guarantee that this policy will change the group's desired capacity by at least this much''')] def print_result(self, result): print result.get('PolicyARN') euca2ools-3.0.2/euca2ools/commands/autoscaling/putscheduledupdategroupaction.py000066400000000000000000000054471222241730200301440ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class PutScheduledUpdateGroupAction(AutoScalingRequest): DESCRIPTION = 'Schedule a scaling action for an auto-scaling group' ARGS = [Arg('ScheduledActionName', metavar='ACTION', help='name of the new scheduled action'), Arg('-g', '--auto-scaling-group', dest='AutoScalingGroupName', metavar='ASGROUP', required=True, help='''auto-scaling group the new action should affect (required)'''), Arg('-b', '--start-time', dest='StartTime', metavar='YYYY-MM-DDThh:mm:ssZ', help='time for this action to start'), Arg('-e', '--end-time', dest='EndTime', metavar='YYYY-MM-DDThh:mm:ssZ', help='time for this action to end'), Arg('-r', '--recurrence', dest='Recurrence', metavar='"MIN HOUR DATE MONTH DAY"', help='''time when recurring future actions will start, in crontab format'''), Arg('--desired-capacity', dest='DesiredCapacity', metavar='COUNT', type=int, help='new capacity setting for the group'), Arg('--max-size', dest='MaxSize', metavar='COUNT', type=int, help='maximum number of instances to allow in the group'), Arg('--min-size', dest='MinSize', metavar='COUNT', type=int, help='minimum number of instances to allow in the group')] euca2ools-3.0.2/euca2ools/commands/autoscaling/resumeprocesses.py000066400000000000000000000037321222241730200252170ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class ResumeProcesses(AutoScalingRequest): DESCRIPTION = "Resume an auto-scaling group's auto-scaling processes" ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP', help='name of the auto-scaling group to update (required)'), Arg('--processes', dest='ScalingProcesses.member', metavar='PROCESS1,PROCESS2,...', type=delimited_list(','), help='''comma-separated list of auto-scaling processes to resume (default: all processes)''')] euca2ools-3.0.2/euca2ools/commands/autoscaling/setdesiredcapacity.py000066400000000000000000000044041222241730200256360ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class SetDesiredCapacity(AutoScalingRequest): DESCRIPTION = "Set an auto-scaling group's desired capacity" ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP', help='name of the auto-scaling group to update (required)'), Arg('-c', '--desired-capacity', dest='DesiredCapacity', type=int, required=True, help='new capacity setting for the group (required)'), Arg('-h', '--honor-cooldown', dest='HonorCooldown', action='store_const', const='true', help='''reject the request if the group is in cooldown (default: override any cooldown period)'''), Arg('-H', '--no-honor-cooldown', dest='HonorCooldown', action='store_const', const='false', help='override any cooldown period (this is the default)')] euca2ools-3.0.2/euca2ools/commands/autoscaling/setinstancehealth.py000066400000000000000000000044751222241730200255030ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class SetInstanceHealth(AutoScalingRequest): DESCRIPTION = "Manually set an auto-scaling instance's health status" ARGS = [Arg('InstanceId', metavar='INSTANCE', help='ID of the instance to update (required)'), Arg('-s', '--status', dest='HealthStatus', required=True, choices=('Healthy', 'Unhealthy'), help='new status (required)'), Arg('--respect-grace-period', dest='ShouldRespectGracePeriod', action='store_const', const='true', help="""respect the associated auto-scaling group's grace period (this is the default)"""), Arg('--no-respect-grace-period', dest='ShouldRespectGracePeriod', action='store_const', const='false', help="""ignore the associated auto-scaling group's grace period (default: respect the group's grace period)""")] euca2ools-3.0.2/euca2ools/commands/autoscaling/suspendprocesses.py000066400000000000000000000037351222241730200254030ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class SuspendProcesses(AutoScalingRequest): DESCRIPTION = "Suspend an auto-scaling group's auto-scaling processes" ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP', help='name of the auto-scaling group to update (required)'), Arg('--processes', dest='ScalingProcesses.member', metavar='PROCESS1,PROCESS2,...', type=delimited_list(','), help='''comma-separated list of auto-scaling processes to suspend (default: all processes)''')] euca2ools-3.0.2/euca2ools/commands/autoscaling/terminateinstanceinautoscalinggroup.py000066400000000000000000000064241222241730200313440ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg, MutuallyExclusiveArgList from requestbuilder.mixins import TabifyingMixin class TerminateInstanceInAutoScalingGroup(AutoScalingRequest, TabifyingMixin): DESCRIPTION = "Manually terminate an auto-scaling instance" ARGS = [Arg('InstanceId', metavar='INSTANCE', help='ID of the instance to terminate (required)'), MutuallyExclusiveArgList(True, Arg('-d', '--decrement-desired-capacity', action='store_const', dest='ShouldDecrementDesiredCapacity', const='true', help='''also reduce the desired capacity of the auto-scaling group by 1'''), Arg('-D', '--no-decrement-desired-capacity', dest='ShouldDecrementDesiredCapacity', action='store_const', const='false', help='''leave the auto-scaling group's desired capacity as-is. A new instance may be launched to compensate for the one being terminated.''')), Arg('--show-long', action='store_true', route_to=None, help='show extra info about the instance being terminated'), Arg('-f', '--force', action='store_true', route_to=None, help=argparse.SUPPRESS)] # for compatibility def print_result(self, result): activity = result['Activity'] bits = ['INSTANCE', activity.get('ActivityId'), activity.get('EndTime'), activity.get('StatusCode'), activity.get('Cause')] if self.args['show_long']: bits.append(activity.get('StatusMessage')) bits.append(activity.get('Progress')) bits.append(activity.get('Description')) bits.append(activity.get('StartTime')) print self.tabify(bits) euca2ools-3.0.2/euca2ools/commands/autoscaling/updateautoscalinggroup.py000066400000000000000000000100541222241730200265540ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.autoscaling import AutoScalingRequest from requestbuilder import Arg class UpdateAutoScalingGroup(AutoScalingRequest): DESCRIPTION = "Update an auto-scaling group's parameters" ARGS = [Arg('AutoScalingGroupName', metavar='ASGROUP', help='name of the auto-scaling group to update (required)'), Arg('--default-cooldown', dest='DefaultCooldown', metavar='SECONDS', type=int, help='''amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities may start'''), Arg('--desired-capacity', dest='DesiredCapacity', metavar='COUNT', type=int, help='number of running instances the group should contain'), Arg('--grace-period', dest='HealthCheckGracePeriod', metavar='SECONDS', type=int, help='''number of seconds to wait before starting health checks on newly-created instances'''), Arg('--health-check-type', dest='HealthCheckType', choices=('EC2', 'ELB'), help='service to obtain health check status from'), Arg('-l', '--launch-configuration', dest='LaunchConfigurationName', metavar='LAUNCHCONFIG', help='''name of the launch configuration to use with the new group (required)'''), Arg('-M', '--max-size', dest='MaxSize', metavar='COUNT', type=int, help='maximum group size (required)'), Arg('-m', '--min-size', dest='MinSize', metavar='COUNT', type=int, help='minimum group size (required)'), Arg('--placement-group', dest='PlacementGroup', help='placement group in which to launch new instances'), Arg('--termination-policies', dest='TerminationPolicies.member', metavar='POLICY1,POLICY2,...', type=delimited_list(','), help='''ordered list of termination policies. The first has the highest precedence.'''), Arg('--vpc-zone-identifier', dest='VPCZoneIdentifier', metavar='ZONE1,ZONE2,...', help='''comma-separated list of subnet identifiers. If you specify availability zones as well, ensure the subnets' availability zones match the ones you specified'''), Arg('-z', '--availability-zones', dest='AvailabilityZones.member', metavar='ZONE1,ZONE2,...', type=delimited_list(','), help='''comma-separated list of availability zones for the new group (required unless subnets are supplied)''')] euca2ools-3.0.2/euca2ools/commands/bundle/000077500000000000000000000000001222241730200203515ustar00rootroot00000000000000euca2ools-3.0.2/euca2ools/commands/bundle/__init__.py000066400000000000000000000205121222241730200224620ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse import os.path from euca2ools.commands import Euca2ools from euca2ools.commands.argtypes import (delimited_list, filesize, manifest_block_device_mappings) from requestbuilder import Arg from requestbuilder.command import BaseCommand from requestbuilder.exceptions import ArgumentError from requestbuilder.mixins import FileTransferProgressBarMixin from requestbuilder.util import set_userregion class BundleCreator(BaseCommand, FileTransferProgressBarMixin): SUITE = Euca2ools ARGS = [Arg('-r', '--arch', choices=('i386', 'x86_64', 'armhf'), required=True, help="the image's processor architecture (required)"), Arg('-c', '--cert', metavar='FILE', help='file containing your X.509 certificate.'), Arg('-k', '--privatekey', metavar='FILE', help='''file containing the private key to sign the bundle's manifest with. This private key will also be required to unbundle the image in the future.'''), Arg('-u', '--user', metavar='ACCOUNT', help='your account ID'), Arg('--region', dest='userregion', metavar='USER@REGION', help='''use encryption keys and the account ID specified for a user and/or region in configuration files'''), Arg('--ec2cert', metavar='FILE', help='''file containing the cloud's X.509 certificate'''), Arg('--kernel', metavar='IMAGE', help='''ID of the kernel image to associate with the machine bundle'''), Arg('--ramdisk', metavar='IMAGE', help='''ID of the ramdisk image to associate with the machine bundle'''), Arg('-B', '--block-device-mappings', metavar='VIRTUAL1=DEVICE1,VIRTUAL2=DEVICE2,...', type=manifest_block_device_mappings, help='''default block device mapping scheme with which to launch instances of this machine image'''), Arg('-d', '--destination', metavar='DIR', help='''location to place the bundle's files (default: dir named by TMPDIR, TEMP, or TMP environment variables, or otherwise /var/tmp)'''), Arg('--part-size', type=filesize, default=10485760, # 10m help=argparse.SUPPRESS), Arg('--productcodes', metavar='CODE1,CODE2,...', type=delimited_list(','), default=[], help='comma-separated list of product codes'), Arg('--batch', action='store_true', help=argparse.SUPPRESS)] # noinspection PyExceptionInherit def configure(self): BaseCommand.configure(self) set_userregion(self.config, self.args.get('userregion')) set_userregion(self.config, os.getenv('EUCA_REGION')) # Get creds add_bundle_creds(self.args, self.config) if not self.args.get('cert'): raise ArgumentError( 'missing certificate; please supply one with -c') self.log.debug('certificate: %s', self.args['cert']) if not self.args.get('privatekey'): raise ArgumentError( 'missing private key; please supply one with -k') self.log.debug('private key: %s', self.args['privatekey']) if not self.args.get('ec2cert'): raise ArgumentError( 'missing cloud certificate; please supply one with --ec2cert') self.log.debug('cloud certificate: %s', self.args['ec2cert']) if not self.args.get('user'): raise ArgumentError( 'missing account ID; please supply one with --user') self.log.debug('account ID: %s', self.args['user']) if (self.args.get('destination') and os.path.exists(self.args['destination']) and not os.path.isdir(self.args['destination'])): raise ArgumentError("argument -d/--destination: '{0}' is not a " "directory".format(self.args['destination'])) # noinspection PyExceptionInherit def add_bundle_creds(args, config): # User's X.509 certificate (user-level in config) if not args.get('cert'): config_cert = config.get_user_option('certificate') if 'EC2_CERT' in os.environ: args['cert'] = os.getenv('EC2_CERT') elif 'EUCA_CERT' in os.environ: # used by the NC args['cert'] = os.getenv('EUCA_CERT') elif config_cert: args['cert'] = config_cert if args.get('cert'): args['cert'] = os.path.expanduser(os.path.expandvars(args['cert'])) if not os.path.exists(args['cert']): raise ArgumentError("certificate file '{0}' does not exist" .format(args['cert'])) if not os.path.isfile(args['cert']): raise ArgumentError("certificate file '{0}' is not a file" .format(args['cert'])) # User's private key (user-level in config) if not args.get('privatekey'): config_privatekey = config.get_user_option('private-key') if 'EC2_PRIVATE_KEY' in os.environ: args['privatekey'] = os.getenv('EC2_PRIVATE_KEY') if 'EUCA_PRIVATE_KEY' in os.environ: # used by the NC args['privatekey'] = os.getenv('EUCA_PRIVATE_KEY') elif config_privatekey: args['privatekey'] = config_privatekey if args.get('privatekey'): args['privatekey'] = os.path.expanduser(os.path.expandvars( args['privatekey'])) if not os.path.exists(args['privatekey']): raise ArgumentError("private key file '{0}' does not exist" .format(args['privatekey'])) if not os.path.isfile(args['privatekey']): raise ArgumentError("private key file '{0}' is not a file" .format(args['privatekey'])) # Cloud's X.509 cert (region-level in config) if not args.get('ec2cert'): config_privatekey = config.get_region_option('certificate') if 'EUCALYPTUS_CERT' in os.environ: # This has no EC2 equivalent since they just bundle their cert. args['ec2cert'] = os.getenv('EUCALYPTUS_CERT') elif config_privatekey: args['ec2cert'] = config_privatekey if args.get('ec2cert'): args['ec2cert'] = os.path.expanduser(os.path.expandvars( args['ec2cert'])) if not os.path.exists(args['ec2cert']): raise ArgumentError("cloud certificate file '{0}' does not exist" .format(args['ec2cert'])) if not os.path.isfile(args['ec2cert']): raise ArgumentError("cloud certificate file '{0}' is not a file" .format(args['ec2cert'])) # User's account ID (user-level) if not args.get('user'): config_account_id = config.get_user_option('account-id') if 'EC2_USER_ID' in os.environ: args['user'] = os.getenv('EC2_USER_ID') elif config_account_id: args['user'] = config_account_id euca2ools-3.0.2/euca2ools/commands/bundle/bundle.py000066400000000000000000000363741222241730200222110ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import binascii import hashlib import multiprocessing import itertools import logging import lxml.objectify import os.path import random import shutil import subprocess import sys import tarfile import threading import time # Note: show_progress=True in a couple methods imports progressbar ## TODO: document that fact class Bundle(object): DEFAULT_PART_SIZE = 10 * 1024 * 1024 # 10M EC2_IMAGE_SIZE_LIMIT = 10 * 1024 * 1024 * 1024 # 10G def __init__(self): self.digest = None self.digest_algorithm = None self.enc_algorithm = None self.enc_key = None # a hex string self.enc_iv = None # a hex string self.image_filename = None self.image_size = None self.log = logging.getLogger(self.__class__.__name__) self.parts = None self._lock = threading.Lock() @property def bundled_size(self): return sum(part['size'] for part in self.parts) @classmethod def create_from_image(cls, image_filename, part_prefix, part_size=None, progressbar=None): new_bundle = cls() new_bundle._create_from_image(image_filename, part_prefix, part_size=part_size, progressbar=progressbar) return new_bundle @classmethod def create_from_manifest(cls, manifest_filename, partdir=None, privkey_filename=None): if partdir is None: partdir = os.path.dirname(manifest_filename) new_bundle = cls() with open(manifest_filename) as manifest_file: # noinspection PyUnresolvedReferences manifest = lxml.objectify.parse(manifest_file).getroot() new_bundle.digest = manifest.image.digest.text new_bundle.digest_algorithm = manifest.image.digest.get('algorithm') new_bundle.enc_algorithm = manifest.image.user_encrypted_key.get( 'algorithm') new_bundle.enc_key = _try_to_decrypt_keys( (manifest.image.user_encrypted_key.text, manifest.image.ec2_encrypted_key.text), privkey_filename) new_bundle.enc_iv = _try_to_decrypt_keys( (manifest.image.user_encrypted_iv.text, manifest.image.ec2_encrypted_iv.text), privkey_filename) new_bundle.image_size = int(manifest.image.size.text) new_bundle.parts = [] for part in manifest.image.parts.part: part_dict = {} part_filename = os.path.join(partdir, part.filename.text) if not os.path.isfile(part_filename): raise ValueError("no such part: '{0}'".format(part_filename)) part_dict['path'] = part_filename part_dict['digest'] = part.digest.text part_dict['size'] = os.path.getsize(part_filename) new_bundle.parts.append(part_dict) return new_bundle def _create_from_image(self, image_filename, part_prefix, part_size=None, progressbar=None): if part_size is None: part_size = self.DEFAULT_PART_SIZE with self._lock: self.digest_algorithm = 'SHA1' self.enc_algorithm = 'AES-128-CBC' self.image_filename = image_filename self.image_size = os.path.getsize(image_filename) if self.image_size > self.EC2_IMAGE_SIZE_LIMIT: msg = "this image is larger than EC2's size limit" self.log.warn(msg) print >> sys.stderr, 'warning:', msg elif self.image_size == 0: msg = 'this image is an empty file' self.log.warn(msg) print >> sys.stderr, 'warning:', msg # pipe for getting the digest from sha1sum digest_pipe_out, digest_pipe_in = multiprocessing.Pipe(duplex=False) # pipe for tar --> sha1sum tar_out_pipe_out, tar_out_pipe_in = os.pipe() # pipe for sha1sum --> gzip sha_out_pipe_out, sha_out_pipe_in = os.pipe() # tar --> sha1sum # # Digest calculation is a little processor-intensive, so it goes in its # own process. # # That conveniently lets us avoid the annoyances of streaming lots of # data between two threads by letting us simply use OS pipes. pid = os.fork() if pid == 0: digest_pipe_out.close() os.close(tar_out_pipe_in) os.close(sha_out_pipe_out) _calc_digest_and_exit(tar_out_pipe_out, sha_out_pipe_in, digest_pipe_in) digest_pipe_in.close() os.close(tar_out_pipe_out) os.close(sha_out_pipe_in) # sha1sum --> gzip try: gzip = subprocess.Popen(['pigz', '-c'], stdin=sha_out_pipe_out, stdout=subprocess.PIPE, close_fds=True, bufsize=-1) except OSError: gzip = subprocess.Popen(['gzip', '-c'], stdin=sha_out_pipe_out, stdout=subprocess.PIPE, close_fds=True, bufsize=-1) os.close(sha_out_pipe_out) # gzip --> openssl srand = random.SystemRandom() enc_key = '{0:0>32x}'.format(srand.getrandbits(128)) enc_iv = '{0:0>32x}'.format(srand.getrandbits(128)) with self._lock: self.enc_key = enc_key self.enc_iv = enc_iv openssl = subprocess.Popen(['openssl', 'enc', '-e', '-aes-128-cbc', '-K', enc_key, '-iv', enc_iv], stdin=gzip.stdout, stdout=subprocess.PIPE, close_fds=True, bufsize=-1) # openssl --> writer writer_thread = threading.Thread(target=self._write_parts, args=(openssl.stdout, part_prefix, part_size)) writer_thread.start() # Drive everything by feeding tar with open(image_filename) as image: with os.fdopen(tar_out_pipe_in, 'w') as tar_input: _write_tarball(image, tar_input, progressbar=progressbar) writer_thread.join() overall_digest = digest_pipe_out.recv() digest_pipe_out.close() with self._lock: self.digest = overall_digest def _write_parts(self, infile, part_prefix, part_size): with self._lock: self.parts = [] try: for part_no in itertools.count(): part_fname = '{0}.part.{1}'.format(part_prefix, part_no) part_info = _write_single_part(infile, part_fname, part_size) with self._lock: self.parts.append(part_info) if part_info['size'] < part_size: # That's the last part return finally: infile.close() def extract_image(self, destdir, progressbar=None): assert self.digest_algorithm == 'SHA1' assert self.enc_algorithm == 'AES-128-CBC' # pipe for getting the digest from sha1sum digest_pipe_out, digest_pipe_in = multiprocessing.Pipe(duplex=False) # pipe for getting the extracted image's file name from tar imgname_pipe_out, imgname_pipe_in = multiprocessing.Pipe(duplex=False) # pipe for gzip -> sha1sum gzip_out_pipe_out, gzip_out_pipe_in = os.pipe() # pipe for sha1sum -> tar sha_out_pipe_out, sha_out_pipe_in = os.pipe() # part reader -> openssl openssl = subprocess.Popen(['openssl', 'enc', '-d', '-aes-128-cbc', '-K', self.enc_key, '-iv', self.enc_iv], stdin=subprocess.PIPE, stdout=subprocess.PIPE, bufsize=-1) # openssl -> gzip try: subprocess.Popen(['pigz', '-c', '-d'], stdin=openssl.stdout, stdout=gzip_out_pipe_in, close_fds=True, bufsize=-1) except OSError: subprocess.Popen(['gzip', '-c', '-d'], stdin=openssl.stdout, stdout=gzip_out_pipe_in, close_fds=True, bufsize=-1) openssl.stdout.close() os.close(gzip_out_pipe_in) # gzip -> sha1sum pid = os.fork() if pid == 0: openssl.stdin.close() digest_pipe_out.close() os.close(sha_out_pipe_out) _calc_digest_and_exit(gzip_out_pipe_out, sha_out_pipe_in, digest_pipe_in) digest_pipe_in.close() os.close(gzip_out_pipe_out) os.close(sha_out_pipe_in) tar_thread = threading.Thread( target=_extract_image_from_tarball, args=(os.fdopen(sha_out_pipe_out), destdir, imgname_pipe_in)) tar_thread.start() # Drive everything by feeding each part in turn to openssl bytes_read = 0 # progressbar must be based on bundled_size, not size progressbar.start() try: for part in self.parts: with open(part['path']) as part_file: while True: chunk = part_file.read(8192) if chunk: openssl.stdin.write(chunk) bytes_read += len(chunk) progressbar.update(bytes_read) else: break finally: openssl.stdin.close() progressbar.finish() tar_thread.join() written_digest = digest_pipe_out.recv() digest_pipe_out.close() with self._lock: self.image_filename = imgname_pipe_out.recv() imgname_pipe_out.close() if written_digest != self.digest: raise ValueError('extracted image appears to be corrupt ' '(expected digest: {0}, actual: {1})' .format(self.digest, written_digest)) if os.path.getsize(self.image_filename) != self.image_size: raise ValueError('extracted image appears to be corrupt ' '(expected size: {0}, actual: {1})' .format(self.image_size, os.path.getsize(self.image_filename))) return self.image_filename ### BUNDLE CREATION ### def _write_tarball(infile, outfile, progressbar=None): tar_thread = threading.Thread(target=_add_fileobj_to_tarball, args=(infile, outfile)) tar_thread.start() if progressbar is not None: progressbar.start() while tar_thread.is_alive(): progressbar.update(infile.tell()) time.sleep(0.01) progressbar.finish() tar_thread.join() def _add_fileobj_to_tarball(infile, outfile): tarball = tarfile.open(mode='w|', fileobj=outfile) try: tarinfo = tarfile.TarInfo(os.path.basename(infile.name)) tarinfo.size = os.path.getsize(infile.name) tarball.addfile(tarinfo=tarinfo, fileobj=infile) finally: tarball.close() def _calc_digest_and_exit(in_fileno, out_fileno, result_pipe): infile = os.fdopen(in_fileno) outfile = os.fdopen(out_fileno, 'w') digest = hashlib.sha1() while True: chunk = infile.read(8192) if chunk: digest.update(chunk) outfile.write(chunk) else: break result_pipe.send(digest.hexdigest()) result_pipe.close() infile.close() outfile.close() sys.exit() def _write_single_part(infile, part_fname, part_size): part_digest = hashlib.sha1() with open(part_fname, 'w') as part: bytes_to_write = part_size while bytes_to_write > 0: chunk = infile.read(min((bytes_to_write, 8192))) if chunk: part.write(chunk) part_digest.update(chunk) bytes_to_write -= len(chunk) else: break return {'path': part_fname, 'digest': part_digest.hexdigest(), 'size': part.tell()} ### BUNDLE EXTRACTION ### def _get_bundle_keys_from_manifest(manifest, privkey_filename): enc_key = _try_to_decrypt_keys((manifest.image.user_encrypted_key.text, manifest.image.ec2_encrypted_key.text), privkey_filename) enc_iv = _try_to_decrypt_keys((manifest.image.user_encrypted_iv.text, manifest.image.ec2_encrypted_iv.text), privkey_filename) return enc_key, enc_iv def _try_to_decrypt_keys(hex_encrypted_keys, privkey_filename): for key in hex_encrypted_keys: popen = subprocess.Popen(['openssl', 'rsautl', '-decrypt', '-pkcs', '-inkey', privkey_filename], stdin=subprocess.PIPE, stdout=subprocess.PIPE) (decrypted_key, __) = popen.communicate(binascii.unhexlify(key)) try: # Make sure it might actually be an encryption key. # This isn't perfect, but it's still better than nothing. int(decrypted_key, 16) return decrypted_key except ValueError: pass raise ValueError("Failed to decrypt the bundle's encryption key. " "Ensure the key supplied matches the one used for " "bundling.") def _extract_image_from_tarball(infile, destdir, imgname_pipe): tarball = tarfile.open(mode='r|', fileobj=infile) try: tarinfo = tarball.next() assert tarinfo is not None outfile_name = os.path.join(destdir, tarinfo.name) imgname_pipe.send(outfile_name) imgname_pipe.close() tarred_image = tarball.extractfile(tarinfo) with open(outfile_name, 'w') as outfile: shutil.copyfileobj(tarred_image, outfile) finally: tarball.close() euca2ools-3.0.2/euca2ools/commands/bundle/bundleimage.py000066400000000000000000000253621222241730200232070ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse import binascii import euca2ools from euca2ools.commands.bundle import BundleCreator from euca2ools.commands.bundle.bundle import Bundle from euca2ools.util import mkdtemp_for_large_files import hashlib import lxml.etree import lxml.objectify import os.path from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError import subprocess class BundleImage(BundleCreator): DESCRIPTION = 'Prepare an image for uploading to a cloud' ARGS = [Arg('-i', '--image', metavar='FILE', required=True, help='file containing the image to bundle (required)'), Arg('-p', '--prefix', help='''the file name prefix to give the bundle's files (default: the image's file name)'''), Arg('--image-type', choices=('machine', 'kernel', 'ramdisk'), default='machine', help=argparse.SUPPRESS), Arg('--progressbar-label', help=argparse.SUPPRESS)] # noinspection PyExceptionInherit def configure(self): BundleCreator.configure(self) # kernel/ramdisk image IDs if self.args.get('kernel') == 'true': self.args['image_type'] = 'kernel' if self.args.get('ramdisk') == 'true': self.args['image_type'] = 'ramdisk' if self.args['image_type'] == 'kernel': if self.args.get('kernel') and self.args['kernel'] != 'true': raise ArgumentError("argument --kernel: not compatible with " "image type 'kernel'") if self.args.get('ramdisk'): raise ArgumentError("argument --ramdisk: not compatible with " "image type 'kernel'") if self.args['image_type'] == 'ramdisk': if self.args.get('kernel'): raise ArgumentError("argument --kernel: not compatible with " "image type 'ramdisk'") if self.args.get('ramdisk') and self.args['ramdisk'] != 'true': raise ArgumentError("argument --ramdisk: not compatible with " "image type 'ramdisk'") def main(self): prefix = (self.args.get('prefix') or os.path.basename(self.args['image'])) if self.args.get('destination'): path_prefix = os.path.join(self.args['destination'], prefix) if not os.path.exists(self.args['destination']): os.mkdir(self.args['destination']) else: tempdir = mkdtemp_for_large_files(prefix='bundle-') path_prefix = os.path.join(tempdir, prefix) self.log.debug('bundle path prefix: %s', path_prefix) label = self.args.get('progressbar_label', 'Bundling image') pbar = self.get_progressbar(label=label, maxval=os.path.getsize(self.args['image'])) bundle = Bundle.create_from_image( self.args['image'], path_prefix, part_size=self.args.get('part_size'), progressbar=pbar) manifest = self.generate_manifest_xml(bundle) manifest_filename = path_prefix + '.manifest.xml' with open(manifest_filename, 'w') as manifest_file: manifest_file.write(manifest) return (part['path'] for part in bundle.parts), manifest_filename def print_result(self, result): print 'Wrote manifest', result[1] # noinspection PyUnresolvedReferences def generate_manifest_xml(self, bundle): manifest = lxml.objectify.Element('manifest') # Manifest version manifest.version = '2007-10-10' # Our version manifest.bundler = None manifest.bundler.name = 'euca2ools' manifest.bundler.version = euca2ools.__version__ manifest.bundler.release = None # Target hardware manifest.machine_configuration = None manifest.machine_configuration.architecture = self.args['arch'] if self.args.get('kernel'): manifest.machine_configuration.kernel_id = self.args['kernel'] if self.args.get('ramdisk'): manifest.machine_configuration.ramdisk_id = self.args['ramdisk'] if self.args['image_type'] == 'machine': bd_mappings = self.args.get('block_device_mappings', {}) if bd_mappings: manifest.machine_configuration.block_device_mapping = None for virtual, device in sorted(bd_mappings.iteritems()): bd_elem = lxml.objectify.Element('mapping') bd_elem.virtual = virtual bd_elem.device = device manifest.machine_configuration.block_device_mapping.append( bd_elem) if self.args.get('productcodes'): manifest.machine_configuration.product_codes = None for code in self.args['productcodes']: code_elem = lxml.objectify.Element('product_code') manifest.machine_configuration.product_codes.append( code_elem) (manifest.machine_configuration.product_codes .product_code[-1]) = code # Image info manifest.image = None manifest.image.name = os.path.basename(bundle.image_filename) manifest.image.user = self.args['user'] # user's account ID manifest.image.type = self.args['image_type'] # machine/kernel/ramdisk if self.args['image_type'] == 'kernel': # This might need something else manifest.image.kernel_name = os.path.basename( bundle.image_filename) manifest.image.digest = bundle.digest manifest.image.digest.set('algorithm', bundle.digest_algorithm) manifest.image.size = bundle.image_size manifest.image.bundled_size = bundle.bundled_size # Bundle encryption keys (these are cloud-specific) manifest.image.ec2_encrypted_key = public_encrypt(bundle.enc_key, self.args['ec2cert']) manifest.image.ec2_encrypted_key.set('algorithm', bundle.enc_algorithm) manifest.image.user_encrypted_key = public_encrypt(bundle.enc_key, self.args['cert']) manifest.image.user_encrypted_key.set('algorithm', bundle.enc_algorithm) manifest.image.ec2_encrypted_iv = public_encrypt(bundle.enc_iv, self.args['ec2cert']) manifest.image.user_encrypted_iv = public_encrypt(bundle.enc_iv, self.args['cert']) # Bundle parts manifest.image.parts = None manifest.image.parts.set('count', str(len(bundle.parts))) for index, part in enumerate(bundle.parts): part_elem = lxml.objectify.Element('part') part_elem.set('index', str(index)) part_elem.filename = os.path.basename(part['path']) part_elem.digest = part['digest'] part_elem.digest.set('algorithm', bundle.digest_algorithm) manifest.image.parts.append(part_elem) # Parent image IDs if (self.args['image_type'] == 'machine' and self.args.get('ancestor_image_ids')): # I think this info only comes from the metadata service when you # run ec2-bundle-vol on an instance. ec2-bundle-image doesn't seem # to have an option for it. manifest.image.ancestry = None for ancestor_image_id in self.args['ancestor_image_ids']: ancestor_elem = lxml.objectify.Element('ancestor_ami_id') manifest.image.ancestry.append(ancestor_elem) manifest.image.ancestry.ancestor_ami_id[-1] = ancestor_image_id lxml.objectify.deannotate(manifest, xsi_nil=True) lxml.etree.cleanup_namespaces(manifest) to_sign = (lxml.etree.tostring(manifest.machine_configuration) + lxml.etree.tostring(manifest.image)) self.log.debug('string to sign: %s', repr(to_sign)) signature = rsa_sha1_sign(to_sign, self.args['privatekey']) manifest.signature = signature self.log.debug('hex-encoded signature: %s', signature) lxml.objectify.deannotate(manifest, xsi_nil=True) lxml.etree.cleanup_namespaces(manifest) self.log.debug('-- manifest content --\n', extra={'append': True}) pretty_manifest = lxml.etree.tostring(manifest, pretty_print=True).strip() self.log.debug(pretty_manifest, extra={'append': True}) self.log.debug('-- end of manifest content --') return lxml.etree.tostring(manifest) def public_encrypt(content, cert_filename): popen = subprocess.Popen(['openssl', 'rsautl', '-encrypt', '-pkcs', '-inkey', cert_filename, '-certin'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) (stdout, __) = popen.communicate(content) return binascii.hexlify(stdout) def rsa_sha1_sign(content, privkey_filename): digest = hashlib.sha1() digest.update(content) popen = subprocess.Popen(['openssl', 'pkeyutl', '-sign', '-inkey', privkey_filename, '-pkeyopt', 'digest:sha1'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) (stdout, __) = popen.communicate(digest.digest()) return binascii.hexlify(stdout) euca2ools-3.0.2/euca2ools/commands/bundle/bundlevol.py000066400000000000000000000213141222241730200227160ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import copy import os import sys from euca2ools.commands.argtypes import delimited_list, filesize from euca2ools.commands.bundle import BundleCreator from euca2ools.commands.bundle.bundle import Bundle from euca2ools.commands.bundle.bundleimage import BundleImage from euca2ools.commands.bundle.helpers import (check_metadata, get_metadata, get_metadata_dict, get_metadata_list) from euca2ools.commands.bundle.imagecreator import ImageCreator from requestbuilder import Arg, MutuallyExclusiveArgList from requestbuilder.exceptions import ClientError, ServerError IMAGE_MAX_SIZE_IN_MB = Bundle.EC2_IMAGE_SIZE_LIMIT / 1024 // 1024 # # We pass our args dict along to BundleImage so we need to remove all the # args that it doesn't understand. # BUNDLE_IMAGE_ARG_FILTER = ('generate_fstab', 'fstab', 'bundle_all_dirs', 'filter', 'inherit', 'size', 'volume', 'exclude', 'include', 'ancestor_image_ids') class BundleVol(BundleCreator): DESCRIPTION = ("Create a bundled iamge based on the running machine's " 'filesystem\n\nThis command must be run as the superuser.') ARGS = [Arg('-s', '--size', metavar='MB', type=filesize, default=IMAGE_MAX_SIZE_IN_MB, help='''Size of the image in MB (default: {0}; recommended maximum: {0}).'''.format(IMAGE_MAX_SIZE_IN_MB)), Arg('-p', '--prefix', metavar='PREFIX', default='image', help='''the file name prefix to give the bundle's files (defaults to 'image').'''), Arg('-a', '--all', dest="bundle_all_dirs", action='store_true', help='''Bundle all directories (including mounted filesystems).'''), MutuallyExclusiveArgList( Arg('--no-inherit', dest='inherit', action='store_false', default=True, help='''Do not add instance metadata to the bundled image (defaults to inheriting metadata).'''), Arg('--inherit', dest='inherit', action='store_true', default=True, help='''Explicitly inherit instance metadata and add it to the bundled image (this is the default behavior)''')), Arg('-i', '--include', metavar='FILE1,FILE2,...', type=delimited_list(','), help='''Comma-separated list of absolute file paths to include.'''), Arg('-e', '--exclude', metavar='DIR1,DIR2,...', type=delimited_list(','), help='''Comma-separated list of directories to exclude.'''), Arg('--volume', metavar='PATH', default='/', help='''Path to mounted volume to bundle (defaults to '/').'''), Arg('--no-filter', dest='filter', action='store_false', help='''Do not use the default filtered files list.'''), MutuallyExclusiveArgList( Arg('--fstab', metavar='PATH', help='''Path to the fstab to be bundled with image.'''), Arg('--generate-fstab', action='store_true', help='Generate fstab to bundle in image.'))] def __init__(self, **kwargs): if (os.geteuid() != 0 and '--help' not in sys.argv and '-h' not in sys.argv): # Inform people with insufficient privileges before parsing args # so they don't have to wade through required arg messages and # whatnot first. raise Exception("must be superuser") BundleCreator.__init__(self, **kwargs) def _inherit_metadata(self): """Read instance metadata which we will propagate to the BundleImage command. These values are used for generating a manifest once we have a bundled image. """ try: check_metadata() if not self.args.get('ramdisk'): self.args['ramdisk'] = get_metadata('ramdisk-id') self.log.debug("inheriting ramdisk: {0}" .format(self.args.get('ramdisk'))) if not self.args.get('kernel'): self.args['kernel'] = get_metadata('kernel-id') self.log.debug("inheriting kernel: {0}" .format(self.args.get('kernel'))) if not self.args.get('block_device_mappings'): self.args['block_device_mappings'] = \ get_metadata_dict('block-device-mapping') self.log.debug("inheriting block device mappings: {0}".format( self.args.get('block_device_mappings'))) # # Product codes and ancestor ids are special cases since they # aren't always there. # try: productcodes = get_metadata_list('product-codes') self.args['productcodes'].extend(productcodes) self.log.debug("inheriting product codes: {0}" .format(productcodes)) except (ClientError, ServerError): msg = 'unable to read product codes from metadata.' print sys.stderr, msg self.log.warn(msg) try: if not self.args.get('ancestor_image_ids'): self.args['ancestor_image_ids'] = [] ancestor_ids = get_metadata_list('ancestor-ami-ids') self.args['ancestor_image_ids'].extend(ancestor_ids) self.log.debug("inheriting ancestor ids: {0}" .format(ancestor_ids)) except (ClientError, ServerError): msg = 'unable to read ancestor ids from metadata.' print sys.stderr, msg self.log.warn(msg) except (ClientError, ServerError): msg = ('Unable to read instance metadata. Use --no-inherit if ' 'you want to proceed without the metadata service.') print >> sys.stderr, msg self.log.warn(msg) raise def _filter_args_for_bundle_image(self): """Make a complete copy of args to pass along to BundleImage. We first need to remove any arguments that BundleImage would not know about. """ args = copy.deepcopy(self.args) for arg in BUNDLE_IMAGE_ARG_FILTER: try: del args[arg] except KeyError: pass return args def configure(self): BundleCreator.configure(self) self.args['user'] = self.args.get('user').replace('-', '') def main(self): if self.args.get('inherit'): self._inherit_metadata() image_file = ImageCreator(log=self.log, **self.args).run() try: image_args = self._filter_args_for_bundle_image() image_args.update(image=image_file, image_type='machine') self.log.info("bundling image: {0}".format(image_file)) return BundleImage(**image_args).main() finally: if os.path.exists(image_file): os.remove(image_file) if len(os.listdir(os.path.dirname(image_file))) == 0: os.rmdir(os.path.dirname(image_file)) def print_result(self, result): for part_filename in result[0]: print 'Wrote', part_filename print 'Wrote manifest', result[1] euca2ools-3.0.2/euca2ools/commands/bundle/deletebundle.py000066400000000000000000000151051222241730200233610ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.bundle.helpers import download_files from euca2ools.commands.bundle.helpers import get_manifest_keys from euca2ools.commands.bundle.helpers import get_manifest_parts from euca2ools.commands.walrus import WalrusRequest from euca2ools.commands.walrus.checkbucket import CheckBucket from euca2ools.commands.walrus.deletebucket import DeleteBucket from euca2ools.commands.walrus.deleteobject import DeleteObject from euca2ools.exceptions import AWSError from requestbuilder import Arg, MutuallyExclusiveArgList from requestbuilder.exceptions import ArgumentError import argparse import os import shutil import tempfile class DeleteBundle(WalrusRequest): DESCRIPTION = 'Delete a previously-uploaded bundle' ARGS = [Arg('-b', '--bucket', dest='bucket', metavar='BUCKET[/PREFIX]', required=True, help='location of the bundle to delete (required)'), MutuallyExclusiveArgList( True, Arg('-m', '--manifest', dest='manifest_path', metavar='MANIFEST', help='''use a local manifest file to figure out what to delete'''), Arg('-p', '--prefix', dest='prefix', help='''delete the bundle that begins with a specific prefix (e.g. "fry" for "fry.manifest.xml")'''), Arg('--delete-all-bundles', dest='delete_all', action='store_true', help=argparse.SUPPRESS)), Arg('--clear', dest='clear', action='store_true', help='attempt to delete the bucket as well')] def _delete_manifest_parts(self, manifest_keys, directory): bucket = self.args.get('bucket') for key in manifest_keys: paths = get_manifest_parts(os.path.join(directory, key), bucket) DeleteObject(paths=paths, service=self.service, config=self.config).main() def _delete_manifest_keys(self, manifest_keys): bucket = self.args.get('bucket') paths = [os.path.join(bucket, key) for key in manifest_keys] DeleteObject(paths=paths, service=self.service, config=self.config).main() # noinspection PyExceptionInherit def _delete_by_local_manifest(self): manifest_path = self.args.get('manifest_path') if not os.path.isfile(manifest_path): raise ArgumentError( "manifest file '{0}' does not exist.".format(manifest_path)) manifest_keys = [os.path.basename(manifest_path)] directory = os.path.dirname(manifest_path) or '.' # When we use a local manifest file, we should still check if there is # a matching manifest in the bucket. If it's there then we delete it. # It's okay if this fails. It might not be there. try: self._delete_manifest_keys(manifest_keys) except AWSError as err: if err.code == 'NoSuchEntity': pass else: raise self._delete_manifest_parts(manifest_keys, directory) # noinspection PyExceptionInherit def _delete_by_prefix(self): bucket = self.args.get('bucket') directory = tempfile.mkdtemp() try: manifest_keys = ["{0}.manifest.xml".format( self.args.get('prefix'))] try: download_files(bucket, manifest_keys, directory, service=self.service, config=self.config) except AWSError as err: if err.code == 'NoSuchEntity': error = ("manifest file '{0}' does not exist in bucket " "'{1}'.") raise ArgumentError(error.format(manifest_keys[0], bucket)) else: raise self._delete_manifest_parts(manifest_keys, directory) self._delete_manifest_keys(manifest_keys) finally: shutil.rmtree(directory) def _delete_all_bundles(self): bucket = self.args.get('bucket') directory = tempfile.mkdtemp() try: manifest_keys = get_manifest_keys(bucket, service=self.service, config=self.config) download_files(bucket, manifest_keys, directory, service=self.service, config=self.config) self._delete_manifest_parts(manifest_keys, directory) self._delete_manifest_keys(manifest_keys) finally: shutil.rmtree(directory) def main(self): bucket = self.args.get('bucket').split('/', 1)[0] # Verify bucket existence CheckBucket(bucket=bucket, service=self.service, config=self.config).main() # Use local manifest file if self.args.get('manifest_path'): self._delete_by_local_manifest() # Use manifest file in walrus elif self.args.get('prefix'): self._delete_by_prefix() # Delete all bundles in the bucket elif self.args.get('delete_all'): self._delete_all_bundles() if self.args.get('clear'): DeleteBucket(bucket=bucket, service=self.service, config=self.config).main() euca2ools-3.0.2/euca2ools/commands/bundle/downloadbundle.py000066400000000000000000000130151222241730200237240ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.bundle.helpers import download_files from euca2ools.commands.bundle.helpers import get_manifest_keys from euca2ools.commands.bundle.helpers import get_manifest_parts from euca2ools.commands.walrus import WalrusRequest from euca2ools.commands.walrus.checkbucket import CheckBucket from euca2ools.exceptions import AWSError from euca2ools.util import mkdtemp_for_large_files import os from requestbuilder import Arg, MutuallyExclusiveArgList from requestbuilder.exceptions import ArgumentError import shutil class DownloadBundle(WalrusRequest): DESCRIPTION = ('Download a bundled image from the cloud\n\nYou must run ' 'euca-unbundle-image on the bundle you download to obtain ' 'the original image.') ARGS = [Arg('-b', '--bucket', metavar='BUCKET', required=True, help='bucket to download the bucket from (required)'), MutuallyExclusiveArgList( Arg('-m', '--manifest', dest='manifest_path', metavar='FILE', help='''use a local manifest file to figure out what to download'''), Arg('-p', '--prefix', metavar='PREFIX', help='''download the bundle that begins with a specific prefix (e.g. "fry" for "fry.manifest.xml")''')), Arg('-d', '--directory', metavar='DIR', help='The directory to download the parts to.')] def _download_parts(self, manifests, directory): bucket = self.args.get('bucket') for manifest in manifests: parts = get_manifest_parts(os.path.join(directory, manifest)) download_files(bucket, parts, directory, service=self.service, config=self.config, show_progress=self.args.get('show_progress', True)) # noinspection PyExceptionInherit def _download_by_local_manifest(self, directory): manifest_path = self.args.get('manifest_path') if not os.path.isfile(manifest_path): raise ArgumentError( "manifest file '{0}' does not exist.".format(manifest_path)) manifest_key = os.path.basename(manifest_path) if not os.path.exists(os.path.join(directory, manifest_key)): shutil.copy(manifest_path, directory) self._download_parts([manifest_key], directory) # noinspection PyExceptionInherit def _download_by_prefix(self, directory): bucket = self.args.get('bucket') prefix = self.args.get('prefix') manifest_keys = get_manifest_keys(bucket, prefix, service=self.service, config=self.config) if not manifest_keys: if prefix: raise ArgumentError( "no manifests found with prefix '{0}' in bucket '{1}'." .format(prefix, bucket)) else: raise ArgumentError("no manifests found in bucket '{0}'." .format(bucket)) try: download_files(bucket, manifest_keys, directory, service=self.service, config=self.config, show_progress=self.args.get('show_progress', True)) except AWSError as err: if err.code != 'NoSuchEntity': raise raise ArgumentError( "cannot find manifest file(s) {0} in bucket '{1}'." .format(",".join(manifest_keys), bucket)) self._download_parts(manifest_keys, directory) # noinspection PyExceptionInherit def main(self): bucket = self.args.get('bucket').split('/', 1)[0] CheckBucket(bucket=bucket, service=self.service, config=self.config).main() directory = self.args.get('directory') or mkdtemp_for_large_files() if not os.path.isdir(directory): raise ArgumentError( "location '{0}' is either not a directory or does not exist." .format(directory)) if self.args.get('manifest_path'): self._download_by_local_manifest(directory) else: self._download_by_prefix(directory) print "Bundle downloaded to '{0}'".format(directory) euca2ools-3.0.2/euca2ools/commands/bundle/helpers.py000066400000000000000000000127441222241730200223750ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.walrus.getobject import GetObject from euca2ools.commands.walrus.listbucket import ListBucket import os from requestbuilder.exceptions import ClientError, ServerError import requests from requests.exceptions import Timeout, ConnectionError from urlparse import urljoin from xml.dom import minidom METADATA_URL = 'http://169.254.169.254/latest/meta-data/' METADATA_TIMEOUT = 10 def get_manifest_parts(manifest, bucket=None): """Gets a list object containing the filenames of parts in the manifest. Returns a list of parts contained in the manifest. :param manifest: name of the local manifest file to parse. :param bucket: (optional) bucket name to append to the part key. """ part_paths = [] dom = minidom.parse(manifest) elem = dom.getElementsByTagName('manifest')[0] for tag in elem.getElementsByTagName('filename'): for node in tag.childNodes: if node.nodeType == node.TEXT_NODE: if bucket: part_paths.append(os.path.join(bucket, node.data)) else: part_paths.append(node.data) return part_paths def get_manifest_keys(bucket, prefix=None, **kwargs): """Gets the key names for manifests in the specified bucket with optional prefix. Returns list of manifest keys in the bucket. :param bucket: bucket to search for manifest keys. :param prefix: (optional) only return keys with this prefix. :param kwargs: (optional) extra options passed to ListBucket. """ manifests = [] kwargs.update(paths=[bucket]) response = ListBucket(**kwargs).main() for item in response.get('Contents'): key = item.get('Key') if key.endswith('.manifest.xml'): if prefix: if key.startswith(prefix): manifests.append(key) else: manifests.append(key) return manifests def download_files(bucket, keys, directory, **kwargs): """Download manifests from a Walrus bucket to a local directory. :param bucket: The bucket to download manifests from. :param keys: keys of the files to download. :param directory: location to put downloaded manifests. :param kwargs: (optional) extra arguments passed to GetObject. """ paths = [os.path.join(bucket, key) for key in keys] kwargs.update(paths=paths, opath=directory) GetObject(**kwargs).main() def check_metadata(): """Check if instance metadata is available.""" try: response = requests.get(METADATA_URL) if not response.ok: raise ServerError(response) except ConnectionError as err: raise ClientError("unable to contact metadata service: {0}" .format(err.args[0])) def get_metadata(*paths): """Get a single metadata value. Returns a string containing the value of the metadata key. :param paths: A variable number of items to be joined together as segments of the metadata url. """ url = METADATA_URL if paths: url = urljoin(url, "/".join(paths)) try: response = requests.get(url, timeout=METADATA_TIMEOUT) except Timeout: raise ClientError("timeout occurred when getting metadata from {0}" .format(url)) except ConnectionError as err: raise ClientError("error occurred when getting metadata from {0}: {1}" .format(url, err.args[0])) if response.ok: return response.content else: raise ServerError(response) def get_metadata_list(*paths): """Get a list of metadata values. Returns a list containing the values of the metadata key. :param paths: A variable number of items to be joined together as segments of the metadata url. """ return get_metadata(*paths).split('\n') def get_metadata_dict(*paths): """Get a dict of metadata values. Returns a dict containing the values of the metadata sub-keys. :param paths: A variable number of items to be joined together as segments of the metadata url. """ items = get_metadata_list(*paths) return dict((item, get_metadata(*(list(paths) + [item]))) for item in items) euca2ools-3.0.2/euca2ools/commands/bundle/imagecreator.py000066400000000000000000000405141222241730200233710ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.util import sanitize_path from euca2ools.util import mkdtemp_for_large_files as mkdtemp import glob import os import sys import platform import shutil import stat import subprocess import time NO_EXCLUDE_ENVAR = 'EUCA_BUNDLE_VOL_EMPTY_EXCLUDES' BLKID_TAGS = {'LABEL': 'label', 'TYPE': 'fstype', 'UUID': 'uuid'} ALLOWED_FS_TYPES = ('ext2', 'ext3', 'ext4', 'xfs', 'jfs', 'reiserfs') EXCLUDED_DIRS = ('/dev', '/media', '/mnt', '/proc', '/sys', '/cdrom', '/tmp') SYSTEM_DIRS = ('proc', 'tmp', 'dev', 'mnt', 'sys') DEVICE_NODES = {'dev/console': ['c', '5', '1'], 'dev/full': ['c', '1', '7'], 'dev/null': ['c', '1', '3'], 'dev/zero': ['c', '1', '5'], 'dev/tty': ['c', '5', '0'], 'dev/tty0': ['c', '4', '0'], 'dev/tty1': ['c', '4', '1'], 'dev/tty2': ['c', '4', '2'], 'dev/tty3': ['c', '4', '3'], 'dev/tty4': ['c', '4', '4'], 'dev/tty5': ['c', '4', '5'], 'dev/xvc0': ['c', '204', '191']} FSTAB_BODY_TEMPLATE = dict( i386="""/dev/sda1\t/\text3\tdefaults 1 1 /dev/sdb\t/mnt\text3\tdefaults 0 0 none\t/dev/pts\tdevpts\tgid=5,mode=620 0 0 none\t/proc\tproc\tdefaults 0 0 none\t/sys\tsysfs\tdefaults 0 0""", x86_64="""/dev/sda1\t/\text3\tdefaults,errors=remount-ro 0 0 /dev/sda2\t/mnt\text3\tdefaults\t0 0 /dev/sda3\tswap\tswap\tdefaults\t0 0 proc\t/proc\tproc\tdefaults\t0 0 devpts\t/dev/pts\tdevpts\tgid=5,mode=620 0 0""") FSTAB_HEADER_TEMPLATE = """# # # /etc/fstab # # Created by euca-bundle-vol on {0} # #""" FSTAB_TIME_FORMAT = "%a %b %d %H:%M:%S %Y" DEFAULT_PATTERN_EXCLUDES = [ '*/#*#', '*/.#*', '*.sw', '*.swo', '*.swp', '*~', '*.pem', '*.priv', '*id_rsa*', '*id_dsa*', '*.gpg', '*.jks', '*/.ssh/authorized_keys', '*/.bash_history', ] # # We're using /etc/mtab since this is what the AWS tools do. Other tools like # df also read the /etc/mtab file for mounts. Even though /proc/mounts is # more up to date, we'll stick with this unless there's a good reason to # change it. # MOUNTS_FILE = '/etc/mtab' class VolumeSync(object): def __init__(self, volume, image, log=None): self.log = log self.mpoint = mkdtemp(prefix='vol-') self.excludes = [] self.filter = False self.fstab = None self.generate_fstab_file = False self.image = image self.includes = [] self.volume = volume self.bundle_all_dirs = False def run(self): """ This is where ALL the magic happens! """ self._sync_files() self._populate_system_dirs() self._populate_device_nodes() self._populate_tmpfs_mounts() # # If an fstab file was specified we will replace the current # fstab on the created image with the file supplied. If the # user has told us to generate a new fstab file, then we will # create a new one based on the architecture of the target # system. If neither are specified then we do nothing here and # the user keeps their fstab from the original volume. # if self.fstab: with open(self.fstab, 'r') as fstab_file: self._install_fstab(fstab_file.read()) elif self.generate_fstab_file: self._install_generated_fstab() def exclude(self, exclude): if exclude: if isinstance(exclude, list): self.excludes.extend(exclude) else: self.excludes.append(exclude) def include(self, include): if include: if isinstance(include, list): self.includes.extend(include) else: self.includes.append(include) def bundle_all(self): self.bundle_all_dirs = True def filter_files(self): self.filter = True def install_fstab_from_file(self, fstab): if not os.path.exists(fstab): raise ValueError( "fstab file '{0}' does not exist.".format(fstab)) self.fstab = fstab def generate_fstab(self): self.generate_fstab_file = True def _update_exclusions(self): """ Here we update the following sync exclusions: 1. Exclude our disk image we are syncing to. 2. Exclude our mount point for our image. 3. Exclude filesystems that are not allowed. 4. Exclude special system directories. 5. Exclude file patterns for privacy. 6. Exclude problematic udev rules. """ if self.image.find(self.volume) == 0: self.exclude(os.path.dirname(self.image)) if self.mpoint.find(self.volume) == 0: self.exclude(self.mpoint) if not self.bundle_all_dirs: self._add_mounts_exclusions() self.excludes.extend(EXCLUDED_DIRS) if self.filter: self.excludes.extend(DEFAULT_PATTERN_EXCLUDES) if os.environ.get(NO_EXCLUDE_ENVAR, "0") == "0": self.excludes.extend( ['/etc/udev/rules.d/70-persistent-net.rules', '/etc/udev/rules.d/z25_persistent-net.rules']) def _add_mounts_exclusions(self): """Exclude locations from the volume rsync based on whether we are allowed to sync the type of filesystem. If you have chosen to bundle all using '--all' then this will not get called. """ with open(MOUNTS_FILE, 'r') as mounts: for line in mounts.readlines(): (mount, fstype) = line.split()[1:3] # # If we find that a mount in our volume's mtab file is # and shares a parent directory with the volume we will # check if the filesystem for the mount is not allowed # (e.g., NFS) and we will exclude it. This will not happen # if you have chosen the 'all' option. # if (mount.find(self.volume) == 0 and fstype not in ALLOWED_FS_TYPES): self.excludes.append(mount) def _populate_tmpfs_mounts(self): """Find all tmpfs mounts on our volume and make sure that they are created on the image. """ with open(MOUNTS_FILE, 'r') as mounts: for line in mounts.readlines(): (mount, fstype) = line.split()[1:3] if fstype == 'tmpfs': fullpath = os.path.join(self.mpoint, mount[1:]) if not os.path.exists(fullpath): os.makedirs(fullpath) def _populate_device_nodes(self): """Populate the /dev directory in our image with common device nodes.""" for node, args in DEVICE_NODES.iteritems(): subprocess.check_call(['mknod', os.path.join(self.mpoint, node)] + args) def _populate_system_dirs(self): """Populate our image with common system directories.""" for sysdir in SYSTEM_DIRS: fullpath = os.path.join(self.mpoint, sysdir) if not os.path.exists(fullpath): os.makedirs(fullpath) if sysdir == 'tmp': os.chmod(fullpath, 01777) def _install_generated_fstab(self): self._install_fstab(_generate_fstab_content()) def _install_fstab(self, content): fstab_path = os.path.join(self.mpoint, 'etc', 'fstab') if os.path.exists(fstab_path): shutil.copyfile(fstab_path, fstab_path + '.old') os.remove(fstab_path) with open(fstab_path, 'wb') as fstab: fstab.write(content) def _sync_files(self): cmd = ['rsync', '-aXS'] self._update_exclusions() for exclude in self.excludes: cmd.extend(['--exclude', exclude]) for include in self.includes: cmd.extend(['--include', include]) cmd.extend(glob.glob(os.path.join(self.volume, '*'))) cmd.append(self.mpoint + os.path.sep) try: if self.log: self.log.debug('executing {0}'.format(cmd)) subprocess.check_call(cmd) except subprocess.CalledProcessError as err: # # rsync return code 23: Partial transfer due to error # rsync return code 24: Partial transfer due to missing source files # if err.returncode in (23, 24): msg = 'rsync reports files partially copied' if self.log: self.log.warn(msg) print >> sys.stderr, 'warning:', msg else: raise def mount(self): subprocess.check_call('sync') if not os.path.exists(self.mpoint): os.makedirs(self.mpoint) if self.log: self.log.debug("mounting {0}".format(self.mpoint)) subprocess.check_call(['mount', '-o', 'loop', self.image, self.mpoint]) def unmount(self): subprocess.check_call('sync') if self.log: self.log.debug("unmounting {0}".format(self.mpoint)) subprocess.check_call(['umount', '-d', self.mpoint]) if os.path.exists(self.mpoint): os.rmdir(self.mpoint) def __enter__(self): self.mount() return self # noinspection PyUnusedLocal def __exit__(self, exc_type, exc_value, traceback): self.unmount() class ImageCreator(object): def __init__(self, log=None, **kwargs): # # Assign settings for image creation # self.log = log self.filesystem = {} self.volume = kwargs.get('volume') self.fstab = kwargs.get('fstab') self.generate_fstab = kwargs.get('generate_fstab', False) self.excludes = kwargs.get('exclude', []) self.includes = kwargs.get('include', []) self.bundle_all_dirs = kwargs.get('bundle_all_dirs', False) self.prefix = kwargs.get('prefix') self.filter = kwargs.get('filter', True) self.size = kwargs.get('size') self.destination = kwargs.get('destination') or mkdtemp(prefix='image-') self.image = os.path.join(self.destination, '{0}.img'.format(self.prefix)) # # Validate settings # if not self.volume: raise ValueError("must supply a source volume.") self.volume = sanitize_path(self.volume) if not self.size: raise ValueError("must supply a size for the generated image.") if not self.prefix: raise ValueError("must supply a prefix.") if not self.volume: raise ValueError("must supply a volume.") if not (os.path.exists(self.destination) or os.path.isdir(self.destination)): raise ValueError("'{0}' is not a directory or does not exist." .format(self.destination)) def run(self): """ Prepare a disk image """ print >> sys.stderr, "Creating image...", self._create_raw_diskimage() self._populate_filesystem_info() self._make_filesystem(**self.filesystem) print >> sys.stderr, " done" # # Inside the VolumeSync context we will mount our image # as a loop device. If for any reason a failure occurs # the device will automatically be unmounted and cleaned up. # print >> sys.stderr, "Syncing volume contents...", with VolumeSync(self.volume, self.image, log=self.log) as volsync: if self.fstab: volsync.install_fstab_from_file(self.fstab) elif self.generate_fstab: volsync.generate_fstab() if self.filter: volsync.filter_files() if self.bundle_all_dirs: volsync.bundle_all() volsync.exclude(self.excludes) volsync.include(self.includes) volsync.run() print >> sys.stderr, " done" return self.image def _create_raw_diskimage(self): """Create a sparse raw image file.""" subprocess.check_call(['dd', 'if=/dev/zero', 'of={0}'.format(self.image), 'count=1', 'bs=1M', 'seek={0}'.format(self.size - 1)]) def _populate_filesystem_info(self): """Create a temporary device node for the volume we're going to copy. We'll use it to get information about the source volume's filesystem. """ st_dev = os.stat(self.volume).st_dev devid = os.makedev(os.major(st_dev), os.minor(st_dev)) directory = mkdtemp(prefix='devnode-') devnode = os.path.join(directory, 'rootdev') os.mknod(devnode, 0o400 | stat.S_IFBLK, devid) try: for tag in BLKID_TAGS: try: out = subprocess.Popen(['blkid', '-s', tag, '-ovalue', devnode], stdout=subprocess.PIPE ).communicate()[0] self.filesystem[BLKID_TAGS[tag]] = out.rstrip() except subprocess.CalledProcessError: pass finally: os.remove(devnode) os.rmdir(directory) def _make_filesystem(self, fstype='ext3', uuid=None, label=None): """Format our raw image. :param fstype: (optional) Filesystem type, one of ext3, ext4, xfs, btrfs. :param uuid: (optional) UUID of the filesystem. :param label: (optional) Label of the filesystem. """ mkfs_cmd = 'mkfs.{0}'.format(fstype) tunefs = None if fstype.startswith('ext'): mkfs = [mkfs_cmd, '-F', self.image] if uuid: tunefs = ['tune2fs', '-U', uuid, self.image] elif fstype == 'xfs': mkfs = [mkfs_cmd, self.image] tunefs = ['xfs_admin', '-U', uuid, self.image] elif fstype == 'btrfs': mkfs = [mkfs_cmd, self.image] if uuid: raise Exception("btrfs with uuid not supported") else: raise Exception("unsupported fs {0}".format(fstype)) if label: mkfs.extend(['-L', label]) subprocess.check_call(mkfs) if tunefs: subprocess.check_call(tunefs) def _generate_fstab_content(arch=platform.machine()): """Generate an fstab file based on the system's architecture. Returns the fstab file contents as a string. :param arch: (optional) The architecture to use when creating the fstab file. It will default to the architecture of the currently running system. If the system is 'i386' then the legacy fstab configuration will be used, and if the system is 'x86_64' then the new fstab configuration will be used. """ if arch in FSTAB_BODY_TEMPLATE: return "\n".join([FSTAB_HEADER_TEMPLATE.format( time.strftime(FSTAB_TIME_FORMAT)), FSTAB_BODY_TEMPLATE.get(arch)]) else: raise Exception("platform architecture {0} not supported".format(arch)) euca2ools-3.0.2/euca2ools/commands/bundle/unbundle.py000066400000000000000000000110131222241730200225330ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands import Euca2ools from euca2ools.commands.bundle.bundle import Bundle import os.path from requestbuilder import Arg from requestbuilder.command import BaseCommand from requestbuilder.exceptions import ArgumentError from requestbuilder.mixins import FileTransferProgressBarMixin from requestbuilder.util import set_userregion class Unbundle(BaseCommand, FileTransferProgressBarMixin): DESCRIPTION = ('Recreate an image from its bundled parts\n\nThe key used ' 'to unbundle the image must match the certificate that was ' 'used to bundle it.') SUITE = Euca2ools ARGS = [Arg('-m', '--manifest', metavar='FILE', required=True, help="the bundle's manifest file (required)"), Arg('-k', '--privatekey', metavar='FILE', help='''file containing the private key to decrypt the bundle with. This must match the certificate used when bundling the image.'''), Arg('-d', '--destination', metavar='DIR', default='.', help='''where to place the unbundled image (default: current directory)'''), Arg('-s', '--source', metavar='DIR', default='.', help='''directory containing the bundled image parts (default: current directory)'''), Arg('--region', dest='userregion', metavar='USER@REGION', help='''use encryption keys specified for a user and/or region in configuration files''')] # noinspection PyExceptionInherit def configure(self): BaseCommand.configure(self) set_userregion(self.config, self.args.get('userregion')) set_userregion(self.config, os.getenv('EUCA_REGION')) if not self.args.get('privatekey'): config_privatekey = self.config.get_user_option('private-key') if self.args.get('userregion'): self.args['privatekey'] = config_privatekey elif 'EC2_PRIVATE_KEY' in os.environ: self.args['privatekey'] = os.getenv('EC2_PRIVATE_KEY') elif config_privatekey: self.args['privatekey'] = config_privatekey else: raise ArgumentError( 'missing private key; please supply one with -k') self.args['privatekey'] = os.path.expanduser(os.path.expandvars( self.args['privatekey'])) if not os.path.exists(self.args['privatekey']): raise ArgumentError("private key file '{0}' does not exist" .format(self.args['privatekey'])) if not os.path.isfile(self.args['privatekey']): raise ArgumentError("private key file '{0}' is not a file" .format(self.args['privatekey'])) def main(self): bundle = Bundle.create_from_manifest( self.args['manifest'], partdir=self.args['source'], privkey_filename=self.args['privatekey']) pbar = self.get_progressbar(maxval=bundle.bundled_size) return bundle.extract_image(self.args['destination'], progressbar=pbar) def print_result(self, result): print 'Wrote', result euca2ools-3.0.2/euca2ools/commands/bundle/uploadbundle.py000066400000000000000000000135351222241730200234100ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.walrus import WalrusRequest from euca2ools.commands.walrus.checkbucket import CheckBucket from euca2ools.commands.walrus.createbucket import CreateBucket from euca2ools.commands.walrus.putobject import PutObject from euca2ools.exceptions import AWSError import lxml.etree import lxml.objectify import os.path from requestbuilder import Arg from requestbuilder.mixins import FileTransferProgressBarMixin class UploadBundle(WalrusRequest, FileTransferProgressBarMixin): DESCRIPTION = 'Upload a bundle prepared by euca-bundle-image to the cloud' ARGS = [Arg('-b', '--bucket', metavar='BUCKET[/PREFIX]', required=True, help='bucket to upload the bundle to (required)'), Arg('-m', '--manifest', metavar='FILE', required=True, help='manifest for the bundle to upload (required)'), Arg('--acl', default='aws-exec-read', choices=('public-read', 'aws-exec-read', 'ec2-bundle-read'), help='''canned ACL policy to apply to the bundle (default: aws-exec-read)'''), Arg('-d', '--directory', metavar='DIR', help='''directory that contains the bundle parts (default: directory that contains the manifest)'''), Arg('--part', metavar='INT', type=int, default=0, help='''begin uploading with a specific part number (default: 0)'''), Arg('--location', help='''location constraint of the destination bucket (default: inferred from s3-location-constraint in configuration, or otherwise none)'''), Arg('--retry', dest='retries', action='store_const', const=5, default=1, help='retry failed uploads up to 5 times'), Arg('--skipmanifest', action='store_true', help='do not upload the manifest')] def main(self): (bucket, __, prefix) = self.args['bucket'].partition('/') if prefix and not prefix.endswith('/'): prefix += '/' full_prefix = bucket + '/' + prefix # First make sure the bucket exists try: req = CheckBucket(bucket=bucket, service=self.service, config=self.config) req.main() except AWSError as err: if err.status_code == 404: # No such bucket self.log.info("creating bucket '%s'", bucket) req = CreateBucket(bucket=bucket, location=self.args.get('location'), config=self.config, service=self.service) req.main() else: raise # At this point we know we can at least see the bucket, but it's still # possible that we can't write to it with the desired key names. So # many policies are in play here that it isn't worth trying to be # proactive about it. with open(self.args['manifest']) as manifest_file: # noinspection PyUnresolvedReferences manifest = lxml.objectify.parse(manifest_file).getroot() # Now we actually upload stuff part_dir = (self.args.get('directory') or os.path.dirname(self.args['manifest'])) parts = {} for part in manifest.image.parts.part: parts[int(part.get('index'))] = part.filename.text part_paths = [os.path.join(part_dir, path) for (index, path) in sorted(parts.items()) if index >= self.args.get('part', 0)] req = PutObject(sources=part_paths, dest=full_prefix, acl=self.args['acl'], retries=self.args.get('retries', 1), show_progress=self.args.get('show_progress', False), config=self.config, service=self.service) req.main() if not self.args.get('skipmanifest', False): req = PutObject(sources=[self.args['manifest']], dest=full_prefix, acl=self.args['acl'], retries=self.args.get('retries', 1), show_progress=self.args.get('show_progress', False), config=self.config, service=self.service) req.main() manifest_loc = full_prefix + os.path.basename(self.args['manifest']) return manifest_loc def print_result(self, manifest_loc): print 'Uploaded', manifest_loc euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/000077500000000000000000000000001222241730200232235ustar00rootroot00000000000000euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/__init__.py000066400000000000000000000054021222241730200253350ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands import Euca2ools from euca2ools.exceptions import AWSError from requestbuilder import Arg, MutuallyExclusiveArgList import requestbuilder.auth import requestbuilder.service import requestbuilder.request class ELB(requestbuilder.service.BaseService): NAME = 'elasticloadbalancing' DESCRIPTION = 'Load balancing service' API_VERSION = '2012-06-01' AUTH_CLASS = requestbuilder.auth.QuerySigV2Auth REGION_ENVVAR = 'EUCA_REGION' URL_ENVVAR = 'AWS_ELB_URL' ARGS = [MutuallyExclusiveArgList( Arg('--region', dest='userregion', metavar='USER@REGION', help='''name of the region and/or user in config files to use to connect to the service'''), Arg('-U', '--url', metavar='URL', help='load balancing service endpoint URL'))] def handle_http_error(self, response): raise AWSError(response) class ELBRequest(requestbuilder.request.AWSQueryRequest): SUITE = Euca2ools SERVICE_CLASS = ELB METHOD = 'POST' def parse_response(self, response): response_dict = requestbuilder.request.AWSQueryRequest.parse_response( self, response) useful_keys = list(filter(lambda x: x != 'ResponseMetadata', response_dict.keys())) if len(useful_keys) == 1: return response_dict[useful_keys[0]] or {} else: return response_dict euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/applysecuritygroupstoloadbalancer.py000066400000000000000000000045331222241730200326520ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin class ApplySecurityGroupsToLoadBalancer(ELBRequest, TabifyingMixin): DESCRIPTION = ('[VPC only] Associate one or more security groups with a ' 'load balancer. All previous associations with security ' 'groups will be replaced.') ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('-g', '--security-groups', dest='SecurityGroups.member', metavar='GROUP1,GROUP2,...', type=delimited_list(','), required=True, help='''security groups to associate the load balancer with (required)''')] LIST_TAGS = ['SecurityGroups'] def print_result(self, result): print self.tabify(('SECURITY_GROUPS', ', '.join(result.get('SecurityGroups', [])))) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/argtypes.py000066400000000000000000000111631222241730200254350ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse def listener(listener_str): pairs = {} for pair_str in listener_str.strip().split(','): if pair_str: try: key, val = pair_str.split('=') except ValueError: raise argparse.ArgumentTypeError( "listener '{0}': element '{1}' must have format KEY=VALUE" .format(listener_str, pair_str)) pairs[key.strip()] = val.strip() extra_keys = (set(pairs.keys()) - set(('protocol', 'lb-port', 'instance-port', 'instance-protocol', 'cert-id'))) if len(extra_keys) > 0: raise argparse.ArgumentTypeError( "listener '{0}': invalid element(s): {1}".format(listener_str, ', '.join("'{0}'".format(key) for key in extra_keys))) listener_dict = {} if 'protocol' in pairs: if pairs['protocol'] in ('HTTP', 'HTTPS', 'SSL', 'TCP'): listener_dict['Protocol'] = pairs['protocol'] else: raise argparse.ArgumentTypeError( "listener '{0}': protocol '{1}' is invalid (choose from " "'HTTP', 'HTTPS', 'SSL', 'TCP')" .format(listener_str, pairs['protocol'])) else: raise argparse.ArgumentTypeError( "listener '{0}': protocol is required".format(listener_str)) if 'lb-port' in pairs: try: listener_dict['LoadBalancerPort'] = int(pairs['lb-port']) except ValueError: raise argparse.ArgumentTypeError( "listener '{0}': lb-port must be an integer" .format(listener_str)) else: raise argparse.ArgumentTypeError( "listener '{0}': lb-port is required".format(listener_str)) if 'instance-port' in pairs: try: listener_dict['InstancePort'] = int(pairs['instance-port']) except ValueError: raise argparse.ArgumentTypeError( "listener '{0}': instance-port must be an integer" .format(listener_str)) else: raise argparse.ArgumentTypeError( "listener '{0}': instance-port is required".format(listener_str)) if 'instance-protocol' in pairs: if pairs['instance-protocol'] in ('HTTP', 'HTTPS'): if pairs['protocol'] not in ('HTTP', 'HTTPS'): raise argparse.ArgumentTypeError( "listener '{0}': instance-protocol must be 'HTTP' or " "'HTTPS' when protocol is 'HTTP' or 'HTTPS'" .format(listener_str)) elif pairs['instance-protocol'] in ('SSL', 'TCP'): if pairs['protocol'] not in ('SSL', 'TCP'): raise argparse.ArgumentTypeError( "listener '{0}': instance-protocol must be 'SSL' or " "'TCP' when protocol is 'SSL' or 'TCP'" .format(listener_str)) else: raise argparse.ArgumentTypeError( "listener '{0}': instance-protocol '{1}' is invalid (choose " "from 'HTTP', 'HTTPS', 'SSL', 'TCP')" .format(listener_str, pairs['instance-protocol'])) listener_dict['InstanceProtocol'] = pairs['instance-protocol'] if 'cert-id' in pairs: listener_dict['SSLCertificateId'] = pairs['cert-id'] return listener_dict euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/attachloadbalancertosubnets.py000066400000000000000000000042211222241730200313370ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin class AttachLoadBalancerToSubnets(ELBRequest, TabifyingMixin): DESCRIPTION = '[VPC only] Add a load balancer to one or more subnets' ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('-s', '--subnets', dest='Subnets.member', required=True, metavar='SUBNET1,SUBNET2,...', type=delimited_list(','), help='''IDs of the subnets to add the load balancer to (required)''')] LIST_TAGS = ['Subnets'] def print_result(self, result): print self.tabify(('SUBNETS', ', '.join(result.get('Subnets', [])))) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/configurehealthcheck.py000066400000000000000000000074221222241730200277470ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError from requestbuilder.mixins import TabifyingMixin class ConfigureHealthCheck(ELBRequest, TabifyingMixin): DESCRIPTION = ('Configure health checking for instance registerd with a ' 'load balancer') ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('--healthy-threshold', dest='HealthCheck.HealthyThreshold', metavar='COUNT', type=int, required=True, help='''number of consecutive successful health checks that will mark instances as Healthy (required)'''), Arg('--interval', dest='HealthCheck.Interval', metavar='SECONDS', type=int, required=True, help='approximate interval between health checks (required)'), Arg('-t', '--target', dest='HealthCheck.Target', metavar='PROTOCOL:PORT[/PATH]', required=True, help='connection target for health checks (required)'), Arg('--timeout', dest='HealthCheck.Timeout', metavar='SECONDS', type=int, required=True, help='maximum health check duration (required)'), Arg('--unhealthy-threshold', dest='HealthCheck.UnhealthyThreshold', metavar='COUNT', type=int, required=True, help='''number of consecutive failed health checks that will mark instances as Unhealthy (required)''')] # noinspection PyExceptionInherit def configure(self): ELBRequest.configure(self) target = self.args['HealthCheck.Target'] protocol, __, rest = target.partition(':') if not rest: raise ArgumentError('argument -t/--target: must have form ' 'PROTOCOL:PORT[/PATH]') if protocol.lower() in ('http', 'https') and '/' not in rest: raise ArgumentError('argument -t/--target: path is required for ' "protocol '{0}'".format(protocol)) def print_result(self, result): check = result.get('HealthCheck', {}) print self.tabify(('HEALTH_CHECK', check.get('Target'), check.get('Interval'), check.get('Timeout'), check.get('HealthyThreshold'), check.get('UnhealthyThreshold'))) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/createappcookiestickinesspolicy.py000066400000000000000000000045611222241730200322610ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg class CreateAppCookieStickinessPolicy(ELBRequest): DESCRIPTION = ('Create a new stickiness policy for a load balancer, ' 'whereby the server application generates a cookie and ' 'adds it to its responses. The load balancer will then ' 'use this cookie to route requests from each user to the ' 'same back end instance. This type of policy can only be ' 'associated with HTTP or HTTPS listeners,') ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), # -c is for cookie. That's good enough for me. Arg('-c', '--cookie-name', dest='CookieName', required=True, help='name of the cookie used for stickiness (required)'), Arg('-p', '--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the new policy (required)')] euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/createlbcookiestickinesspolicy.py000066400000000000000000000045601222241730200320750ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg class CreateLBCookieStickinessPolicy(ELBRequest): DESCRIPTION = ('Create a new stickiness policy for a load balancer, ' 'whereby the load balancer automatically generates cookies ' 'that it uses to route requests from each user to the same ' 'back end instance. This type of policy can only be ' 'associated with HTTP or HTTPS listeners.') ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('-e', '--expiration-period', dest='CookieExpirationPeriod', metavar='SECONDS', type=int, required=True, help='''time period after which cookies should be considered stale (default: user's session length) (required)'''), Arg('-p', '--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the new policy (required)')] euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/createloadbalancer.py000066400000000000000000000077121222241730200273770ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from euca2ools.commands.elasticloadbalancing.argtypes import listener from requestbuilder import Arg, MutuallyExclusiveArgList from requestbuilder.mixins import TabifyingMixin class CreateLoadBalancer(ELBRequest, TabifyingMixin): DESCRIPTION = ('Create a load balancer\n\nAfter the load balancer is ' 'created, instances must be registered with it separately.') ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the new load balancer (required)'), MutuallyExclusiveArgList(True, Arg('-s', '--subnets', metavar='SUBNET1,SUBNET2,...', dest='Subnets.member', type=delimited_list(','), help='''[VPC only] subnets the load balancer should run in (required)'''), Arg('-z', '--availability-zones', metavar='ZONE1,ZONE2,...', dest='AvailabilityZones.member', type=delimited_list(','), help='''[Non-VPC only] availability zones the load balancer should run in (required)''')), Arg('-l', '--listener', dest='Listeners.member', action='append', metavar=('"lb-port=PORT, protocol={HTTP,HTTPS,SSL,TCP}, ' 'instance-port=PORT, instance-protocol={HTTP,HTTPS,' 'SSL,TCP}, cert-id=ARN"'), required=True, type=listener, help='''port/protocol settings for the load balancer, where lb-port is the external port number, protocol is the external protocol, instance-port is the back end server port number, instance-protocol is the protocol to use for routing traffic to back end instances, and cert-id is the ARN of the server certificate to use for encrypted connections. lb-port, protocol, and instance-port are required. This option may be used multiple times. (at least 1 required)'''), Arg('-i', '--scheme', dest='Scheme', choices=('internal',), metavar='internal', help='''[VPC only] "internal" to make the new load balancer private to a VPC'''), Arg('-g', '--security-groups', dest='SecurityGroups.member', metavar='GROUP1,GROUP2,...', type=delimited_list(','), help='''[VPC only] IDs of the security groups to assign to the new load balancer''')] def print_result(self, result): print self.tabify(('DNS_NAME', result.get('DNSName'))) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/createloadbalancerlisteners.py000066400000000000000000000051551222241730200313270ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.elasticloadbalancing import ELBRequest from euca2ools.commands.elasticloadbalancing.argtypes import listener from requestbuilder import Arg class CreateLoadBalancerListeners(ELBRequest): DESCRIPTION = 'Add one or more listeners to a load balancer' ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('-l', '--listener', dest='Listeners.member', action='append', metavar=('"lb-port=PORT, protocol={HTTP,HTTPS,SSL,TCP}, ' 'instance-port=PORT, instance-protocol={HTTP,HTTPS,' 'SSL,TCP}, cert-id=ARN"'), required=True, type=listener, help='''port/protocol settings for the load balancer, where lb-port is the external port number, protocol is the external protocol, instance-port is the back end server port number, instance-protocol is the protocol to use for routing traffic to back end instances, and cert-id is the ARN of the server certificate to use for encrypted connections. lb-port, protocol, and instance-port are required. This option may be used multiple times. (at least 1 required)''')] euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/createloadbalancerpolicy.py000066400000000000000000000063501222241730200306140ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg def attribute(attr_as_str): attr = {} for pair in attr_as_str.split(','): key, __, val = pair.partition('=') if key.strip() == 'name': attr['AttributeName'] = val.strip() elif key.strip() == 'value': attr['AttributeValue'] = val.strip() else: raise argparse.ArgumentTypeError( "attribute '{0}': '{1}' is not a valid part of an attribute " "(choose from " "'name', 'value')".format(attr_as_str, key.strip())) if 'AttributeName' not in attr: raise argparse.ArgumentTypeError( "attribute '{0}': name is required".format(attr_as_str)) if 'AttributeValue' not in attr: raise argparse.ArgumentTypeError( "attribute '{0}': value is required".format(attr_as_str)) return attr class CreateLoadBalancerPolicy(ELBRequest): DESCRIPTION = 'Add a new policy to a load balancer' ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the new policy (required)'), Arg('--policy-type', dest='PolicyTypeName', metavar='POLTYPE', required=True, help='''type of the new policy. For a list of policy types, use eulb-describe-lb-policy-types. (required)'''), Arg('-a', '--attribute', dest='PolicyAttributes.member', action='append', metavar='"name=NAME, value=VALUE"', type=attribute, help='''name and value for each attribute associated with the new policy. Use this option multiple times to supply multiple attributes.''')] euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/deleteloadbalancer.py000066400000000000000000000035241222241730200273730ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg class DeleteLoadBalancer(ELBRequest): DESCRIPTION = ('Delete a load balancer\n\nIf the load balancer does not ' 'exist, this command still succeeds.') ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to delete (required)'), Arg('--force', action='store_true', route_to=None, help=argparse.SUPPRESS)] # for compatibility euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/deleteloadbalancerlisteners.py000066400000000000000000000043331222241730200313230ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg class DeleteLoadBalancerListeners(ELBRequest): DESCRIPTION = ('Delete one or more listeners from a load balancer\n\nIf ' 'a listener named with -l/--lb-ports does not exist, this ' 'command still succeeds.') ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('-l', '--lb-ports', dest='LoadBalancerPorts.member', metavar='PORT1,PORT2,...', required=True, type=delimited_list(',', item_type=int), help='port numbers of the listeners to remove (required)'), Arg('--force', action='store_true', route_to=None, help=argparse.SUPPRESS)] # for compatibility euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/deleteloadbalancerpolicy.py000066400000000000000000000034321222241730200306110ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg class DeleteLoadBalancerPolicy(ELBRequest): DESCRIPTION = 'Delete a policy from a load balancer' ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('-p', '--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the policy to delete (required)')] euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/deregisterinstancesfromloadbalancer.py000066400000000000000000000044761222241730200330710ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin def instance_id(inst_as_str): return {'InstanceId': inst_as_str} class DeregisterInstancesFromLoadBalancer(ELBRequest, TabifyingMixin): DESCRIPTION = 'Remove one or more instances from a load balancer' ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('--instances', dest='Instances.member', required=True, metavar='INSTANCE1,INSTANCE2,...', type=delimited_list(',', item_type=instance_id), help='''IDs of the instances to remove from the load balancer (required)''')] LIST_TAGS = ['Instances'] def print_result(self, result): for instance in result.get('Instances', []): print self.tabify(('INSTANCE', instance.get('InstanceId'))) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/describeinstancehealth.py000066400000000000000000000051601222241730200302720ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin def instance_id(inst_as_str): return {'InstanceId': inst_as_str} class DescribeInstanceHealth(ELBRequest, TabifyingMixin): DESCRIPTION = 'Show the state of instances registered with a load balancer' ARGS = [Arg('LoadBalancerName', metavar='ELB', help='''name of the load balancer to describe instances for (required)'''), Arg('--instances', dest='Instances.member', metavar='INSTANCE1,INSTANCE2,...', type=delimited_list(',', item_type=instance_id), help='limit results to specific instances'), Arg('--show-long', action='store_true', route_to=None, help="show all of the instances' info")] LIST_TAGS = ['InstanceStates'] def print_result(self, result): for instance in result.get('InstanceStates', []): bits = ['INSTANCE', instance.get('InstanceId'), instance.get('State')] if self.args['show_long']: bits.append(instance.get('Description')) bits.append(instance.get('ReasonCode')) print self.tabify(bits) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/describeloadbalancerpolicies.py000066400000000000000000000056221222241730200314420ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin class DescribeLoadBalancerPolicies(ELBRequest, TabifyingMixin): DESCRIPTION = 'Show information about load balancer policies' ARGS = [Arg('LoadBalancerName', metavar='ELB', nargs='?', help='''show policies associated with a specific load balancer (default: only describe sample policies provided by the service)'''), Arg('-p', '--policy-names', dest='PolicyNames.member', metavar='POLICY1,POLICY2,...', type=delimited_list(','), help='limit results to specific policies'), Arg('--show-long', action='store_true', route_to=None, help="show all of the policies' info")] LIST_TAGS = ['PolicyDescriptions', 'PolicyAttributeDescriptions'] def print_result(self, result): for policy in result.get('PolicyDescriptions', []): bits = ['POLICY', policy.get('PolicyName'), policy.get('PolicyTypeName')] if self.args['show_long']: attrs = [] for attr in policy.get('PolicyAttributeDescriptions', []): attrs.append('{{name={0},value={1}}}'.format( attr.get('AttributeName'), attr.get('AttributeValue'))) if len(attrs) > 0: bits.append(','.join(attrs)) else: bits.append(None) print self.tabify(bits) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/describeloadbalancerpolicytypes.py000066400000000000000000000057001222241730200322140ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin class DescribeLoadBalancerPolicyTypes(ELBRequest, TabifyingMixin): DESCRIPTION = 'Show information about load balancer policy types' ARGS = [Arg('PolicyTypeNames.member', metavar='POLTYPE', nargs='*', help='limit results to specific policy types'), Arg('--show-long', action='store_true', route_to=None, help="show all of the policy types' info")] LIST_TAGS = ['PolicyTypeDescriptions', 'PolicyAttributeTypeDescriptions'] def print_result(self, result): for poltype in result.get('PolicyTypeDescriptions', []): bits = ['POLICY_TYPE', poltype.get('PolicyTypeName'), poltype.get('Description')] if self.args['show_long']: attrs = [] for attr in poltype.get('PolicyAttributeTypeDescriptions', []): elem_map = (('name', 'AttributeName'), ('description', 'Description'), ('type', 'AttributeType'), ('default-value', 'DefaultValue'), ('cardinality', 'Cardinality')) attr_bits = [] for name, xmlname in elem_map: attr_bits.append('='.join((name, attr.get(xmlname) or ''))) attrs.append('{' + ','.join(attr_bits) + '}') bits.append(','.join(attrs)) print self.tabify(bits) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/describeloadbalancers.py000066400000000000000000000163531222241730200301000ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin class DescribeLoadBalancers(ELBRequest, TabifyingMixin): DESCRIPTION = 'Show information about load balancers' ARGS = [Arg('LoadBalancerNames.member', metavar='ELB', nargs='*', help='limit results to specific load balancers'), Arg('--show-long', action='store_true', route_to=None, help="show all of the load balancers' info")] LIST_TAGS = ['LoadBalancerDescriptions', 'AvailabilityZones', 'BackendServerDescriptions', 'Instances', 'ListenerDescriptions', 'PolicyNames', 'AppCookieStickinessPolicies', 'LBCookieStickinessPolicies', 'OtherPolicies', 'SecurityGroups', 'Subnets'] def print_result(self, result): for desc in result.get('LoadBalancerDescriptions', []): bits = ['LOAD_BALANCER', desc.get('LoadBalancerName'), desc.get('DNSName')] if self.args['show_long']: bits.append(desc.get('CanonicalHostedZoneName')) bits.append(desc.get('CanonicalHostedZoneNameID')) check = desc.get('HealthCheck') if check is not None: check_str_bits = [] elem_map = (('interval', 'Interval'), ('target', 'Target'), ('timeout', 'Timeout'), ('healthy-threshold', 'HealthyThreshold'), ('unhealthy-threshold', 'UnhealthyThreshold')) for name, xmlname in elem_map: if check.get(xmlname): check_str_bits.append(name + '=' + check[xmlname]) if len(check_str_bits) > 0: bits.append('{' + ','.join(check_str_bits) + '}') else: bits.append(None) else: bits.append(None) bits.append(','.join(zone for zone in desc.get('AvailabilityZones', []))) bits.append(','.join(net for net in desc.get('Subnets', []))) bits.append(desc.get('VPCId')) bits.append(','.join(instance.get('InstanceId') for instance in desc.get('Instances', []))) listeners = [] for listenerdesc in desc.get('ListenerDescriptions', []): listener = listenerdesc.get('Listener', {}) listener_str_bits = [] elem_map = (('protocol', 'Protocol'), ('lb-port', 'LoadBalancerPort'), ('instance-protocol', 'InstanceProtocol'), ('instance-port', 'InstancePort'), ('cert-id', 'SSLCertificateId')) for name, xmlname in elem_map: if listener.get(xmlname): listener_str_bits.append(name + '=' + listener[xmlname]) if listenerdesc.get('PolicyNames'): listener_str_bits.append( '{' + ','.join(listenerdesc['PolicyNames']) + '}') listeners.append('{' + ','.join(listener_str_bits) + '}') if len(listeners) > 0: bits.append(','.join(listeners)) else: bits.append(None) beservers = [] for bedesc in desc.get('BackendServerDescriptions', []): beserver_str_bits = [] if 'InstancePort' in bedesc: beserver_str_bits.append('instance-port=' + bedesc['InstancePort']) if 'PolicyNames' in bedesc: policies = ','.join(policy for policy in bedesc['PolicyNames']) beserver_str_bits.append('policies={' + policies + '}') beservers.append('{' + ','.join(beserver_str_bits) + '}') if len(beservers) > 0: bits.append(','.join(beservers)) else: bits.append(None) for poltype in ('AppCookieStickinessPolicies', 'LBCookieStickinessPolicies'): policies = desc.get('Policies', {}).get(poltype) if policies: policy_strs = ('{{policy-name={0},cookie-name={1}}}' .format(policy['PolicyName'], policy['CookieName']) for policy in policies) bits.append(','.join(policy_strs)) else: bits.append(None) otherpolicies = desc.get('Policies', {}).get('OtherPolicies') if otherpolicies: bits.append('{' + ','.join(otherpolicies) + '}') else: bits.append(None) group = desc.get('SourceSecurityGroup') if group: bits.append('{{owner-alias={0},group-name={1}}}'.format( group.get('OwnerAlias', ''), group.get('GroupName', ''))) else: bits.append(None) if desc.get('SecurityGroups'): bits.append('{' + ','.join(desc['SecurityGroups']) + '}') else: bits.append(None) bits.append(desc.get('CreatedTime')) bits.append(desc.get('Scheme')) print self.tabify(bits) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/detachloadbalancerfromsubnets.py000066400000000000000000000042341222241730200316500ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin class DetachLoadBalancerFromSubnets(ELBRequest, TabifyingMixin): DESCRIPTION = '[VPC only] Remove a load balancer from one or more subnets' ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('-s', '--subnets', dest='Subnets.member', required=True, metavar='SUBNET1,SUBNET2,...', type=delimited_list(','), help='''IDs of the subnets to remove the load balancer from (required)''')] LIST_TAGS = ['Subnets'] def print_result(self, result): print self.tabify(('SUBNETS', ','.join(result.get('Subnets', [])))) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/disableavailabilityzonesforloadbalancer.py000066400000000000000000000043621222241730200337160ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin class DisableAvailabilityZonesForLoadBalancer(ELBRequest, TabifyingMixin): DESCRIPTION = 'Remove a load balancer from one or more availability zones' ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('-z', '--availability-zones', dest='AvailabilityZones.member', metavar='ZONE1,ZONE2,...', type=delimited_list(','), required=True, help='''availability zones to remove the load balancer from (required)''')] LIST_TAGS = ['AvailabilityZones'] def print_result(self, result): print self.tabify(('AVAILABILITY_ZONES', ', '.join(result.get('AvailabilityZones', [])))) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/enableavailabilityzonesforloadbalancer.py000066400000000000000000000043471222241730200335440ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin class EnableAvailabilityZonesForLoadBalancer(ELBRequest, TabifyingMixin): DESCRIPTION = 'Add a load balancer to one or more availability zones' ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('-z', '--availability-zones', dest='AvailabilityZones.member', metavar='ZONE1,ZONE2,...', type=delimited_list(','), required=True, help='''availability zones to add the load balancer to (required)''')] LIST_TAGS = ['AvailabilityZones'] def print_result(self, result): print self.tabify(('AVAILABILITY_ZONES', ', '.join(result.get('AvailabilityZones', [])))) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/registerinstanceswithloadbalancer.py000066400000000000000000000044711222241730200325630ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin def instance_id(inst_as_str): return {'InstanceId': inst_as_str} class RegisterInstancesWithLoadBalancer(ELBRequest, TabifyingMixin): DESCRIPTION = 'Add one or more instances to a load balancer' ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('--instances', dest='Instances.member', required=True, metavar='INSTANCE1,INSTANCE2,...', type=delimited_list(',', item_type=instance_id), help='''IDs of the instances to register with the load balancer (required)''')] LIST_TAGS = ['Instances'] def print_result(self, result): for instance in result.get('Instances', []): print self.tabify(('INSTANCE', instance.get('InstanceId'))) euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/setloadbalancerlistenersslcertificate.py000066400000000000000000000041031222241730200334110ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg class SetLoadBalancerListenerSSLCertificate(ELBRequest): DESCRIPTION = ("Change the certificate that terminates a load balancer's" "listener's SSL connections") ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('-l', '--lb-port', dest='LoadBalancerPort', metavar='PORT', type=int, required=True, help='port that should use the certificate (required)'), Arg('-c', '--cert-id', dest='SSLCertificateId', metavar='ARN', required=True, help='ARN for the server certificate to use (required)')] euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/setloadbalancerpoliciesforbackendserver.py000066400000000000000000000043321222241730200337200ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg class SetLoadBalancerPoliciesForBackendServer(ELBRequest): DESCRIPTION = ('Change the policies associated with a port on which load-' 'balanced back end servers listen.') ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('-i', '--instance-port', dest='InstancePort', metavar='PORT', type=int, required=True, help='port number of the back end server (required)'), Arg('-p', '--policy-names', dest='PolicyNames.member', metavar='POLICY1,POLICY2,...', type=delimited_list(','), required=True, help='''list of policies to associate with the back end server (required)''')] euca2ools-3.0.2/euca2ools/commands/elasticloadbalancing/setloadbalancerpoliciesoflistener.py000066400000000000000000000042171222241730200325470ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.elasticloadbalancing import ELBRequest from requestbuilder import Arg class SetLoadBalancerPoliciesOfListener(ELBRequest): DESCRIPTION = 'Change the policy associated with a load balancer listener' ARGS = [Arg('LoadBalancerName', metavar='ELB', help='name of the load balancer to modify (required)'), Arg('-l', '--lb-port', dest='LoadBalancerPort', metavar='PORT', type=int, required=True, help='port of the listener to modify (required)'), Arg('-p', '--policy-names', dest='PolicyNames.member', metavar='POLICY1,POLICY2,...', type=delimited_list(','), required=True, help='''list of policies to associate with the listener (required)''')] euca2ools-3.0.2/euca2ools/commands/euare/000077500000000000000000000000001222241730200202015ustar00rootroot00000000000000euca2ools-3.0.2/euca2ools/commands/euare/__init__.py000066400000000000000000000073301222241730200223150ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse import sys from euca2ools.commands import Euca2ools from euca2ools.exceptions import AWSError from requestbuilder import Arg, MutuallyExclusiveArgList import requestbuilder.auth import requestbuilder.request import requestbuilder.service class Euare(requestbuilder.service.BaseService): NAME = 'iam' DESCRIPTION = 'Eucalyptus User, Authorization and Reporting Environment' API_VERSION = '2010-05-08' AUTH_CLASS = requestbuilder.auth.QuerySigV2Auth REGION_ENVVAR = 'EUCA_REGION' URL_ENVVAR = 'EUARE_URL' ARGS = [MutuallyExclusiveArgList( Arg('--region', dest='userregion', metavar='USER@REGION', help='''name of the region and/or user in config files to use to connect to the service'''), Arg('-U', '--url', metavar='URL', help='identity service endpoint URL'))] def handle_http_error(self, response): raise AWSError(response) class EuareRequest(requestbuilder.request.AWSQueryRequest): SUITE = Euca2ools SERVICE_CLASS = Euare METHOD = 'POST' def configure(self): requestbuilder.request.AWSQueryRequest.configure(self) if self.args.get('deprecated_delegate'): # Use it and complain self.params['DelegateAccount'] = self.args['deprecated_delegate'] msg = 'argument --delegate is deprecated; use --as-account instead' self.log.warn(msg) print >> sys.stderr, 'warning:', msg def parse_response(self, response): response_dict = requestbuilder.request.AWSQueryRequest.parse_response( self, response) # EUARE responses enclose their useful data inside FooResponse # elements. If that's all we have after stripping out ResponseMetadata # then just return its contents. useful_keys = list(filter(lambda x: x != 'ResponseMetadata', response_dict.keys())) if len(useful_keys) == 1: return response_dict[useful_keys[0]] or {} else: return response_dict AS_ACCOUNT = [Arg('--as-account', dest='DelegateAccount', metavar='ACCOUNT', help='''[Eucalyptus cloud admin only] run this command as the administrator of another account'''), Arg('--delegate', dest='deprecated_delegate', route_to=None, help=argparse.SUPPRESS)] euca2ools-3.0.2/euca2ools/commands/euare/addgrouppolicy.py000066400000000000000000000064771222241730200236160ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import datetime from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from euca2ools.commands.euare.putgrouppolicy import PutGroupPolicy import json from requestbuilder import Arg class AddGroupPolicy(EuareRequest): DESCRIPTION = ('Add a new policy to a group. To add more complex policies ' 'than this tool supports, see euare-groupuploadpolicy.') ARGS = [Arg('-g', '--group-name', metavar='GROUP', required=True, help='group to attach the policy to (required)'), Arg('-p', '--policy-name', metavar='POLICY', required=True, help='name of the new policy (required)'), Arg('-e', '--effect', choices=('Allow', 'Deny'), required=True, help='whether the new policy should Allow or Deny (required)'), Arg('-a', '--action', required=True, help='action the policy should apply to (required)'), Arg('-r', '--resource', required=True, help='resource the policy should apply to (required)'), Arg('-o', '--output', action='store_true', help='display the newly-created policy'), AS_ACCOUNT] def build_policy(self): stmt = {'Sid': datetime.datetime.utcnow().strftime('%Y%m%d%H%M%S%f'), 'Effect': self.args['effect'], 'Action': self.args['action'], 'Resource': self.args['resource']} return {'Statement': [stmt]} def main(self): policy_doc = json.dumps(self.build_policy()) req = PutGroupPolicy( config=self.config, service=self.service, GroupName=self.args['group_name'], PolicyName=self.args['policy_name'], PolicyDocument=policy_doc, DelegateAccount=self.params['DelegateAccount']) response = req.main() response['PolicyDocument'] = policy_doc return response def print_result(self, result): if self.args['output']: print result['PolicyDocument'] euca2ools-3.0.2/euca2ools/commands/euare/adduserpolicy.py000066400000000000000000000064501222241730200234270ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import datetime from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from euca2ools.commands.euare.putuserpolicy import PutUserPolicy import json from requestbuilder import Arg class AddUserPolicy(EuareRequest): DESCRIPTION = ('Add a new policy to a user. To add more complex policies ' 'than this tool supports, see euare-useruploadpolicy.') ARGS = [Arg('-u', '--user-name', metavar='USER', required=True, help='user to attach the policy to (required)'), Arg('-p', '--policy-name', metavar='POLICY', required=True, help='name of the new policy (required)'), Arg('-e', '--effect', choices=('Allow', 'Deny'), required=True, help='whether the new policy should Allow or Deny (required)'), Arg('-a', '--action', required=True, help='action the policy should apply to (required)'), Arg('-r', '--resource', required=True, help='resource the policy should apply to (required)'), Arg('-o', '--output', action='store_true', help='display the newly-created policy'), AS_ACCOUNT] def build_policy(self): stmt = {'Sid': datetime.datetime.utcnow().strftime('%Y%m%d%H%M%S%f'), 'Effect': self.args['effect'], 'Action': self.args['action'], 'Resource': self.args['resource']} return {'Statement': [stmt]} def main(self): policy_doc = json.dumps(self.build_policy()) req = PutUserPolicy( config=self.config, service=self.service, UserName=self.args['user_name'], PolicyName=self.args['policy_name'], PolicyDocument=policy_doc, DelegateAccount=self.params['DelegateAccount']) response = req.main() response['PolicyDocument'] = policy_doc return response def print_result(self, result): if self.args['output']: print result['PolicyDocument'] euca2ools-3.0.2/euca2ools/commands/euare/addusertogroup.py000066400000000000000000000033531222241730200236260ustar00rootroot00000000000000# Copyright 2009-2012 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class AddUserToGroup(EuareRequest): DESCRIPTION = 'Add a user to a group' ARGS = [Arg('-g', '--group-name', dest='GroupName', required=True, help='group to add the user to'), Arg('-u', '--user-name', dest='UserName', required=True, help='user to add'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/createaccesskey.py000066400000000000000000000034541222241730200237170ustar00rootroot00000000000000# Copyright 2009-2012 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class CreateAccessKey(EuareRequest): DESCRIPTION = 'Create a new access key for a user' ARGS = [Arg('-u', '--user-name', dest='UserName', help='''user the new key will belong to (default: calling user)'''), AS_ACCOUNT] def print_result(self, result): print result['AccessKey']['AccessKeyId'] print result['AccessKey']['SecretAccessKey'] euca2ools-3.0.2/euca2ools/commands/euare/createaccount.py000066400000000000000000000036271222241730200234030ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin class CreateAccount(EuareRequest, TabifyingMixin): DESCRIPTION = '[Eucalyptus cloud admin only] Create a new account' ARGS = [Arg('-a', '--account-name', dest='AccountName', metavar='ACCOUNT', required=True, help='name of the account to create (required)')] def print_result(self, result): print self.tabify((result.get('Account', {}).get('AccountName'), result.get('Account', {}).get('AccountId'))) euca2ools-3.0.2/euca2ools/commands/euare/createaccountalias.py000066400000000000000000000033131222241730200244050ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class CreateAccountAlias(EuareRequest): DESCRIPTION = 'Create an alias for an account, a.k.a. an account name' ARGS = [Arg('-a', '--account-alias', dest='AccountAlias', metavar='ALIAS', required=True, help='name of the alias to create (required)'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/creategroup.py000066400000000000000000000040371222241730200230770ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class CreateGroup(EuareRequest): DESCRIPTION = 'Create a new group' ARGS = [Arg('-g', '--group-name', dest='GroupName', metavar='GROUP', required=True, help='name of the new group (required)'), Arg('-p', '--path', dest='Path', help='path for the new group (default: "/")'), Arg('-v', '--verbose', action='store_true', route_to=None, help="print the new group's ARN and GUID"), AS_ACCOUNT] def print_result(self, result): if self.args['verbose']: print result['Group']['Arn'] print result['Group']['GroupId'] euca2ools-3.0.2/euca2ools/commands/euare/createloginprofile.py000066400000000000000000000042401222241730200244300ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from euca2ools.util import prompt_for_password from requestbuilder import Arg class CreateLoginProfile(EuareRequest): DESCRIPTION = 'Create a password for the specified user' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='name of the user to create a password for (required)'), Arg('-p', '--password', dest='Password', help='''the new password. If unspecified, the new password will be read from the console.'''), AS_ACCOUNT] def configure(self): EuareRequest.configure(self) if self.args['Password'] is None: self.log.info('no password supplied; prompting') self.params['Password'] = prompt_for_password() euca2ools-3.0.2/euca2ools/commands/euare/createsigningcertificate.py000066400000000000000000000052631222241730200256060ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT import os from requestbuilder import Arg class CreateSigningCertificate(EuareRequest): DESCRIPTION = '[Eucalyptus only] Create a new signing certificate' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='user to create the signing certificate for (required)'), Arg('--out', metavar='FILE', route_to=None, help='file to write the certificate to (default: stdout)'), Arg('--keyout', metavar='FILE', route_to=None, help='file to write the private key to (default: stdout)'), AS_ACCOUNT] def postprocess(self, result): if self.args['out']: with open(self.args['out'], 'w') as certfile: certfile.write(result['Certificate']['CertificateBody']) if self.args['keyout']: old_umask = os.umask(0o077) with open(self.args['keyout'], 'w') as keyfile: keyfile.write(result['Certificate']['PrivateKey']) os.umask(old_umask) def print_result(self, result): print result['Certificate']['CertificateId'] if not self.args['out']: print result['Certificate']['CertificateBody'] if not self.args['keyout']: print result['Certificate']['PrivateKey'] euca2ools-3.0.2/euca2ools/commands/euare/createuser.py000066400000000000000000000065201222241730200227200ustar00rootroot00000000000000# Copyright 2009-2012 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from euca2ools.commands.euare.addusertogroup import AddUserToGroup from euca2ools.commands.euare.createaccesskey import CreateAccessKey from requestbuilder import Arg class CreateUser(EuareRequest): DESCRIPTION = ('Create a new user and optionally add the user to a group ' 'or generate an access key for the user') ARGS = [Arg('-u', '--user-name', dest='UserName', required=True, help='name of the new user'), Arg('-p', '--path', dest='Path', help='path for the new user (default: "/")'), Arg('-g', '--group-name', route_to=None, help='add the new user to a group'), Arg('-k', '--create-accesskey', action='store_true', route_to=None, help='''create an access key for the new user and print it to standard out'''), Arg('-v', '--verbose', action='store_true', route_to=None, help="print the new user's ARN and GUID"), AS_ACCOUNT] def postprocess(self, result): if self.args.get('group_name'): obj = AddUserToGroup( config=self.config, service=self.service, UserName=self.args['UserName'], GroupName=self.args['group_name'], DelegateAccount=self.params['DelegateAccount']) obj.main() if self.args.get('create_accesskey'): obj = CreateAccessKey( config=self.config, service=self.service, UserName=self.args['UserName'], DelegateAccount=self.params['DelegateAccount']) key_result = obj.main() result.update(key_result) def print_result(self, result): if self.args['verbose']: print result['User']['Arn'] print result['User']['UserId'] if 'AccessKey' in result: print result['AccessKey']['AccessKeyId'] print result['AccessKey']['SecretAccessKey'] euca2ools-3.0.2/euca2ools/commands/euare/deactivatemfadevice.py000066400000000000000000000036311222241730200245330ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class DeactivateMFADevice(EuareRequest): DESCRIPTION = 'Deactivate an MFA device' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='user whose MFA device to deactivate (required)'), Arg('-s', '--serial-number', dest='SerialNumber', metavar='SERIAL', required=True, help='''serial number of the MFA device to deactivate (required)'''), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/deleteaccesskey.py000066400000000000000000000035111222241730200237100ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class DeleteAccessKey(EuareRequest): DESCRIPTION = 'Delete an access key' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='user whose key to delete (required)'), Arg('-k', '--user-key-id', dest='AccessKeyId', metavar='KEY_ID', required=True, help='ID of the access key to delete (required)'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/deleteaccount.py000066400000000000000000000036061222241730200233770ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest from requestbuilder import Arg class DeleteAccount(EuareRequest): DESCRIPTION = '[Eucalyptus cloud admin only] Delete an account' ARGS = [Arg('-a', '--account-name', dest='AccountName', metavar='ACCOUNT', required=True, help='name of the account to delete (required)'), Arg('-r', '--recursive', dest='Recursive', action='store_const', const='true', help='''delete all users, groups, and policies associated with the account as well''')] euca2ools-3.0.2/euca2ools/commands/euare/deleteaccountalias.py000066400000000000000000000033071222241730200244070ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class DeleteAccountAlias(EuareRequest): DESCRIPTION = "Delete an account's alias, a.k.a. its account name" ARGS = [Arg('-a', '--account-alias', dest='AccountAlias', metavar='ALIAS', required=True, help='name of the alias to delete (required)'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/deleteaccountpolicy.py000066400000000000000000000035711222241730200246200ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest from requestbuilder import Arg class DeleteAccountPolicy(EuareRequest): DESCRIPTION = ('[Eucalyptus cloud admin only] Remove a policy from an ' 'account') ARGS = [Arg('-a', '--account-name', dest='AccountName', metavar='ACCOUNT', required=True, help='account the policy is attached to (required)'), Arg('-p', '--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the policy to delete (required)')] euca2ools-3.0.2/euca2ools/commands/euare/deletegroup.py000066400000000000000000000106251222241730200230760ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from euca2ools.commands.euare.deletegrouppolicy import DeleteGroupPolicy from euca2ools.commands.euare.getgroup import GetGroup from euca2ools.commands.euare.listgrouppolicies import ListGroupPolicies from euca2ools.commands.euare.removeuserfromgroup import RemoveUserFromGroup from requestbuilder import Arg class DeleteGroup(EuareRequest): DESCRIPTION = 'Delete a group' ARGS = [Arg('-g', '--group-name', dest='GroupName', metavar='GROUP', required=True, help='name of the group to delete (required)'), Arg('-r', '--recursive', action='store_true', route_to=None, help='''remove all user memberships and policies associated with the group first'''), Arg('-R', '--recursive-euca', dest='IsRecursive', action='store_const', const='true', help=argparse.SUPPRESS), Arg('-p', '--pretend', action='store_true', route_to=None, help='''list the user memberships and policies that would be deleted instead of actually deleting them. Implies -r.'''), AS_ACCOUNT] def main(self): if self.args['recursive'] or self.args['pretend']: # Figure out what we'd have to delete req = GetGroup(config=self.config, service=self.service, GroupName=self.args['GroupName'], DelegateAccount=self.params['DelegateAccount']) members = req.main().get('Users', []) req = ListGroupPolicies( config=self.config, service=self.service, GroupName=self.args['GroupName'], DelegateAccount=self.params['DelegateAccount']) policies = req.main().get('PolicyNames', []) else: # Just in case members = [] policies = [] if self.args['pretend']: return {'members': [member['Arn'] for member in members], 'policies': policies} else: if self.args['recursive']: member_names = [member['UserName'] for member in members] req = RemoveUserFromGroup( config=self.config, service=self.service, GroupName=self.args['GroupName'], user_names=member_names, DelegateAccount=self.params['DelegateAccount']) req.main() for policy in policies: req = DeleteGroupPolicy( config=self.config, service=self.service, GroupName=self.args['GroupName'], PolicyName=policy, DelegateAccount=self.params['DelegateAccount']) req.main() return self.send() def print_result(self, result): if self.args['pretend']: print 'users' for arn in result['members']: print '\t' + arn print 'policies' for policy in result['policies']: print '\t' + policy euca2ools-3.0.2/euca2ools/commands/euare/deletegrouppolicy.py000066400000000000000000000035321222241730200243150ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class DeleteGroupPolicy(EuareRequest): DESCRIPTION = 'Remove a policy from a group' ARGS = [Arg('-g', '--group-name', dest='GroupName', metavar='GROUP', required=True, help='group the policy is attached to (required)'), Arg('-p', '--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the policy to delete (required)'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/deleteloginprofile.py000066400000000000000000000033161222241730200244320ustar00rootroot00000000000000# Copyright 2009-2012 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class DeleteLoginProfile(EuareRequest): DESCRIPTION = "Delete a user's password" ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='''name of the user whose password should be deleted (required)'''), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/deleteservercertificate.py000066400000000000000000000033441222241730200254530ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class DeleteServerCertificate(EuareRequest): DESCRIPTION = 'Delete a server certificate' ARGS = [Arg('-s', '--server-certificate-name', dest='ServerCertificateName', metavar='CERT', required=True, help='name of the server certificate to delete (required)'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/deletesigningcertificate.py000066400000000000000000000036051222241730200256030ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class DeleteSigningCertificate(EuareRequest): DESCRIPTION = 'Delete a signing certificate' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='user the signing certificate belongs to (required)'), Arg('-c', '--certificate-id', dest='CertificateId', metavar='CERT', required=True, help='ID of the signing certificate to delete (required)'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/deleteuser.py000066400000000000000000000166661222241730200227330ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from euca2ools.commands.euare.deleteaccesskey import DeleteAccessKey from euca2ools.commands.euare.deleteloginprofile import DeleteLoginProfile from euca2ools.commands.euare.deletesigningcertificate import \ DeleteSigningCertificate from euca2ools.commands.euare.deleteuserpolicy import DeleteUserPolicy from euca2ools.commands.euare.getloginprofile import GetLoginProfile from euca2ools.commands.euare.listaccesskeys import ListAccessKeys from euca2ools.commands.euare.listgroupsforuser import ListGroupsForUser from euca2ools.commands.euare.listsigningcertificates import \ ListSigningCertificates from euca2ools.commands.euare.listuserpolicies import ListUserPolicies from euca2ools.commands.euare.removeuserfromgroup import RemoveUserFromGroup from euca2ools.exceptions import AWSError from requestbuilder import Arg class DeleteUser(EuareRequest): DESCRIPTION = 'Delete a user' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='name of the user to delete (required)'), Arg('-r', '--recursive', action='store_true', route_to=None, help='remove all IAM resources associated with the user first'), Arg('-R', '--recursive-euca', dest='IsRecursive', action='store_const', const='true', help=argparse.SUPPRESS), Arg('-p', '--pretend', action='store_true', route_to=None, help='''list the resources that would be deleted instead of actually deleting them. Implies -r.'''), AS_ACCOUNT] def main(self): if self.args['recursive'] or self.args['pretend']: # Figure out what we'd have to delete req = ListAccessKeys( config=self.config, service=self.service, UserName=self.args['UserName'], DelegateAccount=self.params['DelegateAccount']) keys = req.main().get('AccessKeyMetadata', []) req = ListUserPolicies( config=self.config, service=self.service, UserName=self.args['UserName'], DelegateAccount=self.params['DelegateAccount']) policies = req.main().get('PolicyNames', []) req = ListSigningCertificates( config=self.config, service=self.service, UserName=self.args['UserName'], DelegateAccount=self.params['DelegateAccount']) certs = req.main().get('Certificates', []) req = ListGroupsForUser( config=self.config, service=self.service, UserName=self.args['UserName'], DelegateAccount=self.params['DelegateAccount']) groups = req.main().get('Groups', []) req = GetLoginProfile( config=self.config, service=self.service, UserName=self.args['UserName'], DelegateAccount=self.params['DelegateAccount']) try: # This will raise an exception if no login profile is found. req.main() has_login_profile = True except AWSError as err: if err.code == 'NoSuchEntity': # It doesn't exist has_login_profile = False else: # Something else went wrong; not our problem raise else: # Just in case keys = [] policies = [] certs = [] groups = [] has_login_profile = False if self.args['pretend']: return {'keys': keys, 'policies': policies, 'certificates': certs, 'groups': groups, 'has_login_profile': has_login_profile} else: if self.args['recursive']: for key in keys: req = DeleteAccessKey( config=self.config, service=self.service, UserName=self.args['UserName'], AccessKeyId=key['AccessKeyId'], DelegateAccount=self.params['DelegateAccount']) req.send() for policy in policies: req = DeleteUserPolicy( config=self.config, service=self.service, UserName=self.args['UserName'], PolicyName=policy, DelegateAccount=self.params['DelegateAccount']) req.send() for cert in certs: req = DeleteSigningCertificate( config=self.config, service=self.service, UserName=self.args['UserName'], CertificateId=cert['CertificateId'], DelegateAccount=self.params['DelegateAccount']) req.send() for group in groups: req = RemoveUserFromGroup( config=self.config, service=self.service, user_names=[self.args['UserName']], GroupName=group['GroupName'], DelegateAccount=self.params['DelegateAccount']) req.send() if has_login_profile: req = DeleteLoginProfile( config=self.config, service=self.service, UserName=self.args['UserName'], DelegateAccount=self.params['DelegateAccount']) req.send() return self.send() def print_result(self, result): if self.args['pretend']: print 'accesskeys' for key in result['keys']: print '\t' + key['AccessKeyId'] print 'policies' for policy in result['policies']: print '\t' + policy print 'certificates' for cert in result['certificates']: print '\t' + cert['CertificateId'] print 'groups' for group in result['groups']: print '\t' + group['Arn'] euca2ools-3.0.2/euca2ools/commands/euare/deleteuserpolicy.py000066400000000000000000000035241222241730200241400ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class DeleteUserPolicy(EuareRequest): DESCRIPTION = 'Remove a policy from a user' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='user the policy is attached to (required)'), Arg('-p', '--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the policy to delete (required)'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/enablemfadevice.py000066400000000000000000000044401222241730200236470ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class EnableMFADevice(EuareRequest): DESCRIPTION = 'Enable an MFA device' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='user to enable the MFA device for (required)'), Arg('-s', '--serial-number', dest='SerialNumber', metavar='SERIAL', required=True, help='serial number of the MFA device to activate (required)'), Arg('-c1', dest='AuthenticationCode1', metavar='CODE', required=True, help='''an authentication code emitted by the MFA device (required)'''), Arg('-c2', dest='AuthenticationCode2', metavar='CODE', required=True, help='''a subsequent authentication code emitted by the MFA device (required)'''), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/getaccountpolicy.py000066400000000000000000000043701222241730200241330ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest import json from requestbuilder import Arg import urllib class GetAccountPolicy(EuareRequest): DESCRIPTION = "Display an account's policy" ARGS = [Arg('-a', '--account-name', dest='AccountName', metavar='ACCOUNT', required=True, help='account the policy is attached to (required)'), Arg('-p', '--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the policy to show (required)'), Arg('--pretty-print', action='store_true', route_to=None, help='reformat the policy for easier reading')] def print_result(self, result): policy_content = urllib.unquote(result['PolicyDocument']) if self.args['pretty_print']: policy_json = json.loads(policy_content) policy_content = json.dumps(policy_json, indent=4) print policy_content euca2ools-3.0.2/euca2ools/commands/euare/getaccountsummary.py000066400000000000000000000034051222241730200243270ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT class GetAccountSummary(EuareRequest): DESCRIPTION = ('Display account-level information about account entity ' 'usage and IAM quotas') PARAMS = [AS_ACCOUNT] LIST_TAGS = ['SummaryMap'] def print_result(self, result): for entry in sorted(result.get('SummaryMap', [])): print '{0}: {1}'.format(entry.get('key'), entry.get('value')) euca2ools-3.0.2/euca2ools/commands/euare/getgroup.py000066400000000000000000000043531222241730200224140ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg from requestbuilder.response import PaginatedResponse class GetGroup(EuareRequest): DESCRIPTION = 'List all the users in a group' ARGS = [Arg('-g', '--group-name', dest='GroupName', metavar='GROUP', required=True, help='name of the group to show info about'), AS_ACCOUNT] LIST_TAGS = ['Users'] def main(self): return PaginatedResponse(self, (None,), ('Users',)) def prepare_for_page(self, page): # Pages are defined by markers self.params['Marker'] = page def get_next_page(self, response): if response.get('IsTruncated') == 'true': return response['Marker'] def print_result(self, result): print result['Group']['Arn'] print ' ', 'users' for user in result.get('Users', []): print ' ', user['Arn'] euca2ools-3.0.2/euca2ools/commands/euare/getgrouppolicy.py000066400000000000000000000044171222241730200236350ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg import json import urllib class GetGroupPolicy(EuareRequest): DESCRIPTION = "Display a group's policy" ARGS = [Arg('-g', '--group-name', dest='GroupName', metavar='GROUP', required=True, help='group the policy is attached to (required)'), Arg('-p', '--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the policy to show (required)'), Arg('--pretty-print', action='store_true', route_to=None, help='reformat the policy for easier reading'), AS_ACCOUNT] def print_result(self, result): policy_content = urllib.unquote(result['PolicyDocument']) if self.args['pretty_print']: policy_json = json.loads(policy_content) policy_content = json.dumps(policy_json, indent=4) print policy_content euca2ools-3.0.2/euca2ools/commands/euare/getldapsyncstatus.py000066400000000000000000000034041222241730200243350ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest from requestbuilder.mixins import TabifyingMixin class GetLdapSyncStatus(EuareRequest, TabifyingMixin): DESCRIPTION = ("[Eucalyptus cloud admin only] Show the status of the " "cloud's LDAP synchronization") def print_result(self, result): print self.tabify(('SyncEnabled', result.get('SyncEnabled'))) print self.tabify(('InSync', result.get('InSync'))) euca2ools-3.0.2/euca2ools/commands/euare/getloginprofile.py000066400000000000000000000046111222241730200237460ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class GetLoginProfile(EuareRequest): DESCRIPTION = 'Verify that a user has a password' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='user whose password to verify (required)'), Arg('--verbose', action='store_true', route_to=None, help="print extra info about the user's password"), AS_ACCOUNT] def print_result(self, result): # If we've managed to get to this point, we already know the user has # a login profile. user_name = result['LoginProfile'].get('UserName') print 'Login Profile Exists for User', user_name if self.args['verbose']: create_date = result['LoginProfile'].get('CreateDate') if create_date: print 'Creation date:', create_date must_change = result['LoginProfile'].get('MustChangePassword') if must_change: print 'Must change password:', must_change euca2ools-3.0.2/euca2ools/commands/euare/getservercertificate.py000066400000000000000000000037651222241730200247770ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class GetServerCertificate(EuareRequest): DESCRIPTION = 'Show the ARN and GUID of a server certificate' ARGS = [Arg('-s', '--server-certificate-name', dest='ServerCertificateName', metavar='CERT', required=True, help='''name of the server certificate to retrieve info about (required)'''), AS_ACCOUNT] def print_result(self, result): metadata = result.get('ServerCertificate', {}) \ .get('ServerCertificateMetadata', {}) print metadata.get('Arn') print metadata.get('ServerCertificateId') euca2ools-3.0.2/euca2ools/commands/euare/getuser.py000066400000000000000000000042201222241730200222270ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class GetUser(EuareRequest): DESCRIPTION = "Display a user's ARN and GUID" ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', help='''name of the user to show info about (default: current user)'''), Arg('--show-extra', dest='ShowExtra', action='store_const', const='true', help='also display additional user info'), AS_ACCOUNT] def print_result(self, result): print result['User']['Arn'] print result['User']['UserId'] if self.args['ShowExtra'] == 'true': for attr in ('CreateDate', 'Enabled', 'RegStatus', 'PasswordExpiration'): print result['User'].get(attr, '') euca2ools-3.0.2/euca2ools/commands/euare/getuserinfo.py000066400000000000000000000040671222241730200231140ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin class GetUserInfo(EuareRequest, TabifyingMixin): DESCRIPTION = '[Eucalyptus only] Display information about a user' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', help='''name of the user to display info for (default: current user)'''), Arg('-k', '--info-key', dest='InfoKey', help='name of the piece of user info to show'), AS_ACCOUNT] LIST_TAGS = ['Infos'] def print_result(self, result): for info in result.get('Infos', []): print self.tabify((info.get('Key'), info.get('Value'))) euca2ools-3.0.2/euca2ools/commands/euare/getuserpolicy.py000066400000000000000000000044111222241730200234510ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT import json from requestbuilder import Arg import urllib class GetUserPolicy(EuareRequest): DESCRIPTION = "Display a user's policy" ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='user the poilcy is attached to (required)'), Arg('-p', '--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the policy to show (required)'), Arg('--pretty-print', action='store_true', route_to=None, help='reformat the policy for easier reading'), AS_ACCOUNT] def print_result(self, result): policy_content = urllib.unquote(result['PolicyDocument']) if self.args['pretty_print']: policy_json = json.loads(policy_content) policy_content = json.dumps(policy_json, indent=4) print policy_content euca2ools-3.0.2/euca2ools/commands/euare/listaccesskeys.py000066400000000000000000000044011222241730200236030ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg from requestbuilder.response import PaginatedResponse class ListAccessKeys(EuareRequest): DESCRIPTION = "List a user's access keys" ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', help='user to list keys for (default: current user)'), AS_ACCOUNT] LIST_TAGS = ['AccessKeyMetadata'] def main(self): return PaginatedResponse(self, (None,), ('AccessKeyMetadata',)) def prepare_for_page(self, page): # Pages are defined by markers self.params['Marker'] = page def get_next_page(self, response): if response.get('IsTruncated') == 'true': return response['Marker'] def print_result(self, result): for accesskey in result.get('AccessKeyMetadata', []): print accesskey.get('AccessKeyId') print accesskey.get('Status') euca2ools-3.0.2/euca2ools/commands/euare/listaccountaliases.py000066400000000000000000000035251222241730200244520ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT class ListAccountAliases(EuareRequest): DESCRIPTION = "List your account's aliases" ARGS = [AS_ACCOUNT] LIST_TAGS = ['AccountAliases'] def print_result(self, result): # These are technically allowed to paginate, but I haven't seen # accounts with lots of aliases in the wild yet. If that starts # happening, feel free to implement it. for alias in result.get('AccountAliases', []): print 'Alias:', alias euca2ools-3.0.2/euca2ools/commands/euare/listaccountpolicies.py000066400000000000000000000073241222241730200246410ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest from euca2ools.commands.euare.getaccountpolicy import GetAccountPolicy from requestbuilder import Arg from requestbuilder.response import PaginatedResponse class ListAccountPolicies(EuareRequest): DESCRIPTION = ('[Eucalyptus only] List one specific policy or all ' 'policies attached to an account. If no policies are ' 'attached to the account, the action still succeeds.') ARGS = [Arg('-a', '--account-name', dest='AccountName', metavar='ACCOUNT', required=True, help='account owning the policies to list'), Arg('-p', '--policy-name', metavar='POLICY', route_to=None, help='display a specific policy'), Arg('-v', '--verbose', action='store_true', route_to=None, help='''display the contents of the resulting policies (in addition to their names)'''), Arg('--pretty-print', action='store_true', route_to=None, help='''when printing the contents of policies, reformat them for easier reading''')] LIST_TAGS = ['PolicyNames'] def main(self): return PaginatedResponse(self, (None,), ('PolicyNames',)) def prepare_for_page(self, page): # Pages are defined by markers self.params['Marker'] = page def get_next_page(self, response): if response.get('IsTruncated') == 'true': return response['Marker'] def print_result(self, result): if self.args.get('policy_name'): # Look for the specific policy the user asked for for policy_name in result.get('PolicyNames', []): if policy_name == self.args['policy_name']: if self.args['verbose']: self.print_policy(policy_name) else: print policy_name break else: for policy_name in result.get('PolicyNames', []): print policy_name if self.args['verbose']: self.print_policy(policy_name) def print_policy(self, policy_name): req = GetAccountPolicy(service=self.service, AccountName=self.args['AccountName'], PolicyName=policy_name, pretty_print=self.args['pretty_print']) response = req.main() req.print_result(response) euca2ools-3.0.2/euca2ools/commands/euare/listaccounts.py000066400000000000000000000034571222241730200232770ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest from requestbuilder.mixins import TabifyingMixin class ListAccounts(EuareRequest, TabifyingMixin): DESCRIPTION = ("[Eucalyptus cloud admin only] List all of the cloud's " "accounts") LIST_TAGS = ['Accounts'] def print_result(self, result): for account in result.get('Accounts', []): print self.tabify((account.get('AccountName'), account.get('AccountId'))) euca2ools-3.0.2/euca2ools/commands/euare/listgrouppolicies.py000066400000000000000000000074601222241730200243420ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from euca2ools.commands.euare.getgrouppolicy import GetGroupPolicy from requestbuilder import Arg from requestbuilder.response import PaginatedResponse class ListGroupPolicies(EuareRequest): DESCRIPTION = ('List one specific policy or all policies attached to a ' 'group. If no policies are attached to the group, the ' 'command still succeeds.') ARGS = [Arg('-g', '--group-name', dest='GroupName', metavar='GROUP', required=True, help='group owning the policies to list'), Arg('-p', '--policy-name', metavar='POLICY', route_to=None, help='display a specific policy'), Arg('-v', '--verbose', action='store_true', route_to=None, help='''display the contents of the resulting policies (in addition to their names)'''), Arg('--pretty-print', action='store_true', route_to=None, help='''when printing the contents of policies, reformat them for easier reading'''), AS_ACCOUNT] LIST_TAGS = ['PolicyNames'] def main(self): return PaginatedResponse(self, (None,), ('PolicyNames',)) def prepare_for_page(self, page): # Pages are defined by markers self.params['Marker'] = page def get_next_page(self, response): if response.get('IsTruncated') == 'true': return response['Marker'] def print_result(self, result): if self.args.get('policy_name'): # Look for the specific policy the user asked for for policy_name in result.get('PolicyNames', []): if policy_name == self.args['policy_name']: if self.args['verbose']: self.print_policy(policy_name) else: print policy_name break else: for policy_name in result.get('PolicyNames', []): print policy_name if self.args['verbose']: self.print_policy(policy_name) def print_policy(self, policy_name): req = GetGroupPolicy( config=self.config, service=self.service, GroupName=self.args['GroupName'], PolicyName=policy_name, pretty_print=self.args['pretty_print'], DelegateAccount=self.params.get('DelegateAccount')) response = req.main() req.print_result(response) euca2ools-3.0.2/euca2ools/commands/euare/listgroups.py000066400000000000000000000043521222241730200227720ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg from requestbuilder.response import PaginatedResponse class ListGroups(EuareRequest): DESCRIPTION = "List your account's groups" ARGS = [Arg('-p', '--path-prefix', dest='PathPrefix', metavar='PATH', help='''restrict results to groups whose paths begin with a specific prefix'''), AS_ACCOUNT] LIST_TAGS = ['Groups'] def main(self): return PaginatedResponse(self, (None,), ('Groups',)) def prepare_for_page(self, page): # Pages are defined by markers self.params['Marker'] = page def get_next_page(self, response): if response.get('IsTruncated') == 'true': return response['Marker'] def print_result(self, result): print 'groups' for group in result.get('Groups', []): print ' ', group['Arn'] euca2ools-3.0.2/euca2ools/commands/euare/listgroupsforuser.py000066400000000000000000000042711222241730200244000ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg from requestbuilder.response import PaginatedResponse class ListGroupsForUser(EuareRequest): DESCRIPTION = 'List all groups a user is a member of' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='user to list membership for (required)'), AS_ACCOUNT] LIST_TAGS = ['Groups'] def main(self): return PaginatedResponse(self, (None,), ('Groups',)) def prepare_for_page(self, page): # Pages are defined by markers self.params['Marker'] = page def get_next_page(self, response): if response.get('IsTruncated') == 'true': return response['Marker'] def print_result(self, result): for group in result.get('Groups', []): print group['Arn'] euca2ools-3.0.2/euca2ools/commands/euare/listmfadevices.py000066400000000000000000000043001222241730200235520ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg from requestbuilder.response import PaginatedResponse class ListMFADevices(EuareRequest): DESCRIPTION = "List a user's MFA devices" ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', help='user to list MFA devices for (default: current user)'), AS_ACCOUNT] LIST_TAGS = ['MFADevices'] def main(self): return PaginatedResponse(self, (None,), ('MFADevices',)) def prepare_for_page(self, page): # Pages are defined by markers self.params['Marker'] = page def get_next_page(self, response): if response.get('IsTruncated') == 'true': return response['Marker'] def print_result(self, result): for device in result.get('MFADevices', []): print device['SerialNumber'] euca2ools-3.0.2/euca2ools/commands/euare/listservercertificates.py000066400000000000000000000045571222241730200253560ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg from requestbuilder.response import PaginatedResponse class ListServerCertificates(EuareRequest): DESCRIPTION = "List your account's server certificates" ARGS = [Arg('-p', '--path-prefix', dest='PathPrefix', metavar='PREFIX', help='''limit results to server certificates that begin with a given path'''), AS_ACCOUNT] LIST_TAGS = ['ServerCertificateMetadataList'] def main(self): return PaginatedResponse(self, (None,), ('ServerCertificateMetadataList',)) def prepare_for_page(self, page): # Pages are defined by markers self.params['Marker'] = page def get_next_page(self, response): if response.get('IsTruncated') == 'true': return response['Marker'] def print_result(self, result): for cert in result.get('ServerCertificateMetadataList', []): print cert['ServerCertificateMetadata']['Arn'] euca2ools-3.0.2/euca2ools/commands/euare/listsigningcertificates.py000066400000000000000000000047151222241730200255020ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg from requestbuilder.response import PaginatedResponse class ListSigningCertificates(EuareRequest): DESCRIPTION = "List a user's signing certificates" ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', help='user to list certificates for (default: current user)'), Arg('-v', '--verbose', action='store_true', route_to=None, help="also show certificates' contents"), AS_ACCOUNT] LIST_TAGS = ['Certificates'] def main(self): return PaginatedResponse(self, (None,), ('Certificates',)) def prepare_for_page(self, page): # Pages are defined by markers self.params['Marker'] = page def get_next_page(self, response): if response.get('IsTruncatated') == 'true': return response['Marker'] def print_result(self, result): for cert in result.get('Certificates', []): print cert['CertificateId'] if self.args['verbose']: print cert['CertificateBody'] print cert['Status'] euca2ools-3.0.2/euca2ools/commands/euare/listuserpolicies.py000066400000000000000000000075631222241730200241700ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from euca2ools.commands.euare.getuserpolicy import GetUserPolicy from requestbuilder import Arg from requestbuilder.response import PaginatedResponse class ListUserPolicies(EuareRequest): DESCRIPTION = ('List one specific policy or all policies attached to a ' 'user. If no policies are attached to the user, the ' 'action still succeeds.') ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='user owning the policies to list'), Arg('-p', '--policy-name', metavar='POLICY', route_to=None, help='display a specific policy'), Arg('-v', '--verbose', action='store_true', route_to=None, help='''display the contents of the resulting policies (in addition to their names)'''), Arg('--pretty-print', action='store_true', route_to=None, help='''when printing the contents of policies, reformat them for easier reading'''), AS_ACCOUNT] LIST_TAGS = ['PolicyNames'] def main(self): return PaginatedResponse(self, (None,), ('PolicyNames',)) def prepare_for_page(self, page): # Pages are defined by markers self.params['Marker'] = page def get_next_page(self, response): if response.get('IsTruncated') == 'true': return response['Marker'] def print_result(self, result): if self.args.get('policy_name'): # Look for the specific policy the user asked for for policy_name in result.get('PolicyNames', []): if policy_name == self.args['policy_name']: if self.args['verbose']: self.print_policy(policy_name) else: print policy_name break else: for policy_name in result.get('PolicyNames', []): print policy_name if self.args['verbose']: self.print_policy(policy_name) # We already take care of pagination print 'IsTruncated: false' def print_policy(self, policy_name): req = GetUserPolicy( config=self.config, service=self.service, UserName=self.args['UserName'], PolicyName=policy_name, pretty_print=self.args['pretty_print'], DelegateAccount=self.params.get('DelegateAccount')) response = req.main() req.print_result(response) euca2ools-3.0.2/euca2ools/commands/euare/listusers.py000066400000000000000000000042431222241730200226130ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg from requestbuilder.response import PaginatedResponse class ListUsers(EuareRequest): DESCRIPTION = "List your account's users" ARGS = [Arg('-p', '--path-prefix', dest='PathPrefix', metavar='PREFIX', help='limit results to users who begin with a given path'), AS_ACCOUNT] LIST_TAGS = ['Users'] def main(self): return PaginatedResponse(self, (None,), ('Users',)) def prepare_for_page(self, page): # Pages are defined by markers self.params['Marker'] = page def get_next_page(self, response): if response.get('IsTruncated') == 'true': return response['Marker'] def print_result(self, result): for user in result.get('Users', []): print user['Arn'] euca2ools-3.0.2/euca2ools/commands/euare/putaccountpolicy.py000066400000000000000000000043361222241730200241660ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest from requestbuilder import Arg, MutuallyExclusiveArgList class PutAccountPolicy(EuareRequest): DESCRIPTION = '[Eucalyptus cloud admin only] Attach a policy to an account' ARGS = [Arg('-a', '--account-name', dest='AccountName', metavar='ACCOUNT', required=True, help='account to attach the policy to (required)'), Arg('-p', '--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the policy (required)'), MutuallyExclusiveArgList(True, Arg('-o', '--policy-content', dest='PolicyDocument', metavar='POLICY_CONTENT', help='the policy to attach'), Arg('-f', '--policy-document', dest='PolicyDocument', metavar='FILE', type=open, help='file containing the policy to attach'))] euca2ools-3.0.2/euca2ools/commands/euare/putgrouppolicy.py000066400000000000000000000043071222241730200236640ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg, MutuallyExclusiveArgList class PutGroupPolicy(EuareRequest): DESCRIPTION = 'Attach a policy to a group' ARGS = [Arg('-g', '--group-name', dest='GroupName', metavar='GROUP', required=True, help='group to attach the policy to (required)'), Arg('-p', '--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the policy (required)'), MutuallyExclusiveArgList(True, Arg('-o', '--policy-content', dest='PolicyDocument', metavar='POLICY_CONTENT', help='the policy to attach'), Arg('-f', '--policy-document', dest='PolicyDocument', metavar='FILE', type=open, help='file containing the policy to attach')), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/putuserpolicy.py000066400000000000000000000043011222241730200235000ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg, MutuallyExclusiveArgList class PutUserPolicy(EuareRequest): DESCRIPTION = 'Attach a policy to a user' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='user to attach the policy to (required)'), Arg('-p', '--policy-name', dest='PolicyName', metavar='POLICY', required=True, help='name of the policy (required)'), MutuallyExclusiveArgList(True, Arg('-o', '--policy-content', dest='PolicyDocument', metavar='POLICY_CONTENT', help='the policy to attach'), Arg('-f', '--policy-document', dest='PolicyDocument', metavar='FILE', type=open, help='file containing the policy to attach')), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/removeuserfromgroup.py000066400000000000000000000042011222241730200247050ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class RemoveUserFromGroup(EuareRequest): DESCRIPTION = 'Remove a user from a group' ARGS = [Arg('-u', '--user-name', dest='user_names', metavar='USER', action='append', route_to=None, required=True, help='user to remove from the group (required)'), Arg('-g', '--group-name', dest='GroupName', metavar='GROUP', required=True, help='group to remove the user from (required)'), AS_ACCOUNT] def main(self): for user in self.args['user_names']: self.params['UserName'] = user self.send() # The response doesn't actually contain anything of interest, so don't # bother returning anything return None euca2ools-3.0.2/euca2ools/commands/euare/resyncmfadevice.py000066400000000000000000000044641222241730200237320ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class ResyncMFADevice(EuareRequest): DESCRIPTION = 'Re-synchronize an MFA device with the server' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='user to re-synchronize the MFA device for (required)'), Arg('-s', '--serial-number', dest='SerialNumber', metavar='SERIAL', required=True, help='serial number of the MFA device (required)'), Arg('-c1', dest='AuthenticationCode1', metavar='CODE', required=True, help='''an authentication code emitted by the MFA device (required)'''), Arg('-c2', dest='AuthenticationCode2', metavar='CODE', required=True, help='''a subsequent authentication code emitted by the MFA device (required)'''), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/updateaccesskey.py000066400000000000000000000041501222241730200237300ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class UpdateAccessKey(EuareRequest): DESCRIPTION = ('Change the status of an access key from Active to ' 'Inactive, or vice versa') ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', help='''user owning the access key to update (default: current user)'''), Arg('-k', '--user-key-id', dest='AccessKeyId', metavar='KEY_ID', required=True, help='ID of the access key to update (required)'), Arg('-s', '--status', dest='Status', required=True, choices=('Active', 'Inactive'), help='status to assign to the access key'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/updategroup.py000066400000000000000000000036271222241730200231220ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class UpdateGroup(EuareRequest): DESCRIPTION = 'Change the name and/or path of a group' ARGS = [Arg('-g', '--group-name', dest='GroupName', metavar='GROUP', required=True, help='name of the group to update'), Arg('-n', '--new-group-name', dest='NewGroupName', metavar='GROUP', help='new name for the group'), Arg('-p', '--new-path', dest='NewPath', metavar='PATH', help='new path for the group'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/updateloginprofile.py000066400000000000000000000042201222241730200244450ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from euca2ools.util import prompt_for_password from requestbuilder import Arg class UpdateLoginProfile(EuareRequest): DESCRIPTION = "Update a user's password" ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='name of the user to change a password for (required)'), Arg('-p', '--password', dest='Password', help='''the new password. If unspecified, the new password will be read from the console.'''), AS_ACCOUNT] def configure(self): EuareRequest.configure(self) if self.args['Password'] is None: self.log.info('no password supplied; prompting') self.params['Password'] = prompt_for_password() euca2ools-3.0.2/euca2ools/commands/euare/updateservercertificate.py000066400000000000000000000040471222241730200254740ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class UpdateServerCertificate(EuareRequest): DESCRIPTION = 'Change the name and/or path of a server certificate' ARGS = [Arg('-s', '--server-certificate-name', dest='ServerCertificateName', metavar='CERT', required=True, help='name of the server certificate to update'), Arg('-n', '--new-server-certificate-name', dest='NewServerCertificateName', metavar='CERT', help='new name for the server certificate'), Arg('-p', '--new-path', dest='NewPath', metavar='PATH', help='new path for the server certificate'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/updatesigningcertificate.py000066400000000000000000000041441222241730200256220ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class UpdateSigningCertificate(EuareRequest): DESCRIPTION = ('Change the status of a signing certificate from Active to ' 'Inactive, or vice versa') ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', help='''user owning the signing certificate to update (default: current user)'''), Arg('-c', '--certificate-id', dest='CertificateId', metavar='CERT', required=True, help='ID of the signing certificate to update'), Arg('-s', '--status', dest='Status', choices=('Active', 'Inactive'), required=True, help='status to assign to the certificate'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/updateuser.py000066400000000000000000000050331222241730200227350ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class UpdateUser(EuareRequest): DESCRIPTION = 'Change the name and/or path of a user' ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', required=True, help='name of the user to update'), Arg('-n', '--new-user-name', dest='NewUserName', metavar='USER', help='new name for the user'), Arg('-p', '--new-path', dest='NewPath', metavar='PATH', help='new path for the user'), Arg('--enabled', dest='Enabled', choices=('true', 'false'), help='''[Eucalyptus only] 'true' to enable the user, or 'false' to disable the user'''), Arg('--reg-status', dest='RegStatus', choices=('REGISTERED', 'APPROVED', 'CONFIRMED'), help='''[Eucalyptus only] new registration status. Only CONFIRMED users may access the system.'''), Arg('--pwd-expires', dest='PasswordExpiration', metavar='DATETIME', help='''[Eucalyptus only] New password expiration date, in ISO8601 format'''), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/updateuserinfo.py000066400000000000000000000037171222241730200236200ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg class UpdateUserInfo(EuareRequest): DESCRIPTION = "[Eucalyptus only] Update a user's information" ARGS = [Arg('-u', '--user-name', dest='UserName', metavar='USER', help='user to update (default: current user)'), Arg('-k', '--info-key', dest='InfoKey', metavar='KEY', required=True, help='name of the info field to set (required)'), Arg('-i', '--info-value', dest='InfoValue', metavar='VALUE', help='value to set the info field to (omit to delete it)'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/uploadservercertificate.py000066400000000000000000000062601222241730200254750ustar00rootroot00000000000000# Copyright 2009-2011 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg, MutuallyExclusiveArgList class UploadServerCertificate(EuareRequest): DESCRIPTION = 'Upload a server certificate' ARGS = [Arg('-s', '--server-certificate-name', dest='ServerCertificateName', metavar='CERTNAME', required=True, help='name to give the new server certificate (required)'), MutuallyExclusiveArgList(True, Arg('-c', '--certificate-body', dest='CertificateBody', metavar='CERT', help='PEM-encoded certificate'), Arg('--certificate-file', dest='CertificateBody', metavar='FILE', type=open, help='file containing the PEM-encoded certificate')), MutuallyExclusiveArgList(True, Arg('--private-key', dest='PrivateKey', metavar='KEY', help='PEM-encoded private key'), Arg('--private-key-file', dest='PrivateKey', metavar='FILE', type=open, help='file containing the PEM-encoded private key')), MutuallyExclusiveArgList(True, Arg('--certificate-chain', dest='CertificateChain', metavar='CHAIN', help='''PEM-encoded certificate chain. This is typically the PEM-encoded certificates of the chain, concatenated together.'''), Arg('--certificate-chain-file', dest='CertificateChain', metavar='FILE', help='''file containing the PEM-encoded certificate chain. This is typically the PEM-encoded certificates of the chain, concatenated together.''')), Arg('-p', '--path', dest='Path', help='path for the new server certificate (default: "/")'), AS_ACCOUNT] euca2ools-3.0.2/euca2ools/commands/euare/uploadsigningcertificate.py000066400000000000000000000043111222241730200256200ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euare import EuareRequest, AS_ACCOUNT from requestbuilder import Arg, MutuallyExclusiveArgList class UploadSigningCertificate(EuareRequest): DESCRIPTION = 'Upload a signing certificate' ARGS = [MutuallyExclusiveArgList(True, Arg('-c', '--certificate-body', dest='CertificateBody', metavar='CERT', help='contents of the new certificate'), Arg('-f', '--certificate-file', dest='CertificateBody', metavar='FILE', type=open, help='file containing the new certificate')), Arg('-u', '--user-name', dest='UserName', metavar='USER', help='''user the signing certificate is for (default: current user)'''), AS_ACCOUNT] def print_result(self, result): print result.get('Certificate', {}).get('CertificateId') euca2ools-3.0.2/euca2ools/commands/euca/000077500000000000000000000000001222241730200200155ustar00rootroot00000000000000euca2ools-3.0.2/euca2ools/commands/euca/__init__.py000066400000000000000000000477211222241730200221410ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands import Euca2ools from euca2ools.exceptions import AWSError from operator import itemgetter import os.path from requestbuilder import Arg, MutuallyExclusiveArgList, AUTH, SERVICE from requestbuilder.auth import QuerySigV2Auth from requestbuilder.exceptions import AuthError from requestbuilder.mixins import TabifyingMixin from requestbuilder.request import AWSQueryRequest from requestbuilder.service import BaseService from requestbuilder.util import set_userregion import shlex from string import Template import sys class EC2CompatibleQuerySigV2Auth(QuerySigV2Auth): # -a and -s are deprecated; remove them in 3.2 ARGS = [Arg('-a', '--access-key', metavar='KEY_ID', dest='deprecated_key_id', help=argparse.SUPPRESS), Arg('-s', metavar='KEY', dest='deprecated_sec_key', help=argparse.SUPPRESS)] def preprocess_arg_objs(self, arg_objs): # If something else defines '-a' or '-s' args, resolve conflicts with # this class's old-style auth args by capitalizing this class's args. # # This behavior is deprecated and will be removed in version 3.2 along # with the -a and -s arguments themselves. a_arg_objs = _find_args_by_parg(arg_objs, '-a') s_arg_objs = _find_args_by_parg(arg_objs, '-s') if len(a_arg_objs) > 1 or len(s_arg_objs) > 1: for arg_obj in a_arg_objs: if arg_obj.kwargs.get('dest') == 'deprecated_key_id': # Capitalize the "-a" arg_obj.pargs = tuple('-A' if parg == '-a' else parg for parg in arg_obj.pargs) for arg_obj in s_arg_objs: if arg_obj.kwargs.get('dest') == 'deprecated_sec_key': # Remove it since regular -S already covers this case arg_objs.remove(arg_obj) def configure(self): # Old-style CLI args # Deprecated; should be removed in 3.2 if self.args.get('deprecated_key_id'): # Use it and complain self.args['key_id'] = self.args['deprecated_key_id'] if _find_args_by_parg(self.ARGS, '-a'): msg = ('argument -a/--access-key is deprecated; use ' '-I/--access-key-id instead') else: msg = ('argument -A/--access-key is deprecated; use ' '-I/--access-key-id instead') self.log.warn(msg) print >> sys.stderr, 'warning:', msg if self.args.get('deprecated_sec_key'): # Use it and complain self.args['secret_key'] = self.args['deprecated_sec_key'] msg = 'argument -s is deprecated; use -S/--secret-key instead' self.log.warn(msg) print >> sys.stderr, 'warning:', msg # Shell-style config file given at the CLI # Deprecated; should be removed in 3.2 if os.path.isfile(self.args.get('shell_configfile', '')): # We already complained about this in the service config = _parse_shell_configfile(self.args['shell_configfile']) if 'EC2_ACCESS_KEY' in config and not self.args.get('key_id'): self.args['key_id'] = config['EC2_ACCESS_KEY'] if 'EC2_SECRET_KEY' in config and not self.args.get('secret_key'): self.args['secret_key'] = config['EC2_SECRET_KEY'] # Environment (for compatibility with AWS tools) if 'AWS_ACCESS_KEY' in os.environ and not self.args.get('key_id'): self.args['key_id'] = os.getenv('AWS_ACCESS_KEY') if 'AWS_SECRET_KEY' in os.environ and not self.args.get('secret_key'): self.args['secret_key'] = os.getenv('AWS_SECRET_KEY') if 'EC2_ACCESS_KEY' in os.environ and not self.args.get('key_id'): self.args['key_id'] = os.getenv('EC2_ACCESS_KEY') if 'EC2_SECRET_KEY' in os.environ and not self.args.get('secret_key'): self.args['secret_key'] = os.getenv('EC2_SECRET_KEY') # --region self.configure_from_configfile(only_if_explicit=True) # AWS credential file (location given in the environment) self.configure_from_aws_credential_file() # Regular config file self.configure_from_configfile() # User, systemwide shell-style config files # Deprecated; should be removed in 3.2 for configfile_name in ('~/.eucarc', '~/.eucarc/eucarc'): configfile_name = os.path.expandvars(configfile_name) configfile_name = os.path.expanduser(configfile_name) if os.path.isfile(configfile_name): config = _parse_shell_configfile(configfile_name) if 'EC2_ACCESS_KEY' in config and not self.args.get('key_id'): self.args['key_id'] = config['EC2_ACCESS_KEY'] if ('EC2_SECRET_KEY' in config and not self.args.get('secret_key')): # self.args['secret_key'] = config['EC2_SECRET_KEY'] # That's it; make sure we have everything we need if not self.args.get('key_id'): raise AuthError('missing access key ID; please supply one with -I') if not self.args.get('secret_key'): raise AuthError('missing secret key; please supply one with -S') class Eucalyptus(BaseService): NAME = 'ec2' DESCRIPTION = 'Eucalyptus compute cloud service' API_VERSION = '2013-02-01' AUTH_CLASS = EC2CompatibleQuerySigV2Auth REGION_ENVVAR = 'EUCA_REGION' URL_ENVVAR = 'EC2_URL' ARGS = [Arg('--config', dest='shell_configfile', metavar='CFGFILE', default='', route_to=(SERVICE, AUTH), help=argparse.SUPPRESS), MutuallyExclusiveArgList( Arg('--region', dest='userregion', metavar='USER@REGION', help='''name of the region and/or user in config files to use to connect to the service'''), Arg('-U', '--url', metavar='URL', help='compute service endpoint URL'))] def configure(self): # self.args gets highest precedence for self.endpoint and user/region self.process_url(self.args.get('url')) set_userregion(self.config, self.args.get('userregion')) # Shell-style config file given at the CLI # Deprecated; should be removed in 3.2 if os.path.isfile(self.args.get('shell_configfile', '')): msg = 'argument --config is deprecated' self.log.warn(msg) print >> sys.stderr, 'warning:', msg config = _parse_shell_configfile(self.args['shell_configfile']) self.process_url(config.get(self.URL_ENVVAR)) if self.URL_ENVVAR in config: self.process_url(config[self.URL_ENVVAR]) # Environment set_userregion(self.config, os.getenv(self.REGION_ENVVAR)) self.process_url(os.getenv(self.URL_ENVVAR)) # Regular config file self.process_url(self.config.get_region_option(self.NAME + '-url')) # User, systemwide shell-style config files # Deprecated; should be removed in 3.2 for configfile_name in ('~/.eucarc', '~/.eucarc/eucarc'): configfile_name = os.path.expandvars(configfile_name) configfile_name = os.path.expanduser(configfile_name) if os.path.isfile(configfile_name): config = _parse_shell_configfile(configfile_name) if self.URL_ENVVAR in config: self.process_url(config[self.URL_ENVVAR]) # Configure request timeouts and retry handlers if self.max_retries is None: config_max_retries = self.config.get_global_option('max-retries') if config_max_retries is not None: self.max_retries = int(config_max_retries) else: self.max_retries = self.MAX_RETRIES if self.timeout is None: config_timeout = self.config.get_global_option('timeout') if config_timeout is not None: self.timeout = float(config_timeout) else: self.timeout = self.TIMEOUT # SSL cert verification is opt-in self.session_args['verify'] = self.config.get_region_option_bool( 'verify-ssl', default=False) # Ensure everything is okay and finish up self.validate_config() if self.auth is not None: self.auth.configure() def handle_http_error(self, response): raise AWSError(response) class EucalyptusRequest(AWSQueryRequest, TabifyingMixin): SUITE = Euca2ools SERVICE_CLASS = Eucalyptus METHOD = 'POST' def __init__(self, **kwargs): AWSQueryRequest.__init__(self, **kwargs) def print_resource_tag(self, resource_tag, resource_id): resource_type = RESOURCE_TYPE_MAP.lookup(resource_id) print self.tabify(['TAG', resource_type, resource_id, resource_tag.get('key'), resource_tag.get('value')]) def print_reservation(self, reservation): res_line = ['RESERVATION', reservation['reservationId'], reservation.get('ownerId')] # group.get('entry') is a workaround for a CLC bug group_ids = [group.get('groupName') or group.get('groupId') or group.get('entry') or '' for group in reservation['groupSet']] res_line.append(', '.join(group_ids)) print self.tabify(res_line) for instance in sorted(reservation.get('instancesSet') or [], key=itemgetter('launchTime')): self.print_instance(instance) def print_instance(self, instance): instance_line = ['INSTANCE'] for key in ['instanceId', 'imageId', 'dnsName', 'privateDnsName']: instance_line.append(instance.get(key)) instance_line.append(instance.get('instanceState', {}) .get('name')) instance_line.append(instance.get('keyName')) instance_line.append(instance.get('amiLaunchIndex')) instance_line.append(','.join([code['productCode'] for code in instance.get('productCodes', [])])) instance_line.append(instance.get('instanceType')) instance_line.append(instance.get('launchTime')) instance_line.append(instance.get('placement', {}).get( 'availabilityZone')) instance_line.append(instance.get('kernelId')) instance_line.append(instance.get('ramdiskId')) instance_line.append(instance.get('platform')) if instance.get('monitoring'): instance_line.append('monitoring-' + instance['monitoring'].get('state')) else: # noinspection PyTypeChecker instance_line.append(None) instance_line.append(instance.get('ipAddress')) instance_line.append(instance.get('privateIpAddress')) instance_line.append(instance.get('vpcId')) instance_line.append(instance.get('subnetId')) instance_line.append(instance.get('rootDeviceType')) instance_line.append(instance.get('instanceLifecycle')) instance_line.append(instance.get('showInstanceRequestId')) # noinspection PyTypeChecker instance_line.append(None) # Should be the license, but where is it? instance_line.append(instance.get('placement', {}).get('groupName')) instance_line.append(instance.get('virtualizationType')) instance_line.append(instance.get('hypervisor')) instance_line.append(instance.get('clientToken')) instance_line.append(','.join([group['groupId'] for group in instance.get('groupSet', [])])) instance_line.append(instance.get('placement', {}).get('tenancy')) instance_line.append(instance.get('ebsOptimized')) instance_line.append(instance.get('iamInstanceProfile', {}).get('arn')) print self.tabify(instance_line) for blockdev in instance.get('blockDeviceMapping', []): self.print_blockdevice(blockdev) for nic in instance.get('networkInterfaceSet', []): self.print_interface(nic) for tag in instance.get('tagSet', []): self.print_resource_tag(tag, instance.get('instanceId')) def print_blockdevice(self, blockdev): print self.tabify(('BLOCKDEVICE', blockdev.get('deviceName'), blockdev.get('ebs', {}).get('volumeId'), blockdev.get('ebs', {}).get('attachTime'), blockdev.get('ebs', {}).get('deleteOnTermination'), blockdev.get('ebs', {}).get('volumeType'), blockdev.get('ebs', {}).get('iops'))) def print_interface(self, nic): nic_info = [nic.get(attr) for attr in ( 'networkInterfaceId', 'subnetId', 'vpcId', 'ownerId', 'status', 'privateIpAddress', 'privateDnsName', 'sourceDestCheck')] print self.tabify(['NIC'] + nic_info) if nic.get('attachment'): attachment_info = [nic['attachment'].get(attr) for attr in ( 'attachmentID', 'deviceIndex', 'status', 'attachTime', 'deleteOnTermination')] print self.tabify(['NICATTACHMENT'] + attachment_info) privaddresses = nic.get('privateIpAddressesSet', []) if nic.get('association'): association = nic['association'] # The EC2 tools apparently print private IP info in the # association even though that info doesn't appear there # in the response, so we have to look it up elsewhere. for privaddress in privaddresses: if (privaddress.get('association', {}).get('publicIp') == association.get('publicIp')): # Found a match break else: privaddress = None print self.tabify(('NICASSOCIATION', association.get('publicIp'), association.get('ipOwnerId'), privaddress)) for group in nic.get('groupSet', []): print self.tabify(('GROUP', group.get('groupId'), group.get('groupName'))) for privaddress in privaddresses: print self.tabify(('PRIVATEIPADDRESS', privaddress.get('privateIpAddress'))) def print_volume(self, volume): vol_bits = ['VOLUME'] for attr in ('volumeId', 'size', 'snapshotId', 'availabilityZone', 'status', 'createTime'): vol_bits.append(volume.get(attr)) vol_bits.append(volume.get('volumeType') or 'standard') vol_bits.append(volume.get('iops')) print self.tabify(vol_bits) for attachment in volume.get('attachmentSet', []): self.print_attachment(attachment) for tag in volume.get('tagSet', []): self.print_resource_tag(tag, volume.get('volumeId')) def print_attachment(self, attachment): print self.tabify(['ATTACHMENT', attachment.get('volumeId'), attachment.get('instanceId'), attachment.get('device'), attachment.get('status'), attachment.get('attachTime')]) def print_snapshot(self, snap): print self.tabify(['SNAPSHOT', snap.get('snapshotId'), snap.get('volumeId'), snap.get('status'), snap.get('startTime'), snap.get('progress'), snap.get('ownerId'), snap.get('volumeSize'), snap.get('description')]) for tag in snap.get('tagSet', []): self.print_resource_tag(tag, snap.get('snapshotId')) def print_bundle_task(self, task): print self.tabify(['BUNDLE', task.get('bundleId'), task.get('instanceId'), task.get('storage', {}).get('S3', {}).get('bucket'), task.get('storage', {}).get('S3', {}).get('prefix'), task.get('startTime'), task.get('updateTime'), task.get('state'), task.get('progress')]) class _ResourceTypeMap(object): _prefix_type_map = { 'cgw': 'customer-gateway', 'dopt': 'dhcp-options', 'aki': 'image', 'ami': 'image', 'ari': 'image', 'eki': 'image', 'emi': 'image', 'eri': 'image', 'i': 'instance', 'igw': 'internet-gateway', 'acl': 'network-acl', 'xxx': 'reserved-instances', # reserved instance IDs are UUIDs 'rtb': 'route-table', 'sg': 'security-group', 'snap': 'snapshot', 'sir': 'spot-instances-request', 'subnet': 'subnet', 'vol': 'volume', 'vpc': 'vpc', 'vpn': 'vpn-connection', 'vgw': 'vpn-gateway'} def lookup(self, item): if not isinstance(item, basestring): raise TypeError('argument type must be str') for prefix in self._prefix_type_map: if item.startswith(prefix + '-'): return self._prefix_type_map[prefix] def __iter__(self): return iter(set(self._prefix_type_map.values())) RESOURCE_TYPE_MAP = _ResourceTypeMap() def _find_args_by_parg(arglike, parg): if isinstance(arglike, Arg): if parg in arglike.pargs: return [arglike] else: return [] elif isinstance(arglike, list): matches = [] for arg in arglike: matches.extend(_find_args_by_parg(arg, parg)) return matches else: raise TypeError('Unsearchable type ' + arglike.__class__.__name__) def _parse_shell_configfile(configfile_name): # Should be able to drop this in 3.2 def sourcehook(filename): filename = filename.strip('"\'') filename = Template(filename).safe_substitute(config) filename = os.path.expandvars(filename) filename = os.path.expanduser(filename) return filename, open(filename) config = {} configfile_name = os.path.expandvars(configfile_name) configfile_name = os.path.expanduser(configfile_name) with open(configfile_name) as configfile: ## TODO: deal with $BASH_SOURCE lexer = shlex.shlex(configfile) lexer.whitespace_split = True lexer.source = 'source' lexer.sourcehook = sourcehook for token in lexer: if '=' in token: (key, val) = token.split('=', 1) val = val.strip('"\'') if not config.get(key): config[key] = Template(val).safe_substitute(config) return config euca2ools-3.0.2/euca2ools/commands/euca/allocateaddress.py000066400000000000000000000036061222241730200235260ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class AllocateAddress(EucalyptusRequest): DESCRIPTION = 'Allocate a public IP address' ARGS = [Arg('-d', '--domain', dest='Domain', metavar='vpc', choices=('vpc',), help='''[VPC only] "vpc" to allocate the address for use in a VPC''')] def print_result(self, result): print self.tabify(('ADDRESS', result.get('publicIp'), result.get('domain', 'standard'), result.get('allocationId'))) euca2ools-3.0.2/euca2ools/commands/euca/associateaddress.py000066400000000000000000000077051222241730200237210ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, MutuallyExclusiveArgList from requestbuilder.exceptions import ArgumentError class AssociateAddress(EucalyptusRequest): DESCRIPTION = 'Associate an elastic IP address with a running instance' ARGS = [MutuallyExclusiveArgList(True, Arg('-i', '--instance-id', dest='InstanceId', metavar='INSTANCE', help='''ID of the instance to associate the address with'''), Arg('-n', '--network-interface', dest='NetworkInterfaceId', metavar='INTERFACE', help='''[VPC only] network interface to associate the address with''')), Arg('PublicIp', metavar='ADDRESS', nargs='?', help='''[Non-VPC only] IP address to associate (required)'''), Arg('-a', '--allocation-id', dest='AllocationId', metavar='ALLOC', help='[VPC only] VPC allocation ID (required)'), Arg('-p', '--private-ip-address', dest='PrivateIpAddress', metavar='ADDRESS', help='''[VPC only] the private address to associate with the address being associated in the VPC (default: primary private IP)'''), Arg('--allow-reassociation', dest='AllowReassociation', action='store_const', const='true', help='''[VPC only] allow the address to be associated even if it is already associated with another interface''')] # noinspection PyExceptionInherit def configure(self): EucalyptusRequest.configure(self) if (self.args.get('PublicIp') is not None and self.args.get('AllocationId') is not None): # Can't be both EC2 and VPC raise ArgumentError( 'argument -a/--allocation-id: not allowed with an IP address') if (self.args.get('PublicIp') is None and self.args.get('AllocationId') is None): # ...but we still have to be one of them raise ArgumentError( 'argument -a/--allocation-id or an IP address is required') def print_result(self, result): if self.args.get('AllocationId'): # VPC print self.tabify(('ADDRESS', self.args.get('InstanceId'), self.args.get('AllocationId'), result.get('associationId'), self.args.get('PrivateIpAddress'))) else: # EC2 print self.tabify(('ADDRESS', self.args.get('PublicIp'), self.args.get('InstanceId'))) euca2ools-3.0.2/euca2ools/commands/euca/attachvolume.py000066400000000000000000000037501222241730200230700ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class AttachVolume(EucalyptusRequest): DESCRIPTION = 'Attach an EBS volume to an instance' ARGS = [Arg('-i', '--instance', dest='InstanceId', metavar='INSTANCE', required=True, help='instance to attach the volume to (required)'), Arg('-d', '--device', dest='Device', required=True, help='device name exposed to the instance (required)'), Arg('VolumeId', metavar='VOLUME', help='ID of the volume to attach (required)')] def print_result(self, result): self.print_attachment(result) euca2ools-3.0.2/euca2ools/commands/euca/authorize.py000066400000000000000000000033011222241730200223760ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca.modgroup import ModifySecurityGroupRequest class Authorize(ModifySecurityGroupRequest): DESCRIPTION = 'Add a rule to a security group that allows traffic to pass' @property def action(self): if self.args['egress']: return 'AuthorizeSecurityGroupEgress' else: return 'AuthorizeSecurityGroupIngress' euca2ools-3.0.2/euca2ools/commands/euca/bundleinstance.py000066400000000000000000000122771222241730200233760ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import base64 from datetime import datetime, timedelta from euca2ools.commands.euca import EucalyptusRequest import hashlib import hmac import json from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError class BundleInstance(EucalyptusRequest): DESCRIPTION = 'Bundle an S3-backed Windows instance' ARGS = [Arg('InstanceId', metavar='INSTANCE', help='ID of the instance to bundle (required)'), Arg('-b', '--bucket', dest='Storage.S3.Bucket', metavar='BUCKET', required=True, help='''bucket in which to store the new machine image (required)'''), Arg('-p', '--prefix', dest='Storage.S3.Prefix', metavar='PREFIX', required=True, help='beginning of the machine image bundle name (required)'), Arg('-o', '--owner-akid', '--user-access-key', metavar='KEY-ID', dest='Storage.S3.AWSAccessKeyId', required=True, help="bucket owner's access key ID (required)"), Arg('-c', '--policy', metavar='POLICY', dest='Storage.S3.UploadPolicy', help='''Base64-encoded upload policy that allows the server to upload a bundle on your behalf. If unused, -w is required.'''), Arg('-s', '--policy-signature', metavar='SIGNATURE', dest='Storage.S3.UploadPolicySignature', help='''signature of the Base64-encoded upload policy. If unused, -w is required.'''), Arg('-w', '--owner-sak', '--user-secret-key', metavar='KEY', route_to=None, help="""bucket owner's secret access key, used to sign upload policies. This is required unless both -c and -s are used."""), Arg('-x', '--expires', metavar='HOURS', type=int, default=24, route_to=None, help='generated upload policy expiration time (default: 24)')] def generate_default_policy(self): delta = timedelta(hours=self.args['expires']) expire_time = (datetime.utcnow() + delta).replace(microsecond=0) policy = {'conditions': [{'acl': 'ec2-bundle-read'}, {'bucket': self.args.get('Storage.S3.Bucket')}, ['starts-with', '$key', self.args.get('Storage.S3.Prefix')]], 'expiration': expire_time.isoformat()} policy_json = json.dumps(policy) self.log.info('generated default policy: %s', policy_json) self.params['Storage.S3.UploadPolicy'] = base64.b64encode(policy_json) def sign_policy(self): my_hmac = hmac.new(self.args['owner_sak'], digestmod=hashlib.sha1) my_hmac.update(self.params.get('Storage.S3.UploadPolicy')) self.params['Storage.S3.UploadPolicySignature'] = \ base64.b64encode(my_hmac.digest()) # noinspection PyExceptionInherit def configure(self): EucalyptusRequest.configure(self) if not self.args.get('Storage.S3.UploadPolicy'): if not self.args.get('owner_sak'): raise ArgumentError('argument -w/--owner-sak is required when ' '-c/--policy is not used') elif not self.args.get('Storage.S3.UploadPolicySignature'): if not self.args.get('owner_sak'): raise ArgumentError('argument -w/--owner-sak is required when ' '-s/--policy-signature is not used') def preprocess(self): if not self.args.get('Storage.S3.UploadPolicy'): self.generate_default_policy() if not self.args.get('Storage.S3.UploadPolicySignature'): self.sign_policy() def print_result(self, result): self.print_bundle_task(result['bundleInstanceTask']) euca2ools-3.0.2/euca2ools/commands/euca/cancelbundletask.py000066400000000000000000000033301222241730200236700ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class CancelBundleTask(EucalyptusRequest): DESCRIPTION = 'Cancel an instance bundling operation' ARGS = [Arg('BundleId', metavar='TASK-ID', help='ID of the bundle task to cancel (required)')] def print_result(self, result): self.print_bundle_task(result.get('bundleInstanceTask')) euca2ools-3.0.2/euca2ools/commands/euca/confirmproductinstance.py000066400000000000000000000037521222241730200251610ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class ConfirmProductInstance(EucalyptusRequest): DESCRIPTION = 'Verify if a product code is associated with an instance' ARGS = [Arg('ProductCode', metavar='CODE', help='product code to confirm (required)'), Arg('-i', '--instance', dest='InstanceId', metavar='INSTANCE', required=True, help='ID of the instance to confirm (required)')] def print_result(self, result): print self.tabify((self.args['ProductCode'], self.args['InstanceId'], result.get('return'), result.get('ownerId'))) euca2ools-3.0.2/euca2ools/commands/euca/copyimage.py000066400000000000000000000046641222241730200223560ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class CopyImage(EucalyptusRequest): DESCRIPTION = ('Copy an image from another region\n\nRun this command ' 'against the destination region, not the source region.') ARGS = [Arg('-r', '--source-region', dest='SourceRegion', metavar='REGION', required=True, help='name of the region to copy the image from (required)'), Arg('-s', '--source-ami-id', dest='SourceImageId', metavar='IMAGE', required=True, help='ID of the image to copy (required)'), Arg('-n', '--name', dest='Name', help='name to assign the new copy of the image'), Arg('-d', '--description', dest='Description', metavar='DESC', help='description to assign the new copy of the image'), Arg('-c', '--client-token', dest='ClientToken', metavar='TOKEN', help='unique identifier to ensure request idempotency')] def print_result(self, result): print self.tabify(('IMAGE', result.get('imageId'))) euca2ools-3.0.2/euca2ools/commands/euca/createimage.py000066400000000000000000000053011222241730200226340ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import ec2_block_device_mapping from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class CreateImage(EucalyptusRequest): DESCRIPTION = 'Create an EBS image from a running or stopped EBS instance' ARGS = [Arg('InstanceId', metavar='INSTANCE', help='instance from which to create the image (required)'), Arg('-n', '--name', dest='Name', required=True, help='name for the new image (required)'), Arg('-d', '--description', dest='Description', metavar='DESC', help='description for the new image'), Arg('--no-reboot', dest='NoReboot', action='store_const', const='true', help='''do not shut down the instance before creating the image. Image integrity may be affected.'''), Arg('-b', '--block-device-mapping', metavar='DEVICE=MAPPED', dest='BlockDeviceMapping', action='append', type=ec2_block_device_mapping, default=[], help='''define a block device mapping for the image, in the form DEVICE=MAPPED, where "MAPPED" is "none", "ephemeral(0-3)", or "[SNAP_ID]:[SIZE]:[true|false]:[standard|VOLTYPE[:IOPS]]"''')] def print_result(self, result): print self.tabify(('IMAGE', result.get('imageId'))) euca2ools-3.0.2/euca2ools/commands/euca/createkeypair.py000066400000000000000000000042621222241730200232230ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest import os from requestbuilder import Arg class CreateKeyPair(EucalyptusRequest): DESCRIPTION = 'Create a new SSH key pair for use with instances' ARGS = [Arg('KeyName', metavar='KEYPAIR', help='name of the new key pair (required)'), Arg('-f', '--filename', metavar='FILE', route_to=None, help='file name to save the private key to')] def print_result(self, result): print self.tabify(('KEYPAIR', result['keyName'], result['keyFingerprint'])) if self.args.get('filename'): prev_umask = os.umask(0o077) with open(self.args['filename'], 'w') as privkeyfile: privkeyfile.write(result['keyMaterial']) os.umask(prev_umask) else: print result['keyMaterial'] euca2ools-3.0.2/euca2ools/commands/euca/createsecuritygroup.py000066400000000000000000000041231222241730200244770ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class CreateSecurityGroup(EucalyptusRequest): DESCRIPTION = 'Create a new security group' ARGS = [Arg('GroupName', metavar='GROUP', help='name of the new group (required)'), Arg('-d', '--description', dest='GroupDescription', metavar='DESC', required=True, help='description of the new group (required)'), Arg('-c', '--vpc', dest='VpcId', metavar='VPC', help='[VPC only] ID of the VPC to create the group in')] def print_result(self, result): print self.tabify(('GROUP', result.get('groupId'), self.args['GroupName'], self.args['GroupDescription'])) euca2ools-3.0.2/euca2ools/commands/euca/createsnapshot.py000066400000000000000000000041051222241730200234120ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class CreateSnapshot(EucalyptusRequest): DESCRIPTION = 'Create a snapshot of a volume' ARGS = [Arg('VolumeId', metavar='VOLUME', help='volume to create a snapshot of (required)'), Arg('-d', '--description', metavar='DESC', dest='Description', help='snapshot description')] def print_result(self, result): print self.tabify(('SNAPSHOT', result.get('snapshotId'), result.get('volumeId'), result.get('status'), result.get('startTime'), result.get('ownerId'), result.get('volumeSize'), result.get('description'))) euca2ools-3.0.2/euca2ools/commands/euca/createtags.py000066400000000000000000000044751222241730200225230ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import binary_tag_def from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class CreateTags(EucalyptusRequest): DESCRIPTION = 'Add or overwrite tags for one or more resources' ARGS = [Arg('ResourceId', metavar='RESOURCE', nargs='+', help='ID(s) of the resource(s) to tag (at least 1 required)'), Arg('--tag', dest='Tag', metavar='KEY[=VALUE]', type=binary_tag_def, action='append', required=True, help='''key and optional value of the tag to create, separated by an "=" character. If no value is given the tag's value is set to an empty string. (at least 1 required)''')] def print_result(self, result): for resource_id in self.args['ResourceId']: for tag in self.args['Tag']: lc_resource_tag = {'key': tag['Key'], 'value': tag['Value']} self.print_resource_tag(lc_resource_tag, resource_id) euca2ools-3.0.2/euca2ools/commands/euca/createvolume.py000066400000000000000000000061771222241730200230750ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError class CreateVolume(EucalyptusRequest): DESCRIPTION = 'Create a new volume' ARGS = [Arg('-z', '--availability-zone', '--zone', dest='AvailabilityZone', metavar='ZONE', required=True, help='''availability zone in which to create the new volume (required)'''), Arg('-s', '--size', dest='Size', type=int, help='''size of the new volume in GiB (required unless --snapshot is used)'''), Arg('--snapshot', dest='SnapshotId', metavar='SNAPSHOT', help='snapshot from which to create the new volume'), Arg('-t', '--type', dest='VolumeType', metavar='VOLTYPE', help='volume type'), Arg('-i', '--iops', dest='Iops', type=int, help='number of I/O operations per second')] # noinspection PyExceptionInherit def configure(self): EucalyptusRequest.configure(self) if not self.args.get('Size') and not self.args.get('SnapshotId'): raise ArgumentError('-s/--size or --snapshot must be specified') if self.args.get('Iops') and not self.args.get('VolumeType'): raise ArgumentError('argument -i/--iops: -t/--type is required') if self.args.get('Iops') and self.args.get('VolumeType') == 'standard': raise ArgumentError( 'argument -i/--iops: not allowed with volume type "standard"') def print_result(self, result): print self.tabify(('VOLUME', result.get('volumeId'), result.get('size'), result.get('snapshotId'), result.get('availabilityZone'), result.get('status'), result.get('createTime'))) euca2ools-3.0.2/euca2ools/commands/euca/deletekeypair.py000066400000000000000000000032731222241730200232230ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class DeleteKeyPair(EucalyptusRequest): DESCRIPTION = 'Delete a key pair' ARGS = [Arg('KeyName', metavar='KEYPAIR', help='name of the key pair to delete (required)')] def print_result(self, result): print self.tabify(('KEYPAIR', self.args['KeyName'])) euca2ools-3.0.2/euca2ools/commands/euca/deletesecuritygroup.py000066400000000000000000000036511222241730200245030ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class DeleteSecurityGroup(EucalyptusRequest): DESCRIPTION = 'Delete a security group' ARGS = [Arg('group', metavar='GROUP', route_to=None, help='name or ID of the security group to delete (required)')] def preprocess(self): if self.args['group'].startswith('sg-'): self.params['GroupId'] = self.args['group'] else: self.params['GroupName'] = self.args['group'] def print_result(self, result): print self.tabify(('RETURN', result.get('return'))) euca2ools-3.0.2/euca2ools/commands/euca/deletesnapshot.py000066400000000000000000000033021222241730200234070ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class DeleteSnapshot(EucalyptusRequest): DESCRIPTION = 'Delete a snapshot' ARGS = [Arg('SnapshotId', metavar='SNAPSHOT', help='ID of the snapshot to delete (required)')] def print_result(self, result): print self.tabify(('SNAPSHOT', self.args['SnapshotId'])) euca2ools-3.0.2/euca2ools/commands/euca/deletetags.py000066400000000000000000000045751222241730200225230ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import ternary_tag_def from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class DeleteTags(EucalyptusRequest): DESCRIPTION = 'Delete tags from one or more resources' ARGS = [Arg('ResourceId', metavar='RESOURCE', nargs='+', help='''ID(s) of the resource(s) to un-tag (at least 1 required)'''), Arg('--tag', dest='Tag', metavar='KEY[=[VALUE]]', type=ternary_tag_def, action='append', required=True, help='''key and optional value of the tag to delete, separated by an "=" character. If you specify a value then the tag is deleted only if its value matches the one you specified. If you specify the empty string as the value (e.g. "--tag foo=") then the tag is deleted only if its value is the empty string. If you do not specify a value (e.g. "--tag foo") then the tag is deleted regardless of its value. (at least 1 required)''')] euca2ools-3.0.2/euca2ools/commands/euca/deletevolume.py000066400000000000000000000032641222241730200230660ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class DeleteVolume(EucalyptusRequest): DESCRIPTION = 'Delete a volume' ARGS = [Arg('VolumeId', metavar='VOLUME', help='ID of the volume to delete (required)')] def print_result(self, result): print self.tabify(('VOLUME', self.args['VolumeId'])) euca2ools-3.0.2/euca2ools/commands/euca/deregisterimage.py000066400000000000000000000037061222241730200235350ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class DeregisterImage(EucalyptusRequest): DESCRIPTION = ('De-register an image. After you de-register an image it ' 'cannot be used to launch new instances.\n\nNote that in ' 'Eucalyptus 3 you may need to run this twice to completely ' "remove an image's registration from the system.") ARGS = [Arg('ImageId', metavar='IMAGE', help='ID of the image to de-register (required)')] def print_result(self, result): print self.tabify(('IMAGE', self.args['ImageId'])) euca2ools-3.0.2/euca2ools/commands/euca/describeaddresses.py000066400000000000000000000067201222241730200240520ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, Filter class DescribeAddresses(EucalyptusRequest): DESCRIPTION = 'Show information about elastic IP addresses' ARGS = [Arg('address', nargs='*', route_to=None, help='''limit results to specific elastic IP addresses or VPC allocation IDs''')] FILTERS = [Filter('allocation-id', help='[VPC only] allocation ID'), Filter('association-id', help='[VPC only] association ID'), Filter('domain', choices=('standard', 'vpc'), help='whether the address is a standard or VPC address'), Filter('instance-id', help='instance the address is associated with'), Filter('network-interface-id', help='''[VPC only] network interface the address is associated with'''), Filter('network-interface-owner-id', help='''[VPC only] ID of the network interface's owner'''), Filter('private-ip-address', help='''[VPC only] private address associated with the public address'''), Filter('public-ip', help='the elastic IP address')] LIST_TAGS = ['addressesSet'] def preprocess(self): alloc_ids = set(addr for addr in self.args.get('address', []) if addr.startswith('eipalloc-')) public_ips = set(self.args.get('address', [])) - alloc_ids if alloc_ids: self.params['AllocationId'] = list(sorted(alloc_ids)) if public_ips: self.params['PublicIp'] = list(sorted(public_ips)) def print_result(self, result): for addr in result.get('addressesSet', []): print self.tabify(('ADDRESS', addr.get('publicIp'), addr.get('instanceId'), addr.get('domain', 'standard'), addr.get('allocationId'), addr.get('associationId'), addr.get('networkInterfaceId'), addr.get('privateIpAddress'))) euca2ools-3.0.2/euca2ools/commands/euca/describeavailabilityzones.py000066400000000000000000000045661222241730200256340ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, Filter class DescribeAvailabilityZones(EucalyptusRequest): DESCRIPTION = 'Display availability zones within the current region' ARGS = [Arg('ZoneName', metavar='ZONE', nargs='*', help='limit results to specific availability zones')] FILTERS = [Filter('message', help='''message giving information about the 'availability zone'''), Filter('region-name', help='region the availability zone is in'), Filter('state', help='state of the availability zone'), Filter('zone-name', help='name of the availability zone')] LIST_TAGS = ['availabilityZoneInfo', 'messageSet'] def print_result(self, result): for zone in result.get('availabilityZoneInfo', []): msgs = ', '.join(msg for msg in zone.get('messageSet', [])) print self.tabify(('AVAILABILITYZONE', zone.get('zoneName'), zone.get('zoneState'), msgs)) euca2ools-3.0.2/euca2ools/commands/euca/describebundletasks.py000066400000000000000000000053761222241730200244220ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, Filter class DescribeBundleTasks(EucalyptusRequest): DESCRIPTION = 'Describe current instance-bundling tasks' ARGS = [Arg('BundleId', metavar='BUNDLE', nargs='*', help='limit results to specific bundle tasks')] FILTERS = [Filter('bundle-id', help='bundle task ID'), Filter('error-code', help='if the task failed, the error code returned'), Filter('error-message', help='if the task failed, the error message returned'), Filter('instance-id', help='ID of the bundled instance'), Filter('progress', help='level of task completion, in percent'), Filter('s3-bucket', help='bucket where the image will be stored'), Filter('s3-prefix', help='beginning of the bundle name'), Filter('start-time', help='task start time'), Filter('state', help='task state', choices=('pending', 'waiting-for-shutdown', 'bundling', 'storing', 'cancelling', 'complete', 'failed')), Filter('update-time', help='most recent task update time')] LIST_TAGS = ['bundleInstanceTasksSet'] def print_result(self, result): for task in result.get('bundleInstanceTasksSet', []): self.print_bundle_task(task) euca2ools-3.0.2/euca2ools/commands/euca/describeimageattribute.py000066400000000000000000000106611222241730200251020ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, MutuallyExclusiveArgList class DescribeImageAttribute(EucalyptusRequest): DESCRIPTION = 'Show information about an attribute of an image' ARGS = [Arg('ImageId', metavar='IMAGE', help='image to describe'), MutuallyExclusiveArgList(True, Arg('-l', '--launch-permission', dest='Attribute', action='store_const', const='launchPermission', help='display launch permissions'), Arg('-p', '--product-codes', dest='Attribute', action='store_const', const='productCodes', help='list associated product codes'), Arg('-B', '--block-device-mapping', dest='Attribute', action='store_const', const='blockDeviceMapping', help='describe block device mappings'), Arg('--kernel', dest='Attribute', action='store_const', const='kernel', help='show associated kernel image ID'), Arg('--ramdisk', dest='Attribute', action='store_const', const='ramdisk', help='show associated ramdisk image ID'), Arg('--description', dest='Attribute', action='store_const', const='description', help="show the image's description"))] LIST_TAGS = ['blockDeviceMapping', 'launchPermission', 'productCodes'] def print_result(self, result): image_id = result.get('imageId') for perm in result.get('launchPermission', []): for (entity_type, entity_name) in perm.items(): print self.tabify(('launchPermission', image_id, entity_type, entity_name)) for code in result.get('productCodes', []): if 'type' in code: code_str = '[{0}: {1}]'.format(code['type'], code.get('productCode')) else: code_str = code.get('productCode') print self.tabify(('productCodes', image_id, 'productCode', code_str)) for blockdev in result.get('blockDeviceMapping', []): blockdev_src = (blockdev.get('virtualName') or blockdev.get('ebs', {}).get('snapshotId')) blockdev_str = '{0}: {1}'.format(blockdev.get('deviceName'), blockdev_src) ## TODO: figure out how to print mappings that create new volumes print self.tabify(('blockDeviceMapping', image_id, 'blockDeviceMap', blockdev_str)) if result.get('kernel'): print self.tabify(('kernel', image_id, None, result['kernel'].get('value'))) if result.get('ramdisk'): print self.tabify(('ramdisk', image_id, None, result['ramdisk'].get('value'))) if result.get('description'): print self.tabify(('description', image_id, None, result['description'].get('value'))) euca2ools-3.0.2/euca2ools/commands/euca/describeimages.py000066400000000000000000000177711222241730200233520ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, Filter, GenericTagFilter from requestbuilder.exceptions import ArgumentError class DescribeImages(EucalyptusRequest): DESCRIPTION = ('Show information about images\n\nBy default, only images ' 'your account owns and images for which your account has ' 'explicit launch permissions are shown.') ARGS = [Arg('ImageId', metavar='IMAGE', nargs='*', help='limit results to specific images'), Arg('-a', '--all', action='store_true', route_to=None, help='describe all images'), Arg('-o', '--owner', dest='Owner', metavar='ACCOUNT', action='append', help='describe images owned by the specified owner'), Arg('-x', '--executable-by', dest='ExecutableBy', metavar='ACCOUNT', action='append', help='''describe images for which the specified account has explicit launch permissions''')] FILTERS = [Filter('architecture', choices=('i386', 'x86_64', 'armhf'), help='CPU architecture'), Filter('block-device-mapping.delete-on-termination', help='''whether a volume is deleted upon instance termination'''), Filter('block-device-mapping.device-name', help='device name for a volume mapped to the image'), Filter('block-device-mapping.snapshot-id', help='snapshot ID for a volume mapped to the image'), Filter('block-device-mapping.volume-size', help='volume size for a volume mapped to the image'), Filter('block-device-mapping.volume-type', help='volume type for a volume mapped to the image'), Filter('description', help='image description'), Filter('hypervisor', help='image\'s hypervisor type'), Filter('image-id'), Filter('image-type', choices=('machine', 'kernel', 'ramdisk'), help='image type ("machine", "kernel", or "ramdisk")'), Filter('is-public', help='whether the image is public'), Filter('kernel-id'), Filter('manifest-location'), Filter('name'), Filter('owner-alias', help="image owner's account alias"), Filter('owner-id', help="image owner's account ID"), Filter('platform', help='"windows" for Windows images'), Filter('product-code', help='product code associated with the image'), Filter('product-code.type', choices=('devpay', 'marketplace'), help='type of product code associated with the image'), Filter('ramdisk-id'), Filter('root-device-name'), Filter('root-device-type', choices=('ebs', 'instance-store'), help='root device type ("ebs" or "instance-store")'), Filter('state', choices=('available', 'pending', 'failed'), help='''image state ("available", "pending", or "failed")'''), Filter('state-reason-code', help='reason code for the most recent state change'), Filter('state-reason-message', help='message for the most recent state change'), Filter('tag-key', help='key of a tag assigned to the image'), Filter('tag-value', help='value of a tag assigned to the image'), GenericTagFilter('tag:KEY', help='specific tag key/value combination'), Filter('virtualization-type', choices=('paravirtual', 'hvm'), help='virtualization type ("paravirtual" or "hvm")')] LIST_TAGS = ['imagesSet', 'productCodes', 'blockDeviceMapping', 'tagSet'] # noinspection PyExceptionInherit def configure(self): EucalyptusRequest.configure(self) if self.args.get('all', False): if self.args.get('ImageId'): raise ArgumentError('argument -a/--all: not allowed with ' 'a list of images') if self.args.get('ExecutableBy'): raise ArgumentError('argument -a/--all: not allowed with ' 'argument -x/--executable-by') if self.args.get('Owner'): raise ArgumentError('argument -a/--all: not allowed with ' 'argument -o/--owner') def main(self): if not any(self.args.get(item) for item in ('all', 'ImageId', 'ExecutableBy', 'Owner')): # Default to owned images and images with explicit launch perms self.params['Owner'] = ['self'] owned = self.send() del self.params['Owner'] self.params['ExecutableBy'] = ['self'] executable = self.send() del self.params['ExecutableBy'] owned['imagesSet'] = (owned.get('imagesSet', []) + executable.get('imagesSet', [])) return owned else: return self.send() def print_result(self, result): images = {} for image in result.get('imagesSet', []): images.setdefault(image['imageId'], image) for image_id, image in sorted(images.iteritems()): self.print_image(image) def print_image(self, image): print self.tabify(( 'IMAGE', image.get('imageId'), image.get('imageLocation'), image.get('imageOwnerAlias') or image.get('imageOwnerId'), image.get('imageState'), ('public' if image.get('isPublic') == 'true' else 'private'), image.get('architecture'), image.get('imageType'), image.get('kernelId'), image.get('ramdiskId'), image.get('platform'), image.get('rootDeviceType'), image.get('virtualizationType'), image.get('hypervisor'))) for mapping in image.get('blockDeviceMapping', []): self.print_blockdevice_mapping(mapping) for tag in image.get('tagSet', []): self.print_resource_tag(tag, image.get('imageId')) def print_blockdevice_mapping(self, mapping): print self.tabify(('BLOCKDEVICEMAPPING', mapping.get('deviceName'), mapping.get('ebs', {}).get('snapshotId'), mapping.get('ebs', {}).get('volumeSize'), mapping.get('ebs', {}).get('deleteOnTermination'))) euca2ools-3.0.2/euca2ools/commands/euca/describeinstanceattribute.py000066400000000000000000000146161222241730200256300ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import base64 from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, MutuallyExclusiveArgList class DescribeInstanceAttribute(EucalyptusRequest): DESCRIPTION = ("Show one of an instance's attributes.\n\n" "Note that exactly one attribute may be shown at a time.") ARGS = [Arg('InstanceId', metavar='INSTANCE', help='ID of the instance to show info for (required)'), MutuallyExclusiveArgList(True, Arg('-b', '--block-device-mapping', dest='Attribute', action='store_const', const='blockDeviceMapping', help='show block device mappings'), Arg('--disable-api-termination', dest='Attribute', action='store_const', const='disableApiTermination', help='show whether termination is disabled'), Arg('--ebs-optimized', dest='Attribute', action='store_const', const='ebsOptimized', help='''show whether the root volume is optimized for EBS I/O'''), Arg('-g', '--group-id', dest='Attribute', action='store_const', const='groupSet', help='show the security groups the instance belongs to'), Arg('-p', '--product-code', dest='Attribute', action='store_const', const='productCodes', help='show any associated product codes'), Arg('--instance-initiated-shutdown-behavior', dest='Attribute', action='store_const', const='instanceInitiatedShutdownBehavior', help='''show whether the instance stops or terminates when shut down'''), Arg('-t', '--instance-type', dest='Attribute', action='store_const', const='instanceType', help="show the instance's type"), Arg('--kernel', dest='Attribute', action='store_const', const='kernel', help='''show the ID of the kernel image associated with the instance'''), Arg('--ramdisk', dest='Attribute', action='store_const', const='ramdisk', help='''show the ID of the ramdisk image associated with the instance'''), Arg('--root-device-name', dest='Attribute', action='store_const', const='rootDeviceName', help='''show the name of the instance's root device (e.g. '/dev/sda1')'''), Arg('--source-dest-check', dest='Attribute', action='store_const', const='sourceDestCheck', help='''[VPC only] show whether source/destination checking is enabled for the instance'''), Arg('--user-data', dest='Attribute', action='store_const', const='userData', help="show the instance's user-data"))] LIST_TAGS = ['blockDeviceMapping', 'groupSet', 'productCodes'] def print_result(self, result): # Deal with complex data first if self.args['Attribute'] == 'blockDeviceMapping': for mapping in result.get('blockDeviceMapping', []): ebs = mapping.get('ebs', {}) print self.tabify(('BLOCKDEVICE', mapping.get('deviceName'), ebs.get('volumeId'), ebs.get('attachTime'), ebs.get('deleteOnTermination'))) # The EC2 tools have a couple more fields that I haven't been # able to identify. If you figure out what they are, please send # a patch. elif self.args['Attribute'] == 'groupSet': ## TODO: test this in the wild (I don't have a VPC to work with) groups = (group.get('groupId') or group.get('groupName') for group in result.get('groupSet', [])) print self.tabify(('groupSet', result.get('instanceId'), ', '.join(groups))) elif self.args['Attribute'] == 'productCodes': ## TODO: test this in the wild (I don't have anything I can test ## it with) codes = (code.get('productCode') for code in result.get('productCodes', [])) print self.tabify(('productCodes', result.get('instanceId'), ', '.join(codes))) elif self.args['Attribute'] == 'userData': userdata = base64.b64decode(result.get('userData', {}) .get('value', '')) if userdata: print self.tabify(('userData', result.get('instanceId'))) print userdata else: print self.tabify(('userData', result.get('instanceId'), None)) else: attr = result.get(self.args['Attribute']) if isinstance(attr, dict) and 'value' in attr: attr = attr['value'] print self.tabify((self.args['Attribute'], result.get('instanceId'), attr)) euca2ools-3.0.2/euca2ools/commands/euca/describeinstances.py000066400000000000000000000263651222241730200240730ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, Filter, GenericTagFilter class DescribeInstances(EucalyptusRequest): DESCRIPTION = 'Show information about instances' ARGS = [Arg('InstanceId', metavar='INSTANCE', nargs='*', help='limit results to specific instances')] FILTERS = [Filter('architecture', choices=('i386', 'x86_64', 'armhf'), help='CPU architecture'), Filter('association.allocation-id', help='''[VPC only] allocation ID bound to a network interface's elastic IP address'''), Filter('association.association-id', help='''[VPC only] association ID returned when an elastic IP was associated with a network interface'''), Filter('association.ip-owner-id', help='''[VPC only] ID of the owner of the elastic IP address associated with a network interface'''), Filter('association.public-ip', help='''[VPC only] address of the elastic IP address bound to a network interface'''), Filter('availability-zone'), Filter('block-device-mapping.attach-time', help='volume attachment time'), Filter('block-device-mapping.delete-on-termination', type=bool, help='''whether a volume is deleted upon instance termination'''), Filter('block-device-mapping.device-name', help='volume device name (e.g. /dev/sdf)'), Filter('block-device-mapping.status', help='volume status'), Filter('block-device-mapping.volume-id', help='volume ID'), Filter('client-token', help='idempotency token provided at instance run time'), Filter('dns-name', help='public DNS name'), # EC2's documentation for "group-id" refers VPC users to # "instance.group-id", while their documentation for the latter # refers them to the former. Consequently, I'm not going to # document a difference for either. They both seem to work for # non-VPC instances. Filter('group-id', help='security group ID'), Filter('group-name', help='security group name'), Filter('hypervisor', help='hypervisor type'), Filter('image-id', help='machine image ID'), Filter('instance.group-id', help='security group ID'), Filter('instance.group-name', help='security group name'), Filter('instance-id'), Filter('instance-lifecycle', choices=('spot',), help='whether this is a spot instance'), Filter('instance-state-code', type=int, help='numeric code identifying instance state'), Filter('instance-state-name', help='instance state'), Filter('instance-type'), Filter('ip-address', help='public IP address'), Filter('kernel-id', help='kernel image ID'), Filter('key-name', help='key pair name provided at instance launch time'), Filter('launch-index', help='launch index within a reservation'), Filter('launch-time', help='instance launch time'), Filter('monitoring-state', choices=('enabled', 'disabled'), help='monitoring state ("enabled" or "disabled")'), Filter('network-interface.addresses.association.ip-owner-id', help='''[VPC only] ID of the owner of the private IP address associated with a network interface'''), Filter('network-interface.addresses.association.public-ip', help='''[VPC only] ID of the association of an elastic IP address with a network interface'''), Filter('network-interface.addresses.primary', choices=('true', 'false'), help='''[VPC only] whether the IP address of the VPC network interface is the primary private IP address'''), Filter('network-interface.addresses.private-ip-address', help='''[VPC only] network interface's private IP address'''), Filter('network-interface.attachment.device-index', type=int, help='''[VPC only] device index to which a network interface is attached'''), Filter('network-interface.attachment.attach-time', help='''[VPC only] time a network interface was attached to an instance'''), Filter('network-interface.attachment.attachment-id', help='''[VPC only] ID of a network interface's attachment'''), Filter('network-interface.attachment.delete-on-termination', choices=('true', 'false'), help='''[VPC only] whether a network interface attachment is deleted when an instance is terminated'''), Filter('network-interface.attachment.instance-owner-id', help='''[VPC only] ID of the instance to which a network interface is attached'''), Filter('network-interface.attachment.status', choices=('attaching', 'attached', 'detaching', 'detached'), help="[VPC only] network interface's attachment status"), Filter('network-interface.availability-zone', help="[VPC only] network interface's availability zone"), Filter('network-interface.description', help='[VPC only] description of a network interface'), Filter('network-interface.group-id', help="[VPC only] network interface's security group ID"), Filter('network-interface.group-name', help='''[VPC only] network interface's security group name'''), Filter('network-interface.mac-address', help="[VPC only] network interface's hardware address"), Filter('network-interface.network-interface.id', help='[VPC only] ID of a network interface'), Filter('network-interface.owner-id', help="[VPC only] ID of a network interface's owner"), Filter('network-interface.private-dns-name', help="[VPC only] network interface's private DNS name"), Filter('network-interface.requester-id', help="[VPC only] network interface's requester ID"), Filter('network-interface.requester-managed', help='''[VPC only] whether the network interface is managed by the service'''), Filter('network-interface.source-destination-check', choices=('true', 'false'), help='''[VPC only] whether source/destination checking is enabled for a network interface'''), Filter('network-interface.status', help="[VPC only] network interface's status"), Filter('network-interface.subnet-id', help="[VPC only] ID of a network interface's subnet"), Filter('network-interface.vpc-id', help="[VPC only] ID of a network interface's VPC"), Filter('owner-id', help="instance owner's account ID"), Filter('placement-group-name'), Filter('platform', help='"windows" for Windows instances'), Filter('private-dns-name'), Filter('private-ip-address'), Filter('product-code'), Filter('product-code.type', choices=('devpay', 'marketplace'), help='type of product code ("devpay" or "marketplace")'), Filter('ramdisk-id', help='ramdisk image ID'), Filter('reason', help="reason for the instance's current state"), Filter('requestor-id', help='ID of the entity that launched an instance'), Filter('reservation-id'), Filter('root-device-name', help='root device name (e.g. /dev/sda1)'), Filter('root-device-type', choices=('ebs', 'instance-store'), help='root device type ("ebs" or "instance-store")'), Filter('spot-instance-request-id'), Filter('state-reason-code', help='reason code for the most recent state change'), Filter('state-reason-message', help='message describing the most recent state change'), Filter('subnet-id', help='[VPC only] ID of the subnet the instance is in'), Filter('tag-key', help='name of any tag assigned to the instance'), Filter('tag-value', help='value of any tag assigned to the instance'), GenericTagFilter('tag:KEY', help='specific tag key/value combination'), Filter('virtualization-type', choices=('paravirtual', 'hvm')), Filter('vpc-id', help='[VPC only] ID of the VPC the instance is in')] LIST_TAGS = ['reservationSet', 'instancesSet', 'groupSet', 'tagSet', 'blockDeviceMapping', 'productCodes', 'networkInterfaceSet', 'privateIpAddressesSet'] def print_result(self, result): for reservation in result.get('reservationSet'): self.print_reservation(reservation) euca2ools-3.0.2/euca2ools/commands/euca/describeinstancetypes.py000066400000000000000000000135451222241730200247710ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin class DescribeInstanceTypes(EucalyptusRequest, TabifyingMixin): DESCRIPTION = '[Eucalyptus only] Show information about instance types' ARGS = [Arg('InstanceType', metavar='INSTANCETYPE', nargs='*', help='limit results to specific instance types'), Arg('--by-zone', dest='by_zone', action='store_true', route_to=None, help='show info for each availability zone separately'), Arg('--show-capacity', dest='Availability', action='store_true', help='show info about instance capacity')] LIST_TAGS = ['instanceTypeDetails', 'availability'] def configure(self): EucalyptusRequest.configure(self) if self.args.get('by_zone', False): self.params['Availability'] = True def print_result(self, result): vmtype_names = [] # Keep an ordered list to deal with py2.6's lack # of OrderedDict vmtypes = {} # vmtype -> info and total capacity zones = {} # zone -> vmtype -> info and zone capacity for vmtype in result.get('instanceTypeDetails', []): vmtype_names.append(vmtype['name']) vmtypes[vmtype['name']] = {'cpu': vmtype.get('cpu'), 'memory': vmtype.get('memory'), 'disk': vmtype.get('disk'), 'available': 0, 'max': 0} if self.params.get('Availability', False): for zone in vmtype.get('availability', []): available = int(zone.get('available', 0)) max_ = int(zone.get('max', 0)) vmtypes[vmtype['name']]['available'] += available vmtypes[vmtype['name']]['max'] += max_ zones.setdefault(zone['zoneName'], {}) zones[zone['zoneName']][vmtype['name']] = { 'cpu': vmtype.get('cpu'), 'memory': vmtype.get('memory'), 'disk': vmtype.get('disk'), 'available': available, 'max': max_} if self.args.get('by_zone'): for zone, zone_vmtypes in sorted(zones.iteritems()): print self.tabify(('AVAILABILITYZONE', zone)) self._print_vmtypes(zone_vmtypes, vmtype_names) print else: self._print_vmtypes(vmtypes, vmtype_names) def _print_vmtypes(self, vmtypes, vmtype_names): # Fields and column headers fields = {'name': 'Name', 'cpu': 'CPUs', 'memory': 'Memory (MB)', 'disk': 'Disk (GB)', 'used': 'Used', 'total': 'Total', 'used_pct': 'Used %'} field_lengths = dict((field, len(header)) for field, header in fields.iteritems()) vmtype_infos = [] for vmtype_name in vmtype_names: total = int(vmtypes[vmtype_name].get('max', 0)) used = total - int(vmtypes[vmtype_name].get('available', 0)) if total != 0: used_pct = '{0:.0%}'.format(float(used) / float(total)) else: used_pct = '' vmtype_info = {'name': vmtype_name, 'cpu': vmtypes[vmtype_name].get('cpu'), 'memory': vmtypes[vmtype_name].get('memory'), 'disk': vmtypes[vmtype_name].get('disk'), 'used': used, 'total': total, 'used_pct': used_pct} vmtype_infos.append(vmtype_info) for field in fields: if len(str(vmtype_info[field])) > field_lengths[field]: field_lengths[field] = len(str(vmtype_info[field])) type_template = ('{{name:<{name}}} {{cpu:>{cpu}}} ' '{{memory:>{memory}}} {{disk:>{disk}}}') if self.args.get('Availability', False): type_template += (' {{used:>{used}}} / {{total:>{total}}} ' '{{used_pct:>{used_pct}}}') type_template = type_template.format(**field_lengths) print 'INSTANCETYPE\t', type_template.format(**fields) for vmtype_info in vmtype_infos: print 'INSTANCETYPE\t', type_template.format(**vmtype_info) euca2ools-3.0.2/euca2ools/commands/euca/describekeypairs.py000066400000000000000000000037651222241730200237320ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, Filter class DescribeKeyPairs(EucalyptusRequest): DESCRIPTION = 'Display information about available key pairs' ARGS = [Arg('KeyName', nargs='*', metavar='KEYPAIR', help='limit results to specific key pairs')] FILTERS = [Filter('fingerprint', help='fingerprint of the key pair'), Filter('key-name', help='name of the key pair')] LIST_TAGS = ['keySet'] def print_result(self, result): for key in result.get('keySet', []): print self.tabify(('KEYPAIR', key.get('keyName'), key.get('keyFingerprint'))) euca2ools-3.0.2/euca2ools/commands/euca/describeregions.py000066400000000000000000000036721222241730200235460ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, Filter class DescribeRegions(EucalyptusRequest): DESCRIPTION = 'Display information about regions' ARGS = [Arg('RegionName', nargs='*', metavar='REGION', help='limit results to specific regions')] FILTERS = [Filter('endpoint'), Filter('region-name')] LIST_TAGS = ['regionInfo'] def print_result(self, result): for region in result.get('regionInfo', []): print self.tabify(('REGION', region.get('regionName'), region.get('regionEndpoint'))) euca2ools-3.0.2/euca2ools/commands/euca/describesecuritygroups.py000066400000000000000000000137741222241730200252130ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, Filter class DescribeSecurityGroups(EucalyptusRequest): DESCRIPTION = ('Show information about security groups\n\nNote that ' 'filters are matched on literal strings only, so ' '"--filter ip-permission.from-port=22" will *not* match a ' 'group with a port range of 20 to 30.') ARGS = [Arg('group', metavar='GROUP', nargs='*', route_to=None, default=[], help='limit results to specific security groups')] FILTERS = [Filter('description', help='group description'), Filter('group-id'), Filter('group-name'), Filter('ip-permission.cidr', help='CIDR IP range granted permission by the group'), Filter('ip-permission.from-port', help='start of TCP/UDP port range, or ICMP type number'), Filter('ip-permission.group-name', help='''name of another group granted permission by this group'''), Filter('ip-permission.protocol', choices=('tcp', 'udp', 'icmp', '6', '17', '1'), help='IP protocol for the permission'), Filter('ip-permission.to-port', help='end of TCP/UDP port range, or ICMP code'), Filter('ip-permission.user-id', help='ID of an account granted permission'), Filter('owner-id', help="account ID of the group's owner"), Filter('tag-key', help='key of a tag assigned to the group'), Filter('tag-value', help='value of a tag assigned to the group'), Filter('vpc-id', help='[VPC only] ID of a VPC the group belongs to')] LIST_TAGS = ['securityGroupInfo', 'ipPermissions', 'ipPermissionsEgress', 'groups', 'ipRanges', 'tagSet'] def preprocess(self): for group in self.args['group']: if group.startswith('sg-'): self.params.setdefault('GroupId', []) self.params['GroupId'].append(group) else: self.params.setdefault('GroupName', []) self.params['GroupName'].append(group) def print_result(self, result): for group in result.get('securityGroupInfo', []): self.print_group(group) def print_group(self, group): print self.tabify(('GROUP', group.get('groupId'), group.get('ownerId'), group.get('groupName'), group.get('groupDescription'), group.get('vpcId'))) for perm in group.get('ipPermissions', []): perm_base = ['PERMISSION', group.get('ownerId'), group.get('groupName'), 'ALLOWS', perm.get('ipProtocol'), perm.get('fromPort'), perm.get('toPort')] for cidr_range in perm.get('ipRanges', []): perm_item = ['FROM', 'CIDR', cidr_range.get('cidrIp'), 'ingress'] print self.tabify(perm_base + perm_item) for othergroup in perm.get('groups', []): perm_item = ['FROM', 'USER', othergroup.get('userId')] if othergroup.get('groupId'): perm_item.extend(['ID', othergroup['groupId']]) else: perm_item.extend(['GRPNAME', othergroup['groupName']]) perm_item.append('ingress') print self.tabify(perm_base + perm_item) for perm in group.get('ipPermissionsEgress', []): perm_base = ['PERMISSION', group.get('ownerId'), group.get('groupName'), 'ALLOWS', perm.get('ipProtocol'), perm.get('fromPort'), perm.get('toPort')] for cidr_range in perm.get('ipRanges', []): perm_item = ['TO', 'CIDR', cidr_range.get('cidrIp'), 'egress'] print self.tabify(perm_base + perm_item) for othergroup in perm.get('groups', []): perm_item = ['TO', 'USER', othergroup.get('userId')] if othergroup.get('groupId'): perm_item.extend(['ID', othergroup['groupId']]) else: perm_item.extend(['GRPNAME', othergroup['groupName']]) perm_item.append('egress') print self.tabify(perm_base + perm_item) for tag in group.get('tagSet', []): self.print_resource_tag(tag, (group.get('groupId') or group.get('groupName'))) euca2ools-3.0.2/euca2ools/commands/euca/describesnapshots.py000066400000000000000000000111111222241730200241050ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, Filter, GenericTagFilter from requestbuilder.exceptions import ArgumentError class DescribeSnapshots(EucalyptusRequest): DESCRIPTION = ('Show information about snapshots\n\nBy default, only ' 'snapshots your account owns and snapshots for which your ' 'account has explicit restore permissions are shown.') ARGS = [Arg('SnapshotId', nargs='*', metavar='SNAPSHOT', help='limit results to specific snapshots'), Arg('-a', '--all', action='store_true', route_to=None, help='describe all snapshots'), Arg('-o', '--owner', dest='Owner', metavar='ACCOUNT', action='append', default=[], help='limit results to snapshots owned by specific accounts'), Arg('-r', '--restorable-by', dest='RestorableBy', action='append', metavar='ACCOUNT', default=[], help='''limit results to snapahots restorable by specific accounts''')] FILTERS = [Filter('description', help='snapshot description'), Filter('owner-alias', help="snapshot owner's account alias"), Filter('owner-id', help="snapshot owner's account ID"), Filter('progress', help='snapshot progress, in percentage'), Filter('snapshot-id'), Filter('start-time', help='snapshot initiation time'), Filter('status', choices=('pending', 'completed', 'error')), Filter('tag-key', help='key of a tag assigned to the snapshot'), Filter('tag-value', help='value of a tag assigned to the snapshot'), GenericTagFilter('tag:KEY', help='specific tag key/value combination'), Filter('volume-id', help='source volume ID'), Filter('volume-size', type=int)] LIST_TAGS = ['snapshotSet', 'tagSet'] # noinspection PyExceptionInherit def configure(self): EucalyptusRequest.configure(self) if self.args.get('all'): if self.args.get('Owner'): raise ArgumentError('argument -a/--all: not allowed with ' 'argument -o/--owner') if self.args.get('RestorableBy'): raise ArgumentError('argument -a/--all: not allowed with ' 'argument -r/--restorable-by') def main(self): if not any(self.args.get(item) for item in ('all', 'Owner', 'RestorableBy')): # Default to owned snapshots and those with explicit restore perms self.params['Owner'] = ['self'] owned = self.send() del self.params['Owner'] self.params['RestorableBy'] = ['self'] restorable = self.send() del self.params['RestorableBy'] owned['snapshotSet'] = (owned.get('snapshotSet', []) + restorable.get('snapshotSet', [])) return owned else: return self.send() def print_result(self, result): for snapshot in result.get('snapshotSet', []): self.print_snapshot(snapshot) euca2ools-3.0.2/euca2ools/commands/euca/describetags.py000066400000000000000000000040161222241730200230270ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest, RESOURCE_TYPE_MAP from requestbuilder import Filter class DescribeTags(EucalyptusRequest): DESCRIPTION = "List tags associated with your account's resources" FILTERS = [Filter('key'), Filter('resource-id'), Filter('resource-type', choices=sorted(tuple(RESOURCE_TYPE_MAP))), Filter('value')] LIST_TAGS = ['tagSet'] def print_result(self, result): for tag in result.get('tagSet', []): print self.tabify(['TAG', tag.get('resourceId'), tag.get('resourceType'), tag.get('key'), tag.get('value')]) euca2ools-3.0.2/euca2ools/commands/euca/describevolumes.py000066400000000000000000000063601222241730200235670ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, Filter, GenericTagFilter class DescribeVolumes(EucalyptusRequest): DESCRIPTION = 'Display information about volumes' ARGS = [Arg('VolumeId', metavar='VOLUME', nargs='*', help='limit results to specific volumes')] FILTERS = [Filter('attachment.attach-time', help='attachment start time'), Filter('attachment.delete-on-termination', help='''whether the volume will be deleted upon instance termination'''), Filter('attachment.device', help='device node exposed to the instance'), Filter('attachment.instance-id', help='ID of the instance the volume is attached to'), Filter('attachment.status', help='attachment state', choices=('attaching', 'attached', 'detaching', 'detached')), Filter('availability-zone'), Filter('create-time', help='creation time'), Filter('size', type=int, help='size in GiB'), Filter('snapshot-id', help='snapshot from which the volume was created'), Filter('status', choices=('creating', 'available', 'in-use', 'deleting', 'deleted', 'error')), Filter('tag-key', help='key of a tag assigned to the volume'), Filter('tag-value', help='value of a tag assigned to the volume'), GenericTagFilter('tag:KEY', help='specific tag key/value combination'), Filter(name='volume-id'), Filter(name='volume-type')] LIST_TAGS = ['volumeSet', 'attachmentSet', 'tagSet'] def print_result(self, result): for volume in result.get('volumeSet'): self.print_volume(volume) euca2ools-3.0.2/euca2ools/commands/euca/detachvolume.py000066400000000000000000000040351222241730200230510ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class DetachVolume(EucalyptusRequest): DESCRIPTION = 'Detach a volume from an instance' ARGS = [Arg('VolumeId', metavar='VOLUME', help='ID of the volume to detach (required)'), Arg('-i', '--instance', dest='InstanceId', metavar='INSTANCE', help='instance to detach from'), Arg('-d', '--device', dest='Device', help='device name'), Arg('-f', '--force', dest='Force', action='store_true', help='''detach without waiting for the instance. Data may be lost.''')] def print_result(self, result): self.print_attachment(result) euca2ools-3.0.2/euca2ools/commands/euca/disassociateaddress.py000066400000000000000000000053451222241730200244170ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError class DisassociateAddress(EucalyptusRequest): DESCRIPTION = 'Disassociate an elastic IP address from an instance' ARGS = [Arg('PublicIp', metavar='ADDRESS', nargs='?', help='''[Non-VPC only] elastic IP address to disassociate (required)'''), Arg('-a', '--association-id', dest='AssociationId', metavar='ASSOC', help="[VPC only] address's association ID (required)")] # noinspection PyExceptionInherit def configure(self): EucalyptusRequest.configure(self) if self.args.get('PublicIp'): if self.args.get('AssociationId'): raise ArgumentError('argument -a/--association-id: not ' 'allowed with an IP address') elif self.args['PublicIp'].startswith('eipassoc'): raise ArgumentError('VPC elastic IP association IDs must be ' 'be specified with -a/--association-id') elif not self.args.get('AssociationId'): raise ArgumentError( 'argument -a/--association-id or an IP address is required') def print_result(self, result): target = self.args.get('PublicIp') or self.args.get('AssociationId') print self.tabify(('ADDRESS', target)) euca2ools-3.0.2/euca2ools/commands/euca/getconsoleoutput.py000066400000000000000000000057471222241730200240270ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import base64 from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg import sys CHAR_ESCAPES = { u'\x00': u'^@', u'\x0c': u'^L', u'\x17': u'^W', u'\x01': u'^A', u'\x0e': u'^N', u'\x18': u'^X', u'\x02': u'^B', u'\x0f': u'^O', u'\x19': u'^Y', u'\x03': u'^C', u'\x10': u'^P', u'\x1a': u'^Z', u'\x04': u'^D', u'\x11': u'^Q', u'\x1b': u'^[', u'\x05': u'^E', u'\x12': u'^R', u'\x1c': u'^\\', u'\x06': u'^F', u'\x13': u'^S', u'\x1d': u'^]', u'\x07': u'^G', u'\x14': u'^T', u'\x1e': u'^^', u'\x08': u'^H', u'\x15': u'^U', u'\x1f': u'^_', u'\x0b': u'^K', u'\x16': u'^V', u'\x7f': u'^?', } class GetConsoleOutput(EucalyptusRequest): DESCRIPTION = 'Retrieve console output for the specified instance' ARGS = [Arg('InstanceId', metavar='INSTANCE', help='''ID of the instance to obtain console output from (required)'''), Arg('-r', '--raw-console-output', action='store_true', route_to=None, help='display raw output without escaping control characters')] def print_result(self, result): print result.get('instanceId', '') print result.get('timestamp', '') output = base64.b64decode(result.get('output', '')) output = output.decode(sys.stdout.encoding, 'replace') output = output.replace(u'\ufffd', u'?') if not self.args['raw_console_output']: # Escape control characters for char, escape in CHAR_ESCAPES.iteritems(): output = output.replace(char, escape) print output euca2ools-3.0.2/euca2ools/commands/euca/getpassword.py000066400000000000000000000046571222241730200227450ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import base64 from euca2ools.commands.euca.getpassworddata import GetPasswordData from requestbuilder import Arg import subprocess class GetPassword(GetPasswordData): NAME = 'GetPasswordData' DESCRIPTION = ('Retrieve the administrator password for an instance ' 'running Windows') ARGS = [Arg('-k', '--priv-launch-key', metavar='FILE', required=True, route_to=None, help='''file containing the private key corresponding to the key pair supplied at instance launch time (required)''')] def print_result(self, result): try: pwdata = result['passwordData'] except AttributeError: # The reply didn't contain a passwordData element. raise AttributeError('no password data found for this instance') cmd = subprocess.Popen(['openssl', 'rsautl', '-decrypt', '-inkey', self.args['priv_launch_key']], stdin=subprocess.PIPE, stdout=subprocess.PIPE) stdout, __ = cmd.communicate(base64.b64decode(pwdata)) print stdout euca2ools-3.0.2/euca2ools/commands/euca/getpassworddata.py000066400000000000000000000037421222241730200235710ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class GetPasswordData(EucalyptusRequest): DESCRIPTION = ('Retrieve the encrypted administrator password for an ' 'instance running Windows. The encrypted password may be ' 'decrypted using the private key of the key pair given ' 'when launching the instance.') ARGS = [Arg('InstanceId', metavar='INSTANCE', help='''ID of the instance to obtain the initial password for (required)''')] def print_result(self, result): if result.get('passwordData'): print result['passwordData'] euca2ools-3.0.2/euca2ools/commands/euca/importkeypair.py000066400000000000000000000041071222241730200232700ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import b64encoded_file_contents from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class ImportKeyPair(EucalyptusRequest): DESCRIPTION = 'Import a public RSA key as a new key pair' ARGS = [Arg('KeyName', metavar='KEYPAIR', help='name for the new key pair (required)'), Arg('-f', '--public-key-file', dest='PublicKeyMaterial', metavar='FILE', type=b64encoded_file_contents, required=True, help='''name of a file containing the public key to import (required)''')] def print_result(self, result): print self.tabify(['KEYPAIR', result.get('keyName'), result.get('keyFingerprint')]) euca2ools-3.0.2/euca2ools/commands/euca/modgroup.py000066400000000000000000000250111222241730200222220ustar00rootroot00000000000000# Copyright 2012-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, MutuallyExclusiveArgList from requestbuilder.exceptions import ArgumentError import sys class ModifySecurityGroupRequest(EucalyptusRequest): """ The basis for security group-editing commands """ ARGS = [Arg('group', metavar='GROUP', route_to=None, help='name or ID of the security group to modify (required)'), Arg('--egress', action='store_true', route_to=None, help='''[VPC only] manage an egress rule, which controls traffic leaving the group'''), Arg('-P', '--protocol', dest='IpPermissions.1.IpProtocol', choices=['tcp', 'udp', 'icmp', '6', '17', '1'], default='tcp', help='protocol to affect (default: tcp)'), Arg('-p', '--port-range', dest='port_range', metavar='RANGE', route_to=None, help='''range of ports (specified as "from-to") or a single port number (required for tcp and udp)'''), # ^ required for tcp and udp Arg('-t', '--icmp-type-code', dest='icmp_type_code', metavar='TYPE:CODE', route_to=None, help='''ICMP type and code (specified as "type:code") (required for icmp)'''), # ^ required for icmp MutuallyExclusiveArgList( Arg('-s', '--cidr', metavar='CIDR', dest='IpPermissions.1.IpRanges.1.CidrIp', help='''IP range (default: 0.0.0.0/0)'''), # ^ default is added by main() Arg('-o', dest='target_group', metavar='GROUP', route_to=None, help='''[Non-VPC only] name of a security group with which to affect network communication''')), Arg('-u', metavar='ACCOUNT', dest='IpPermissions.1.Groups.1.UserId', help='''ID of the account that owns the security group specified with -o''')] # noinspection PyExceptionInherit def configure(self): EucalyptusRequest.configure(self) if (self.args['group'].startswith('sg-') and len(self.args['group']) == 11): # The check could probably be a little better, but meh. Fix if # needed. self.params['GroupId'] = self.args['group'] else: if self.args['egress']: raise ArgumentError('egress rules must use group IDs, not ' 'names') self.params['GroupName'] = self.args['group'] target_group = self.args.get('target_group') if (target_group is not None and target_group.startswith('sg-') and len(target_group) == 11): # Same note as above self.params['IpPermissions.1.Groups.1.GroupId'] = target_group else: if self.args['egress']: raise ArgumentError('argument -o: egress rules must use group ' 'IDs, not names') self.params['IpPermissions.1.Groups.1.GroupName'] = target_group protocol = self.args.get('IpPermissions.1.IpProtocol') if protocol in ['icmp', '1']: if self.args.get('port_range'): raise ArgumentError('argument -p/--port-range: not compatible ' 'with protocol ' + protocol) if not self.args.get('icmp_type_code'): self.args['icmp_type_code'] = '-1:-1' types = self.args['icmp_type_code'].split(':') if len(types) == 2: try: from_port = int(types[0]) to_port = int(types[1]) except ValueError: raise ArgumentError('argument -t/--icmp-type-code: value ' 'must have format "1:2"') else: raise ArgumentError('argument -t/--icmp-type-code: value must ' 'have format "1:2"') if from_port < -1 or to_port < -1: raise ArgumentError('argument -t/--icmp-type-code: type, code ' 'must be at least -1') elif protocol in ['tcp', 'udp', '6', '17']: if self.args.get('icmp_type_code'): raise ArgumentError('argument -t/--icmp-type-code: not ' 'compatible with protocol ' + protocol) if not self.args.get('port_range'): raise ArgumentError('argument -p/--port-range is required for ' 'protocol ' + protocol) if ':' in self.args['port_range']: # Be extra helpful in the event of this common typo raise ArgumentError('argument -p/--port-range: multi-port ' 'range must be separated by "-", not ":"') if self.args['port_range'].startswith('-'): ports = self.args['port_range'][1:].split('-') ports[0] = '-' + ports[0] else: ports = self.args['port_range'].split('-') if len(ports) == 2: try: from_port = int(ports[0]) to_port = int(ports[1]) except ValueError: raise ArgumentError('argument -p/--port-range: multi-port ' 'value must be comprised of integers') elif len(ports) == 1: try: from_port = to_port = int(ports[0]) except ValueError: raise ArgumentError('argument -p/--port-range: single ' 'port value must be an integer') else: raise ArgumentError('argument -p/--port-range: value must ' 'have format "1" or "1-2"') if from_port < -1 or to_port < -1: raise ArgumentError('argument -p/--port-range: port number(s) ' 'must be at least -1') else: # Shouldn't get here since argparse should only allow the values we # handle raise ValueError('unrecognized protocol: "{0}"'.format(protocol)) self.params['IpPermissions.1.FromPort'] = from_port self.params['IpPermissions.1.ToPort'] = to_port if (not self.args.get('IpPermissions.1.IpRanges.1.GroupName') and not self.args.get('IpPermissions.1.IpRanges.1.CidrIp')): # Default rule target is the entire Internet self.params['IpPermissions.1.IpRanges.1.CidrIp'] = '0.0.0.0/0' if (self.params.get('IpPermissions.1.Groups.1.GroupName') and not self.args.get('IpPermissions.1.Groups.1.UserId')): raise ArgumentError('argument -u is required when -o names a ' 'security group by name') def print_result(self, result): print self.tabify(['GROUP', self.args.get('group')]) perm_str = ['PERMISSION', self.args.get('group'), 'ALLOWS', self.params.get('IpPermissions.1.IpProtocol'), self.params.get('IpPermissions.1.FromPort'), self.params.get('IpPermissions.1.ToPort')] if self.params.get('IpPermissions.1.Groups.1.UserId'): perm_str.append('USER') perm_str.append(self.params.get('IpPermissions.1.Groups.1.UserId')) if self.params.get('IpPermissions.1.Groups.1.GroupId'): perm_str.append('GRPID') perm_str.append(self.params.get( 'IpPermissions.1.Groups.1.GroupId')) elif self.params.get('IpPermissions.1.Groups.1.GroupName'): perm_str.append('GRPNAME') perm_str.append(self.params.get( 'IpPermissions.1.Groups.1.GroupName')) if self.params.get('IpPermissions.1.IpRanges.1.CidrIp'): perm_str.extend(['FROM', 'CIDR']) perm_str.append(self.params.get( 'IpPermissions.1.IpRanges.1.CidrIp')) print self.tabify(perm_str) def process_cli_args(self): # We need to parse out -t and -p *before* argparse can see it because # of Python bug 9334, which prevents argparse from recognizing '-1:-1' # as an option value and not a (nonexistent) option name. saved_sys_argv = list(sys.argv) def parse_neg_one_value(opt_name): if opt_name in sys.argv: index = sys.argv.index(opt_name) if (index < len(sys.argv) - 1 and sys.argv[index + 1].startswith('-1')): opt_val = sys.argv[index + 1] del sys.argv[index:index + 2] return opt_val icmp_type_code = (parse_neg_one_value('-t') or parse_neg_one_value('--icmp-type-code')) port_range = (parse_neg_one_value('-p') or parse_neg_one_value('--port-range')) EucalyptusRequest.process_cli_args(self) if icmp_type_code: self.args['icmp_type_code'] = icmp_type_code if port_range: self.args['port_range'] = port_range sys.argv = saved_sys_argv euca2ools-3.0.2/euca2ools/commands/euca/modifyimageattribute.py000066400000000000000000000117521222241730200246130ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg, MutuallyExclusiveArgList from requestbuilder.exceptions import ArgumentError class ModifyImageAttribute(EucalyptusRequest): DESCRIPTION = 'Modify an attribute of an image' ARGS = [Arg('ImageId', metavar='IMAGE', help='image to modify'), MutuallyExclusiveArgList(True, Arg('--description', dest='Description.Value', metavar='DESC', help="change the image's description"), Arg('-p', '--product-code', dest='ProductCode', metavar='CODE', action='append', help='''product code to add to the given instance-store image'''), Arg('-l', '--launch-permission', action='store_true', route_to=None, help='grant/revoke launch permissions with -a/-r')), Arg('-a', '--add', metavar='ENTITY', action='append', default=[], route_to=None, help='''account to grant launch permission, or "all" for all accounts'''), Arg('-r', '--remove', metavar='ENTITY', action='append', default=[], route_to=None, help='''account to remove launch permission from, or "all" for all accounts''')] # noinspection PyExceptionInherit def preprocess(self): if self.args.get('launch_permission'): lperm = {} for entity in self.args.get('add', []): lperm.setdefault('Add', []) if entity == 'all': lperm['Add'].append({'Group': entity}) else: lperm['Add'].append({'UserId': entity}) for entity in self.args.get('remove', []): lperm.setdefault('Remove', []) if entity == 'all': lperm['Remove'].append({'Group': entity}) else: lperm['Remove'].append({'UserId': entity}) if not lperm: raise ArgumentError('at least one entity must be specified ' 'with -a/--add or -r/--remove') self.params['LaunchPermission'] = lperm else: if self.args.get('add'): raise ArgumentError('argument -a/--add may only be used ' 'with -l/--launch-permission') if self.args.get('remove'): raise ArgumentError('argument -r/--remove may only be used ' 'with -l/--launch-permission') def print_result(self, result): if self.args.get('Description.Value'): print self.tabify(('description', self.args['ImageId'], None, self.args['Description.Value'])) if self.args.get('ProductCode'): for code in self.args['ProductCode']: print self.tabify(('productcodes', self.args['ImageId'], 'productCode', code)) if self.args.get('launch_permission'): for add in self.params['LaunchPermission'].get('Add', []): for (entity_type, entity_name) in add.items(): print self.tabify(('launchPermission', self.args['ImageId'], 'ADD', entity_type, entity_name)) for add in self.params['LaunchPermission'].get('Remove', []): for (entity_type, entity_name) in add.items(): print self.tabify(('launchPermission', self.args['ImageId'], 'REMOVE', entity_type, entity_name)) euca2ools-3.0.2/euca2ools/commands/euca/modifyinstancetypeattribute.py000066400000000000000000000061021222241730200262300ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError from requestbuilder.mixins import TabifyingMixin class ModifyInstanceTypeAttribute(EucalyptusRequest, TabifyingMixin): DESCRIPTION = '[Eucalyptus cloud admin only] Modify an instance type' ARGS = [Arg('Name', metavar='INSTANCETYPE', help='name of the instance type to modify (required)'), Arg('-c', '--cpus', dest='Cpu', metavar='COUNT', type=int, help='number of virtual CPUs to allocate to each instance'), Arg('-d', '--disk', dest='Disk', metavar='GB', type=int, help='amount of instance storage to allow each instance'), Arg('-m', '--memory', dest='Memory', metavar='MB', type=int, help='amount of RAM to allocate to each instance'), Arg('--reset', dest='Reset', action='store_true', help='reset the instance type to its default configuration')] # noinspection PyExceptionInherit def configure(self): EucalyptusRequest.configure(self) if (self.args.get('Reset') and any(self.args.get(attr) is not None for attr in ('Cpu', 'Disk', 'Memory'))): # Basically, reset is mutually exclusive with everything else. raise ArgumentError('argument --reset may not be used with ' 'instance type attributes') def print_result(self, result): newtype = result.get('instanceType', {}) print self.tabify(('INSTANCETYPE', newtype.get('name'), newtype.get('cpu'), newtype.get('memory'), newtype.get('disk'))) euca2ools-3.0.2/euca2ools/commands/euca/modifysnapshotattribute.py000066400000000000000000000104421222241730200253630ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError class ModifySnapshotAttribute(EucalyptusRequest): DESCRIPTION = 'Modify an attribute of a snapshot' ARGS = [Arg('SnapshotId', metavar='SNAPSHOT', help='ID of the snapshot to modify'), Arg('-c', '--create-volume-permission', action='store_true', required=True, route_to=None, help='grant/revoke volume creation permission with -a/-r'), Arg('-a', '--add', metavar='ENTITY', action='append', default=[], route_to=None, help='account to grant permission, or "all" for all accounts'), Arg('-r', '--remove', metavar='ENTITY', action='append', default=[], route_to=None, help='''account to remove permission from, or "all" for all accounts''')] # noinspection PyExceptionInherit def preprocess(self): if self.args.get('create_volume_permission'): cvperm = {} for entity in self.args.get('add', []): cvperm.setdefault('Add', []) if entity == 'all': cvperm['Add'].append({'Group': entity}) else: cvperm['Add'].append({'UserId': entity}) for entity in self.args.get('remove', []): cvperm.setdefault('Remove', []) if entity == 'all': cvperm['Remove'].append({'Group': entity}) else: cvperm['Remove'].append({'UserId': entity}) if not cvperm: raise ArgumentError('at least one entity must be specified ' 'with -a/--add or -r/--remove') self.params['CreateVolumePermission'] = cvperm else: if self.args.get('add'): raise ArgumentError('argument -a/--add may only be used ' 'with -c/--create-volume-permission') if self.args.get('remove'): raise ArgumentError('argument -r/--remove may only be used ' 'with -c/--create-volume-permission') def print_result(self, result): if self.args.get('create_volume_permission'): for add in self.params['CreateVolumePermission'].get('Add', []): for (entity_type, entity_name) in add.items(): print self.tabify(('createVolumePermission', self.args['SnapshotId'], 'ADD', entity_type, entity_name)) for add in self.params['CreateVolumePermission'].get('Remove', []): for (entity_type, entity_name) in add.items(): print self.tabify(('createVolumePermission', self.args['SnapshotId'], 'REMOVE', entity_type, entity_name)) euca2ools-3.0.2/euca2ools/commands/euca/monitorinstances.py000066400000000000000000000036511222241730200237730ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class MonitorInstances(EucalyptusRequest): DESCRIPTION = 'Enable monitoring for one or more instances' ARGS = [Arg('InstanceId', metavar='INSTANCE', nargs='+', help='''ID(s) of the instance(s) to begin monitoring (at least 1 required)''')] LIST_TAGS = ['instancesSet'] def print_result(self, result): for instance in result.get('instancesSet', []): print self.tabify((instance.get('instanceId'), 'monitoring-' + instance.get('monitoring', {}).get('state'))) euca2ools-3.0.2/euca2ools/commands/euca/rebootinstances.py000066400000000000000000000032101222241730200235650ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class RebootInstances(EucalyptusRequest): DESCRIPTION = 'Reboot one or more instances' ARGS = [Arg('InstanceId', metavar='INSTANCE', nargs='+', help='''ID(s) of the instance(s) to reboot (at least 1 required)''')] euca2ools-3.0.2/euca2ools/commands/euca/registerimage.py000066400000000000000000000124471222241730200232260ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import ec2_block_device_mapping from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError class RegisterImage(EucalyptusRequest): DESCRIPTION = 'Register a new image' ARGS = [Arg('ImageLocation', metavar='MANIFEST', nargs='?', help='''location of the image manifest in S3 storage (required for instance-store images)'''), Arg('-n', '--name', dest='Name', required=True, help='name of the new image (required)'), Arg('-d', '--description', dest='Description', help='description of the new image'), Arg('-a', '--architecture', dest='Architecture', choices=('i386', 'x86_64', 'armhf'), help='CPU architecture of the new image'), Arg('--kernel', dest='KernelId', metavar='KERNEL', help='ID of the kernel to associate with the new image'), Arg('--ramdisk', dest='RamdiskId', metavar='RAMDISK', help='ID of the ramdisk to associate with the new image'), Arg('--root-device-name', dest='RootDeviceName', metavar='DEVICE', help='root device name (default: /dev/sda1)'), # ^ default is added by main() Arg('-s', '--snapshot', route_to=None, help='snapshot to use for the root device'), Arg('-b', '--block-device-mapping', metavar='DEVICE=MAPPED', dest='BlockDeviceMapping', action='append', type=ec2_block_device_mapping, default=[], help='''define a block device mapping for the image, in the form DEVICE=MAPPED, where "MAPPED" is "none", "ephemeral(0-3)", or "[SNAP-ID]:[SIZE]:[true|false]:[standard|VOLTYPE[:IOPS]]"'''), Arg('--virtualization-type', dest='VirtualizationType', choices=('paravirtual', 'hvm'), help='[Privileged] virtualization type for the new image')] # noinspection PyExceptionInherit def preprocess(self): if self.args.get('ImageLocation'): # instance-store image if self.args.get('RootDeviceName'): raise ArgumentError('argument --root-device-name: not allowed ' 'with argument MANIFEST') if self.args.get('snapshot'): raise ArgumentError('argument --snapshot: not allowed with ' 'argument MANIFEST') else: # Try for an EBS image if not self.args.get('RootDeviceName'): self.args['RootDeviceName'] = '/dev/sda1' snapshot = self.args.get('snapshot') # Look for a mapping for the root device for mapping in self.args['BlockDeviceMapping']: if mapping.get('DeviceName') == self.args['RootDeviceName']: if (snapshot and snapshot != mapping.get('Ebs', {}).get('SnapshotId')): # The mapping's snapshot differs or doesn't exist raise ArgumentError('snapshot ID supplied with ' '--snapshot conflicts with block device mapping ' 'for root device ' + mapping['DeviceName']) else: # No need to apply --snapshot since the mapping is # already there break else: if snapshot: self.params['BlockDeviceMapping'].append( {'DeviceName': self.args['RootDeviceName'], 'Ebs': {'SnapshotId': snapshot}}) else: raise ArgumentError('either a manifest location or a root ' 'device snapshot mapping must be specified') def print_result(self, result): print self.tabify(('IMAGE', result.get('imageId'))) euca2ools-3.0.2/euca2ools/commands/euca/releaseaddress.py000066400000000000000000000051751222241730200233650ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError class ReleaseAddress(EucalyptusRequest): DESCRIPTION = 'Release an elastic IP address' ARGS = [Arg('PublicIp', metavar='ADDRESS', nargs='?', help='[Non-VPC only] address to release (required)'), Arg('-a', '--allocation-id', dest='AllocationId', metavar='ALLOC', help='''[VPC only] allocation ID for the address to release (required)''')] # noinspection PyExceptionInherit def configure(self): EucalyptusRequest.configure(self) if (self.args.get('PublicIp') is not None and self.args.get('AllocationId') is not None): # Can't be both EC2 and VPC raise ArgumentError( 'argument -a/--allocation-id: not allowed with an IP address') if (self.args.get('PublicIp') is None and self.args.get('AllocationId') is None): # ...but we still have to be one of them raise ArgumentError( 'argument -a/--allocation-id or an IP address is required') def print_result(self, result): print self.tabify(('ADDRESS', self.args.get('PublicIp'), self.args.get('AllocationId'))) euca2ools-3.0.2/euca2ools/commands/euca/resetimageattribute.py000066400000000000000000000037001222241730200244400ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from requestbuilder import Arg from euca2ools.commands.euca import EucalyptusRequest class ResetImageAttribute(EucalyptusRequest): DESCRIPTION = 'Reset an attribute of an image to its default value' ARGS = [Arg('ImageId', metavar='IMAGE', help='ID of the image whose attribute should be reset (required)'), Arg('-l', '--launch-permission', dest='Attribute', action='store_const', const='launchPermission', required=True, help='reset launch permissions')] def print_result(self, result): print self.tabify(('launchPermission', self.args['ImageId'], 'RESET')) euca2ools-3.0.2/euca2ools/commands/euca/revoke.py000066400000000000000000000032411222241730200216620ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca.modgroup import ModifySecurityGroupRequest class Revoke(ModifySecurityGroupRequest): DESCRIPTION = 'Remove a rule from a security group' @property def action(self): if self.args['egress']: return 'RevokeSecurityGroupEgress' else: return 'RevokeSecurityGroupIngress' euca2ools-3.0.2/euca2ools/commands/euca/runinstances.py000066400000000000000000000315301222241730200231050ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import base64 from euca2ools.commands.argtypes import (ec2_block_device_mapping, vpc_interface) from euca2ools.commands.euca import EucalyptusRequest import os.path from requestbuilder import Arg, MutuallyExclusiveArgList from requestbuilder.exceptions import ArgumentError class RunInstances(EucalyptusRequest): DESCRIPTION = 'Launch instances of a machine image' ARGS = [Arg('ImageId', metavar='IMAGE', help='ID of the image to instantiate (required)'), Arg('-n', '--instance-count', dest='count', metavar='MIN[-MAX]', default='1', route_to=None, help='''number 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.'''), Arg('-g', '--group', action='append', default=[], route_to=None, help='security group(s) in which to launch the instances'), Arg('-k', '--key', dest='KeyName', metavar='KEYPAIR', help='name of the key pair to use'), MutuallyExclusiveArgList( Arg('-d', '--user-data', metavar='DATA', route_to=None, help='''user data to make available to instances in this reservation'''), Arg('--user-data-force', metavar='DATA', route_to=None, help='''same as -d/--user-data, but without checking if a file by that name exists first'''), Arg('-f', '--user-data-file', metavar='FILE', route_to=None, help='''file containing user data to make available to the instances in this reservation''')), Arg('--addressing', dest='AddressingType', choices=('public', 'private'), help='''[Eucalyptus only] addressing scheme to launch the instance with. Use "private" to run an instance with no public address.'''), Arg('-t', '--instance-type', dest='InstanceType', help='type of instance to launch'), Arg('-z', '--availability-zone', metavar='ZONE', dest='Placement.AvailabilityZone'), Arg('--kernel', dest='KernelId', metavar='KERNEL', help='ID of the kernel to launch the instance(s) with'), Arg('--ramdisk', dest='RamdiskId', metavar='RAMDISK', help='ID of the ramdisk to launch the instance(s) with'), Arg('-b', '--block-device-mapping', metavar='DEVICE=MAPPED', dest='BlockDeviceMapping', action='append', type=ec2_block_device_mapping, default=[], help='''define a block device mapping for the instances, in the form DEVICE=MAPPED, where "MAPPED" is "none", "ephemeral(0-3)", or "[SNAP-ID]:[SIZE]:[true|false]:[standard|VOLTYPE[:IOPS]]"'''), Arg('-m', '--monitor', dest='Monitoring.Enabled', action='store_const', const='true', help='enable detailed monitoring for the instance(s)'), Arg('--disable-api-termination', dest='DisableApiTermination', action='store_const', const='true', help='prevent API users from terminating the instance(s)'), Arg('--instance-initiated-shutdown-behavior', dest='InstanceInitiatedShutdownBehavior', choices=('stop', 'terminate'), help=('whether to "stop" (default) or terminate EBS instances ' 'when they shut down')), Arg('--placement-group', dest='Placement.GroupName', metavar='PLGROUP', help='''name of a placement group to launch into'''), Arg('--tenancy', dest='Placement.Tenancy', choices=('default', 'dedicated'), help='''[VPC only] "dedicated" to run on single-tenant hardware'''), Arg('--client-token', dest='ClientToken', metavar='TOKEN', help='unique identifier to ensure request idempotency'), Arg('-s', '--subnet', metavar='SUBNET', route_to=None, help='''[VPC only] subnet to create the instance's network interface in'''), Arg('--private-ip-address', metavar='ADDRESS', route_to=None, help='''[VPC only] assign a specific primary private IP address to an instance's interface'''), MutuallyExclusiveArgList( Arg('--secondary-private-ip-address', metavar='ADDRESS', action='append', route_to=None, help='''[VPC only] assign a specific secondary private IP address to an instance's network interface. Use this option multiple times to add additional addresses.'''), Arg('--secondary-private-ip-address-count', metavar='COUNT', type=int, route_to=None, help='''[VPC only] automatically assign a specific number of secondary private IP addresses to an instance's network interface''')), Arg('-a', '--network-interface', dest='NetworkInterface', metavar='INTERFACE', action='append', type=vpc_interface, help='''[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.'''), Arg('-p', '--iam-profile', metavar='IPROFILE', route_to=None, help='''name or ARN of the IAM instance profile to associate with the new instance(s)'''), Arg('--ebs-optimized', dest='EbsOptimized', action='store_const', const='true', help='optimize the new instance(s) for EBS I/O')] LIST_TAGS = ['reservationSet', 'instancesSet', 'groupSet', 'tagSet', 'blockDeviceMapping', 'productCodes', 'networkInterfaceSet', 'privateIpAddressesSet'] # noinspection PyExceptionInherit def configure(self): EucalyptusRequest.configure(self) if self.args.get('user_data'): if os.path.isfile(self.args['user_data']): raise ArgumentError( '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.') else: self.params['UserData'] = base64.b64encode( self.args['user_data']) elif self.args.get('user_data_force'): self.params['UserData'] = base64.b64encode( self.args['user_data_force']) elif self.args.get('user_data_file'): with open(self.args['user_data_file']) as user_data_file: self.params['UserData'] = base64.b64encode( user_data_file.read()) if self.args.get('KeyName') is None: default_key_name = self.config.get_region_option( 'ec2-default-keypair') if default_key_name: self.log.info("using default key pair '%s'", default_key_name) self.params['KeyName'] = default_key_name # noinspection PyExceptionInherit def preprocess(self): counts = self.args['count'].split('-') if len(counts) == 1: try: self.params['MinCount'] = int(counts[0]) self.params['MaxCount'] = int(counts[0]) except ValueError: raise ArgumentError('argument -n/--instance-count: instance ' 'count must be an integer') elif len(counts) == 2: try: self.params['MinCount'] = int(counts[0]) self.params['MaxCount'] = int(counts[1]) except ValueError: raise ArgumentError('argument -n/--instance-count: instance ' 'count range must be must be comprised of ' 'integers') else: raise ArgumentError('argument -n/--instance-count: value must ' 'have format "1" or "1-2"') if self.params['MinCount'] < 1 or self.params['MaxCount'] < 1: raise ArgumentError('argument -n/--instance-count: instance count ' 'must be positive') if self.params['MinCount'] > self.params['MaxCount']: self.log.debug('MinCount > MaxCount; swapping') self.params.update({'MinCount': self.params['MaxCount'], 'MaxCount': self.params['MinCount']}) for group in self.args['group']: if group.startswith('sg-'): self.params.setdefault('SecurityGroupId', []) self.params['SecurityGroupId'].append(group) else: self.params.setdefault('SecurityGroup', []) self.params['SecurityGroup'].append(group) iprofile = self.args.get('iam_profile') if iprofile: if iprofile.startswith('arn:'): self.params['IamInstanceProfile.Arn'] = iprofile else: self.params['IamInstanceProfile.Name'] = iprofile # Assemble an interface out of the "friendly" split interface options cli_iface = {} if self.args.get('private_ip_address'): cli_iface['PrivateIpAddresses'] = [ {'PrivateIpAddress': self.args['private_ip_address'], 'Primary': 'true'}] if self.args.get('secondary_private_ip_address'): sec_ips = [{'PrivateIpAddress': addr} for addr in self.args['secondary_private_ip_address']] cli_iface.setdefault('PrivateIpAddresses', []) cli_iface['PrivateIpAddresses'].extend(sec_ips) if self.args.get('secondary_private_ip_address_count'): sec_ip_count = self.args['secondary_private_ip_address_count'] cli_iface['SecondaryPrivateIpAddressCount'] = sec_ip_count if self.args.get('subnet'): cli_iface['SubnetId'] = self.args['subnet'] if cli_iface: cli_iface['DeviceIndex'] = 0 self.params.setdefault('NetworkInterface', []) self.params['NetworkInterface'].append(cli_iface) def print_result(self, result): self.print_reservation(result) euca2ools-3.0.2/euca2ools/commands/euca/startinstances.py000066400000000000000000000037251222241730200234430ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class StartInstances(EucalyptusRequest): DESCRIPTION = 'Start one or more stopped instances' ARGS = [Arg('InstanceId', metavar='INSTANCE', nargs='+', help='ID(s) of the instance(s) to start')] LIST_TAGS = ['instancesSet'] def print_result(self, result): for instance in result.get('instancesSet', []): print self.tabify(('INSTANCE', instance.get('instanceId'), instance.get('previousState', {}).get('name'), instance.get('currentState', {}).get('name'))) euca2ools-3.0.2/euca2ools/commands/euca/stopinstances.py000066400000000000000000000042011222241730200232610ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class StopInstances(EucalyptusRequest): DESCRIPTION = 'Stop one or more running instances' ARGS = [Arg('InstanceId', metavar='INSTANCE', nargs='+', help='ID(s) of the instance(s) to stop'), Arg('-f', '--force', dest='Force', action='store_const', const='true', help='immediately stop the instance(s). Data may be lost')] LIST_TAGS = ['instancesSet'] def print_result(self, result): for instance in result.get('instancesSet', []): print self.tabify(('INSTANCE', instance.get('instanceId'), instance.get('previousState', {}).get('name'), instance.get('currentState', {}).get('name'))) euca2ools-3.0.2/euca2ools/commands/euca/terminateinstances.py000066400000000000000000000037311222241730200242730ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class TerminateInstances(EucalyptusRequest): DESCRIPTION = 'Terminate one or more instances' ARGS = [Arg('InstanceId', metavar='INSTANCE', nargs='+', help='ID(s) of the instance(s) to terminate')] LIST_TAGS = ['instancesSet'] def print_result(self, result): for instance in result.get('instancesSet', []): print self.tabify(('INSTANCE', instance.get('instanceId'), instance.get('previousState', {}).get('name'), instance.get('currentState', {}).get('name'))) euca2ools-3.0.2/euca2ools/commands/euca/unmonitorinstances.py000066400000000000000000000036621222241730200243400ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.euca import EucalyptusRequest from requestbuilder import Arg class UnmonitorInstances(EucalyptusRequest): DESCRIPTION = 'Disable monitoring for one or more instances' ARGS = [Arg('InstanceId', metavar='INSTANCE', nargs='+', help='''ID(s) ofthe the instance(s) to stop monitoring (at least 1 required)''')] LIST_TAGS = ['instancesSet'] def print_result(self, result): for instance in result.get('instancesSet', []): print self.tabify((instance.get('instanceId'), 'monitoring-' + instance.get('monitoring', {}).get('state'))) euca2ools-3.0.2/euca2ools/commands/eustore/000077500000000000000000000000001222241730200205665ustar00rootroot00000000000000euca2ools-3.0.2/euca2ools/commands/eustore/__init__.py000066400000000000000000000041071222241730200227010ustar00rootroot00000000000000# Copyright 2011-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands import Euca2ools from requestbuilder import Arg, MutuallyExclusiveArgList from requestbuilder.request import BaseRequest from requestbuilder.service import BaseService class EuStore(BaseService): NAME = 'eustore' DESCRIPTION = 'Eucalyptus Image Store' REGION_ENVVAR = 'EUCA_REGION' URL_ENVVAR = 'EUSTORE_URL' ARGS = [MutuallyExclusiveArgList( Arg('--region', dest='userregion', metavar='USER@REGION', help='''name of the region and/or user in config files to use to connect to the service'''), Arg('-U', '--url', help='EuStore service URL'))] class EuStoreRequest(BaseRequest): SUITE = Euca2ools SERVICE_CLASS = EuStore DEFAULT_ROUTES = () euca2ools-3.0.2/euca2ools/commands/eustore/describeimages.py000066400000000000000000000054701222241730200241140ustar00rootroot00000000000000# Copyright 2011-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.eustore import EuStoreRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin class DescribeImages(EuStoreRequest, TabifyingMixin): DESCRIPTION = 'List images available for installation from EuStore' ARGS = [Arg('-v', '--verbose', action='store_true', help='display more information about images than the default')] def preprocess(self): self.path = 'catalog' # Requests 1 adds Transfer-Encoding: chunked unconditionally when # self.body is None. emis.eucalyptus.com currently runs nginx without # the module needed for that loaded, so this hacks around it. self.body = '' def parse_response(self, response): self.log.debug('-- response content --\n', extra={'append': True}) self.log.debug(response.text, extra={'append': True}) self.log.debug('-- end of response content --') return response.json() def print_result(self, catalog): for image in catalog.get('images', []): hypervisors = image.get('hypervisors-supported', []) bits = [image.get('name'), image.get('os'), image.get('architecture'), image.get('version'), ','.join(hypervisors), image.get('description')] if self.args['verbose']: bits.extend([image.get('date'), image.get('stamp'), image.get('recipe'), image.get('contact')]) print self.tabify(bits) euca2ools-3.0.2/euca2ools/commands/eustore/installimage.py000066400000000000000000000534651222241730200236260ustar00rootroot00000000000000# Copyright 2011-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse import copy from euca2ools.commands.bundle import add_bundle_creds from euca2ools.commands.bundle.bundleimage import BundleImage from euca2ools.commands.bundle.uploadbundle import UploadBundle from euca2ools.commands.euare import Euare from euca2ools.commands.euare.listaccountaliases import ListAccountAliases from euca2ools.commands.euca import Eucalyptus from euca2ools.commands.euca.registerimage import RegisterImage from euca2ools.commands.eustore import EuStoreRequest import euca2ools.commands.eustore.describeimages from euca2ools.commands.walrus import Walrus from euca2ools.util import mkdtemp_for_large_files import hashlib import os.path import random from requestbuilder import Arg, MutuallyExclusiveArgList from requestbuilder.auth import QuerySigV2Auth, S3RestAuth import requestbuilder.commands.http from requestbuilder.exceptions import ArgumentError, ClientError from requestbuilder.mixins import FileTransferProgressBarMixin from requestbuilder.util import set_userregion import shutil import sys import tarfile import urlparse import zlib class InstallImage(EuStoreRequest, FileTransferProgressBarMixin): DESCRIPTION = 'Download an image from EuStore and add it to your cloud' ARGS = [MutuallyExclusiveArgList(True, Arg('-i', '--image-name', metavar='EUIMAGE', help='name of the image to download and install'), Arg('-t', '--tarball', metavar='FILE', help='tarball to install the image from')), Arg('-b', '--bucket', required=True, help='bucket to store the images in (required)'), Arg('-s', '--description', metavar='DESC', help='image description (required for -t)'), Arg('-a', '--architecture', choices=('i386', 'x86_64', 'armhf'), help='image architecture (required for -t)'), Arg('-p', '--prefix', help='prefix to use when naming the image'), Arg('--hypervisor', choices=('xen', 'kvm', 'universal'), help='''hypervisor the kernel image is built for (required for images with hypervisor-specific kernels'''), Arg('-k', '--kernel-type', dest='kernel_type', choices=('xen', 'kvm', 'universal'), help=argparse.SUPPRESS), Arg('-d', '--directory', dest='directory', metavar='DIR', help='''location to place the image and other artifacts (default: dir named by TMPDIR, TEMP, or TMP environment variables, or otherwise /var/tmp)'''), Arg('--pad-name', action='store_true', help='''add some random characters to the image's name to ensure it is unique'''), Arg('--kernel', help='''ID of the kernel image to use instead of the one bundled with the image'''), Arg('--ramdisk', help='''ID of the ramdisk image to use instead of the one bundled with the image'''), Arg('-I', '--access-key-id', dest='key_id', metavar='KEY_ID'), Arg('-S', '--secret-key', dest='secret_key', metavar='KEY'), Arg('-c', '--cert', metavar='FILE', help='file containing your signing certificate'), Arg('--privatekey', metavar='FILE', help='''file containing the private key to sign the bundle's manifest with. This private key will also be required to unbundle the image in the future.'''), Arg('--ec2cert', metavar='FILE', help='''file containing the cloud's X.509 certificate'''), Arg('-u', '--user', metavar='ACCOUNT', help='your account ID'), Arg('--ec2-url', metavar='URL', help='compute service endpoint URL'), Arg('--iam-url', metavar='URL', help='identity service endpoint URL'), Arg('--s3-url', metavar='URL', help='storage service endpoint URL'), Arg('-y', '--yes', action='store_true', help=argparse.SUPPRESS)] # noinspection PyExceptionInherit def configure(self): EuStoreRequest.configure(self) set_userregion(self.config, self.args.get('userregion')) if self.args.get('kernel_type'): # Use it and complain self.args['hypervisor'] = self.args['kernel_type'] msg = ('argument -k/--kernel-type is deprecated; use --hypervisor ' 'instead') self.log.warn(msg) print >> sys.stderr, 'warning:', msg # Get bundle creds first add_bundle_creds(self.args, self.config) if not self.args.get('cert'): raise ArgumentError( 'missing certificate; please supply one with -c') self.log.debug('certificate: %s', self.args['cert']) if not self.args.get('privatekey'): raise ArgumentError( 'missing private key; please supply one with --privatekey') self.log.debug('private key: %s', self.args['privatekey']) if not self.args.get('ec2cert'): raise ArgumentError( 'missing cloud certificate; please supply one with --ec2cert') self.log.debug('cloud certificate: %s', self.args['ec2cert']) if not self.args.get('user'): raise ArgumentError( 'missing account ID; please supply one with --user') self.log.debug('account ID: %s', self.args['user']) # Set up the web services -- we're going to use them a lot query_auth = QuerySigV2Auth(self.config, key_id=self.args.get('key_id'), secret_key=self.args.get('secret_key')) self.__euare = Euare(self.config, loglevel=self.log.level, auth=copy.copy(query_auth), url=self.args.get('iam_url')) self.log.debug('configuring euare service') self.__euare.configure() self.__eucalyptus = Eucalyptus(self.config, loglevel=self.log.level, auth=copy.copy(query_auth), url=self.args.get('ec2_url')) self.log.debug('configuring eucalyptus service') self.__eucalyptus.configure() s3_auth = S3RestAuth(self.config, key_id=self.args.get('key_id'), secret_key=self.args.get('secret_key')) self.__walrus = Walrus(self.config, loglevel=self.log.level, auth=s3_auth, url=self.args.get('s3_url')) self.__walrus.configure() # Check other args next if self.args.get('tarball'): if not self.args.get('architecture'): raise ArgumentError('argument -a/--architecture is required ' 'when -t/--tarball is used') if not self.args.get('hypervisor'): raise ArgumentError('argument --hypervisor is required when ' '-t/--tarball is used') self.args['tarball'] = os.path.expanduser(os.path.expandvars( self.args['tarball'])) if not os.path.exists(self.args['tarball']): raise ArgumentError("tarball file '{0}' does not exist" .format(self.args['tarball'])) if not os.path.isfile(self.args['tarball']): raise ArgumentError("tarball file '{0}' is not a file" .format(self.args['tarball'])) if self.args.get('kernel') and not self.args.get('ramdisk'): raise ArgumentError('argument --kernel: --ramdisk is required') if self.args.get('ramdisk') and not self.args.get('kernel'): raise ArgumentError('argument --ramdisk: --kernel is required') if self.args.get('image') and self.args.get('architecture'): self.log.warn("downloaded image's architecture may be overridden") def ensure_kernel_reg_privs(self): req = ListAccountAliases(service=self.__euare, config=self.config) response = req.main() for alias in response.get('AccountAliases', []): if alias == 'eucalyptus': self.log.debug("found account alias '%s'; ok to register " "kernel/ramdisk images", alias) return raise ClientError("kernel/ramdisk images may only be registered by " "the 'eucalyptus' account") def main(self): if not self.args.get('kernel') or not self.args.get('ramdisk'): self.ensure_kernel_reg_privs() if self.args.get('directory'): workdir = self.args['directory'] should_delete_workdir = False else: workdir = mkdtemp_for_large_files() self.log.debug('created working directory %s', workdir) should_delete_workdir = True tarball_path = self.get_tarball(workdir=workdir) image_ids = self.bundle_and_register_all(workdir, tarball_path) if should_delete_workdir: shutil.rmtree(workdir) return image_ids def print_result(self, image_ids): print 'Installed new image', image_ids['machine'] def get_tarball(self, workdir): if self.args.get('tarball'): self.log.info('using local tarball %s', self.args['tarball']) return self.args['tarball'] else: # Download one req = euca2ools.commands.eustore.describeimages.DescribeImages( service=self.service, config=self.config) eustore_images = req.main() for image in eustore_images.get('images', []): if image.get('name') == self.args['image_name']: break else: raise KeyError("no such image: '{0}'" .format(self.args['image_name'])) # pylint: disable=W0631 self.log.debug('image data: %s', str(image)) if self.args.get('architecture') is None: self.args['architecture'] = image.get('architecture') if self.args.get('description') is None: self.args['description'] = image.get('description') if bool(image.get('single-kernel', False)): self.log.debug('image catalog data specify single-kernel; ' "setting hypervisor to 'universal'") self.args['hypervisor'] = 'universal' if not self.args.get('hypervisor'): raise RuntimeError("image '{0}' uses hypervisor-specific " "kernels; please specify a hypervisor with " "--hypervisor" .format(self.args['image_name'])) if self.service.endpoint.endswith('/'): endpoint = self.service.endpoint else: endpoint = self.service.endpoint + '/' url = urlparse.urljoin(endpoint, image['url']) self.log.info('downloading image from %s', url) label = 'Downloading image '.format(os.path.basename(url)) req = requestbuilder.commands.http.Get( label=label, url=url, show_progress=self.args.get('show_progress', False), dest=workdir, config=self.config) tarball_path, tarball_size = req.main() self.log.info('downloaded %i bytes to %s', tarball_size, tarball_path) expected_crc = image['name'] # Yes, really. real_crc = self.calc_file_checksum(tarball_path) if real_crc != expected_crc: raise RuntimeError('downloaded file is incomplete or corrupt ' '(checksum: {0}, expected: {1})' .format(real_crc, expected_crc)) return tarball_path # pylint: enable=W0631 def calc_file_checksum(self, filename): filesize = os.path.getsize(filename) pbar = self.get_progressbar(label='Verifying image ', maxval=filesize) digest = hashlib.md5() with open(filename) as file_: pbar.start() while file_.tell() < filesize: chunk = file_.read(4096) digest.update(chunk) pbar.update(file_.tell()) pbar.finish() crc = zlib.crc32(digest.hexdigest()) & 0xffffffff return '{0:0>10d}'.format(crc) def bundle_and_register_all(self, workdir, tarball_filename): if self.args['show_progress']: print 'Preparing to extract image...' if self.args.get('pad_name', False): image_name_pad = '{0:0>8x}-'.format(random.randrange(16**8)) else: image_name_pad = '' image_name = 'eustore-{0}{1}'.format( image_name_pad, os.path.splitext(os.path.basename(tarball_filename))[0] .replace('.', '_')) tarball = tarfile.open(tarball_filename, 'r:gz') try: members = tarball.getmembers() filenames = tuple(member.name for member in members) commonprefix = os.path.commonprefix(filenames) kernel_id = self.args.get('kernel') ramdisk_id = self.args.get('ramdisk') if self.args['hypervisor'] == 'universal': hv_prefix = commonprefix else: hv_type_dir = self.args['hypervisor'] + '-kernel' hv_prefix = os.path.join(commonprefix, hv_type_dir) # Get any kernel and ramdisk images we're missing bundled_images = [] for member in members: if member.name.startswith(hv_prefix): if kernel_id is None and 'vmlinu' in member.name: # Note that vmlinux/vmlinuz is not always at the # beginning of the file name bundled_images.append(member.name) kernel_image = self.extract_without_path( tarball, member, workdir, 'Extracting kernel ') manifest_loc = self.bundle_and_upload_image( kernel_image, 'kernel', workdir) req = RegisterImage( config=self.config, service=self.__eucalyptus, ImageLocation=manifest_loc, Name=(image_name + '-kernel'), Description=self.args.get('description'), Architecture=self.args.get('architecture')) response = req.main() kernel_id = response.get('imageId') if self.args['show_progress']: print 'Registered kernel image', kernel_id elif (ramdisk_id is None and any(s in member.name for s in ('initrd', 'initramfs', 'loader'))): bundled_images.append(member.name) ramdisk_image = self.extract_without_path( tarball, member, workdir, 'Extracting ramdisk') manifest_loc = self.bundle_and_upload_image( ramdisk_image, 'ramdisk', workdir) req = RegisterImage( config=self.config, service=self.__eucalyptus, ImageLocation=manifest_loc, Name=(image_name + '-ramdisk'), Description=self.args.get('description'), Architecture=self.args.get('architecture')) response = req.main() ramdisk_id = response.get('imageId') if self.args['show_progress']: print 'Registered ramdisk image', ramdisk_id if kernel_id is None: raise RuntimeError('failed to find a useful kernel image') if ramdisk_id is None: raise RuntimeError('failed to find a useful ramdisk image') # Now that we have kernel and ramdisk image IDs, deal with the # machine image machine_id = None for member in members: if member.name in bundled_images: continue if any(s in member.name for s in ('initrd', 'initramfs', 'loader')): # Make sure we don't accidentally register a ramdisk image. # This can happen when use of --ramdisk prevents us from # pruning it later. continue if machine_id is None and member.name.endswith('.img'): bundled_images.append(member.name) machine_image = self.extract_without_path( tarball, member, workdir, 'Extracting image ') manifest_loc = self.bundle_and_upload_image( machine_image, 'machine', workdir, kernel_id=kernel_id, ramdisk_id=ramdisk_id) req = RegisterImage( config=self.config, service=self.__eucalyptus, ImageLocation=manifest_loc, Name=image_name, Description=self.args.get('description'), Architecture=self.args.get('architecture')) response = req.main() machine_id = response.get('imageId') if self.args['show_progress']: print 'Registered machine image', machine_id finally: tarball.close() if self.args['show_progress']: print '-- Done --' return {'machine': machine_id, 'kernel': kernel_id, 'ramdisk': ramdisk_id} def extract_without_path(self, tarball, member, destdir, bar_label): dest_filename = os.path.join(destdir, os.path.basename(member.name)) self.log.info('extracting %s from tarball to %s', member.name, dest_filename) src = tarball.extractfile(member) pbar = self.get_progressbar(label=bar_label, maxval=member.size) try: with open(dest_filename, 'w') as dest: while dest.tell() < member.size: # The first chunk may take a while to read since gzip # doesn't support seeking. chunk = src.read(16384) dest.write(chunk) if pbar.start_time is None: pbar.start() pbar.update(dest.tell()) pbar.finish() finally: src.close() return dest_filename def bundle_and_upload_image(self, image, image_type, workdir, kernel_id=None, ramdisk_id=None): if image_type == 'machine': image_type_args = {'kernel': kernel_id, 'ramdisk': ramdisk_id} progressbar_label = 'Bundling image ' elif image_type == 'kernel': image_type_args = {'kernel': 'true'} progressbar_label = 'Bundling kernel ' elif image_type == 'ramdisk': image_type_args = {'ramdisk': 'true'} progressbar_label = 'Bundling ramdisk ' else: raise ValueError("unrecognized image type: '{0}'" .format(image_type)) cmd = BundleImage(config=self.config, image=image, arch=self.args['architecture'], cert=self.args['cert'], privatekey=self.args['privatekey'], ec2cert=self.args['ec2cert'], user=self.args['user'], destination=workdir, image_type=image_type, show_progress=self.args.get('show_progress', False), progressbar_label=progressbar_label, **image_type_args) __, manifest_path = cmd.main() if self.args.get('show_progress', False): print '-- Uploading {0} image --'.format(image_type) cmd = UploadBundle(config=self.config, service=self.__walrus, bucket=self.args['bucket'], manifest=manifest_path, acl='aws-exec-read', show_progress=self.args.get('show_progress', False)) manifest_loc = cmd.main() return manifest_loc euca2ools-3.0.2/euca2ools/commands/monitoring/000077500000000000000000000000001222241730200212655ustar00rootroot00000000000000euca2ools-3.0.2/euca2ools/commands/monitoring/__init__.py000066400000000000000000000104211222241730200233740ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands import Euca2ools from euca2ools.exceptions import AWSError from requestbuilder import Arg, MutuallyExclusiveArgList import requestbuilder.auth from requestbuilder.mixins import TabifyingMixin import requestbuilder.service from requestbuilder.request import AWSQueryRequest class CloudWatch(requestbuilder.service.BaseService): NAME = 'monitoring' DESCRIPTION = 'Instance monitoring service' API_VERSION = '2010-08-01' AUTH_CLASS = requestbuilder.auth.QuerySigV2Auth REGION_ENVVAR = 'EUCA_REGION' URL_ENVVAR = 'AWS_CLOUDWATCH_URL' ARGS = [MutuallyExclusiveArgList( Arg('--region', dest='userregion', metavar='USER@REGION', help='''name of the region and/or user in config files to use to connect to the service'''), Arg('-U', '--url', metavar='URL', help='instance monitoring service endpoint URL'))] def handle_http_error(self, response): raise AWSError(response) class CloudWatchRequest(AWSQueryRequest, TabifyingMixin): SUITE = Euca2ools SERVICE_CLASS = CloudWatch METHOD = 'POST' def parse_response(self, response): response_dict = AWSQueryRequest.parse_response(self, response) useful_keys = list(filter(lambda x: x != 'ResponseMetadata', response_dict.keys())) if len(useful_keys) == 1: return response_dict[useful_keys[0]] or {} else: return response_dict def print_alarm(self, alarm): bits = [alarm.get('AlarmName')] if self.args['show_long']: bits.append(alarm.get('AlarmDescription')) bits.append(alarm.get('StateValue')) if self.args['show_long']: bits.append(alarm.get('StateReason')) bits.append(alarm.get('StateReasonData')) bits.append(alarm.get('ActionsEnabled')) bits.append(','.join(alarm.get('OKActions', []))) bits.append(','.join(alarm.get('AlarmActions', []))) if self.args['show_long']: bits.append(','.join(alarm.get('InsufficientDataActions', []))) bits.append(alarm.get('Namespace')) bits.append(alarm.get('MetricName')) if self.args['show_long']: dimensions = [] for dimension in alarm.get('Dimensions', []): dimensions.append('{0}={1}'.format(dimension.get('Name'), dimension.get('Value'))) if len(dimensions) > 0: bits.append('{{{0}}}'.format(','.join(dimensions))) else: bits.append(None) bits.append(alarm.get('Period')) bits.append(alarm.get('Statistic')) if self.args['show_long']: bits.append(alarm.get('Unit')) bits.append(alarm.get('EvaluationPeriods')) bits.append(alarm.get('ComparisonOperator')) bits.append(alarm.get('Threshold')) print self.tabify(bits) euca2ools-3.0.2/euca2ools/commands/monitoring/argtypes.py000066400000000000000000000032121222241730200234730ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse def cloudwatch_dimension(dim_as_str): try: name, val = dim_as_str.split('=', 1) return {'Name': name, 'Value': val} except ValueError: raise argparse.ArgumentTypeError('dimension filter "{0}" must have ' 'form KEY=VALUE'.format(dim_as_str)) euca2ools-3.0.2/euca2ools/commands/monitoring/deletealarms.py000066400000000000000000000033571222241730200243110ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.monitoring import CloudWatchRequest from requestbuilder import Arg class DeleteAlarms(CloudWatchRequest): DESCRIPTION = 'Delete alarms' ARGS = [Arg('AlarmNames.member', metavar='ALARM', nargs='+', help='names of the alarms to delete'), Arg('-f', '--force', action='store_true', route_to=None, help=argparse.SUPPRESS)] # for compatibility euca2ools-3.0.2/euca2ools/commands/monitoring/describealarmhistory.py000066400000000000000000000060101222241730200260530ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.monitoring import CloudWatchRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class DescribeAlarmHistory(CloudWatchRequest, TabifyingMixin): DESCRIPTION = 'Retrieve history for one alarm or all alarms' ARGS = [Arg('AlarmName', metavar='ALARM', nargs='?', help='limit results to a specific alarm'), Arg('--end-date', dest='EndDate', metavar='DATE', help='limit results to history before a given point in time'), Arg('--history-item-type', dest='HistoryItemType', choices=('Action', 'ConfigurationUpdate', 'StateUpdate'), help='limit results to specific history item types'), Arg('--show-long', action='store_true', route_to=None, help='show detailed event data as machine-readable JSON'), Arg('--start-date', dest='StartDate', metavar='DATE', help='limit results to history after a given point in time')] LIST_TAGS = ['AlarmHistoryItems'] def main(self): return PaginatedResponse(self, (None,), ('AlarmHistoryItems',)) def prepare_for_page(self, page): self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): for item in result.get('AlarmHistoryItems', []): bits = [item.get('AlarmName'), item.get('Timestamp'), item.get('HistoryItemType'), item.get('HistorySummary')] if self.args['show_long']: bits.append(item.get('HistoryData')) print self.tabify(bits) euca2ools-3.0.2/euca2ools/commands/monitoring/describealarms.py000066400000000000000000000055771222241730200246350ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.monitoring import CloudWatchRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class DescribeAlarms(CloudWatchRequest, TabifyingMixin): DESCRIPTION = 'Describe alarms' ARGS = [Arg('AlarmNames.member', metavar='ALARM', nargs='*', help='limit results to specific alarms'), Arg('--action-prefix', dest='ActionPrefix', metavar='PREFIX', help='''limit results to alarms whose actions' ARNs begin with a specific string'''), Arg('--alarm-name-prefix', dest='AlarmNamePrefix', metavar='PREFIX', help='''limit results to alarms whose names begin with a specific string'''), Arg('--show-long', action='store_true', route_to=None, help="show all of the alarms' info"), Arg('--state-value', dest='StateValue', choices=('OK', 'ALARM', 'INSUFFICIENT_DATA'), help='limit results to alarms in a specific state')] LIST_TAGS = ['MetricAlarms', 'AlarmActions', 'Dimensions', 'InsufficientDataActions', 'OKActions'] def main(self): return PaginatedResponse(self, (None,), ('MetricAlarms',)) def prepare_for_page(self, page): self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): for alarm in result.get('MetricAlarms', []): self.print_alarm(alarm) euca2ools-3.0.2/euca2ools/commands/monitoring/describealarmsformetric.py000066400000000000000000000071241222241730200265360ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.monitoring import CloudWatchRequest from euca2ools.commands.monitoring.argtypes import cloudwatch_dimension from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class DescribeAlarmsForMetric(CloudWatchRequest, TabifyingMixin): DESCRIPTION = ('Describe alarms for a single metric.\n\nNote that all ' "of an alarm's metrics must match exactly to obtain any " 'results.') ARGS = [Arg('--metric-name', dest='MetricName', metavar='METRIC', required=True, help='name of the metric (required)'), Arg('--namespace', dest='Namespace', metavar='NAMESPACE', required=True, help='namespace of the metric (required)'), # --alarm-description is supported by the tool, but not the service Arg('--alarm-description', route_to=None, help=argparse.SUPPRESS), Arg('--dimensions', dest='Dimensions.member', metavar='KEY1=VALUE1,KEY2=VALUE2,...', type=delimited_list(',', item_type=cloudwatch_dimension), help='dimensions of the metric'), Arg('--period', dest='Period', metavar='SECONDS', help='period over which statistics are applied'), Arg('--show-long', action='store_true', route_to=None, help="show all of the alarms' info"), Arg('--statistic', dest='Statistic', choices=('Average', 'Maximum', 'Minimum', 'SampleCount', 'Sum'), help='statistic of the metric on which to trigger alarms'), Arg('--unit', dest='Unit', help='unit of measurement for statistics')] LIST_TAGS = ['MetricAlarms', 'AlarmActions', 'Dimensions', 'InsufficientDataActions', 'OKActions'] def main(self): return PaginatedResponse(self, (None,), ('MetricAlarms',)) def prepare_for_page(self, page): self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): for alarm in result.get('MetricAlarms', []): self.print_alarm(alarm) euca2ools-3.0.2/euca2ools/commands/monitoring/disablealarmactions.py000066400000000000000000000032151222241730200256410ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.monitoring import CloudWatchRequest from requestbuilder import Arg class DisableAlarmActions(CloudWatchRequest): DESCRIPTION = 'Disable all actions for one or more alarms' ARGS = [Arg('AlarmNames.member', metavar='ALARM', nargs='+', help='names of the alarms to disable actions for')] euca2ools-3.0.2/euca2ools/commands/monitoring/enablealarmactions.py000066400000000000000000000032121222241730200254610ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.monitoring import CloudWatchRequest from requestbuilder import Arg class EnableAlarmActions(CloudWatchRequest): DESCRIPTION = 'Enable all actions for one or more alarms' ARGS = [Arg('AlarmNames.member', metavar='ALARM', nargs='+', help='names of the alarms to enable actions for')] euca2ools-3.0.2/euca2ools/commands/monitoring/getmetricstatistics.py000066400000000000000000000116761222241730200257500ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import datetime from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.monitoring import CloudWatchRequest from euca2ools.commands.monitoring.argtypes import cloudwatch_dimension from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class GetMetricStatistics(CloudWatchRequest, TabifyingMixin): DESCRIPTION = "Show a metric's statistics" ARGS = [Arg('MetricName', metavar='METRIC', help='name of the metric to get statistics for (required)'), Arg('-n', '--namespace', dest='Namespace', required=True, help="the metric's namespace (required)"), Arg('-s', '--statistics', dest='Statistics.member', required=True, metavar='STAT1,STAT2,...', type=delimited_list(','), help='the metric statistics to show (at least 1 required)'), Arg('--dimensions', dest='Dimensions.member', metavar='KEY1=VALUE1,KEY2=VALUE2,...', type=delimited_list(',', item_type=cloudwatch_dimension), help='the dimensions of the metric to show'), Arg('--start-time', dest='StartTime', metavar='YYYY-MM-DDThh:mm:ssZ', help='''earliest time to retrieve data points for (default: one hour ago)'''), Arg('--end-time', dest='EndTime', metavar='YYYY-MM-DDThh:mm:ssZ', help='''latest time to retrieve data points for (default: now)'''), Arg('--period', dest='Period', metavar='SECONDS', type=int, help='''granularity of the returned data points (must be a multiple of 60)'''), Arg('--unit', dest='Unit', help='unit the metric is reported in')] LIST_TAGS = ['Datapoints'] # noinspection PyExceptionInherit def configure(self): CloudWatchRequest.configure(self) if self.args.get('period'): if self.args['period'] <= 0: raise ArgumentError( 'argument --period: value must be positive') elif self.args['period'] % 60 != 0: raise ArgumentError( 'argument --period: value must be a multiple of 60') def main(self): now = datetime.datetime.utcnow() then = now - datetime.timedelta(hours=1) if not self.args.get('StartTime'): self.params['StartTime'] = then.strftime('%Y-%m-%dT%H:%M:%SZ') if not self.args.get('EndTime'): self.params['EndTime'] = now.strftime('%Y-%m-%dT%H:%M:%SZ') return PaginatedResponse(self, (None,), ('Datapoints',)) def prepare_for_page(self, page): self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): points = [] for point in result.get('Datapoints', []): timestamp = point.get('Timestamp', '') try: parsed = datetime.datetime.strptime(timestamp, '%Y-%m-%dT%H:%M:%SZ') timestamp = parsed.strftime('%Y-%m-%d %H:%M:%S') except ValueError: # We'll just print it verbatim pass points.append((timestamp, point.get('SampleCount'), point.get('Average'), point.get('Sum'), point.get('Minimum'), point.get('Maximum'), point.get('Unit'))) for point in sorted(points): print self.tabify(point) euca2ools-3.0.2/euca2ools/commands/monitoring/listmetrics.py000066400000000000000000000065561222241730200242150ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.monitoring import CloudWatchRequest from euca2ools.commands.monitoring.argtypes import cloudwatch_dimension from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse class ListMetrics(CloudWatchRequest, TabifyingMixin): DESCRIPTION = 'Show a list of monitoring metrics' ARGS = [Arg('-d', '--dimensions', dest='Dimensions.member', metavar='KEY1=VALUE1,KEY2=VALUE2,...', type=delimited_list(',', item_type=cloudwatch_dimension), help='limit results to metrics with specific dimensions'), Arg('-m', '--metric-name', dest='MetricName', metavar='METRIC', help='limit results to a specific metric'), Arg('-n', '--namespace', dest='Namespace', metavar='NAMESPACE', help='limit results to metrics in a specific namespace')] LIST_TAGS = ['Metrics', 'Dimensions'] def main(self): return PaginatedResponse(self, (None,), ('Metrics',)) def prepare_for_page(self, page): self.params['NextToken'] = page def get_next_page(self, response): return response.get('NextToken') or None def print_result(self, result): out_lines = [] for metric in sorted(result.get('Metrics', [])): if len(metric.get('Dimensions', [])) > 0: formatted_dims = ['{0}={1}'.format(dimension.get('Name'), dimension.get('Value')) for dimension in metric['Dimensions']] out_lines.append((metric.get('MetricName'), metric.get('Namespace'), '{{{0}}}'.format(','.join(formatted_dims)))) else: out_lines.append((metric.get('MetricName'), metric.get('Namespace'), None)) for out_line in sorted(out_lines): print self.tabify(out_line) euca2ools-3.0.2/euca2ools/commands/monitoring/putmetricalarm.py000066400000000000000000000113731222241730200246750ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.monitoring import CloudWatchRequest from euca2ools.commands.monitoring.argtypes import cloudwatch_dimension from requestbuilder import Arg class PutMetricAlarm(CloudWatchRequest): DESCRIPTION = 'Create or update an alarm' ARGS = [Arg('AlarmName', metavar='ALARM', help='name of the alarm (required)'), Arg('--comparison-operator', dest='ComparisonOperator', choices=('GreaterThanOrEqualToThreshold', 'GreaterThanThreshold', 'LessThanThreshold', 'LessThanOrEqualToThreshold'), required=True, help='''arithmetic operator with which the comparison with the threshold will be made (required)'''), Arg('--evaluation-periods', dest='EvaluationPeriods', type=int, metavar='COUNT', required=True, help='''number of consecutive periods for which the value of the metric needs to be compared to the threshold (required)'''), Arg('--metric-name', dest='MetricName', metavar='METRIC', required=True, help="name for the alarm's associated metric (required)"), Arg('--namespace', dest='Namespace', metavar='NAMESPACE', required=True, help="namespace for the alarm's associated metric (required)"), Arg('--period', dest='Period', metavar='SECONDS', type=int, required=True, help='''period over which the specified statistic is applied (required)'''), Arg('--statistic', dest='Statistic', choices=('Average', 'Maximum', 'Minimum', 'SampleCount', 'Sum'), required=True, help='statistic on which to alarm (required)'), Arg('--threshold', dest='Threshold', metavar='FLOAT', type=float, required=True, help='value to compare the statistic against (required)'), Arg('--actions-enabled', dest='ActionsEnabled', choices=('true', 'false'), help='''whether this alarm's actions should be executed when it changes state'''), Arg('--alarm-actions', dest='AlarmActions.member', metavar='ARN1,ARN2,...', type=delimited_list(','), help='''ARNs of SNS topics to publish to when the alarm changes to the ALARM state'''), Arg('--alarm-description', dest='AlarmDescription', metavar='DESCRIPTION', help='description of the alarm'), Arg('-d', '--dimensions', dest='Dimensions.member', metavar='KEY1=VALUE1,KEY2=VALUE2,...', type=delimited_list(',', item_type=cloudwatch_dimension), help="dimensions for the alarm's associated metric"), Arg('--insufficient-data-actions', metavar='ARN1,ARN2,...', dest='InsufficientDataActions.member', type=delimited_list(','), help='''ARNs of SNS topics to publish to when the alarm changes to the INSUFFICIENT_DATA state'''), Arg('--ok-actions', dest='OKActions.member', metavar='ARN1,ARN2,...', type=delimited_list(','), help='''ARNs of SNS topics to publish to when the alarm changes to the OK state'''), Arg('--unit', dest='Unit', help="unit for the alarm's associated metric")] euca2ools-3.0.2/euca2ools/commands/monitoring/putmetricdata.py000066400000000000000000000076161222241730200245170ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.argtypes import delimited_list from euca2ools.commands.monitoring import CloudWatchRequest from euca2ools.commands.monitoring.argtypes import cloudwatch_dimension from requestbuilder import Arg, MutuallyExclusiveArgList def statistic_set(set_as_str): pairs = {} for pair in set_as_str.split(','): try: key, val = pair.split('=') except ValueError: raise argparse.ArgumentTypeError( 'statistic set must have format KEY1=VALUE1,...') try: pairs[key] = float(val) except ValueError: raise argparse.ArgumentTypeError('value "{0}" must be numeric' .format(val)) for field in ('Maximum', 'Minimum', 'SampleCount', 'Sum'): if field not in pairs: raise argparse.ArgumentTypeError( 'value for statistic "{0}" is required'.format(field)) return pairs class PutMetricData(CloudWatchRequest): DESCRIPTION = 'Add data points or statistics to a metric' ARGS = [Arg('-m', '--metric-name', dest='MetricData.member.1.MetricName', metavar='METRIC', required=True, help='name of the metric to add data points to (required)'), Arg('-n', '--namespace', dest='Namespace', required=True, help="the metric's namespace (required)"), MutuallyExclusiveArgList(True, Arg('-v', '--value', dest='MetricData.member.1.Value', metavar='FLOAT', type=float, help='data value for the metric'), Arg('-s', '--statistic-values', '--statisticValues', dest='MetricData.member.1.StatisticValues', type=statistic_set, metavar=('Maximum=FLOAT,Minimum=FLOAT,' 'SampleCount=FLOAT,Sum=FLOAT'), help='''statistic values for the metric. Values for Maximum, Minimum, SampleCount, and Sum are all required.''')), Arg('-d', '--dimensions', dest='Dimensions.member', metavar='KEY1=VALUE1,KEY2=VALUE2,...', type=delimited_list(',', item_type=cloudwatch_dimension), help='the dimensions of the metric to add data points to'), Arg('-t', '--timestamp', dest='MetricData.member.1.Timestamp', metavar='YYYY-MM-DDThh:mm:ssZ', help='timestamp of the data point'), Arg('-u', '--unit', dest='MetricData.member.1.Unit', metavar='UNIT', help='unit the metric is being reported in')] euca2ools-3.0.2/euca2ools/commands/monitoring/setalarmstate.py000066400000000000000000000042511222241730200245120ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.monitoring import CloudWatchRequest from requestbuilder import Arg class SetAlarmState(CloudWatchRequest): DESCRIPTION = 'Temporarily set the state of an alarm' ARGS = [Arg('AlarmName', metavar='ALARM', help='name of the alarm to update (required)'), Arg('--state-value', dest='StateValue', required=True, choices=('ALARM', 'INSUFFICIENT_DATA', 'OK'), help='state to set the alarm to (required)'), Arg('--state-reason', dest='StateReason', metavar='REASON', required=True, help='''human-readable reason why the alarm was set to this state (required)'''), Arg('--state-reason-data', dest='StateReasonData', metavar='JSON', help='''JSON-formatted reason why the alarm was set to this state''')] euca2ools-3.0.2/euca2ools/commands/walrus/000077500000000000000000000000001222241730200204155ustar00rootroot00000000000000euca2ools-3.0.2/euca2ools/commands/walrus/__init__.py000066400000000000000000000132711222241730200225320ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import string import urlparse from euca2ools.commands import Euca2ools from euca2ools.exceptions import AWSError from requestbuilder import Arg, MutuallyExclusiveArgList import requestbuilder.auth import requestbuilder.request import requestbuilder.service class Walrus(requestbuilder.service.BaseService): NAME = 's3' DESCRIPTION = 'Object storage service' AUTH_CLASS = requestbuilder.auth.S3RestAuth REGION_ENVVAR = 'EUCA_REGION' URL_ENVVAR = 'S3_URL' ARGS = [MutuallyExclusiveArgList( Arg('--region', dest='userregion', metavar='USER@REGION', help='''name of the region and/or user in config files to use to connect to the service'''), Arg('-U', '--url', metavar='URL', help='storage service endpoint URL'))] def handle_http_error(self, response): raise AWSError(response) class WalrusRequest(requestbuilder.request.BaseRequest): SUITE = Euca2ools SERVICE_CLASS = Walrus def __init__(self, **kwargs): requestbuilder.request.BaseRequest.__init__(self, **kwargs) self.redirects_left = 3 def handle_server_error(self, err): if 300 <= err.status_code < 400 and 'Endpoint' in err.elements: # When S3 does an inter-region redirect it doesn't supply the new # location in the usual header, but rather supplies a new endpoint # in the error's XML. This forces us to handle it manually. self.log.debug('-- response content --\n', extra={'append': True}) self.log.debug(self.response.text, extra={'append': True}) self.log.debug('-- end of response content --') self.log.info('result: redirect') if self.redirects_left > 0: self.redirects_left -= 1 parsed = list(urlparse.urlparse(self.service.endpoint)) parsed[1] = err.elements['Endpoint'] new_url = urlparse.urlunparse(parsed) self.log.debug('redirecting to %s (%i redirects remaining)', new_url, self.redirects_left) self.service.endpoint = new_url if isinstance(self.body, file): self.log.debug('re-seeking body to beginning of file') # pylint: disable=E1101 # noinspection PyUnresolvedReferences self.body.seek(0) # pylint: enable=E1101 return self.send() else: self.log.warn('too many redirects; giving up') raise else: return requestbuilder.request.BaseRequest.handle_server_error( self, err) def validate_generic_bucket_name(bucket): if len(bucket) == 0: raise ValueError('name is too short') if len(bucket) > 255: raise ValueError('name is too long') for char in bucket: if char not in string.ascii_letters + string.digits + '.-_': raise ValueError('invalid character \'{0}\''.format(char)) def validate_dns_bucket_name(bucket): if len(bucket) < 3: raise ValueError('name is too short') if len(bucket) > 63: raise ValueError('name is too long') if bucket.startswith('.'): raise ValueError('name may not start with \'.\'') if bucket.endswith('.'): raise ValueError('name may not end with \'.\'') labels = bucket.split('.') for label in labels: if len(label) == 0: raise ValueError('name may not contain \'..\'') for char in label: if char not in string.ascii_lowercase + string.digits + '-': raise ValueError('invalid character \'{0}\''.format(char)) if label[0] not in string.ascii_lowercase + string.digits: raise ValueError(('character \'{0}\' may not begin part of a ' 'bucket name').format(label[0])) if label[-1] not in string.ascii_lowercase + string.digits: raise ValueError(('character \'{0}\' may not end part of a ' 'bucket name').format(label[-1])) if len(labels) == 4: try: map(int, bucket.split('.')) except ValueError: # This is actually the case we want pass else: raise ValueError('name must not be formatted like an IP address') euca2ools-3.0.2/euca2ools/commands/walrus/checkbucket.py000066400000000000000000000034551222241730200232510ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.walrus import WalrusRequest from requestbuilder import Arg class CheckBucket(WalrusRequest): DESCRIPTION = 'Return successfully if a bucket exists' ARGS = [Arg('bucket', route_to=None, help='name of the bucket to check')] def preprocess(self): # We use GET instead of HEAD so we can get redirections when we talk # to the wrong region. self.method = 'GET' self.path = self.args['bucket'] self.params['max-keys'] = 0 euca2ools-3.0.2/euca2ools/commands/walrus/createbucket.py000066400000000000000000000052231222241730200234320ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.walrus import (WalrusRequest, validate_generic_bucket_name) from requestbuilder import Arg import xml.etree.ElementTree as ET class CreateBucket(WalrusRequest): DESCRIPTION = 'Create a new bucket' ARGS = [Arg('bucket', route_to=None, help='name of the new bucket'), Arg('--location', route_to=None, help='''location constraint to configure the bucket with (default: inferred from s3-location-constraint in configuration, or otherwise none)''')] def configure(self): WalrusRequest.configure(self) validate_generic_bucket_name(self.args['bucket']) def preprocess(self): self.method = 'PUT' self.path = self.args['bucket'] cb_config = ET.Element('CreateBucketConfiguration') cb_config.set('xmlns', 'http://doc.s3.amazonaws.com/2006-03-01') lconstraint = (self.args['location'] or self.config.get_region_option('s3-location-constraint')) if lconstraint: cb_lconstraint = ET.SubElement(cb_config, 'LocationConstraint') cb_lconstraint.text = lconstraint if len(cb_config.getchildren()): cb_xml = ET.tostring(cb_config) self.log.debug('bucket configuration: %s', cb_xml) self.body = cb_xml euca2ools-3.0.2/euca2ools/commands/walrus/deletebucket.py000066400000000000000000000034511222241730200234320ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.walrus import (WalrusRequest, validate_generic_bucket_name) from requestbuilder import Arg class DeleteBucket(WalrusRequest): DESCRIPTION = 'Delete a bucket' ARGS = [Arg('bucket', route_to=None, help='name of the bucket to delete')] def configure(self): WalrusRequest.configure(self) validate_generic_bucket_name(self.args['bucket']) def preprocess(self): self.method = 'DELETE' self.path = self.args['bucket'] euca2ools-3.0.2/euca2ools/commands/walrus/deleteobject.py000066400000000000000000000037601222241730200234260ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.walrus import WalrusRequest from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError class DeleteObject(WalrusRequest): DESCRIPTION = 'Delete objects from the server' ARGS = [Arg('paths', metavar='BUCKET/KEY', nargs='+', route_to=None)] # noinspection PyExceptionInherit def configure(self): WalrusRequest.configure(self) for path in self.args['paths']: if '/' not in path: raise ArgumentError("path '{0}' must include a key name") def main(self): self.method = 'DELETE' for path in self.args['paths']: self.path = path self.send() euca2ools-3.0.2/euca2ools/commands/walrus/getobject.py000066400000000000000000000105251222241730200227400ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.walrus import WalrusRequest from euca2ools.util import build_progressbar_label_template import os.path from requestbuilder import Arg from requestbuilder.mixins import FileTransferProgressBarMixin class GetObject(WalrusRequest, FileTransferProgressBarMixin): DESCRIPTION = 'Retrieve objects from the server' ARGS = [Arg('paths', metavar='BUCKET/KEY', nargs='+', route_to=None), Arg('-o', dest='opath', metavar='PATH', default='.', route_to=None, help='''where to download to. If this names an existing directory or ends in '/' all objects will be downloaded separately to files in that directory. Otherwise, all downloads will be written to a file with this name. Note that outputting multiple objects to a file will result in their concatenation. (default: current directory)''')] def main(self): opath = self.args['opath'] label_template = build_progressbar_label_template(self.args['paths']) if opath.endswith('/') and not os.path.isdir(opath): # Ends with '/' and does not exist -> create it os.mkdir(opath) if os.path.isdir(opath): # Download one per directory for index, path in enumerate(self.args['paths'], 1): ofile_name = os.path.join(opath, path.rsplit('/', 1)[-1]) self.path = path response = self.send() if 'Content-Length' in response.headers: maxval = int(response.headers['Content-Length']) else: maxval = None label = label_template.format(index=index, fname=path) pbar = self.get_progressbar(label=label, maxval=maxval) pbar.start() with open(ofile_name, 'w') as ofile: for chunk in response.iter_content(chunk_size=16384): ofile.write(chunk) pbar.update(ofile.tell()) ofile.flush() pbar.finish() else: # Download everything to one file with open(opath, 'w') as ofile: for index, path in enumerate(self.args['paths'], 1): self.path = path response = self.send() bytes_written = 0 if 'Content-Length' in response.headers: maxval = int(response.headers['Content-Length']) else: maxval = None label = label_template.format(index=index, fname=path) pbar = self.get_progressbar(label=label, maxval=maxval) pbar.start() for chunk in response.iter_content(chunk_size=16384): ofile.write(chunk) bytes_written += len(chunk) pbar.update(bytes_written) pbar.finish() ofile.flush() euca2ools-3.0.2/euca2ools/commands/walrus/listallmybuckets.py000066400000000000000000000057221222241730200243700ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.walrus import WalrusRequest from requestbuilder import Arg from requestbuilder.mixins import TabifyingMixin from requestbuilder.xmlparse import parse_listdelimited_aws_xml class ListAllMyBuckets(WalrusRequest, TabifyingMixin): DESCRIPTION = 'List all buckets owned by your account' ARGS = [Arg('-l', dest='long_output', action='store_true', route_to=None, help='''list in long format, with creation dates and owner info'''), Arg('-n', dest='numeric_output', action='store_true', route_to=None, help='''display account IDs numerically in long (-l) output. This option turns on the -l option.''')] def configure(self): WalrusRequest.configure(self) if self.args['numeric_output']: self.args['long_output'] = True def preprocess(self): self.method = 'GET' self.path = '' def parse_response(self, response): response_dict = self.log_and_parse_response(response, parse_listdelimited_aws_xml, list_tags=('Buckets',)) return response_dict['ListAllMyBucketsResult'] def print_result(self, result): if self.args['numeric_output'] or 'DisplayName' not in result['Owner']: owner = result.get('Owner', {}).get('ID') else: owner = result.get('Owner', {}).get('DisplayName') for bucket in result.get('Buckets', []): if self.args['long_output']: print self.tabify((owner, bucket.get('CreationDate'), bucket.get('Name'))) else: print bucket.get('Name') euca2ools-3.0.2/euca2ools/commands/walrus/listbucket.py000066400000000000000000000072661222241730200231530ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.walrus import (WalrusRequest, validate_generic_bucket_name) from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError from requestbuilder.mixins import TabifyingMixin from requestbuilder.response import PaginatedResponse from requestbuilder.xmlparse import parse_aws_xml class ListBucket(WalrusRequest, TabifyingMixin): DESCRIPTION = 'List keys in one or more buckets' ARGS = [Arg('paths', metavar='BUCKET[/KEY]', nargs='+', route_to=None), Arg('--max-keys-per-request', dest='max-keys', type=int, help=argparse.SUPPRESS)] # noinspection PyExceptionInherit def configure(self): WalrusRequest.configure(self) for path in self.args['paths']: if path.startswith('/'): raise ArgumentError(( 'argument \'{0}\' must not start with ' '"/"; format is BUCKET[/KEY]').format(path)) bucket = path.split('/', 1)[0] try: validate_generic_bucket_name(bucket) except ValueError as err: raise ArgumentError( 'bucket "{0}": {1}'.format(bucket, err.message)) def main(self): self.method = 'GET' pages = [(path, {}) for path in self.args['paths']] return PaginatedResponse(self, pages, ('Contents',)) def get_next_page(self, response): if response.get('IsTruncated') == 'true': return self.path, {'marker': response['Contents'][-1]['Key']} def prepare_for_page(self, page): bucket, __, prefix = page[0].partition('/') markers = page[1] self.path = bucket if prefix: self.params['prefix'] = prefix elif 'prefix' in self.params: del self.params['prefix'] if markers is not None and markers.get('marker'): self.params['marker'] = markers['marker'] elif 'marker' in self.params: del self.params['marker'] def parse_response(self, response): response_dict = self.log_and_parse_response( response, parse_aws_xml, list_item_tags=('Contents', 'CommonPrefixes')) return response_dict['ListBucketResult'] def print_result(self, result): for obj in result.get('Contents', []): print obj.get('Key') euca2ools-3.0.2/euca2ools/commands/walrus/putobject.py000066400000000000000000000156511222241730200227760ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from euca2ools.commands.walrus import WalrusRequest from euca2ools.util import build_progressbar_label_template import mimetypes import os.path from requestbuilder import Arg from requestbuilder.exceptions import ArgumentError, ClientError from requestbuilder.mixins import FileTransferProgressBarMixin import socket import threading import time class PutObject(WalrusRequest, FileTransferProgressBarMixin): DESCRIPTION = ('Upload objects to the server\n\nNote that uploading a ' 'large file to a region other than the one the bucket is ' 'may result in "Broken pipe" errors or other connection ' 'problems that this program cannot detect.') ARGS = [Arg('sources', metavar='FILE', nargs='+', route_to=None, help='file(s) to upload'), Arg('dest', metavar='BUCKET/PREFIX', route_to=None, help='bucket name and optional prefix for key names'), Arg('-T', dest='literal_dest', action='store_true', route_to=None, help='''treat the destination as the full bucket and key name for the uploaded object instead of a bucket and prefix. This only works when uploading a single file.'''), Arg('--acl', choices=('private', 'public-read', 'public-read-write', 'authenticated-read', 'bucket-owner-read', 'bucket-owner-full-control', 'aws-exec-read'), route_to=None), Arg('--guess-mime-type', action='store_true', route_to=None, help='''automatically select MIME types for the files being uploaded'''), Arg('--retry', dest='retries', action='store_const', const=5, default=1, route_to=None, help='retry interrupted uploads up to 5 times')] METHOD = 'PUT' def __init__(self, **kwargs): WalrusRequest.__init__(self, **kwargs) self.last_upload_error = None self._lock = threading.Lock() # noinspection PyExceptionInherit def configure(self): WalrusRequest.configure(self) if (self.args.get('literal_dest', False) and len(self.args['sources']) != 1): # Can't explicitly specify dest file names when we're uploading # more than one thing raise ArgumentError('argument -T: only allowed with one file') if self.args['dest'].startswith('/'): raise ArgumentError('destination must begin with a bucket name') # noinspection PyExceptionInherit def main(self): sources = list(self.args['sources']) label_template = build_progressbar_label_template(sources) for index, source_filename in enumerate(sources, 1): if self.args.get('literal_dest', False): (bucket, __, keyname) = self.args['dest'].partition('/') if not keyname: raise ArgumentError('destination must contain a key name') else: (bucket, __, prefix) = self.args['dest'].partition('/') keyname = prefix + os.path.basename(source_filename) self.path = bucket + '/' + keyname self.headers['Content-Length'] = os.path.getsize(source_filename) self.headers.pop('Content-Type', None) if self.args.get('acl'): self.headers['x-amz-acl'] = self.args['acl'] if self.args.get('guess_mime_type', False): mtype = mimetypes.guess_type(source_filename) if mtype: self.headers['Content-Type'] = mtype self.log.info('uploading %s to %s', source_filename, self.path) with self._lock: self.last_upload_error = None with open(source_filename) as source: upload_thread = threading.Thread(target=self.try_send, args=(source,), kwargs={'retries_left': self.args['retries']}) # The upload thread is daemonic so ^C will kill the program # more cleanly. upload_thread.daemon = True upload_thread.start() label = label_template.format(index=index, fname=os.path.basename(source_filename)) pbar = self.get_progressbar(label=label, maxval=os.path.getsize(source_filename)) pbar.start() while upload_thread.is_alive(): pbar.update(source.tell()) time.sleep(0.01) pbar.finish() upload_thread.join() with self._lock: if self.last_upload_error is not None: # pylint: disable=E0702 raise self.last_upload_error # pylint: enable=E0702 def try_send(self, source, retries_left=0): self.body = source try: self.send() except ClientError as err: if len(err.args) > 0 and isinstance(err.args[0], socket.error): self.log.warn('socket error') if retries_left > 0: self.log.info('retrying upload (%i retries remaining)', retries_left) self.log.debug('re-seeking body to beginning of file') source.seek(0) return self.try_send(source, retries_left - 1) else: with self._lock: self.last_upload_error = err raise except Exception as err: with self._lock: self.last_upload_error = err raise euca2ools-3.0.2/euca2ools/exceptions.py000066400000000000000000000057371222241730200200460ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import io import requestbuilder.exceptions from requestbuilder.xmlparse import parse_aws_xml import six class AWSError(requestbuilder.exceptions.ServerError): def __init__(self, response, *args): requestbuilder.exceptions.ServerError.__init__(self, response, *args) self.code = None # API error code self.message = None # Error message self.elements = {} # Elements in the error response's body if self.body: try: parsed = parse_aws_xml(io.StringIO(six.text_type(self.body))) parsed = parsed[parsed.keys()[0]] # Strip off the root element if 'Errors' in parsed: # This could probably be improved, but meh. Patches are # welcome. :) parsed = parsed['Errors'] if 'Error' in parsed: parsed = parsed['Error'] if parsed.get('Code'): self.code = parsed['Code'] self.args += (parsed['Code'],) self.message = parsed.get('Message') self.elements = parsed except ValueError: # Dump the unparseable message body so we don't include # unusable garbage in the exception. Since Eucalyptus # frequently returns plain text and/or broken XML, store it # in case we need it later. self.message = self.body self.args += (self.message,) def format_for_cli(self): return 'error ({0}): {1}'.format(self.code or self.status_code, self.message or self.reason) euca2ools-3.0.2/euca2ools/nc/000077500000000000000000000000001222241730200156775ustar00rootroot00000000000000euca2ools-3.0.2/euca2ools/nc/__init__.py000066400000000000000000000025021222241730200200070ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. euca2ools-3.0.2/euca2ools/nc/auth.py000066400000000000000000000165341222241730200172230ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse import base64 import datetime import hashlib import os.path from requestbuilder import Arg from requestbuilder.auth import BaseAuth from requestbuilder.exceptions import ArgumentError import subprocess import urlparse import urllib class EucaRsaV2Auth(BaseAuth): """Provides authentication for inter-component requests""" ARGS = [Arg('--cert', metavar='FILE', help='''file containing the X.509 certificate to use when signing requests'''), Arg('--privatekey', metavar='FILE', help='file containing the private key to sign requests with'), Arg('--spoof-key-id', metavar='KEY_ID', help='run this command as if signed by a specific access key'), Arg('--euca-auth', action='store_true', help=argparse.SUPPRESS)] # noinspection PyExceptionInherit def configure(self): BaseAuth.configure(self) if not self.args.get('spoof_key_id'): self.args['spoof_key_id'] = os.getenv('EC2_ACCESS_KEY') cert = self.args.get('cert') or os.getenv('EUCA_CERT') privkey = self.args.get('privatekey') or os.getenv('EUCA_PRIVATE_KEY') if not cert: raise ArgumentError('argument --cert or environment variable ' 'EUCA_CERT is required') if not privkey: raise ArgumentError('argument --privatekey or environment ' 'variable EUCA_PRIVATE_KEY is required') cert = os.path.expanduser(os.path.expandvars(cert)) privkey = os.path.expanduser(os.path.expandvars(privkey)) if not os.path.exists(cert): raise ArgumentError("certificate file '{0}' does not exist" .format(cert)) if not os.path.isfile(cert): raise ArgumentError("certificate file '{0}' is not a file" .format(cert)) if not os.path.exists(privkey): raise ArgumentError("private key file '{0}' does not exist" .format(privkey)) if not os.path.isfile(privkey): raise ArgumentError("private key file '{0}' is not a file" .format(privkey)) self.args['cert'] = cert self.args['privatekey'] = privkey def __call__(self, request): if request.headers is None: request.headers = {} now = datetime.datetime.utcnow() request.headers['Date'] = now.strftime('%Y%m%dT%H%M%SZ') if 'Authorization' in request.headers: del request.headers['Authorization'] if self.args.get('spoof_key_id'): request.headers['AWSAccessKeyId'] = self.args['spoof_key_id'] elif 'AWSAccessKeyId' in request.headers: del request.headers['AWSAccessKeyId'] cert_fp = self._get_fingerprint() self.log.debug('certificate fingerprint: %s', cert_fp) headers_to_sign = self._get_headers_to_sign(request) signed_headers = self._get_signed_headers(headers_to_sign) self.log.debug('SignedHeaders:%s', signed_headers) canonical_request = self._get_canonical_request(request) self.log.debug('CanonicalRequest:\n%s', canonical_request) signature = self._sign(canonical_request) self.log.debug('Signature:%s', signature) auth_header = ' '.join(('EUCA2-RSA-SHA256', cert_fp, signed_headers, signature)) request.headers['Authorization'] = auth_header def _get_fingerprint(self): cmd = ['openssl', 'x509', '-noout', '-in', self.args['cert'], '-fingerprint', '-md5'] openssl = subprocess.Popen(cmd, stdout=subprocess.PIPE) (stdout, __) = openssl.communicate() if openssl.returncode != 0: raise subprocess.CalledProcessError(openssl.returncode, cmd) return stdout.strip().rsplit('=', 1)[-1].replace(':', '').lower() def _sign(self, canonical_request): digest = hashlib.sha256(canonical_request).digest() cmd = ['openssl', 'pkeyutl', '-sign', '-inkey', self.args['privatekey'], '-pkeyopt', 'digest:sha256'] openssl = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE) (stdout, __) = openssl.communicate(digest) if openssl.returncode != 0: raise subprocess.CalledProcessError(openssl.returncode, cmd) return base64.b64encode(stdout) def _get_canonical_request(self, request): # 1. request method method = request.method.upper() # 2. CanonicalURI c_uri = self._get_canonical_uri(request) # 3. CanonicalQueryString c_querystr = self._get_canonical_querystr(request) # 4. CanonicalHeaders headers_to_sign = self._get_headers_to_sign(request) c_headers = self._get_canonical_headers(headers_to_sign) # 5. SignedHeaders s_headers = self._get_signed_headers(headers_to_sign) return '\n'.join((method, c_uri, c_querystr, c_headers, s_headers)) def _get_canonical_uri(self, request): return urlparse.urlparse(request.url).path or '/' def _get_canonical_querystr(self, request): params = [] for key, val in request.params.iteritems(): params.append('='.join((urllib.quote(key, safe='/~'), urllib.quote(str(val), safe='~')))) return '&'.join(sorted(params)) def _get_headers_to_sign(self, request): headers = {'Host': urlparse.urlparse(request.url).netloc} for key, val in request.headers.iteritems(): if key.lower() != 'authorization': headers[key] = val return headers def _get_canonical_headers(self, headers): header_strs = [str(key).lower().strip() + ':' + str(val).strip() for key, val in headers.iteritems()] return '\n'.join(sorted(header_strs)) def _get_signed_headers(self, headers): return ';'.join(sorted(header.lower().strip() for header in headers)) euca2ools-3.0.2/euca2ools/nc/commands/000077500000000000000000000000001222241730200175005ustar00rootroot00000000000000euca2ools-3.0.2/euca2ools/nc/commands/__init__.py000066400000000000000000000024751222241730200216210ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. euca2ools-3.0.2/euca2ools/nc/commands/bundleandupload.py000066400000000000000000000133751222241730200232240ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse from euca2ools.commands.bundle import add_bundle_creds from euca2ools.commands.bundle.bundleimage import BundleImage from euca2ools.commands.bundle.uploadbundle import UploadBundle from euca2ools.nc.auth import EucaRsaV2Auth from euca2ools.nc.services import NCInternalWalrus from requestbuilder import Arg import requestbuilder.command # FIXME: This should actually use the policy given by the user instead of # EucaRsaV2Auth. It previously attempted to use both at the same time, # leading to amusing code paths in walrus, so for the moment it uses # the latter exclusively. class BundleAndUpload(requestbuilder.command.BaseCommand): DESCRIPTION = ('[Eucalyptus NC internal] Bundle and upload an image on ' 'behalf of a user') ARGS = [Arg('-b', '--bucket', required=True, help='bucket to upload the bundle to (required)'), Arg('-i', '--image', required=True, help='file containing the image to bundle (required)'), # --arch's default should go away when these bugs are fixed: # https://eucalyptus.atlassian.net/browse/EUCA-5979 # https://eucalyptus.atlassian.net/browse/EUCA-5980 Arg('-r', '--arch', default='x86_64', help='image architecture (default: x86_64)'), Arg('-d', '--directory', help='''location to place the working directory with temporary files'''), Arg('--cert', metavar='FILE', help='''file containing the X.509 certificate to use when signing requests and bundling the image'''), Arg('--privatekey', metavar='FILE', help='''file containing the private key to use when signing requests and bundling the image'''), Arg('--spoof-key-id', metavar='KEY_ID', help='run this command as if signed by a specific access key'), Arg('--ec2cert', metavar='FILE', help="file containing the cloud's X.509 certificate"), Arg('--user', metavar='ACCOUNT', help="the user's account ID"), Arg('-c', '--upload-policy', metavar='POLICY', help='Base64-encoded S3 upload policy'), Arg('--upload-policy-signature', '--policysignature', dest='upload_policy_signature', metavar='SIGNATURE', route_to=None, help='''signature for the upload policy given with --upload-policy'''), Arg('-U', '--url', help='storage service endpoint URL'), Arg('--euca-auth', action='store_true', help=argparse.SUPPRESS), Arg('--kernel', metavar='IMAGE', help='''ID of the kernel image to associate with the machine bundle'''), Arg('--ramdisk', metavar='IMAGE', help='''ID of the ramdisk image to associate with the machine bundle''')] # Note that this is a back end service for which region support is # out of scope. This isn't going to get tested with that. def configure(self): requestbuilder.command.BaseCommand.configure(self) add_bundle_creds(self.args, self.config) walrus_auth = EucaRsaV2Auth( config=self.config, loglevel=self.log.level, cert=self.args.get('cert'), privatekey=self.args.get('privatekey'), spoof_key_id=self.args.get('spoof_key_id')) self.__walrus = NCInternalWalrus(auth=walrus_auth, config=self.config, loglevel=self.log.level, url=self.args.get('url')) self.__walrus.configure() def main(self): cmd = BundleImage(image=self.args['image'], arch=self.args['arch'], cert=self.args['cert'], privatekey=self.args['privatekey'], user=self.args['user'], destination=self.args.get('directory'), ec2cert=self.args['ec2cert'], image_type='machine', config=self.config, kernel=self.args['kernel'], ramdisk=self.args['ramdisk']) parts, manifest = cmd.main() cmd = UploadBundle(bucket=self.args['bucket'], manifest=manifest, acl='ec2-bundle-read', config=self.config, service=self.__walrus) manifest_loc = cmd.main() return manifest_loc euca2ools-3.0.2/euca2ools/nc/commands/checkbucket.py000066400000000000000000000034571222241730200223360ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse import euca2ools.commands.walrus.checkbucket import euca2ools.nc.services from requestbuilder import Arg class CheckBucket(euca2ools.commands.walrus.checkbucket.CheckBucket): DESCRIPTION = ('[Eucalyptus NC internal] Return successfully if a bucket ' 'already exists') SERVICE_CLASS = euca2ools.nc.services.NCInternalWalrus ARGS = [Arg('-b', action='store_true', route_to=None, help=argparse.SUPPRESS)] # This makes the -b optional euca2ools-3.0.2/euca2ools/nc/services.py000066400000000000000000000027451222241730200201040ustar00rootroot00000000000000# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import euca2ools.nc.auth import euca2ools.commands.walrus class NCInternalWalrus(euca2ools.commands.walrus.Walrus): AUTH_CLASS = euca2ools.nc.auth.EucaRsaV2Auth euca2ools-3.0.2/euca2ools/util.py000066400000000000000000000055601222241730200166340ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import getpass import os import sys import tempfile def build_progressbar_label_template(fnames): if len(fnames) == 0: return None elif len(fnames) == 1: return '{fname}' else: max_fname_len = max(len(os.path.basename(fname)) for fname in fnames) fmt_template = '{{fname:<{maxlen}}} ({{index:>{lenlen}}}/{total})' return fmt_template.format(maxlen=max_fname_len, lenlen=len(str(len(fnames))), total=len(fnames)) # pylint: disable=W0622 def mkdtemp_for_large_files(suffix='', prefix='tmp', dir=None): """ Like tempfile.mkdtemp, but using /var/tmp as a last resort instead of /tmp. This is meant for utilities that create large files, as /tmp is often a ramdisk. """ if dir is None: dir = (os.getenv('TMPDIR') or os.getenv('TEMP') or os.getenv('TMP') or '/var/tmp') return tempfile.mkdtemp(suffix=suffix, prefix=prefix, dir=dir) # pylint: enable=W0622 def sanitize_path(path): """Make a fully expanded and absolute path for us to work with. Returns a santized path string. :param path: The path string to sanitize. """ return os.path.abspath(os.path.expandvars(os.path.expanduser(path))) def prompt_for_password(): pass1 = getpass.getpass(prompt='New password: ') pass2 = getpass.getpass(prompt='Retype new password: ') if pass1 == pass2: return pass1 else: print >> sys.stderr, 'error: passwords do not match' return prompt_for_password() euca2ools-3.0.2/generate-manpages.sh000077500000000000000000000014131222241730200173240ustar00rootroot00000000000000#!/bin/sh -ex mkdir -p man export PYTHONPATH=".:$PYTHONPATH" py_version=$(python -c 'import sys; print ".".join(map(str, sys.version_info[:2]))') script_dir="build/scripts-$py_version" version="$($script_dir/euca-version 2>&1 | sed -e 's/^euca2ools *\([^(]*\).*/\1/' -e 's/ *$//')" for exe in $@; do description="$($script_dir/$exe --help 2>&1 | python -c 'import sys; print sys.stdin.read().split("\n\n")[1]')" help2man -N --no-discard-stderr -S "euca2ools $version" -n "$description" --version-string "$version" -o man/$(basename $exe).1 $script_dir/$exe sed -i -e 's/^.SH DESCRIPTION/.SH SYNOPSIS/' \ -e 's/usage: *//' \ -e '/^\.IP/{/^\.IP/d}' \ -e '/^\.PP/{s/^\.PP.*/.SH DESCRIPTION/}' \ man/$(basename $exe).1 done euca2ools-3.0.2/man/000077500000000000000000000000001222241730200141565ustar00rootroot00000000000000euca2ools-3.0.2/man/euare-accountaliascreate.1000066400000000000000000000023331222241730200211720ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-ACCOUNTALIASCREATE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-accountaliascreate \- Create an alias for an account, a.k.a. an account name .SH SYNOPSIS euare\-accountaliascreate \fB\-a\fR ALIAS [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Create an alias for an account, a.k.a. an account name .SS "optional arguments:" .TP \fB\-a\fR ALIAS, \fB\-\-account\-alias\fR ALIAS name of the alias to create (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-accountaliasdelete.1000066400000000000000000000023231222241730200211700ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-ACCOUNTALIASDELETE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-accountaliasdelete \- Delete an account's alias, a.k.a. its account name .SH SYNOPSIS euare\-accountaliasdelete \fB\-a\fR ALIAS [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Delete an account's alias, a.k.a. its account name .SS "optional arguments:" .TP \fB\-a\fR ALIAS, \fB\-\-account\-alias\fR ALIAS name of the alias to delete (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-accountaliaslist.1000066400000000000000000000020641222241730200207030ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-ACCOUNTALIASLIST "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-accountaliaslist \- List your account's aliases .SH SYNOPSIS euare\-accountaliaslist [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List your account's aliases .SS "optional arguments:" .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-accountcreate.1000066400000000000000000000022211222241730200201540ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-ACCOUNTCREATE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-accountcreate \- [Eucalyptus cloud admin only] Create a new account .SH SYNOPSIS euare\-accountcreate \fB\-a\fR ACCOUNT [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION [Eucalyptus cloud admin only] Create a new account .SS "optional arguments:" .TP \fB\-a\fR ACCOUNT, \fB\-\-account\-name\fR ACCOUNT name of the account to create (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-accountdel.1000066400000000000000000000022351222241730200174620ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-ACCOUNTDEL "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-accountdel \- [Eucalyptus cloud admin only] Delete an account .SH SYNOPSIS euare\-accountdel \fB\-a\fR ACCOUNT [\-r] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION [Eucalyptus cloud admin only] Delete an account .SS "optional arguments:" .TP \fB\-a\fR ACCOUNT, \fB\-\-account\-name\fR ACCOUNT name of the account to delete (required) .TP \fB\-r\fR, \fB\-\-recursive\fR delete all users, groups, and policies associated with the account as well .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-accountdelpolicy.1000066400000000000000000000023101222241730200206740ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-ACCOUNTDELPOLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-accountdelpolicy \- [Eucalyptus cloud admin only] Remove a policy from an account .SH SYNOPSIS euare\-accountdelpolicy \fB\-a\fR ACCOUNT \fB\-p\fR POLICY [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION [Eucalyptus cloud admin only] Remove a policy from an account .SS "optional arguments:" .TP \fB\-a\fR ACCOUNT, \fB\-\-account\-name\fR ACCOUNT account the policy is attached to (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the policy to delete (required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-accountgetpolicy.1000066400000000000000000000023311222241730200207120ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-ACCOUNTGETPOLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-accountgetpolicy \- Display an account's policy .SH SYNOPSIS euare\-accountgetpolicy \fB\-a\fR ACCOUNT \fB\-p\fR POLICY [\-\-pretty\-print] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Display an account's policy .SS "optional arguments:" .TP \fB\-a\fR ACCOUNT, \fB\-\-account\-name\fR ACCOUNT account the policy is attached to (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the policy to show (required) .TP \fB\-\-pretty\-print\fR reformat the policy for easier reading .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-accountgetsummary.1000066400000000000000000000020051222241730200211060ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-ACCOUNTGETSUMMARY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-accountgetsummary \- Display account-level information about account entity usage and IAM quotas .SH SYNOPSIS euare\-accountgetsummary [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Display account\-level information about account entity usage and IAM quotas .SS "optional arguments:" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-accountlist.1000066400000000000000000000020611222241730200176660ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-ACCOUNTLIST "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-accountlist \- [Eucalyptus cloud admin only] List all of the cloud's accounts .SH SYNOPSIS euare\-accountlist [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION [Eucalyptus cloud admin only] List all of the cloud's accounts .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-accountlistpolicies.1000066400000000000000000000031321222241730200214160ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-ACCOUNTLISTPOLICIES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-accountlistpolicies \- [Eucalyptus only] List one specific policy or all policies attached to an account. If no policies are attached to the account, the action still succeeds. .SH SYNOPSIS euare\-accountlistpolicies \fB\-a\fR ACCOUNT [\-p POLICY] [\-v] [\-\-pretty\-print] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION [Eucalyptus only] List one specific policy or all policies attached to an account. If no policies are attached to the account, the action still succeeds. .SS "optional arguments:" .TP \fB\-a\fR ACCOUNT, \fB\-\-account\-name\fR ACCOUNT account owning the policies to list .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY display a specific policy .TP \fB\-v\fR, \fB\-\-verbose\fR display the contents of the resulting policies (in addition to their names) .TP \fB\-\-pretty\-print\fR when printing the contents of policies, reformat them for easier reading .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-accountuploadpolicy.1000066400000000000000000000026421222241730200214240ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-ACCOUNTUPLOADPOLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-accountuploadpolicy \- [Eucalyptus cloud admin only] Attach a policy to an account .SH SYNOPSIS euare\-accountuploadpolicy \fB\-a\fR ACCOUNT \fB\-p\fR POLICY (\fB\-o\fR POLICY_CONTENT | \fB\-f\fR FILE) [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION [Eucalyptus cloud admin only] Attach a policy to an account .SS "optional arguments:" .TP \fB\-a\fR ACCOUNT, \fB\-\-account\-name\fR ACCOUNT account to attach the policy to (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the policy (required) .TP \fB\-o\fR POLICY_CONTENT, \fB\-\-policy\-content\fR POLICY_CONTENT the policy to attach .TP \fB\-f\fR FILE, \fB\-\-policy\-document\fR FILE file containing the policy to attach .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-getldapsyncstatus.1000066400000000000000000000021511222241730200211170ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GETLDAPSYNCSTATUS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-getldapsyncstatus \- [Eucalyptus cloud admin only] Show the status of the cloud's LDAP synchronization .SH SYNOPSIS euare\-getldapsyncstatus [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION [Eucalyptus cloud admin only] Show the status of the cloud's LDAP synchronization .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-groupaddpolicy.1000066400000000000000000000035321222241730200203670ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GROUPADDPOLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-groupaddpolicy \- Add a new policy to a group. To add more complex policies than this tool supports, see euare-groupuploadpolicy. .SH SYNOPSIS euare\-groupaddpolicy \fB\-g\fR GROUP \fB\-p\fR POLICY \fB\-e\fR {Allow,Deny} \fB\-a\fR ACTION \fB\-r\fR RESOURCE [\-o] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Add a new policy to a group. To add more complex policies than this tool supports, see euare\-groupuploadpolicy. .SS "optional arguments:" .TP \fB\-g\fR GROUP, \fB\-\-group\-name\fR GROUP group to attach the policy to (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the new policy (required) .TP \fB\-e\fR {Allow,Deny}, \fB\-\-effect\fR {Allow,Deny} whether the new policy should Allow or Deny (required) .TP \fB\-a\fR ACTION, \fB\-\-action\fR ACTION action the policy should apply to (required) .TP \fB\-r\fR RESOURCE, \fB\-\-resource\fR RESOURCE resource the policy should apply to (required) .TP \fB\-o\fR, \fB\-\-output\fR display the newly\-created policy .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-groupadduser.1000066400000000000000000000023271222241730200200470ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GROUPADDUSER "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-groupadduser \- Add a user to a group .SH SYNOPSIS euare\-groupadduser \fB\-g\fR GROUPNAME \fB\-u\fR USERNAME [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Add a user to a group .SS "optional arguments:" .TP \fB\-g\fR GROUPNAME, \fB\-\-group\-name\fR GROUPNAME group to add the user to .TP \fB\-u\fR USERNAME, \fB\-\-user\-name\fR USERNAME user to add .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-groupcreate.1000066400000000000000000000024301222241730200176560ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GROUPCREATE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-groupcreate \- Create a new group .SH SYNOPSIS euare\-groupcreate \fB\-g\fR GROUP [\-p PATH] [\-v] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Create a new group .SS "optional arguments:" .TP \fB\-g\fR GROUP, \fB\-\-group\-name\fR GROUP name of the new group (required) .TP \fB\-p\fR PATH, \fB\-\-path\fR PATH path for the new group (default: "/") .TP \fB\-v\fR, \fB\-\-verbose\fR print the new group's ARN and GUID .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-groupdel.1000066400000000000000000000025661222241730200171710ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GROUPDEL "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-groupdel \- Delete a group .SH SYNOPSIS euare\-groupdel \fB\-g\fR GROUP [\-r] [\-p] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Delete a group .SS "optional arguments:" .TP \fB\-g\fR GROUP, \fB\-\-group\-name\fR GROUP name of the group to delete (required) .TP \fB\-r\fR, \fB\-\-recursive\fR remove all user memberships and policies associated with the group first .TP \fB\-p\fR, \fB\-\-pretend\fR list the user memberships and policies that would be deleted instead of actually deleting them. Implies \fB\-r\fR. .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-groupdelpolicy.1000066400000000000000000000024111222241730200203760ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GROUPDELPOLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-groupdelpolicy \- Remove a policy from a group .SH SYNOPSIS euare\-groupdelpolicy \fB\-g\fR GROUP \fB\-p\fR POLICY [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Remove a policy from a group .SS "optional arguments:" .TP \fB\-g\fR GROUP, \fB\-\-group\-name\fR GROUP group the policy is attached to (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the policy to delete (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-groupgetpolicy.1000066400000000000000000000025261222241730200204200ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GROUPGETPOLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-groupgetpolicy \- Display a group's policy .SH SYNOPSIS euare\-groupgetpolicy \fB\-g\fR GROUP \fB\-p\fR POLICY [\-\-pretty\-print] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Display a group's policy .SS "optional arguments:" .TP \fB\-g\fR GROUP, \fB\-\-group\-name\fR GROUP group the policy is attached to (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the policy to show (required) .TP \fB\-\-pretty\-print\fR reformat the policy for easier reading .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-grouplistbypath.1000066400000000000000000000022561222241730200206040ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GROUPLISTBYPATH "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-grouplistbypath \- List your account's groups .SH SYNOPSIS euare\-grouplistbypath [\-p PATH] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List your account's groups .SS "optional arguments:" .TP \fB\-p\fR PATH, \fB\-\-path\-prefix\fR PATH restrict results to groups whose paths begin with a specific prefix .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-grouplistpolicies.1000066400000000000000000000032631222241730200211230ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GROUPLISTPOLICIES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-grouplistpolicies \- List one specific policy or all policies attached to a group. If no policies are attached to the group, the command still succeeds. .SH SYNOPSIS euare\-grouplistpolicies \fB\-g\fR GROUP [\-p POLICY] [\-v] [\-\-pretty\-print] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List one specific policy or all policies attached to a group. If no policies are attached to the group, the command still succeeds. .SS "optional arguments:" .TP \fB\-g\fR GROUP, \fB\-\-group\-name\fR GROUP group owning the policies to list .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY display a specific policy .TP \fB\-v\fR, \fB\-\-verbose\fR display the contents of the resulting policies (in addition to their names) .TP \fB\-\-pretty\-print\fR when printing the contents of policies, reformat them for easier reading .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-grouplistusers.1000066400000000000000000000022301222241730200204460ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GROUPLISTUSERS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-grouplistusers \- List all the users in a group .SH SYNOPSIS euare\-grouplistusers \fB\-g\fR GROUP [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List all the users in a group .SS "optional arguments:" .TP \fB\-g\fR GROUP, \fB\-\-group\-name\fR GROUP name of the group to show info about .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-groupmod.1000066400000000000000000000024671222241730200172040ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GROUPMOD "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-groupmod \- Change the name and/or path of a group .SH SYNOPSIS euare\-groupmod \fB\-g\fR GROUP [\-n GROUP] [\-p PATH] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Change the name and/or path of a group .SS "optional arguments:" .TP \fB\-g\fR GROUP, \fB\-\-group\-name\fR GROUP name of the group to update .TP \fB\-n\fR GROUP, \fB\-\-new\-group\-name\fR GROUP new name for the group .TP \fB\-p\fR PATH, \fB\-\-new\-path\fR PATH new path for the group .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-groupremoveuser.1000066400000000000000000000023771222241730200206210ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GROUPREMOVEUSER "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-groupremoveuser \- Remove a user from a group .SH SYNOPSIS euare\-groupremoveuser \fB\-u\fR USER \fB\-g\fR GROUP [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Remove a user from a group .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user to remove from the group (required) .TP \fB\-g\fR GROUP, \fB\-\-group\-name\fR GROUP group to remove the user from (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-groupuploadpolicy.1000066400000000000000000000027431222241730200211260ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-GROUPUPLOADPOLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-groupuploadpolicy \- Attach a policy to a group .SH SYNOPSIS euare\-groupuploadpolicy \fB\-g\fR GROUP \fB\-p\fR POLICY (\fB\-o\fR POLICY_CONTENT | \fB\-f\fR FILE) [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Attach a policy to a group .SS "optional arguments:" .TP \fB\-g\fR GROUP, \fB\-\-group\-name\fR GROUP group to attach the policy to (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the policy (required) .TP \fB\-o\fR POLICY_CONTENT, \fB\-\-policy\-content\fR POLICY_CONTENT the policy to attach .TP \fB\-f\fR FILE, \fB\-\-policy\-document\fR FILE file containing the policy to attach .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-servercertdel.1000066400000000000000000000022531222241730200202120ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-SERVERCERTDEL "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-servercertdel \- Delete a server certificate .SH SYNOPSIS euare\-servercertdel \fB\-s\fR CERT [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Delete a server certificate .SS "optional arguments:" .TP \fB\-s\fR CERT, \fB\-\-server\-certificate\-name\fR CERT name of the server certificate to delete (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-servercertgetattributes.1000066400000000000000000000023721222241730200223360ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-SERVERCERTGETATTRIBUTES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-servercertgetattributes \- Show the ARN and GUID of a server certificate .SH SYNOPSIS euare\-servercertgetattributes \fB\-s\fR CERT [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Show the ARN and GUID of a server certificate .SS "optional arguments:" .TP \fB\-s\fR CERT, \fB\-\-server\-certificate\-name\fR CERT name of the server certificate to retrieve info about (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-servercertlistbypath.1000066400000000000000000000023331222241730200216300ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-SERVERCERTLISTBYPATH "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-servercertlistbypath \- List your account's server certificates .SH SYNOPSIS euare\-servercertlistbypath [\-p PREFIX] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List your account's server certificates .SS "optional arguments:" .TP \fB\-p\fR PREFIX, \fB\-\-path\-prefix\fR PREFIX limit results to server certificates that begin with a given path .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-servercertmod.1000066400000000000000000000026351222241730200202310ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-SERVERCERTMOD "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-servercertmod \- Change the name and/or path of a server certificate .SH SYNOPSIS euare\-servercertmod \fB\-s\fR CERT [\-n CERT] [\-p PATH] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Change the name and/or path of a server certificate .SS "optional arguments:" .TP \fB\-s\fR CERT, \fB\-\-server\-certificate\-name\fR CERT name of the server certificate to update .TP \fB\-n\fR CERT, \fB\-\-new\-server\-certificate\-name\fR CERT new name for the server certificate .TP \fB\-p\fR PATH, \fB\-\-new\-path\fR PATH new path for the server certificate .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-servercertupload.1000066400000000000000000000041451222241730200207340ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-SERVERCERTUPLOAD "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-servercertupload \- Upload a server certificate .SH SYNOPSIS euare\-servercertupload \fB\-s\fR CERTNAME (\fB\-c\fR CERT | \fB\-\-certificate\-file\fR FILE) (\fB\-\-private\-key\fR KEY | \fB\-\-private\-key\-file\fR FILE) (\fB\-\-certificate\-chain\fR CHAIN | \fB\-\-certificate\-chain\-file\fR FILE) [\-p PATH] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Upload a server certificate .SS "optional arguments:" .TP \fB\-s\fR CERTNAME, \fB\-\-server\-certificate\-name\fR CERTNAME name to give the new server certificate (required) .TP \fB\-c\fR CERT, \fB\-\-certificate\-body\fR CERT PEM\-encoded certificate .TP \fB\-\-certificate\-file\fR FILE file containing the PEM\-encoded certificate .TP \fB\-\-private\-key\fR KEY PEM\-encoded private key .TP \fB\-\-private\-key\-file\fR FILE file containing the PEM\-encoded private key .TP \fB\-\-certificate\-chain\fR CHAIN PEM\-encoded certificate chain. This is typically the PEM\-encoded certificates of the chain, concatenated together. .TP \fB\-\-certificate\-chain\-file\fR FILE file containing the PEM\-encoded certificate chain. This is typically the PEM\-encoded certificates of the chain, concatenated together. .TP \fB\-p\fR PATH, \fB\-\-path\fR PATH path for the new server certificate (default: "/") .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-useraddcert.1000066400000000000000000000025541222241730200176520ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERADDCERT "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-useraddcert \- Upload a signing certificate .SH SYNOPSIS euare\-useraddcert (\fB\-c\fR CERT | \fB\-f\fR FILE) [\-u USER] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Upload a signing certificate .SS "optional arguments:" .TP \fB\-c\fR CERT, \fB\-\-certificate\-body\fR CERT contents of the new certificate .TP \fB\-f\fR FILE, \fB\-\-certificate\-file\fR FILE file containing the new certificate .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user the signing certificate is for (default: current user) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-useraddkey.1000066400000000000000000000022551222241730200175030ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERADDKEY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-useraddkey \- Create a new access key for a user .SH SYNOPSIS euare\-useraddkey [\-u USERNAME] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Create a new access key for a user .SS "optional arguments:" .TP \fB\-u\fR USERNAME, \fB\-\-user\-name\fR USERNAME user the new key will belong to (default: calling user) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-useraddloginprofile.1000066400000000000000000000025361222241730200214060ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERADDLOGINPROFILE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-useraddloginprofile \- Create a password for the specified user .SH SYNOPSIS euare\-useraddloginprofile \fB\-u\fR USER [\-p PASSWORD] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Create a password for the specified user .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER name of the user to create a password for (required) .TP \fB\-p\fR PASSWORD, \fB\-\-password\fR PASSWORD the new password. If unspecified, the new password will be read from the console. .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-useraddpolicy.1000066400000000000000000000035161222241730200202130ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERADDPOLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-useraddpolicy \- Add a new policy to a user. To add more complex policies than this tool supports, see euare-useruploadpolicy. .SH SYNOPSIS euare\-useraddpolicy \fB\-u\fR USER \fB\-p\fR POLICY \fB\-e\fR {Allow,Deny} \fB\-a\fR ACTION \fB\-r\fR RESOURCE [\-o] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Add a new policy to a user. To add more complex policies than this tool supports, see euare\-useruploadpolicy. .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user to attach the policy to (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the new policy (required) .TP \fB\-e\fR {Allow,Deny}, \fB\-\-effect\fR {Allow,Deny} whether the new policy should Allow or Deny (required) .TP \fB\-a\fR ACTION, \fB\-\-action\fR ACTION action the policy should apply to (required) .TP \fB\-r\fR RESOURCE, \fB\-\-resource\fR RESOURCE resource the policy should apply to (required) .TP \fB\-o\fR, \fB\-\-output\fR display the newly\-created policy .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-usercreate.1000066400000000000000000000032051222241730200175010ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERCREATE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-usercreate \- Create a new user and optionally add the user to a group or generate an access key for the user .SH SYNOPSIS euare\-usercreate \fB\-u\fR USERNAME [\-p PATH] [\-g GROUP_NAME] [\-k] [\-v] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Create a new user and optionally add the user to a group or generate an access key for the user .SS "optional arguments:" .TP \fB\-u\fR USERNAME, \fB\-\-user\-name\fR USERNAME name of the new user .TP \fB\-p\fR PATH, \fB\-\-path\fR PATH path for the new user (default: "/") .TP \fB\-g\fR GROUP_NAME, \fB\-\-group\-name\fR GROUP_NAME add the new user to a group .TP \fB\-k\fR, \fB\-\-create\-accesskey\fR create an access key for the new user and print it to standard out .TP \fB\-v\fR, \fB\-\-verbose\fR print the new user's ARN and GUID .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-usercreatecert.1000066400000000000000000000026071222241730200203640ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERCREATECERT "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-usercreatecert \- [Eucalyptus only] Create a new signing certificate .SH SYNOPSIS euare\-usercreatecert \fB\-u\fR USER [\-\-out FILE] [\-\-keyout FILE] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION [Eucalyptus only] Create a new signing certificate .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user to create the signing certificate for (required) .TP \fB\-\-out\fR FILE file to write the certificate to (default: stdout) .TP \fB\-\-keyout\fR FILE file to write the private key to (default: stdout) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userdeactivatemfadevice.1000066400000000000000000000024571222241730200222230ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERDEACTIVATEMFADEVICE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userdeactivatemfadevice \- Deactivate an MFA device .SH SYNOPSIS euare\-userdeactivatemfadevice \fB\-u\fR USER \fB\-s\fR SERIAL [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Deactivate an MFA device .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user whose MFA device to deactivate (required) .TP \fB\-s\fR SERIAL, \fB\-\-serial\-number\fR SERIAL serial number of the MFA device to deactivate (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userdel.1000066400000000000000000000025071222241730200170060ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERDEL "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userdel \- Delete a user .SH SYNOPSIS euare\-userdel \fB\-u\fR USER [\-r] [\-p] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Delete a user .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER name of the user to delete (required) .TP \fB\-r\fR, \fB\-\-recursive\fR remove all IAM resources associated with the user first .TP \fB\-p\fR, \fB\-\-pretend\fR list the resources that would be deleted instead of actually deleting them. Implies \fB\-r\fR. .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userdelcert.1000066400000000000000000000024141222241730200176610ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERDELCERT "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userdelcert \- Delete a signing certificate .SH SYNOPSIS euare\-userdelcert \fB\-u\fR USER \fB\-c\fR CERT [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Delete a signing certificate .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user the signing certificate belongs to (required) .TP \fB\-c\fR CERT, \fB\-\-certificate\-id\fR CERT ID of the signing certificate to delete (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userdelkey.1000066400000000000000000000023451222241730200175170ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERDELKEY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userdelkey \- Delete an access key .SH SYNOPSIS euare\-userdelkey \fB\-u\fR USER \fB\-k\fR KEY_ID [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Delete an access key .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user whose key to delete (required) .TP \fB\-k\fR KEY_ID, \fB\-\-user\-key\-id\fR KEY_ID ID of the access key to delete (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userdelloginprofile.1000066400000000000000000000022611222241730200214150ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERDELLOGINPROFILE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userdelloginprofile \- Delete a user's password .SH SYNOPSIS euare\-userdelloginprofile \fB\-u\fR USER [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Delete a user's password .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER name of the user whose password should be deleted (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userdelpolicy.1000066400000000000000000000023771222241730200202330ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERDELPOLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userdelpolicy \- Remove a policy from a user .SH SYNOPSIS euare\-userdelpolicy \fB\-u\fR USER \fB\-p\fR POLICY [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Remove a policy from a user .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user the policy is attached to (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the policy to delete (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userenablemfadevice.1000066400000000000000000000027411222241730200213340ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERENABLEMFADEVICE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userenablemfadevice \- Enable an MFA device .SH SYNOPSIS euare\-userenablemfadevice \fB\-u\fR USER \fB\-s\fR SERIAL \fB\-c1\fR CODE \fB\-c2\fR CODE [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Enable an MFA device .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user to enable the MFA device for (required) .TP \fB\-s\fR SERIAL, \fB\-\-serial\-number\fR SERIAL serial number of the MFA device to activate (required) .TP \fB\-c1\fR CODE an authentication code emitted by the MFA device (required) .TP \fB\-c2\fR CODE a subsequent authentication code emitted by the MFA device (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-usergetattributes.1000066400000000000000000000023761222241730200211340ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERGETATTRIBUTES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-usergetattributes \- Display a user's ARN and GUID .SH SYNOPSIS euare\-usergetattributes [\-u USER] [\-\-show\-extra] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Display a user's ARN and GUID .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER name of the user to show info about (default: current user) .TP \fB\-\-show\-extra\fR also display additional user info .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-usergetinfo.1000066400000000000000000000026121222241730200176720ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERGETINFO "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-usergetinfo \- [Eucalyptus only] Display information about a user .SH SYNOPSIS euare\-usergetinfo [\-u USER] [\-k INFOKEY] [\-\-as\-account ACCOUNT] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION [Eucalyptus only] Display information about a user .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER name of the user to display info for (default: current user) .TP \fB\-k\fR INFOKEY, \fB\-\-info\-key\fR INFOKEY name of the piece of user info to show .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-usergetloginprofile.1000066400000000000000000000023761222241730200214370ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERGETLOGINPROFILE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-usergetloginprofile \- Verify that a user has a password .SH SYNOPSIS euare\-usergetloginprofile \fB\-u\fR USER [\-\-verbose] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Verify that a user has a password .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user whose password to verify (required) .TP \fB\-\-verbose\fR print extra info about the user's password .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-usergetpolicy.1000066400000000000000000000025141222241730200202370ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERGETPOLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-usergetpolicy \- Display a user's policy .SH SYNOPSIS euare\-usergetpolicy \fB\-u\fR USER \fB\-p\fR POLICY [\-\-pretty\-print] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Display a user's policy .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user the poilcy is attached to (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the policy to show (required) .TP \fB\-\-pretty\-print\fR reformat the policy for easier reading .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userlistbypath.1000066400000000000000000000022361222241730200204240ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERLISTBYPATH "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userlistbypath \- List your account's users .SH SYNOPSIS euare\-userlistbypath [\-p PREFIX] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List your account's users .SS "optional arguments:" .TP \fB\-p\fR PREFIX, \fB\-\-path\-prefix\fR PREFIX limit results to users who begin with a given path .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userlistcerts.1000066400000000000000000000023601222241730200202530ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERLISTCERTS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userlistcerts \- List a user's signing certificates .SH SYNOPSIS euare\-userlistcerts [\-u USER] [\-v] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List a user's signing certificates .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user to list certificates for (default: current user) .TP \fB\-v\fR, \fB\-\-verbose\fR also show certificates' contents .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userlistgroups.1000066400000000000000000000022461222241730200204550ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERLISTGROUPS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userlistgroups \- List all groups a user is a member of .SH SYNOPSIS euare\-userlistgroups \fB\-u\fR USER [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List all groups a user is a member of .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user to list membership for (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userlistkeys.1000066400000000000000000000022131222241730200201030ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERLISTKEYS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userlistkeys \- List a user's access keys .SH SYNOPSIS euare\-userlistkeys [\-u USER] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List a user's access keys .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user to list keys for (default: current user) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userlistmfadevices.1000066400000000000000000000022441222241730200212420ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERLISTMFADEVICES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userlistmfadevices \- List a user's MFA devices .SH SYNOPSIS euare\-userlistmfadevices [\-u USER] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List a user's MFA devices .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user to list MFA devices for (default: current user) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userlistpolicies.1000066400000000000000000000032451222241730200207450ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERLISTPOLICIES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userlistpolicies \- List one specific policy or all policies attached to a user. If no policies are attached to the user, the action still succeeds. .SH SYNOPSIS euare\-userlistpolicies \fB\-u\fR USER [\-p POLICY] [\-v] [\-\-pretty\-print] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List one specific policy or all policies attached to a user. If no policies are attached to the user, the action still succeeds. .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user owning the policies to list .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY display a specific policy .TP \fB\-v\fR, \fB\-\-verbose\fR display the contents of the resulting policies (in addition to their names) .TP \fB\-\-pretty\-print\fR when printing the contents of policies, reformat them for easier reading .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-usermod.1000066400000000000000000000033701222241730200170200ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERMOD "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-usermod \- Change the name and/or path of a user .SH SYNOPSIS euare\-usermod \fB\-u\fR USER [\-n USER] [\-p PATH] [\-\-enabled {true,false}] [\-\-reg\-status {REGISTERED,APPROVED,CONFIRMED}] [\-\-pwd\-expires DATETIME] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Change the name and/or path of a user .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER name of the user to update .TP \fB\-n\fR USER, \fB\-\-new\-user\-name\fR USER new name for the user .TP \fB\-p\fR PATH, \fB\-\-new\-path\fR PATH new path for the user .TP \fB\-\-enabled\fR {true,false} [Eucalyptus only] 'true' to enable the user, or \&'false' to disable the user .TP \fB\-\-reg\-status\fR {REGISTERED,APPROVED,CONFIRMED} [Eucalyptus only] new registration status. Only CONFIRMED users may access the system. .TP \fB\-\-pwd\-expires\fR DATETIME [Eucalyptus only] New password expiration date, in ISO8601 format .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-usermodcert.1000066400000000000000000000027761222241730200177070ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERMODCERT "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-usermodcert \- Change the status of a signing certificate from Active to Inactive, or vice versa .SH SYNOPSIS euare\-usermodcert [\-u USER] \fB\-c\fR CERT \fB\-s\fR {Active,Inactive} [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Change the status of a signing certificate from Active to Inactive, or vice versa .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user owning the signing certificate to update (default: current user) .TP \fB\-c\fR CERT, \fB\-\-certificate\-id\fR CERT ID of the signing certificate to update .TP \fB\-s\fR {Active,Inactive}, \fB\-\-status\fR {Active,Inactive} status to assign to the certificate .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-usermodkey.1000066400000000000000000000027471222241730200175400ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERMODKEY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-usermodkey \- Change the status of an access key from Active to Inactive, or vice versa .SH SYNOPSIS euare\-usermodkey [\-u USER] \fB\-k\fR KEY_ID \fB\-s\fR {Active,Inactive} [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Change the status of an access key from Active to Inactive, or vice versa .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user owning the access key to update (default: current user) .TP \fB\-k\fR KEY_ID, \fB\-\-user\-key\-id\fR KEY_ID ID of the access key to update (required) .TP \fB\-s\fR {Active,Inactive}, \fB\-\-status\fR {Active,Inactive} status to assign to the access key .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-usermodloginprofile.1000066400000000000000000000024761222241730200214400ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERMODLOGINPROFILE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-usermodloginprofile \- Update a user's password .SH SYNOPSIS euare\-usermodloginprofile \fB\-u\fR USER [\-p PASSWORD] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Update a user's password .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER name of the user to change a password for (required) .TP \fB\-p\fR PASSWORD, \fB\-\-password\fR PASSWORD the new password. If unspecified, the new password will be read from the console. .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userresyncmfadevice.1000066400000000000000000000030171222241730200214060ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERRESYNCMFADEVICE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userresyncmfadevice \- Re-synchronize an MFA device with the server .SH SYNOPSIS euare\-userresyncmfadevice \fB\-u\fR USER \fB\-s\fR SERIAL \fB\-c1\fR CODE \fB\-c2\fR CODE [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Re\-synchronize an MFA device with the server .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user to re\-synchronize the MFA device for (required) .TP \fB\-s\fR SERIAL, \fB\-\-serial\-number\fR SERIAL serial number of the MFA device (required) .TP \fB\-c1\fR CODE an authentication code emitted by the MFA device (required) .TP \fB\-c2\fR CODE a subsequent authentication code emitted by the MFA device (required) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-userupdateinfo.1000066400000000000000000000026041222241730200203760ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERUPDATEINFO "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-userupdateinfo \- [Eucalyptus only] Update a user's information .SH SYNOPSIS euare\-userupdateinfo [\-u USER] \fB\-k\fR KEY [\-i VALUE] [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION [Eucalyptus only] Update a user's information .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user to update (default: current user) .TP \fB\-k\fR KEY, \fB\-\-info\-key\fR KEY name of the info field to set (required) .TP \fB\-i\fR VALUE, \fB\-\-info\-value\fR VALUE value to set the info field to (omit to delete it) .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euare-useruploadpolicy.1000066400000000000000000000027311222241730200207450ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUARE-USERUPLOADPOLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euare-useruploadpolicy \- Attach a policy to a user .SH SYNOPSIS euare\-useruploadpolicy \fB\-u\fR USER \fB\-p\fR POLICY (\fB\-o\fR POLICY_CONTENT | \fB\-f\fR FILE) [\-\-as\-account ACCOUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Attach a policy to a user .SS "optional arguments:" .TP \fB\-u\fR USER, \fB\-\-user\-name\fR USER user to attach the policy to (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the policy (required) .TP \fB\-o\fR POLICY_CONTENT, \fB\-\-policy\-content\fR POLICY_CONTENT the policy to attach .TP \fB\-f\fR FILE, \fB\-\-policy\-document\fR FILE file containing the policy to attach .TP \fB\-\-as\-account\fR ACCOUNT [Eucalyptus cloud admin only] run this command as the administrator of another account .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL identity service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-allocate-address.1000066400000000000000000000021451222241730200203640ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-ALLOCATE-ADDRESS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-allocate-address \- Allocate a public IP address .SH SYNOPSIS euca\-allocate\-address [\-d vpc] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Allocate a public IP address .SS "optional arguments:" .TP \fB\-d\fR vpc, \fB\-\-domain\fR vpc [VPC only] "vpc" to allocate the address for use in a VPC .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-associate-address.1000066400000000000000000000035651222241730200205620ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-ASSOCIATE-ADDRESS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-associate-address \- Associate an elastic IP address with a running instance .SH SYNOPSIS euca\-associate\-address (\fB\-i\fR INSTANCE | \fB\-n\fR INTERFACE) [\-a ALLOC] [\-p ADDRESS] [\-\-allow\-reassociation] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [ADDRESS] .SH DESCRIPTION Associate an elastic IP address with a running instance .SS "positional arguments:" .TP ADDRESS [Non\-VPC only] IP address to associate (required) .SS "optional arguments:" .TP \fB\-i\fR INSTANCE, \fB\-\-instance\-id\fR INSTANCE ID of the instance to associate the address with .TP \fB\-n\fR INTERFACE, \fB\-\-network\-interface\fR INTERFACE [VPC only] network interface to associate the address with .TP \fB\-a\fR ALLOC, \fB\-\-allocation\-id\fR ALLOC [VPC only] VPC allocation ID (required) .TP \fB\-p\fR ADDRESS, \fB\-\-private\-ip\-address\fR ADDRESS [VPC only] the private address to associate with the address being associated in the VPC (default: primary private IP) .TP \fB\-\-allow\-reassociation\fR [VPC only] allow the address to be associated even if it is already associated with another interface .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-attach-volume.1000066400000000000000000000024631222241730200177310ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-ATTACH-VOLUME "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-attach-volume \- Attach an EBS volume to an instance .SH SYNOPSIS euca\-attach\-volume \fB\-i\fR INSTANCE \fB\-d\fR DEVICE [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] VOLUME .SH DESCRIPTION Attach an EBS volume to an instance .SS "positional arguments:" .TP VOLUME ID of the volume to attach (required) .SS "optional arguments:" .TP \fB\-i\fR INSTANCE, \fB\-\-instance\fR INSTANCE instance to attach the volume to (required) .TP \fB\-d\fR DEVICE, \fB\-\-device\fR DEVICE device name exposed to the instance (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-authorize.1000066400000000000000000000037321222241730200171720ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-AUTHORIZE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-authorize \- Add a rule to a security group that allows traffic to pass .SH SYNOPSIS euca\-authorize [\-\-egress] [\-P {tcp,udp,icmp,6,17,1}] [\-p RANGE] [\-t TYPE:CODE] [\-s CIDR | \fB\-o\fR GROUP] [\-u ACCOUNT] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] GROUP .SH DESCRIPTION Add a rule to a security group that allows traffic to pass .SS "positional arguments:" .TP GROUP name or ID of the security group to modify (required) .SS "optional arguments:" .TP \fB\-\-egress\fR [VPC only] manage an egress rule, which controls traffic leaving the group .TP \fB\-P\fR {tcp,udp,icmp,6,17,1}, \fB\-\-protocol\fR {tcp,udp,icmp,6,17,1} protocol to affect (default: tcp) .TP \fB\-p\fR RANGE, \fB\-\-port\-range\fR RANGE range of ports (specified as "from\-to") or a single port number (required for tcp and udp) .TP \fB\-t\fR TYPE:CODE, \fB\-\-icmp\-type\-code\fR TYPE:CODE ICMP type and code (specified as "type:code") (required for icmp) .TP \fB\-s\fR CIDR, \fB\-\-cidr\fR CIDR IP range (default: 0.0.0.0/0) .TP \fB\-o\fR GROUP [Non\-VPC only] name of a security group with which to affect network communication .TP \fB\-u\fR ACCOUNT ID of the account that owns the security group specified with \fB\-o\fR .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-bundle-image.1000066400000000000000000000050271222241730200175100ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-BUNDLE-IMAGE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-bundle-image \- Prepare an image for uploading to a cloud .SH SYNOPSIS euca\-bundle\-image \fB\-i\fR FILE [\-p PREFIX] \fB\-r\fR {i386,x86_64,armhf} [\-c FILE] [\-k FILE] [\-u ACCOUNT] [\-\-region USER@REGION] [\-\-ec2cert FILE] [\-\-kernel IMAGE] [\-\-ramdisk IMAGE] [\-B VIRTUAL1=DEVICE1,VIRTUAL2=DEVICE2,...] [\-d DIR] [\-\-productcodes CODE1,CODE2,...] [\-\-progress | \fB\-\-no\-progress]\fR [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Prepare an image for uploading to a cloud .SS "optional arguments:" .TP \fB\-i\fR FILE, \fB\-\-image\fR FILE file containing the image to bundle (required) .TP \fB\-p\fR PREFIX, \fB\-\-prefix\fR PREFIX the file name prefix to give the bundle's files (default: the image's file name) .TP \fB\-r\fR {i386,x86_64,armhf}, \fB\-\-arch\fR {i386,x86_64,armhf} the image's processor architecture (required) .TP \fB\-c\fR FILE, \fB\-\-cert\fR FILE file containing your X.509 certificate. .TP \fB\-k\fR FILE, \fB\-\-privatekey\fR FILE file containing the private key to sign the bundle's manifest with. This private key will also be required to unbundle the image in the future. .TP \fB\-u\fR ACCOUNT, \fB\-\-user\fR ACCOUNT your account ID .TP \fB\-\-region\fR USER@REGION use encryption keys and the account ID specified for a user and/or region in configuration files .TP \fB\-\-ec2cert\fR FILE file containing the cloud's X.509 certificate .TP \fB\-\-kernel\fR IMAGE ID of the kernel image to associate with the machine bundle .TP \fB\-\-ramdisk\fR IMAGE ID of the ramdisk image to associate with the machine bundle .TP \fB\-B\fR VIRTUAL1=DEVICE1,VIRTUAL2=DEVICE2,..., \fB\-\-block\-device\-mappings\fR VIRTUAL1=DEVICE1,VIRTUAL2=DEVICE2,... default block device mapping scheme with which to launch instances of this machine image .TP \fB\-d\fR DIR, \fB\-\-destination\fR DIR location to place the bundle's files (default: dir named by TMPDIR, TEMP, or TMP environment variables, or otherwise \fI/var/tmp\fP) .TP \fB\-\-productcodes\fR CODE1,CODE2,... comma\-separated list of product codes .TP \fB\-\-progress\fR show progress (the default when run interactively) .TP \fB\-\-no\-progress\fR do not show progress (the default when run noninteractively) .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-bundle-instance.1000066400000000000000000000041761222241730200202360ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-BUNDLE-INSTANCE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-bundle-instance \- Bundle an S3-backed Windows instance .SH SYNOPSIS euca\-bundle\-instance \fB\-b\fR BUCKET \fB\-p\fR PREFIX \fB\-o\fR KEY\-ID [\-c POLICY] [\-s SIGNATURE] [\-w KEY] [\-x HOURS] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE .SH DESCRIPTION Bundle an S3\-backed Windows instance .SS "positional arguments:" .TP INSTANCE ID of the instance to bundle (required) .SS "optional arguments:" .TP \fB\-b\fR BUCKET, \fB\-\-bucket\fR BUCKET bucket in which to store the new machine image (required) .TP \fB\-p\fR PREFIX, \fB\-\-prefix\fR PREFIX beginning of the machine image bundle name (required) .TP \fB\-o\fR KEY\-ID, \fB\-\-owner\-akid\fR KEY\-ID, \fB\-\-user\-access\-key\fR KEY\-ID bucket owner's access key ID (required) .TP \fB\-c\fR POLICY, \fB\-\-policy\fR POLICY Base64\-encoded upload policy that allows the server to upload a bundle on your behalf. If unused, \fB\-w\fR is required. .TP \fB\-s\fR SIGNATURE, \fB\-\-policy\-signature\fR SIGNATURE signature of the Base64\-encoded upload policy. If unused, \fB\-w\fR is required. .TP \fB\-w\fR KEY, \fB\-\-owner\-sak\fR KEY, \fB\-\-user\-secret\-key\fR KEY bucket owner's secret access key, used to sign upload policies. This is required unless both \fB\-c\fR and \fB\-s\fR are used. .TP \fB\-x\fR HOURS, \fB\-\-expires\fR HOURS generated upload policy expiration time (default: 24) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-bundle-upload.1000066400000000000000000000037311222241730200177120ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-BUNDLE-UPLOAD "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-bundle-upload \- [Eucalyptus NC internal] Bundle and upload an image on behalf of a user .SH SYNOPSIS euca\-bundle\-upload \fB\-b\fR BUCKET \fB\-i\fR IMAGE [\-r ARCH] [\-d DIRECTORY] [\-\-cert FILE] [\-\-privatekey FILE] [\-\-spoof\-key\-id KEY_ID] [\-\-ec2cert FILE] [\-\-user ACCOUNT] [\-c POLICY] [\-\-upload\-policy\-signature SIGNATURE] [\-U URL] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION [Eucalyptus NC internal] Bundle and upload an image on behalf of a user .SS "optional arguments:" .TP \fB\-b\fR BUCKET, \fB\-\-bucket\fR BUCKET bucket to upload the bundle to (required) .TP \fB\-i\fR IMAGE, \fB\-\-image\fR IMAGE file containing the image to bundle (required) .TP \fB\-r\fR ARCH, \fB\-\-arch\fR ARCH image architecture (default: x86_64) .TP \fB\-d\fR DIRECTORY, \fB\-\-directory\fR DIRECTORY location to place the working directory with temporary files .TP \fB\-\-cert\fR FILE file containing the X.509 certificate to use when signing requests and bundling the image .TP \fB\-\-privatekey\fR FILE file containing the private key to use when signing requests and bundling the image .TP \fB\-\-spoof\-key\-id\fR KEY_ID run this command as if signed by a specific access key .TP \fB\-\-ec2cert\fR FILE file containing the cloud's X.509 certificate .TP \fB\-\-user\fR ACCOUNT the user's account ID .TP \fB\-c\fR POLICY, \fB\-\-upload\-policy\fR POLICY Base64\-encoded S3 upload policy .TP \fB\-\-upload\-policy\-signature\fR SIGNATURE, \fB\-\-policysignature\fR SIGNATURE signature for the upload policy given with \fB\-\-uploadpolicy\fR .TP \fB\-U\fR URL, \fB\-\-url\fR URL storage service endpoint URL .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-bundle-vol.1000066400000000000000000000071411222241730200172250ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-BUNDLE-VOL "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-bundle-vol \- Create a bundled iamge based on the running machine's filesystem .SH SYNOPSIS euca\-bundle\-vol [\-s MB] [\-p PREFIX] [\-a] [\-\-no\-inherit | \fB\-\-inherit]\fR [\-i FILE1,FILE2,...] [\-e DIR1,DIR2,...] [\-\-volume PATH] [\-\-no\-filter] [\-\-fstab PATH | \fB\-\-generate\-fstab]\fR \fB\-r\fR {i386,x86_64,armhf} [\-c FILE] [\-k FILE] [\-u ACCOUNT] [\-\-region USER@REGION] [\-\-ec2cert FILE] [\-\-kernel IMAGE] [\-\-ramdisk IMAGE] [\-B VIRTUAL1=DEVICE1,VIRTUAL2=DEVICE2,...] [\-d DIR] [\-\-productcodes CODE1,CODE2,...] [\-\-progress | \fB\-\-no\-progress]\fR [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Create a bundled iamge based on the running machine's filesystem .SH DESCRIPTION This command must be run as the superuser. .SS "optional arguments:" .TP \fB\-s\fR MB, \fB\-\-size\fR MB Size of the image in MB (default: 10240; recommended maximum: 10240). .TP \fB\-p\fR PREFIX, \fB\-\-prefix\fR PREFIX the file name prefix to give the bundle's files (defaults to 'image'). .TP \fB\-a\fR, \fB\-\-all\fR Bundle all directories (including mounted filesystems). .TP \fB\-\-no\-inherit\fR Do not add instance metadata to the bundled image (defaults to inheriting metadata). .TP \fB\-\-inherit\fR Explicitly inherit instance metadata and add it to the bundled image (this is the default behavior) .TP \fB\-i\fR FILE1,FILE2,..., \fB\-\-include\fR FILE1,FILE2,... Comma\-separated list of absolute file paths to include. .TP \fB\-e\fR DIR1,DIR2,..., \fB\-\-exclude\fR DIR1,DIR2,... Comma\-separated list of directories to exclude. .TP \fB\-\-volume\fR PATH Path to mounted volume to bundle (defaults to '/'). .TP \fB\-\-no\-filter\fR Do not use the default filtered files list. .TP \fB\-\-fstab\fR PATH Path to the fstab to be bundled with image. .TP \fB\-\-generate\-fstab\fR Generate fstab to bundle in image. .TP \fB\-r\fR {i386,x86_64,armhf}, \fB\-\-arch\fR {i386,x86_64,armhf} the image's processor architecture (required) .TP \fB\-c\fR FILE, \fB\-\-cert\fR FILE file containing your X.509 certificate. .TP \fB\-k\fR FILE, \fB\-\-privatekey\fR FILE file containing the private key to sign the bundle's manifest with. This private key will also be required to unbundle the image in the future. .TP \fB\-u\fR ACCOUNT, \fB\-\-user\fR ACCOUNT your account ID .TP \fB\-\-region\fR USER@REGION use encryption keys and the account ID specified for a user and/or region in configuration files .TP \fB\-\-ec2cert\fR FILE file containing the cloud's X.509 certificate .TP \fB\-\-kernel\fR IMAGE ID of the kernel image to associate with the machine bundle .TP \fB\-\-ramdisk\fR IMAGE ID of the ramdisk image to associate with the machine bundle .TP \fB\-B\fR VIRTUAL1=DEVICE1,VIRTUAL2=DEVICE2,..., \fB\-\-block\-device\-mappings\fR VIRTUAL1=DEVICE1,VIRTUAL2=DEVICE2,... default block device mapping scheme with which to launch instances of this machine image .TP \fB\-d\fR DIR, \fB\-\-destination\fR DIR location to place the bundle's files (default: dir named by TMPDIR, TEMP, or TMP environment variables, or otherwise \fI/var/tmp\fP) .TP \fB\-\-productcodes\fR CODE1,CODE2,... comma\-separated list of product codes .TP \fB\-\-progress\fR show progress (the default when run interactively) .TP \fB\-\-no\-progress\fR do not show progress (the default when run noninteractively) .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-cancel-bundle-task.1000066400000000000000000000021571222241730200206140ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-CANCEL-BUNDLE-TASK "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-cancel-bundle-task \- Cancel an instance bundling operation .SH SYNOPSIS euca\-cancel\-bundle\-task [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] TASK\-ID .SH DESCRIPTION Cancel an instance bundling operation .SS "positional arguments:" .TP TASK\-ID ID of the bundle task to cancel (required) .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-check-bucket.1000066400000000000000000000024051222241730200175040ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-CHECK-BUCKET "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-check-bucket \- [Eucalyptus NC internal] Return successfully if a bucket already exists .SH SYNOPSIS euca\-check\-bucket [\-\-region USER@REGION | \fB\-U\fR URL] [\-\-cert FILE] [\-\-privatekey FILE] [\-\-spoof\-key\-id KEY_ID] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] bucket .SH DESCRIPTION [Eucalyptus NC internal] Return successfully if a bucket already exists .SS "positional arguments:" .TP bucket name of the bucket to check .SS "optional arguments:" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL storage service endpoint URL .TP \fB\-\-cert\fR FILE file containing the X.509 certificate to use when signing requests .TP \fB\-\-privatekey\fR FILE file containing the private key to sign requests with .TP \fB\-\-spoof\-key\-id\fR KEY_ID run this command as if signed by a specific access key .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-confirm-product-instance.1000066400000000000000000000024051222241730200220710ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-CONFIRM-PRODUCT-INSTANCE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-confirm-product-instance \- Verify if a product code is associated with an instance .SH SYNOPSIS euca\-confirm\-product\-instance \fB\-i\fR INSTANCE [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] CODE .SH DESCRIPTION Verify if a product code is associated with an instance .SS "positional arguments:" .TP CODE product code to confirm (required) .SS "optional arguments:" .TP \fB\-i\fR INSTANCE, \fB\-\-instance\fR INSTANCE ID of the instance to confirm (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-copy-image.1000066400000000000000000000031421222241730200172050ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-COPY-IMAGE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-copy-image \- Copy an image from another region .SH SYNOPSIS euca\-copy\-image \fB\-r\fR REGION \fB\-s\fR IMAGE [\-n NAME] [\-d DESC] [\-c TOKEN] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Copy an image from another region .SH DESCRIPTION Run this command against the destination region, not the source region. .SS "optional arguments:" .TP \fB\-r\fR REGION, \fB\-\-source\-region\fR REGION name of the region to copy the image from (required) .TP \fB\-s\fR IMAGE, \fB\-\-source\-ami\-id\fR IMAGE ID of the image to copy (required) .TP \fB\-n\fR NAME, \fB\-\-name\fR NAME name to assign the new copy of the image .TP \fB\-d\fR DESC, \fB\-\-description\fR DESC description to assign the new copy of the image .TP \fB\-c\fR TOKEN, \fB\-\-client\-token\fR TOKEN unique identifier to ensure request idempotency .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-create-group.1000066400000000000000000000023751222241730200175570ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-CREATE-GROUP "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-create-group \- Create a new security group .SH SYNOPSIS euca\-create\-group \fB\-d\fR DESC [\-c VPC] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] GROUP .SH DESCRIPTION Create a new security group .SS "positional arguments:" .TP GROUP name of the new group (required) .SS "optional arguments:" .TP \fB\-d\fR DESC, \fB\-\-description\fR DESC description of the new group (required) .TP \fB\-c\fR VPC, \fB\-\-vpc\fR VPC [VPC only] ID of the VPC to create the group in .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-create-image.1000066400000000000000000000033261222241730200175020ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-CREATE-IMAGE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-create-image \- Create an EBS image from a running or stopped EBS instance .SH SYNOPSIS euca\-create\-image \fB\-n\fR NAME [\-d DESC] [\-\-no\-reboot] [\-b DEVICE=MAPPED] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE .SH DESCRIPTION Create an EBS image from a running or stopped EBS instance .SS "positional arguments:" .TP INSTANCE instance from which to create the image (required) .SS "optional arguments:" .TP \fB\-n\fR NAME, \fB\-\-name\fR NAME name for the new image (required) .TP \fB\-d\fR DESC, \fB\-\-description\fR DESC description for the new image .TP \fB\-\-no\-reboot\fR do not shut down the instance before creating the image. Image integrity may be affected. .TP \fB\-b\fR DEVICE=MAPPED, \fB\-\-block\-device\-mapping\fR DEVICE=MAPPED define a block device mapping for the image, in the form DEVICE=MAPPED, where "MAPPED" is "none", "ephemeral(0\-3)", or "[SNAP_ID]:[SIZE]:[true|false]:[s tandard|VOLTYPE[:IOPS]]" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-create-keypair.1000066400000000000000000000023131222241730200200570ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-CREATE-KEYPAIR "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-create-keypair \- Create a new SSH key pair for use with instances .SH SYNOPSIS euca\-create\-keypair [\-f FILE] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] KEYPAIR .SH DESCRIPTION Create a new SSH key pair for use with instances .SS "positional arguments:" .TP KEYPAIR name of the new key pair (required) .SS "optional arguments:" .TP \fB\-f\fR FILE, \fB\-\-filename\fR FILE file name to save the private key to .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-create-snapshot.1000066400000000000000000000022371222241730200202570ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-CREATE-SNAPSHOT "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-create-snapshot \- Create a snapshot of a volume .SH SYNOPSIS euca\-create\-snapshot [\-d DESC] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] VOLUME .SH DESCRIPTION Create a snapshot of a volume .SS "positional arguments:" .TP VOLUME volume to create a snapshot of (required) .SS "optional arguments:" .TP \fB\-d\fR DESC, \fB\-\-description\fR DESC snapshot description .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-create-tags.1000066400000000000000000000025411222241730200173540ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-CREATE-TAGS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-create-tags \- Add or overwrite tags for one or more resources .SH SYNOPSIS euca\-create\-tags \fB\-\-tag\fR KEY[=VALUE] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] RESOURCE [RESOURCE ...] .SH DESCRIPTION Add or overwrite tags for one or more resources .SS "positional arguments:" .TP RESOURCE ID(s) of the resource(s) to tag (at least 1 required) .SS "optional arguments:" .TP \fB\-\-tag\fR KEY[=VALUE] key and optional value of the tag to create, separated by an "=" character. If no value is given the tag's value is set to an empty string. (at least 1 required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-create-volume.1000066400000000000000000000027711222241730200177320ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-CREATE-VOLUME "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-create-volume \- Create a new volume .SH SYNOPSIS euca\-create\-volume \fB\-z\fR ZONE [\-s SIZE] [\-\-snapshot SNAPSHOT] [\-t VOLTYPE] [\-i IOPS] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Create a new volume .SS "optional arguments:" .TP \fB\-z\fR ZONE, \fB\-\-availability\-zone\fR ZONE, \fB\-\-zone\fR ZONE availability zone in which to create the new volume (required) .TP \fB\-s\fR SIZE, \fB\-\-size\fR SIZE size of the new volume in GiB (required unless \fB\-\-snapshot\fR is used) .TP \fB\-\-snapshot\fR SNAPSHOT snapshot from which to create the new volume .TP \fB\-t\fR VOLTYPE, \fB\-\-type\fR VOLTYPE volume type .TP \fB\-i\fR IOPS, \fB\-\-iops\fR IOPS number of I/O operations per second .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-delete-bundle.1000066400000000000000000000026131222241730200176660ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DELETE-BUNDLE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-delete-bundle \- Delete a previously-uploaded bundle .SH SYNOPSIS euca\-delete\-bundle \fB\-b\fR BUCKET[/PREFIX] (\fB\-m\fR MANIFEST | \fB\-p\fR PREFIX) [\-\-clear] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Delete a previously\-uploaded bundle .SS "optional arguments:" .TP \fB\-b\fR BUCKET[/PREFIX], \fB\-\-bucket\fR BUCKET[/PREFIX] location of the bundle to delete (required) .TP \fB\-m\fR MANIFEST, \fB\-\-manifest\fR MANIFEST use a local manifest file to figure out what to delete .TP \fB\-p\fR PREFIX, \fB\-\-prefix\fR PREFIX delete the bundle that begins with a specific prefix (e.g. "fry" for "fry.manifest.xml") .TP \fB\-\-clear\fR attempt to delete the bucket as well .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL storage service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-delete-group.1000066400000000000000000000021051222241730200175450ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DELETE-GROUP "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-delete-group \- Delete a security group .SH SYNOPSIS euca\-delete\-group [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] GROUP .SH DESCRIPTION Delete a security group .SS "positional arguments:" .TP GROUP name or ID of the security group to delete (required) .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-delete-keypair.1000066400000000000000000000020671222241730200200640ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DELETE-KEYPAIR "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-delete-keypair \- Delete a key pair .SH SYNOPSIS euca\-delete\-keypair [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] KEYPAIR .SH DESCRIPTION Delete a key pair .SS "positional arguments:" .TP KEYPAIR name of the key pair to delete (required) .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-delete-snapshot.1000066400000000000000000000020721222241730200202530ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DELETE-SNAPSHOT "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-delete-snapshot \- Delete a snapshot .SH SYNOPSIS euca\-delete\-snapshot [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] SNAPSHOT .SH DESCRIPTION Delete a snapshot .SS "positional arguments:" .TP SNAPSHOT ID of the snapshot to delete (required) .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-delete-tags.1000066400000000000000000000031351222241730200173530ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DELETE-TAGS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-delete-tags \- Delete tags from one or more resources .SH SYNOPSIS euca\-delete\-tags \fB\-\-tag\fR KEY[=[VALUE]] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] RESOURCE [RESOURCE ...] .SH DESCRIPTION Delete tags from one or more resources .SS "positional arguments:" .TP RESOURCE ID(s) of the resource(s) to un\-tag (at least 1 required) .SS "optional arguments:" .TP \fB\-\-tag\fR KEY[=[VALUE]] key and optional value of the tag to delete, separated by an "=" character. If you specify a value then the tag is deleted only if its value matches the one you specified. If you specify the empty string as the value (e.g. "\-\-tag foo=") then the tag is deleted only if its value is the empty string. If you do not specify a value (e.g. "\-\-tag foo") then the tag is deleted regardless of its value. (at least 1 required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-delete-volume.1000066400000000000000000000020521222241730200177210ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DELETE-VOLUME "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-delete-volume \- Delete a volume .SH SYNOPSIS euca\-delete\-volume [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] VOLUME .SH DESCRIPTION Delete a volume .SS "positional arguments:" .TP VOLUME ID of the volume to delete (required) .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-deregister.1000066400000000000000000000025161222241730200173140ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DEREGISTER "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-deregister \- De-register an image. After you de-register an image it cannot be used to launch new instances. .SH SYNOPSIS euca\-deregister [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] IMAGE .SH DESCRIPTION De\-register an image. After you de\-register an image it cannot be used to launch new instances. .SH DESCRIPTION Note that in Eucalyptus 3 you may need to run this twice to completely remove an image's registration from the system. .SS "positional arguments:" .TP IMAGE ID of the image to de\-register (required) .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-describe-addresses.1000066400000000000000000000034231222241730200207100ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-ADDRESSES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-addresses \- Show information about elastic IP addresses .SH SYNOPSIS euca\-describe\-addresses [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-filter NAME=VALUE] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [address [address ...]] .SH DESCRIPTION Show information about elastic IP addresses .SS "positional arguments:" .TP address limit results to specific elastic IP addresses or VPC allocation IDs .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-filter\fR NAME=VALUE restrict results to those that meet criteria .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SS "allowed filter names:" .TP allocation\-id [VPC only] allocation ID .TP association\-id [VPC only] association ID .TP domain whether the address is a standard or VPC address .TP instance\-id instance the address is associated with .TP network\-interface\-id [VPC only] network interface the address is associated with network\-interface\-owner\-id [VPC only] ID of the network interface's owner .TP private\-ip\-address [VPC only] private address associated with the public address .TP public\-ip the elastic IP address euca2ools-3.0.2/man/euca-describe-availability-zones.1000066400000000000000000000030001222241730200225300ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-AVAILABILITY-ZONES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-availability-zones \- Display availability zones within the current region .SH SYNOPSIS euca\-describe\-availability\-zones [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-filter NAME=VALUE] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [ZONE [ZONE ...]] .SH DESCRIPTION Display availability zones within the current region .SS "positional arguments:" .TP ZONE limit results to specific availability zones .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-filter\fR NAME=VALUE restrict results to those that meet criteria .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SS "allowed filter names:" .TP message message giving information about the \&'availability zone .TP region\-name region the availability zone is in .TP state state of the availability zone .TP zone\-name name of the availability zone euca2ools-3.0.2/man/euca-describe-bundle-tasks.1000066400000000000000000000033051222241730200213260ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-BUNDLE-TASKS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-bundle-tasks \- Describe current instance-bundling tasks .SH SYNOPSIS euca\-describe\-bundle\-tasks [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-filter NAME=VALUE] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [BUNDLE [BUNDLE ...]] .SH DESCRIPTION Describe current instance\-bundling tasks .SS "positional arguments:" .TP BUNDLE limit results to specific bundle tasks .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-filter\fR NAME=VALUE restrict results to those that meet criteria .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SS "allowed filter names:" .TP bundle\-id bundle task ID .TP error\-code if the task failed, the error code returned .TP error\-message if the task failed, the error message returned .TP instance\-id ID of the bundled instance .TP progress level of task completion, in percent .TP s3\-bucket bucket where the image will be stored .TP s3\-prefix beginning of the bundle name .TP start\-time task start time .TP state task state .TP update\-time most recent task update time euca2ools-3.0.2/man/euca-describe-group.1000066400000000000000000000040571222241730200200730ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-GROUP "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-group \- Show information about security groups .SH SYNOPSIS euca\-describe\-group [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-filter NAME=VALUE] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [GROUP [GROUP ...]] .SH DESCRIPTION Show information about security groups .SH DESCRIPTION Note that filters are matched on literal strings only, so "\-\-filter ip\-permission.from\-port=22" will *not* match a group with a port range of 20 to 30. .SS "positional arguments:" .TP GROUP limit results to specific security groups .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-filter\fR NAME=VALUE restrict results to those that meet criteria .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SS "allowed filter names:" .TP description group description group\-id group\-name ip\-permission.cidr CIDR IP range granted permission by the group ip\-permission.from\-port start of TCP/UDP port range, or ICMP type number ip\-permission.group\-name name of another group granted permission by this group ip\-permission.protocol IP protocol for the permission ip\-permission.to\-port end of TCP/UDP port range, or ICMP code ip\-permission.user\-id ID of an account granted permission .TP owner\-id account ID of the group's owner .TP tag\-key key of a tag assigned to the group .TP tag\-value value of a tag assigned to the group .TP vpc\-id [VPC only] ID of a VPC the group belongs to euca2ools-3.0.2/man/euca-describe-groups.1000066400000000000000000000004341222241730200202510ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.12. .TH EUCA-DESCRIBE-GROUPS "1" "May 2013" "euca2ools 3.0.0" "User Commands" .SH NAME euca-describe-groups \- Display information about regions .SH SYNOPSIS sh: build/*/euca\-describe\-groups: No such file or directory euca2ools-3.0.2/man/euca-describe-image-attribute.1000066400000000000000000000031301222241730200220110ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-IMAGE-ATTRIBUTE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-image-attribute \- Show information about an attribute of an image .SH SYNOPSIS euca\-describe\-image\-attribute (\fB\-l\fR | \fB\-p\fR | \fB\-B\fR | \fB\-\-kernel\fR | \fB\-\-ramdisk\fR | \fB\-\-description\fR) [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] IMAGE .SH DESCRIPTION Show information about an attribute of an image .SS "positional arguments:" .TP IMAGE image to describe .SS "optional arguments:" .TP \fB\-l\fR, \fB\-\-launch\-permission\fR display launch permissions .TP \fB\-p\fR, \fB\-\-product\-codes\fR list associated product codes .TP \fB\-B\fR, \fB\-\-block\-device\-mapping\fR describe block device mappings .TP \fB\-\-kernel\fR show associated kernel image ID .TP \fB\-\-ramdisk\fR show associated ramdisk image ID .TP \fB\-\-description\fR show the image's description .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-describe-images.1000066400000000000000000000061651222241730200202060ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-IMAGES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-images \- Show information about images .SH SYNOPSIS euca\-describe\-images [\-a] [\-o ACCOUNT] [\-x ACCOUNT] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-filter NAME=VALUE] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [IMAGE [IMAGE ...]] .SH DESCRIPTION Show information about images .SH DESCRIPTION By default, only images your account owns and images for which your account has explicit launch permissions are shown. .SS "positional arguments:" .TP IMAGE limit results to specific images .SS "optional arguments:" .TP \fB\-a\fR, \fB\-\-all\fR describe all images .TP \fB\-o\fR ACCOUNT, \fB\-\-owner\fR ACCOUNT describe images owned by the specified owner .TP \fB\-x\fR ACCOUNT, \fB\-\-executable\-by\fR ACCOUNT describe images for which the specified account has explicit launch permissions .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-filter\fR NAME=VALUE restrict results to those that meet criteria .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SS "allowed filter names:" .TP architecture CPU architecture block\-device\-mapping.delete\-on\-termination whether a volume is deleted upon instance termination block\-device\-mapping.device\-name device name for a volume mapped to the image block\-device\-mapping.snapshot\-id snapshot ID for a volume mapped to the image block\-device\-mapping.volume\-size volume size for a volume mapped to the image block\-device\-mapping.volume\-type volume type for a volume mapped to the image .TP description image description .TP hypervisor image's hypervisor type image\-id image\-type image type ("machine", "kernel", or "ramdisk") is\-public whether the image is public kernel\-id manifest\-location name owner\-alias image owner's account alias owner\-id image owner's account ID platform "windows" for Windows images product\-code product code associated with the image product\-code.type type of product code associated with the image ramdisk\-id root\-device\-name root\-device\-type root device type ("ebs" or "instance\-store") state image state ("available", "pending", or "failed") .TP state\-reason\-code reason code for the most recent state change .TP state\-reason\-message message for the most recent state change .TP tag\-key key of a tag assigned to the image .TP tag\-value value of a tag assigned to the image .TP tag:KEY specific tag key/value combination .TP virtualization\-type virtualization type ("paravirtual" or "hvm") euca2ools-3.0.2/man/euca-describe-instance-attribute.1000066400000000000000000000047461222241730200225510ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-INSTANCE-ATTRIBUTE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-instance-attribute \- Show one of an instance's attributes. .SH SYNOPSIS euca\-describe\-instance\-attribute (\fB\-b\fR | \fB\-\-disable\-api\-termination\fR | \fB\-\-ebs\-optimized\fR | \fB\-g\fR | \fB\-p\fR | \fB\-\-instance\-initiated\-shutdown\-behavior\fR | \fB\-t\fR | \fB\-\-kernel\fR | \fB\-\-ramdisk\fR | \fB\-\-root\-device\-name\fR | \fB\-\-source\-dest\-check\fR | \fB\-\-user\-data\fR) [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE .SH DESCRIPTION Show one of an instance's attributes. .SH DESCRIPTION Note that exactly one attribute may be shown at a time. .SS "positional arguments:" .TP INSTANCE ID of the instance to show info for (required) .SS "optional arguments:" .TP \fB\-b\fR, \fB\-\-block\-device\-mapping\fR show block device mappings .TP \fB\-\-disable\-api\-termination\fR show whether termination is disabled .TP \fB\-\-ebs\-optimized\fR show whether the root volume is optimized for EBS I/O .TP \fB\-g\fR, \fB\-\-group\-id\fR show the security groups the instance belongs to .TP \fB\-p\fR, \fB\-\-product\-code\fR show any associated product codes .TP \fB\-\-instance\-initiated\-shutdown\-behavior\fR show whether the instance stops or terminates when shut down .TP \fB\-t\fR, \fB\-\-instance\-type\fR show the instance's type .TP \fB\-\-kernel\fR show the ID of the kernel image associated with the instance .TP \fB\-\-ramdisk\fR show the ID of the ramdisk image associated with the instance .TP \fB\-\-root\-device\-name\fR show the name of the instance's root device (e.g. \&'/dev/sda1') .TP \fB\-\-source\-dest\-check\fR [VPC only] show whether source/destination checking is enabled for the instance .TP \fB\-\-user\-data\fR show the instance's user\-data .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-describe-instance-types.1000066400000000000000000000025471222241730200217070ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-INSTANCE-TYPES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-instance-types \- [Eucalyptus only] Show information about instance types .SH SYNOPSIS euca\-describe\-instance\-types [\-\-by\-zone] [\-\-show\-capacity] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [INSTANCETYPE [INSTANCETYPE ...]] .SH DESCRIPTION [Eucalyptus only] Show information about instance types .SS "positional arguments:" .TP INSTANCETYPE limit results to specific instance types .SS "optional arguments:" .TP \fB\-\-by\-zone\fR show info for each availability zone separately .TP \fB\-\-show\-capacity\fR show info about instance capacity .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-describe-instances.1000066400000000000000000000141551222241730200207260ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-INSTANCES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-instances \- Show information about instances .SH SYNOPSIS euca\-describe\-instances [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-filter NAME=VALUE] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [INSTANCE [INSTANCE ...]] .SH DESCRIPTION Show information about instances .SS "positional arguments:" .TP INSTANCE limit results to specific instances .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-filter\fR NAME=VALUE restrict results to those that meet criteria .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SS "allowed filter names:" .TP architecture CPU architecture association.allocation\-id [VPC only] allocation ID bound to a network interface's elastic IP address association.association\-id [VPC only] association ID returned when an elastic IP was associated with a network interface association.ip\-owner\-id [VPC only] ID of the owner of the elastic IP address associated with a network interface association.public\-ip [VPC only] address of the elastic IP address bound to a network interface availability\-zone block\-device\-mapping.attach\-time volume attachment time block\-device\-mapping.delete\-on\-termination whether a volume is deleted upon instance termination block\-device\-mapping.device\-name .TP volume device name (e.g. \fI/dev/sdf\fP) block\-device\-mapping.status volume status block\-device\-mapping.volume\-id volume ID .TP client\-token idempotency token provided at instance run time .TP dns\-name public DNS name .TP group\-id security group ID .TP group\-name security group name .TP hypervisor hypervisor type .TP image\-id machine image ID .TP instance.group\-id security group ID .TP instance.group\-name security group name instance\-id instance\-lifecycle whether this is a spot instance instance\-state\-code numeric code identifying instance state instance\-state\-name instance state instance\-type ip\-address public IP address kernel\-id kernel image ID key\-name key pair name provided at instance launch time launch\-index launch index within a reservation launch\-time instance launch time monitoring\-state monitoring state ("enabled" or "disabled") network\-interface.addresses.association.ip\-owner\-id [VPC only] ID of the owner of the private IP address associated with a network interface network\-interface.addresses.association.public\-ip [VPC only] ID of the association of an elastic IP address with a network interface network\-interface.addresses.primary [VPC only] whether the IP address of the VPC network interface is the primary private IP address network\-interface.addresses.private\-ip\-address [VPC only] network interface's private IP address network\-interface.attachment.device\-index [VPC only] device index to which a network interface is attached network\-interface.attachment.attach\-time [VPC only] time a network interface was attached to an instance network\-interface.attachment.attachment\-id [VPC only] ID of a network interface's attachment network\-interface.attachment.delete\-on\-termination [VPC only] whether a network interface attachment is deleted when an instance is terminated network\-interface.attachment.instance\-owner\-id [VPC only] ID of the instance to which a network interface is attached network\-interface.attachment.status [VPC only] network interface's attachment status network\-interface.availability\-zone [VPC only] network interface's availability zone network\-interface.description [VPC only] description of a network interface network\-interface.group\-id [VPC only] network interface's security group ID network\-interface.group\-name [VPC only] network interface's security group name network\-interface.mac\-address [VPC only] network interface's hardware address network\-interface.network\-interface.id [VPC only] ID of a network interface network\-interface.owner\-id [VPC only] ID of a network interface's owner network\-interface.private\-dns\-name [VPC only] network interface's private DNS name network\-interface.requester\-id [VPC only] network interface's requester ID network\-interface.requester\-managed [VPC only] whether the network interface is managed by the service network\-interface.source\-destination\-check [VPC only] whether source/destination checking is enabled for a network interface network\-interface.status [VPC only] network interface's status network\-interface.subnet\-id [VPC only] ID of a network interface's subnet network\-interface.vpc\-id [VPC only] ID of a network interface's VPC .TP owner\-id instance owner's account ID placement\-group\-name platform "windows" for Windows instances private\-dns\-name private\-ip\-address product\-code product\-code.type type of product code ("devpay" or "marketplace") .TP ramdisk\-id ramdisk image ID .TP reason reason for the instance's current state .TP requestor\-id ID of the entity that launched an instance reservation\-id root\-device\-name root device name (e.g. \fI/dev/sda1\fP) root\-device\-type root device type ("ebs" or "instance\-store") spot\-instance\-request\-id state\-reason\-code reason code for the most recent state change state\-reason\-message message describing the most recent state change .TP subnet\-id [VPC only] ID of the subnet the instance is in .TP tag\-key name of any tag assigned to the instance .TP tag\-value value of any tag assigned to the instance .TP tag:KEY specific tag key/value combination virtualization\-type vpc\-id [VPC only] ID of the VPC the instance is in euca2ools-3.0.2/man/euca-describe-keypairs.1000066400000000000000000000025221222241730200205610ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-KEYPAIRS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-keypairs \- Display information about available key pairs .SH SYNOPSIS euca\-describe\-keypairs [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-filter NAME=VALUE] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [KEYPAIR [KEYPAIR ...]] .SH DESCRIPTION Display information about available key pairs .SS "positional arguments:" .TP KEYPAIR limit results to specific key pairs .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-filter\fR NAME=VALUE restrict results to those that meet criteria .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SS "allowed filter names:" .TP fingerprint fingerprint of the key pair .TP key\-name name of the key pair euca2ools-3.0.2/man/euca-describe-regions.1000066400000000000000000000023711222241730200204020ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-REGIONS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-regions \- Display information about regions .SH SYNOPSIS euca\-describe\-regions [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-filter NAME=VALUE] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [REGION [REGION ...]] .SH DESCRIPTION Display information about regions .SS "positional arguments:" .TP REGION limit results to specific regions .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-filter\fR NAME=VALUE restrict results to those that meet criteria .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SS "allowed filter names:" endpoint region\-name euca2ools-3.0.2/man/euca-describe-snapshots.1000066400000000000000000000042061222241730200207550ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-SNAPSHOTS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-snapshots \- Show information about snapshots .SH SYNOPSIS euca\-describe\-snapshots [\-a] [\-o ACCOUNT] [\-r ACCOUNT] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-filter NAME=VALUE] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [SNAPSHOT [SNAPSHOT ...]] .SH DESCRIPTION Show information about snapshots .SH DESCRIPTION By default, only snapshots your account owns and snapshots for which your account has explicit restore permissions are shown. .SS "positional arguments:" .TP SNAPSHOT limit results to specific snapshots .SS "optional arguments:" .TP \fB\-a\fR, \fB\-\-all\fR describe all snapshots .TP \fB\-o\fR ACCOUNT, \fB\-\-owner\fR ACCOUNT limit results to snapshots owned by specific accounts .TP \fB\-r\fR ACCOUNT, \fB\-\-restorable\-by\fR ACCOUNT limit results to snapahots restorable by specific accounts .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-filter\fR NAME=VALUE restrict results to those that meet criteria .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SS "allowed filter names:" .TP description snapshot description .TP owner\-alias snapshot owner's account alias .TP owner\-id snapshot owner's account ID .TP progress snapshot progress, in percentage snapshot\-id start\-time snapshot initiation time status tag\-key key of a tag assigned to the snapshot tag\-value value of a tag assigned to the snapshot tag:KEY specific tag key/value combination volume\-id source volume ID volume\-size euca2ools-3.0.2/man/euca-describe-tags.1000066400000000000000000000023031222241730200176650ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-TAGS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-tags \- List tags associated with your account's resources .SH SYNOPSIS euca\-describe\-tags [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-filter NAME=VALUE] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List tags associated with your account's resources .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-filter\fR NAME=VALUE restrict results to those that meet criteria .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SS "allowed filter names:" key resource\-id resource\-type value euca2ools-3.0.2/man/euca-describe-volumes.1000066400000000000000000000036031222241730200204250ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DESCRIBE-VOLUMES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-describe-volumes \- Display information about volumes .SH SYNOPSIS euca\-describe\-volumes [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-filter NAME=VALUE] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [VOLUME [VOLUME ...]] .SH DESCRIPTION Display information about volumes .SS "positional arguments:" .TP VOLUME limit results to specific volumes .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-filter\fR NAME=VALUE restrict results to those that meet criteria .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SS "allowed filter names:" attachment.attach\-time attachment start time attachment.delete\-on\-termination whether the volume will be deleted upon instance termination .TP attachment.device device node exposed to the instance attachment.instance\-id ID of the instance the volume is attached to .TP attachment.status attachment state availability\-zone create\-time creation time size size in GiB snapshot\-id snapshot from which the volume was created status tag\-key key of a tag assigned to the volume tag\-value value of a tag assigned to the volume tag:KEY specific tag key/value combination volume\-id volume\-type euca2ools-3.0.2/man/euca-detach-volume.1000066400000000000000000000025161222241730200177140ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DETACH-VOLUME "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-detach-volume \- Detach a volume from an instance .SH SYNOPSIS euca\-detach\-volume [\-i INSTANCE] [\-d DEVICE] [\-f] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] VOLUME .SH DESCRIPTION Detach a volume from an instance .SS "positional arguments:" .TP VOLUME ID of the volume to detach (required) .SS "optional arguments:" .TP \fB\-i\fR INSTANCE, \fB\-\-instance\fR INSTANCE instance to detach from .TP \fB\-d\fR DEVICE, \fB\-\-device\fR DEVICE device name .TP \fB\-f\fR, \fB\-\-force\fR detach without waiting for the instance. Data may be lost. .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-disassociate-address.1000066400000000000000000000024231222241730200212520ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DISASSOCIATE-ADDRESS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-disassociate-address \- Disassociate an elastic IP address from an instance .SH SYNOPSIS euca\-disassociate\-address [\-a ASSOC] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [ADDRESS] .SH DESCRIPTION Disassociate an elastic IP address from an instance .SS "positional arguments:" .TP ADDRESS [Non\-VPC only] elastic IP address to disassociate (required) .SS "optional arguments:" .TP \fB\-a\fR ASSOC, \fB\-\-association\-id\fR ASSOC [VPC only] address's association ID (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-download-bundle.1000066400000000000000000000027651222241730200202430ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-DOWNLOAD-BUNDLE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-download-bundle \- Download a bundled image from the cloud .SH SYNOPSIS euca\-download\-bundle \fB\-b\fR BUCKET [\-m FILE | \fB\-p\fR PREFIX] [\-d DIR] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Download a bundled image from the cloud .SH DESCRIPTION You must run euca\-unbundle\-image on the bundle you download to obtain the original image. .SS "optional arguments:" .TP \fB\-b\fR BUCKET, \fB\-\-bucket\fR BUCKET bucket to download the bucket from (required) .TP \fB\-m\fR FILE, \fB\-\-manifest\fR FILE use a local manifest file to figure out what to download .TP \fB\-p\fR PREFIX, \fB\-\-prefix\fR PREFIX download the bundle that begins with a specific prefix (e.g. "fry" for "fry.manifest.xml") .TP \fB\-d\fR DIR, \fB\-\-directory\fR DIR The directory to download the parts to. .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL storage service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-get-console-output.1000066400000000000000000000026051222241730200207330ustar00rootroot00000000000000.\" THIS FILE IS MAINTAINED MANUALLY. DO NOT AUTOMATICALLY OVERWRITE IT. .TH EUCA-GET-CONSOLE-OUTPUT "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-get-console-output \- Retrieve console output for the specified instance .SH SYNOPSIS euca\-get\-console\-output [\-r] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE .SH DESCRIPTION Retrieve console output for the specified instance .SS "positional arguments:" .TP INSTANCE ID of the instance to obtain console output from (required) .SS "optional arguments:" .TP \fB\-r\fR, \fB\-\-raw\-console\-output\fR display raw output without escaping control characters .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .SH ENVIRONMENT VARIABLES .TP \fBLC_CTYPE\fR determines the interpretation of characters in the retrieved console output euca2ools-3.0.2/man/euca-get-password-data.1000066400000000000000000000026701222241730200205060ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-GET-PASSWORD-DATA "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-get-password-data \- Retrieve the encrypted administrator password for an instance running Windows. The encrypted password may be decrypted using the private key of the key pair given when launching the instance. .SH SYNOPSIS euca\-get\-password\-data [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE .SH DESCRIPTION Retrieve the encrypted administrator password for an instance running Windows. The encrypted password may be decrypted using the private key of the key pair given when launching the instance. .SS "positional arguments:" .TP INSTANCE ID of the instance to obtain the initial password for (required) .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-get-password.1000066400000000000000000000025341222241730200175760ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-GET-PASSWORD "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-get-password \- Retrieve the administrator password for an instance running Windows .SH SYNOPSIS euca\-get\-password \fB\-k\fR FILE [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE .SH DESCRIPTION Retrieve the administrator password for an instance running Windows .SS "positional arguments:" .TP INSTANCE ID of the instance to obtain the initial password for (required) .SS "optional arguments:" .TP \fB\-k\fR FILE, \fB\-\-priv\-launch\-key\fR FILE file containing the private key corresponding to the key pair supplied at instance launch time (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-import-keypair.1000066400000000000000000000023441222241730200201320ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-IMPORT-KEYPAIR "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-import-keypair \- Import a public RSA key as a new key pair .SH SYNOPSIS euca\-import\-keypair \fB\-f\fR FILE [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] KEYPAIR .SH DESCRIPTION Import a public RSA key as a new key pair .SS "positional arguments:" .TP KEYPAIR name for the new key pair (required) .SS "optional arguments:" .TP \fB\-f\fR FILE, \fB\-\-public\-key\-file\fR FILE name of a file containing the public key to import (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-modify-image-attribute.1000066400000000000000000000032021222241730200215200ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-MODIFY-IMAGE-ATTRIBUTE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-modify-image-attribute \- Modify an attribute of an image .SH SYNOPSIS euca\-modify\-image\-attribute (\fB\-\-description\fR DESC | \fB\-p\fR CODE | \fB\-l\fR) [\-a ENTITY] [\-r ENTITY] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] IMAGE .SH DESCRIPTION Modify an attribute of an image .SS "positional arguments:" .TP IMAGE image to modify .SS "optional arguments:" .TP \fB\-\-description\fR DESC change the image's description .TP \fB\-p\fR CODE, \fB\-\-product\-code\fR CODE product code to add to the given instance\-store image .TP \fB\-l\fR, \fB\-\-launch\-permission\fR grant/revoke launch permissions with \fB\-a\fR/\-r .TP \fB\-a\fR ENTITY, \fB\-\-add\fR ENTITY account to grant launch permission, or "all" for all accounts .TP \fB\-r\fR ENTITY, \fB\-\-remove\fR ENTITY account to remove launch permission from, or "all" for all accounts .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-modify-instance-type.1000066400000000000000000000030311222241730200212200ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-MODIFY-INSTANCE-TYPE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-modify-instance-type \- [Eucalyptus cloud admin only] Modify an instance type .SH SYNOPSIS euca\-modify\-instance\-type [\-c COUNT] [\-d GB] [\-m MB] [\-\-reset] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCETYPE .SH DESCRIPTION [Eucalyptus cloud admin only] Modify an instance type .SS "positional arguments:" .TP INSTANCETYPE name of the instance type to modify (required) .SS "optional arguments:" .TP \fB\-c\fR COUNT, \fB\-\-cpus\fR COUNT number of virtual CPUs to allocate to each instance .TP \fB\-d\fR GB, \fB\-\-disk\fR GB amount of instance storage to allow each instance .TP \fB\-m\fR MB, \fB\-\-memory\fR MB amount of RAM to allocate to each instance .TP \fB\-\-reset\fR reset the instance type to its default configuration .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-modify-snapshot-attribute.1000066400000000000000000000027161222241730200223060ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-MODIFY-SNAPSHOT-ATTRIBUTE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-modify-snapshot-attribute \- Modify an attribute of a snapshot .SH SYNOPSIS euca\-modify\-snapshot\-attribute \fB\-c\fR [\-a ENTITY] [\-r ENTITY] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] SNAPSHOT .SH DESCRIPTION Modify an attribute of a snapshot .SS "positional arguments:" .TP SNAPSHOT ID of the snapshot to modify .SS "optional arguments:" .TP \fB\-c\fR, \fB\-\-create\-volume\-permission\fR grant/revoke volume creation permission with \fB\-a\fR/\-r .TP \fB\-a\fR ENTITY, \fB\-\-add\fR ENTITY account to grant permission, or "all" for all accounts .TP \fB\-r\fR ENTITY, \fB\-\-remove\fR ENTITY account to remove permission from, or "all" for all accounts .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-monitor-instances.1000066400000000000000000000022361222241730200206320ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-MONITOR-INSTANCES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-monitor-instances \- Enable monitoring for one or more instances .SH SYNOPSIS euca\-monitor\-instances [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE [INSTANCE ...] .SH DESCRIPTION Enable monitoring for one or more instances .SS "positional arguments:" .TP INSTANCE ID(s) of the instance(s) to begin monitoring (at least 1 required) .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-reboot-instances.1000066400000000000000000000021631222241730200204340ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-REBOOT-INSTANCES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-reboot-instances \- Reboot one or more instances .SH SYNOPSIS euca\-reboot\-instances [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE [INSTANCE ...] .SH DESCRIPTION Reboot one or more instances .SS "positional arguments:" .TP INSTANCE ID(s) of the instance(s) to reboot (at least 1 required) .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-register.1000066400000000000000000000043551222241730200170060ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-REGISTER "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-register \- Register a new image .SH SYNOPSIS euca\-register \fB\-n\fR NAME [\-d DESCRIPTION] [\-a {i386,x86_64,armhf}] [\-\-kernel KERNEL] [\-\-ramdisk RAMDISK] [\-\-root\-device\-name DEVICE] [\-s SNAPSHOT] [\-b DEVICE=MAPPED] [\-\-virtualization\-type {paravirtual,hvm}] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [MANIFEST] .SH DESCRIPTION Register a new image .SS "positional arguments:" .TP MANIFEST location of the image manifest in S3 storage (required for instance\-store images) .SS "optional arguments:" .TP \fB\-n\fR NAME, \fB\-\-name\fR NAME name of the new image (required) .TP \fB\-d\fR DESCRIPTION, \fB\-\-description\fR DESCRIPTION description of the new image .TP \fB\-a\fR {i386,x86_64,armhf}, \fB\-\-architecture\fR {i386,x86_64,armhf} CPU architecture of the new image .TP \fB\-\-kernel\fR KERNEL ID of the kernel to associate with the new image .TP \fB\-\-ramdisk\fR RAMDISK ID of the ramdisk to associate with the new image .TP \fB\-\-root\-device\-name\fR DEVICE root device name (default: \fI/dev/sda1\fP) .TP \fB\-s\fR SNAPSHOT, \fB\-\-snapshot\fR SNAPSHOT snapshot to use for the root device .TP \fB\-b\fR DEVICE=MAPPED, \fB\-\-block\-device\-mapping\fR DEVICE=MAPPED define a block device mapping for the image, in the form DEVICE=MAPPED, where "MAPPED" is "none", "ephemeral(0\-3)", or "[SNAPID]:[SIZE]:[true|false]:[standard|VOLTYPE[:IOPS]]" .TP \fB\-\-virtualization\-type\fR {paravirtual,hvm} [Privileged] virtualization type for the new image .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-release-address.1000066400000000000000000000023271222241730200202220ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-RELEASE-ADDRESS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-release-address \- Release an elastic IP address .SH SYNOPSIS euca\-release\-address [\-a ALLOC] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [ADDRESS] .SH DESCRIPTION Release an elastic IP address .SS "positional arguments:" .TP ADDRESS [Non\-VPC only] address to release (required) .SS "optional arguments:" .TP \fB\-a\fR ALLOC, \fB\-\-allocation\-id\fR ALLOC [VPC only] allocation ID for the address to release (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-reset-image-attribute.1000066400000000000000000000023551222241730200213630ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-RESET-IMAGE-ATTRIBUTE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-reset-image-attribute \- Reset an attribute of an image to its default value .SH SYNOPSIS euca\-reset\-image\-attribute \fB\-l\fR [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] IMAGE .SH DESCRIPTION Reset an attribute of an image to its default value .SS "positional arguments:" .TP IMAGE ID of the image whose attribute should be reset (required) .SS "optional arguments:" .TP \fB\-l\fR, \fB\-\-launch\-permission\fR reset launch permissions .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-revoke.1000066400000000000000000000036431222241730200164540ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-REVOKE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-revoke \- Remove a rule from a security group .SH SYNOPSIS euca\-revoke [\-\-egress] [\-P {tcp,udp,icmp,6,17,1}] [\-p RANGE] [\-t TYPE:CODE] [\-s CIDR | \fB\-o\fR GROUP] [\-u ACCOUNT] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] GROUP .SH DESCRIPTION Remove a rule from a security group .SS "positional arguments:" .TP GROUP name or ID of the security group to modify (required) .SS "optional arguments:" .TP \fB\-\-egress\fR [VPC only] manage an egress rule, which controls traffic leaving the group .TP \fB\-P\fR {tcp,udp,icmp,6,17,1}, \fB\-\-protocol\fR {tcp,udp,icmp,6,17,1} protocol to affect (default: tcp) .TP \fB\-p\fR RANGE, \fB\-\-port\-range\fR RANGE range of ports (specified as "from\-to") or a single port number (required for tcp and udp) .TP \fB\-t\fR TYPE:CODE, \fB\-\-icmp\-type\-code\fR TYPE:CODE ICMP type and code (specified as "type:code") (required for icmp) .TP \fB\-s\fR CIDR, \fB\-\-cidr\fR CIDR IP range (default: 0.0.0.0/0) .TP \fB\-o\fR GROUP [Non\-VPC only] name of a security group with which to affect network communication .TP \fB\-u\fR ACCOUNT ID of the account that owns the security group specified with \fB\-o\fR .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-run-instances.1000066400000000000000000000130021222241730200177400ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-RUN-INSTANCES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-run-instances \- Launch instances of a machine image .SH SYNOPSIS euca\-run\-instances [\-n MIN[\-MAX]] [\-g GROUP] [\-k KEYPAIR] [\-d DATA | \fB\-\-user\-data\-force\fR DATA | \fB\-f\fR FILE] [\-\-addressing {public,private}] [\-t INSTANCETYPE] [\-z ZONE] [\-\-kernel KERNEL] [\-\-ramdisk RAMDISK] [\-b DEVICE=MAPPED] [\-m] [\-\-disable\-api\-termination] [\-\-instance\-initiated\-shutdown\-behavior {stop,terminate}] [\-\-placement\-group PLGROUP] [\-\-tenancy {default,dedicated}] [\-\-client\-token TOKEN] [\-s SUBNET] [\-\-private\-ip\-address ADDRESS] [\-\-secondary\-private\-ip\-address ADDRESS | \fB\-\-secondary\-private\-ip\-address\-count\fR COUNT] [\-a INTERFACE] [\-p IPROFILE] [\-\-ebs\-optimized] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] IMAGE .SH DESCRIPTION Launch instances of a machine image .SS "positional arguments:" .TP IMAGE ID of the image to instantiate (required) .SS "optional arguments:" .TP \fB\-n\fR MIN[\-MAX], \fB\-\-instance\-count\fR MIN[\-MAX] number 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. .TP \fB\-g\fR GROUP, \fB\-\-group\fR GROUP security group(s) in which to launch the instances .TP \fB\-k\fR KEYPAIR, \fB\-\-key\fR KEYPAIR name of the key pair to use .TP \fB\-d\fR DATA, \fB\-\-user\-data\fR DATA user data to make available to instances in this reservation .TP \fB\-\-user\-data\-force\fR DATA same as \fB\-d\fR/\-\-user\-data, but without checking if a file by that name exists first .TP \fB\-f\fR FILE, \fB\-\-user\-data\-file\fR FILE file containing user data to make available to the instances in this reservation .TP \fB\-\-addressing\fR {public,private} [Eucalyptus only] addressing scheme to launch the instance with. Use "private" to run an instance with no public address. .TP \fB\-t\fR INSTANCETYPE, \fB\-\-instance\-type\fR INSTANCETYPE type of instance to launch .HP \fB\-z\fR ZONE, \fB\-\-availability\-zone\fR ZONE .TP \fB\-\-kernel\fR KERNEL ID of the kernel to launch the instance(s) with .TP \fB\-\-ramdisk\fR RAMDISK ID of the ramdisk to launch the instance(s) with .TP \fB\-b\fR DEVICE=MAPPED, \fB\-\-block\-device\-mapping\fR DEVICE=MAPPED define a block device mapping for the instances, in the form DEVICE=MAPPED, where "MAPPED" is "none", "ephemeral(0\-3)", or "[SNAPID]:[SIZE]:[true|false]:[standard|VOLTYPE[:IOPS]]" .TP \fB\-m\fR, \fB\-\-monitor\fR enable detailed monitoring for the instance(s) .TP \fB\-\-disable\-api\-termination\fR prevent API users from terminating the instance(s) .TP \fB\-\-instance\-initiated\-shutdown\-behavior\fR {stop,terminate} whether to "stop" (default) or terminate EBS instances when they shut down .TP \fB\-\-placement\-group\fR PLGROUP name of a placement group to launch into .TP \fB\-\-tenancy\fR {default,dedicated} [VPC only] "dedicated" to run on single\-tenant hardware .TP \fB\-\-client\-token\fR TOKEN unique identifier to ensure request idempotency .TP \fB\-s\fR SUBNET, \fB\-\-subnet\fR SUBNET [VPC only] subnet to create the instance's network interface in .TP \fB\-\-private\-ip\-address\fR ADDRESS [VPC only] assign a specific primary private IP address to an instance's interface .TP \fB\-\-secondary\-private\-ip\-address\fR ADDRESS [VPC only] assign a specific secondary private IP address to an instance's network interface. Use this option multiple times to add additional addresses. .TP \fB\-\-secondary\-private\-ip\-address\-count\fR COUNT [VPC only] automatically assign a specific number of secondary private IP addresses to an instance's network interface .TP \fB\-a\fR INTERFACE, \fB\-\-network\-interface\fR INTERFACE [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:[DESCRIPT ION]:[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. .TP \fB\-p\fR IPROFILE, \fB\-\-iam\-profile\fR IPROFILE name or ARN of the IAM instance profile to associate with the new instance(s) .TP \fB\-\-ebs\-optimized\fR optimize the new instance(s) for EBS I/O .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-start-instances.1000066400000000000000000000021471222241730200203010ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-START-INSTANCES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-start-instances \- Start one or more stopped instances .SH SYNOPSIS euca\-start\-instances [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE [INSTANCE ...] .SH DESCRIPTION Start one or more stopped instances .SS "positional arguments:" .TP INSTANCE ID(s) of the instance(s) to start .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-stop-instances.1000066400000000000000000000022711222241730200201270ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-STOP-INSTANCES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-stop-instances \- Stop one or more running instances .SH SYNOPSIS euca\-stop\-instances [\-f] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE [INSTANCE ...] .SH DESCRIPTION Stop one or more running instances .SS "positional arguments:" .TP INSTANCE ID(s) of the instance(s) to stop .SS "optional arguments:" .TP \fB\-f\fR, \fB\-\-force\fR immediately stop the instance(s). Data may be lost .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-terminate-instances.1000066400000000000000000000021571222241730200211350ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-TERMINATE-INSTANCES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-terminate-instances \- Terminate one or more instances .SH SYNOPSIS euca\-terminate\-instances [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE [INSTANCE ...] .SH DESCRIPTION Terminate one or more instances .SS "positional arguments:" .TP INSTANCE ID(s) of the instance(s) to terminate .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-unbundle.1000066400000000000000000000030131222241730200167640ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-UNBUNDLE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-unbundle \- Recreate an image from its bundled parts .SH SYNOPSIS euca\-unbundle \fB\-m\fR FILE [\-k FILE] [\-d DIR] [\-s DIR] [\-\-region USER@REGION] [\-\-progress | \fB\-\-no\-progress]\fR [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Recreate an image from its bundled parts .SH DESCRIPTION The key used to unbundle the image must match the certificate that was used to bundle it. .SS "optional arguments:" .TP \fB\-m\fR FILE, \fB\-\-manifest\fR FILE the bundle's manifest file (required) .TP \fB\-k\fR FILE, \fB\-\-privatekey\fR FILE file containing the private key to decrypt the bundle with. This must match the certificate used when bundling the image. .TP \fB\-d\fR DIR, \fB\-\-destination\fR DIR where to place the unbundled image (default: current directory) .TP \fB\-s\fR DIR, \fB\-\-source\fR DIR directory containing the bundled image parts (default: current directory) .TP \fB\-\-region\fR USER@REGION use encryption keys specified for a user and/or region in configuration files .TP \fB\-\-progress\fR show progress (the default when run interactively) .TP \fB\-\-no\-progress\fR do not show progress (the default when run noninteractively) .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-unmonitor-instances.1000066400000000000000000000022501222241730200211710ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-UNMONITOR-INSTANCES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-unmonitor-instances \- Disable monitoring for one or more instances .SH SYNOPSIS euca\-unmonitor\-instances [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE [INSTANCE ...] .SH DESCRIPTION Disable monitoring for one or more instances .SS "positional arguments:" .TP INSTANCE ID(s) ofthe the instance(s) to stop monitoring (at least 1 required) .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL compute service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-upload-bundle.1000066400000000000000000000042021222241730200177040ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUCA-UPLOAD-BUNDLE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-upload-bundle \- Upload a bundle prepared by euca-bundle-image to the cloud .SH SYNOPSIS euca\-upload\-bundle \fB\-b\fR BUCKET[/PREFIX] \fB\-m\fR FILE [\-\-acl {public\-read,aws\-exec\-read,ec2\-bundle\-read}] [\-d DIR] [\-\-part INT] [\-\-location LOCATION] [\-\-retry] [\-\-skipmanifest] [\-\-progress | \fB\-\-no\-progress]\fR [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Upload a bundle prepared by euca\-bundle\-image to the cloud .SS "optional arguments:" .TP \fB\-b\fR BUCKET[/PREFIX], \fB\-\-bucket\fR BUCKET[/PREFIX] bucket to upload the bundle to (required) .TP \fB\-m\fR FILE, \fB\-\-manifest\fR FILE manifest for the bundle to upload (required) .TP \fB\-\-acl\fR {public\-read,aws\-exec\-read,ec2\-bundle\-read} canned ACL policy to apply to the bundle (default: aws\-exec\-read) .TP \fB\-d\fR DIR, \fB\-\-directory\fR DIR directory that contains the bundle parts (default: directory that contains the manifest) .TP \fB\-\-part\fR INT begin uploading with a specific part number (default: 0) .TP \fB\-\-location\fR LOCATION location constraint of the destination bucket (default: inferred from s3\-location\-constraint in configuration, or otherwise none) .TP \fB\-\-retry\fR retry failed uploads up to 5 times .TP \fB\-\-skipmanifest\fR do not upload the manifest .TP \fB\-\-progress\fR show progress (the default when run interactively) .TP \fB\-\-no\-progress\fR do not show progress (the default when run noninteractively) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL storage service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euca-version.1000066400000000000000000000003241222241730200166370ustar00rootroot00000000000000.TH EUCA-VERSION "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euca-version \- Display the euca2ools suite's version .SH SYNOPSIS euca-version .SH DESCRIPTION Display the euca2ools suite's version euca2ools-3.0.2/man/eulb-apply-security-groups-to-lb.1000066400000000000000000000027721222241730200225170ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-APPLY-SECURITY-GROUPS-TO-LB "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-apply-security-groups-to-lb \- [VPC only] Associate one or more security groups with a load balancer. All previous associations with security groups will be replaced. .SH SYNOPSIS eulb\-apply\-security\-groups\-to\-lb \fB\-g\fR GROUP1,GROUP2,... [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION [VPC only] Associate one or more security groups with a load balancer. All previous associations with security groups will be replaced. .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-g\fR GROUP1,GROUP2,..., \fB\-\-security\-groups\fR GROUP1,GROUP2,... security groups to associate the load balancer with (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-attach-lb-to-subnets.1000066400000000000000000000024701222241730200211300ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-ATTACH-LB-TO-SUBNETS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-attach-lb-to-subnets \- [VPC only] Add a load balancer to one or more subnets .SH SYNOPSIS eulb\-attach\-lb\-to\-subnets \fB\-s\fR SUBNET1,SUBNET2,... [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION [VPC only] Add a load balancer to one or more subnets .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-s\fR SUBNET1,SUBNET2,..., \fB\-\-subnets\fR SUBNET1,SUBNET2,... IDs of the subnets to add the load balancer to (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-configure-healthcheck.1000066400000000000000000000035631222241730200214160ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-CONFIGURE-HEALTHCHECK "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-configure-healthcheck \- Configure health checking for instance registerd with a load balancer .SH SYNOPSIS eulb\-configure\-healthcheck \fB\-\-healthy\-threshold\fR COUNT \fB\-\-interval\fR SECONDS \fB\-t\fR PROTOCOL:PORT[/PATH] \fB\-\-timeout\fR SECONDS \fB\-\-unhealthy\-threshold\fR COUNT [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Configure health checking for instance registerd with a load balancer .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-\-healthy\-threshold\fR COUNT number of consecutive successful health checks that will mark instances as Healthy (required) .TP \fB\-\-interval\fR SECONDS approximate interval between health checks (required) .TP \fB\-t\fR PROTOCOL:PORT[/PATH], \fB\-\-target\fR PROTOCOL:PORT[/PATH] connection target for health checks (required) .TP \fB\-\-timeout\fR SECONDS maximum health check duration (required) .TP \fB\-\-unhealthy\-threshold\fR COUNT number of consecutive failed health checks that will mark instances as Unhealthy (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-create-app-cookie-stickiness-policy.1000066400000000000000000000035401222241730200241310ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-CREATE-APP-COOKIE-STICKINESS-POLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-create-app-cookie-stickiness-policy \- Create a new stickiness policy for a load balancer, whereby the server application generates a cookie and adds it to its responses. The load balancer will then use this cookie to route requests from each user to the same back end instance. This type of policy can only be associated with HTTP or HTTPS listeners, .SH SYNOPSIS eulb\-create\-app\-cookie\-stickiness\-policy \fB\-c\fR COOKIENAME \fB\-p\fR POLICY [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Create a new stickiness policy for a load balancer, whereby the server application generates a cookie and adds it to its responses. The load balancer will then use this cookie to route requests from each user to the same back end instance. This type of policy can only be associated with HTTP or HTTPS listeners, .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-c\fR COOKIENAME, \fB\-\-cookie\-name\fR COOKIENAME name of the cookie used for stickiness (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the new policy (required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-create-lb-cookie-stickiness-policy.1000066400000000000000000000034431222241730200237500ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-CREATE-LB-COOKIE-STICKINESS-POLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-create-lb-cookie-stickiness-policy \- Create a new stickiness policy for a load balancer, whereby the load balancer automatically generates cookies that it uses to route requests from each user to the same back end instance. This type of policy can only be associated with HTTP or HTTPS listeners. .SH SYNOPSIS eulb\-create\-lb\-cookie\-stickiness\-policy \fB\-e\fR SECONDS \fB\-p\fR POLICY [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Create a new stickiness policy for a load balancer, whereby the load balancer automatically generates cookies that it uses to route requests from each user to the same back end instance. This type of policy can only be associated with HTTP or HTTPS listeners. .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-e\fR SECONDS, \fB\-\-expiration\-period\fR SECONDS time period after which cookies should be considered stale (default: user's session length) (required) .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the new policy (required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-create-lb-listeners.1000066400000000000000000000036211222241730200210330ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-CREATE-LB-LISTENERS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-create-lb-listeners \- Add one or more listeners to a load balancer .SH SYNOPSIS eulb\-create\-lb\-listeners \fB\-l\fR "lb\-port=PORT, protocol={HTTP,HTTPS,SSL,TCP}, instance\-port=PORT, instance\-protocol={HTTP,HTTPS,SSL,TCP}, cert\-id=ARN" [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Add one or more listeners to a load balancer .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-l\fR "lb\-port=PORT, protocol={HTTP,HTTPS,SSL,TCP}, instance\-port=PORT, instance\-protocol={HTTP,HTTPS,SSL,TCP}, cert\-id=ARN", \fB\-\-listener\fR "lb\-port=PORT, protocol={HTTP,HTTPS,SSL,TCP}, instance\-port=PORT, instance\-protocol={HTTP,HTTPS,SSL,TCP}, cert\-id=ARN" port/protocol settings for the load balancer, where lb\-port is the external port number, protocol is the external protocol, instance\-port is the back end server port number, instance\-protocol is the protocol to use for routing traffic to back end instances, and cert\-id is the ARN of the server certificate to use for encrypted connections. lb\-port, protocol, and instance\-port are required. This option may be used multiple times. (at least 1 required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-create-lb-policy.1000066400000000000000000000030131222241730200203150ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-CREATE-LB-POLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-create-lb-policy \- Add a new policy to a load balancer .SH SYNOPSIS eulb\-create\-lb\-policy \fB\-\-policy\-name\fR POLICY \fB\-\-policy\-type\fR POLTYPE [\-a "name=NAME, value=VALUE"] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Add a new policy to a load balancer .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-\-policy\-name\fR POLICY name of the new policy (required) .TP \fB\-\-policy\-type\fR POLTYPE type of the new policy. For a list of policy types, use eulb\-describe\-lb\-policy\-types. (required) .TP \fB\-a\fR "name=NAME, value=VALUE", \fB\-\-attribute\fR "name=NAME, value=VALUE" name and value for each attribute associated with the new policy. Use this option multiple times to supply multiple attributes. .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-create-lb.1000066400000000000000000000052211222241730200170230ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-CREATE-LB "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-create-lb \- Create a load balancer .SH SYNOPSIS eulb\-create\-lb (\fB\-s\fR SUBNET1,SUBNET2,... | \fB\-z\fR ZONE1,ZONE2,...) \fB\-l\fR "lb\-port=PORT, protocol={HTTP,HTTPS,SSL,TCP}, instance\-port=PORT, instance\-protocol={HTTP,HTTPS,SSL,TCP}, cert\-id=ARN" [\-i internal] [\-g GROUP1,GROUP2,...] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Create a load balancer .SH DESCRIPTION After the load balancer is created, instances must be registered with it separately. .SS "positional arguments:" .TP ELB name of the new load balancer (required) .SS "optional arguments:" .TP \fB\-s\fR SUBNET1,SUBNET2,..., \fB\-\-subnets\fR SUBNET1,SUBNET2,... [VPC only] subnets the load balancer should run in (required) .TP \fB\-z\fR ZONE1,ZONE2,..., \fB\-\-availability\-zones\fR ZONE1,ZONE2,... [Non\-VPC only] availability zones the load balancer should run in (required) .TP \fB\-l\fR "lb\-port=PORT, protocol={HTTP,HTTPS,SSL,TCP}, instance\-port=PORT, instance\-protocol={HTTP,HTTPS,SSL,TCP}, cert\-id=ARN", \fB\-\-listener\fR "lb\-port=PORT, protocol={HTTP,HTTPS,SSL,TCP}, instance\-port=PORT, instance\-protocol={HTTP,HTTPS,SSL,TCP}, cert\-id=ARN" port/protocol settings for the load balancer, where lb\-port is the external port number, protocol is the external protocol, instance\-port is the back end server port number, instance\-protocol is the protocol to use for routing traffic to back end instances, and cert\-id is the ARN of the server certificate to use for encrypted connections. lb\-port, protocol, and instance\-port are required. This option may be used multiple times. (at least 1 required) .TP \fB\-i\fR internal, \fB\-\-scheme\fR internal [VPC only] "internal" to make the new load balancer private to a VPC .TP \fB\-g\fR GROUP1,GROUP2,..., \fB\-\-security\-groups\fR GROUP1,GROUP2,... [VPC only] IDs of the security groups to assign to the new load balancer .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-delete-lb-listeners.1000066400000000000000000000024601222241730200210320ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-DELETE-LB-LISTENERS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-delete-lb-listeners \- Delete one or more listeners from a load balancer .SH SYNOPSIS eulb\-delete\-lb\-listeners \fB\-l\fR PORT1,PORT2,... [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Delete one or more listeners from a load balancer .SH DESCRIPTION If a listener named with \fB\-l\fR/\-\-lb\-ports does not exist, this command still succeeds. .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-l\fR PORT1,PORT2,..., \fB\-\-lb\-ports\fR PORT1,PORT2,... port numbers of the listeners to remove (required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-delete-lb-policy.1000066400000000000000000000021741222241730200203230ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-DELETE-LB-POLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-delete-lb-policy \- Delete a policy from a load balancer .SH SYNOPSIS eulb\-delete\-lb\-policy \fB\-p\fR POLICY [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Delete a policy from a load balancer .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-p\fR POLICY, \fB\-\-policy\-name\fR POLICY name of the policy to delete (required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-delete-lb.1000066400000000000000000000020571222241730200170260ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-DELETE-LB "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-delete-lb \- Delete a load balancer .SH SYNOPSIS eulb\-delete\-lb [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Delete a load balancer .SH DESCRIPTION If the load balancer does not exist, this command still succeeds. .SS "positional arguments:" .TP ELB name of the load balancer to delete (required) .SS "optional arguments:" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-deregister-instances-from-lb.1000066400000000000000000000025041222241730200226440ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-DEREGISTER-INSTANCES-FROM-LB "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-deregister-instances-from-lb \- Remove one or more instances from a load balancer .SH SYNOPSIS eulb\-deregister\-instances\-from\-lb \fB\-\-instances\fR INSTANCE1,INSTANCE2,... [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Remove one or more instances from a load balancer .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-\-instances\fR INSTANCE1,INSTANCE2,... IDs of the instances to remove from the load balancer (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-describe-instance-health.1000066400000000000000000000026041222241730200220140ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-DESCRIBE-INSTANCE-HEALTH "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-describe-instance-health \- Show the state of instances registered with a load balancer .SH SYNOPSIS eulb\-describe\-instance\-health [\-\-instances INSTANCE1,INSTANCE2,...] [\-\-show\-long] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Show the state of instances registered with a load balancer .SS "positional arguments:" .TP ELB name of the load balancer to describe instances for (required) .SS "optional arguments:" .TP \fB\-\-instances\fR INSTANCE1,INSTANCE2,... limit results to specific instances .TP \fB\-\-show\-long\fR show all of the instances' info .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-describe-lb-policies.1000066400000000000000000000026461222241730200211550ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-DESCRIBE-LB-POLICIES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-describe-lb-policies \- Show information about load balancer policies .SH SYNOPSIS eulb\-describe\-lb\-policies [\-p POLICY1,POLICY2,...] [\-\-show\-long] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [ELB] .SH DESCRIPTION Show information about load balancer policies .SS "positional arguments:" .TP ELB show policies associated with a specific load balancer (default: only describe sample policies provided by the service) .SS "optional arguments:" .TP \fB\-p\fR POLICY1,POLICY2,..., \fB\-\-policy\-names\fR POLICY1,POLICY2,... limit results to specific policies .TP \fB\-\-show\-long\fR show all of the policies' info .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-describe-lb-policy-types.1000066400000000000000000000023701222241730200220010ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-DESCRIBE-LB-POLICY-TYPES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-describe-lb-policy-types \- Show information about load balancer policy types .SH SYNOPSIS eulb\-describe\-lb\-policy\-types [\-\-show\-long] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [POLTYPE [POLTYPE ...]] .SH DESCRIPTION Show information about load balancer policy types .SS "positional arguments:" .TP POLTYPE limit results to specific policy types .SS "optional arguments:" .TP \fB\-\-show\-long\fR show all of the policy types' info .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-describe-lbs.1000066400000000000000000000022621222241730200175250ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-DESCRIBE-LBS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-describe-lbs \- Show information about load balancers .SH SYNOPSIS eulb\-describe\-lbs [\-\-show\-long] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [ELB [ELB ...]] .SH DESCRIPTION Show information about load balancers .SS "positional arguments:" .TP ELB limit results to specific load balancers .SS "optional arguments:" .TP \fB\-\-show\-long\fR show all of the load balancers' info .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-detach-lb-from-subnets.1000066400000000000000000000025151222241730200214350ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-DETACH-LB-FROM-SUBNETS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-detach-lb-from-subnets \- [VPC only] Remove a load balancer from one or more subnets .SH SYNOPSIS eulb\-detach\-lb\-from\-subnets \fB\-s\fR SUBNET1,SUBNET2,... [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION [VPC only] Remove a load balancer from one or more subnets .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-s\fR SUBNET1,SUBNET2,..., \fB\-\-subnets\fR SUBNET1,SUBNET2,... IDs of the subnets to remove the load balancer from (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-disable-zones-for-lb.1000066400000000000000000000025071222241730200211070ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-DISABLE-ZONES-FOR-LB "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-disable-zones-for-lb \- Remove a load balancer from one or more availability zones .SH SYNOPSIS eulb\-disable\-zones\-for\-lb \fB\-z\fR ZONE1,ZONE2,... [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Remove a load balancer from one or more availability zones .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-z\fR ZONE1,ZONE2,..., \fB\-\-availability\-zones\fR ZONE1,ZONE2,... availability zones to remove the load balancer from (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-enable-zones-for-lb.1000066400000000000000000000024651222241730200207350ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-ENABLE-ZONES-FOR-LB "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-enable-zones-for-lb \- Add a load balancer to one or more availability zones .SH SYNOPSIS eulb\-enable\-zones\-for\-lb \fB\-z\fR ZONE1,ZONE2,... [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Add a load balancer to one or more availability zones .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-z\fR ZONE1,ZONE2,..., \fB\-\-availability\-zones\fR ZONE1,ZONE2,... availability zones to add the load balancer to (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-register-instances-with-lb.1000066400000000000000000000024661222241730200223520ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-REGISTER-INSTANCES-WITH-LB "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-register-instances-with-lb \- Add one or more instances to a load balancer .SH SYNOPSIS eulb\-register\-instances\-with\-lb \fB\-\-instances\fR INSTANCE1,INSTANCE2,... [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Add one or more instances to a load balancer .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-\-instances\fR INSTANCE1,INSTANCE2,... IDs of the instances to register with the load balancer (required) .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-set-lb-listener-ssl-cert.1000066400000000000000000000025311222241730200217310ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-SET-LB-LISTENER-SSL-CERT "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-set-lb-listener-ssl-cert \- Change the certificate that terminates a load balancer'slistener's SSL connections .SH SYNOPSIS eulb\-set\-lb\-listener\-ssl\-cert \fB\-l\fR PORT \fB\-c\fR ARN [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Change the certificate that terminates a load balancer'slistener's SSL connections .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-l\fR PORT, \fB\-\-lb\-port\fR PORT port that should use the certificate (required) .TP \fB\-c\fR ARN, \fB\-\-cert\-id\fR ARN ARN for the server certificate to use (required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-set-lb-policies-for-backend-server.1000066400000000000000000000027231222241730200236410ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-SET-LB-POLICIES-FOR-BACKEND-SERVER "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-set-lb-policies-for-backend-server \- Change the policies associated with a port on which load-balanced back end servers listen. .SH SYNOPSIS eulb\-set\-lb\-policies\-for\-backend\-server \fB\-i\fR PORT \fB\-p\fR POLICY1,POLICY2,... [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Change the policies associated with a port on which load\-balanced back end servers listen. .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-i\fR PORT, \fB\-\-instance\-port\fR PORT port number of the back end server (required) .TP \fB\-p\fR POLICY1,POLICY2,..., \fB\-\-policy\-names\fR POLICY1,POLICY2,... list of policies to associate with the back end server (required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eulb-set-lb-policies-of-listener.1000066400000000000000000000025531222241730200224120ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EULB-SET-LB-POLICIES-OF-LISTENER "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eulb-set-lb-policies-of-listener \- Change the policy associated with a load balancer listener .SH SYNOPSIS eulb\-set\-lb\-policies\-of\-listener \fB\-l\fR PORT \fB\-p\fR POLICY1,POLICY2,... [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ELB .SH DESCRIPTION Change the policy associated with a load balancer listener .SS "positional arguments:" .TP ELB name of the load balancer to modify (required) .SS "optional arguments:" .TP \fB\-l\fR PORT, \fB\-\-lb\-port\fR PORT port of the listener to modify (required) .TP \fB\-p\fR POLICY1,POLICY2,..., \fB\-\-policy\-names\fR POLICY1,POLICY2,... list of policies to associate with the listener (required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL load balancing service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-create-auto-scaling-group.1000066400000000000000000000066661222241730200226560ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-CREATE-AUTO-SCALING-GROUP "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-create-auto-scaling-group \- Create a new auto-scaling group .SH SYNOPSIS euscale\-create\-auto\-scaling\-group \fB\-l\fR LAUNCHCONFIG \fB\-M\fR COUNT \fB\-m\fR COUNT [\-\-default\-cooldown SECONDS] [\-\-desired\-capacity COUNT] [\-\-grace\-period SECONDS] [\-\-health\-check\-type {EC2,ELB}] [\-\-load\-balancers ELB1,ELB2,...] [\-\-placement\-group PLACEMENTGROUP] [\-\-tag "k=VALUE, id=VALUE, t=VALUE, v=VALUE, p={true,false}"] [\-\-termination\-policies POLICY1,POLICY2,...] [\-\-vpc\-zone\-identifier ZONE1,ZONE2,...] [\-z ZONE1,ZONE2,...] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ASGROUP .SH DESCRIPTION Create a new auto\-scaling group .SS "positional arguments:" .TP ASGROUP name of the new auto\-scaling group (required) .SS "optional arguments:" .TP \fB\-l\fR LAUNCHCONFIG, \fB\-\-launch\-configuration\fR LAUNCHCONFIG name of the launch configuration to use with the new group (required) .TP \fB\-M\fR COUNT, \fB\-\-max\-size\fR COUNT maximum group size (required) .TP \fB\-m\fR COUNT, \fB\-\-min\-size\fR COUNT minimum group size (required) .TP \fB\-\-default\-cooldown\fR SECONDS amount of time, in seconds, after a scaling activity completes before any further trigger\-related scaling activities may start .TP \fB\-\-desired\-capacity\fR COUNT number of running instances the group should contain .TP \fB\-\-grace\-period\fR SECONDS number of seconds to wait before starting health checks on newly\-created instances .TP \fB\-\-health\-check\-type\fR {EC2,ELB} service to obtain health check status from .TP \fB\-\-load\-balancers\fR ELB1,ELB2,... comma\-separated list of load balancers to use .TP \fB\-\-placement\-group\fR PLACEMENTGROUP placement group in which to launch new instances .TP \fB\-\-tag\fR "k=VALUE, id=VALUE, t=VALUE, v=VALUE, p={true,false}" attributes of a tag to affect. Tags follow the following format: "id=resource\-name, t=resource\-type, k=tag\-key, v=tag\-val, p=propagate\-at\-launch\-flag", where k is the tag's name, v is the tag's value, id is a resource ID, t is a resource type, and p is whether to propagate tags to instances created by the group. A value for 'k=' is required for each tag. The rest are optional. This argument may be used more than once. Each time affects a different tag. .TP \fB\-\-termination\-policies\fR POLICY1,POLICY2,... ordered list of termination policies. The first has the highest precedence. .TP \fB\-\-vpc\-zone\-identifier\fR ZONE1,ZONE2,... comma\-separated list of subnet identifiers. If you specify availability zones as well, ensure the subnets' availability zones match the ones you specified .TP \fB\-z\fR ZONE1,ZONE2,..., \fB\-\-availability\-zones\fR ZONE1,ZONE2,... comma\-separated list of availability zones for the new group (required unless subnets are supplied) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-create-launch-config.1000066400000000000000000000057771222241730200216550ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-CREATE-LAUNCH-CONFIG "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-create-launch-config \- Create a new auto-scaling instance launch configuration .SH SYNOPSIS euscale\-create\-launch\-config \fB\-i\fR IMAGE \fB\-t\fR TYPE [\-\-block\-device\-mapping DEVICE1=MAPPED1,DEVICE2=MAPPED2,...] [\-\-ebs\-optimized] [\-\-group GROUP1,GROUP2,...] [\-\-iam\-instance\-profile PROFILE] [\-\-kernel KERNEL] [\-\-key KEYPAIR] [\-\-monitoring\-enabled] [\-\-monitoring\-disabled] [\-\-ramdisk RAMDISK] [\-\-spot\-price PRICE] [\-d DATA | \fB\-\-user\-data\-force\fR DATA | \fB\-f\fR FILE] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] LAUNCHCONFIG .SH DESCRIPTION Create a new auto\-scaling instance launch configuration .SS "positional arguments:" .TP LAUNCHCONFIG name of the new launch configuration (required) .SS "optional arguments:" .TP \fB\-i\fR IMAGE, \fB\-\-image\-id\fR IMAGE machine image to use for instances (required) .TP \fB\-t\fR TYPE, \fB\-\-instance\-type\fR TYPE instance type for use for instances (required) .TP \fB\-\-block\-device\-mapping\fR DEVICE1=MAPPED1,DEVICE2=MAPPED2,... a comma\-separated list of block device mappings for the image, in the form DEVICE=MAPPED, where "MAPPED" is "none", "ephemeral(0\-3)", or "[SNAPID]:[SIZE]:[true|false] .TP \fB\-\-ebs\-optimized\fR whether the instance is optimized for EBS I/O .TP \fB\-\-group\fR GROUP1,GROUP2,... a comma\-separated list of security groups with which to associate instances. Either all group names or all group IDs are allowed, but not both. .TP \fB\-\-iam\-instance\-profile\fR PROFILE ARN of the instance profile associated with instances' IAM roles .TP \fB\-\-kernel\fR KERNEL kernel image to use for instances .TP \fB\-\-key\fR KEYPAIR name of the key pair to use for instances .TP \fB\-\-monitoring\-enabled\fR enable detailed monitoring (enabled by default) .TP \fB\-\-monitoring\-disabled\fR disable detailed monitoring (enabled by default) .TP \fB\-\-ramdisk\fR RAMDISK ramdisk image to use for instances .TP \fB\-\-spot\-price\fR PRICE maximum hourly price for any spot instances launched .TP \fB\-d\fR DATA, \fB\-\-user\-data\fR DATA user data to make available to instances .TP \fB\-\-user\-data\-force\fR DATA same as \fB\-d\fR/\-\-user\-data, but without checking if a file by that name exists first .TP \fB\-f\fR FILE, \fB\-\-user\-data\-file\fR FILE file containing user data to make available to instances .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-create-or-update-tags.1000066400000000000000000000031161222241730200217550ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-CREATE-OR-UPDATE-TAGS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-create-or-update-tags \- Create or update one or more resource tags .SH SYNOPSIS euscale\-create\-or\-update\-tags \fB\-\-tag\fR "k=VALUE, id=VALUE, t=VALUE, v=VALUE, p={true,false}" [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Create or update one or more resource tags .SS "optional arguments:" .TP \fB\-\-tag\fR "k=VALUE, id=VALUE, t=VALUE, v=VALUE, p={true,false}" attributes of a tag to affect. Tags follow the following format: "id=resource\-name, t=resource\-type, k=tag\-key, v=tag\-val, p=propagate\-at\-launch\-flag", where k is the tag's name, v is the tag's value, id is a resource ID, t is a resource type, and p is whether to propagate tags to instances created by the group. A value for 'k=' is required for each tag. The rest are optional. This argument may be used more than once. Each time affects a different tag. (at least 1 required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-delete-auto-scaling-group.1000066400000000000000000000022701222241730200226400ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DELETE-AUTO-SCALING-GROUP "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-delete-auto-scaling-group \- Delete an auto-scaling group .SH SYNOPSIS euscale\-delete\-auto\-scaling\-group [\-d] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ASGROUP .SH DESCRIPTION Delete an auto\-scaling group .SS "positional arguments:" .TP ASGROUP name of the auto\-scaling group to delete (required) .SS "optional arguments:" .TP \fB\-d\fR, \fB\-\-force\-delete\fR delete the group and all of its instances without waiting for all instances to terminate .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-delete-launch-config.1000066400000000000000000000021351222241730200216350ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DELETE-LAUNCH-CONFIG "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-delete-launch-config \- Delete an auto-scaling instance launch configuration .SH SYNOPSIS euscale\-delete\-launch\-config [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] LAUNCHCONFIG .SH DESCRIPTION Delete an auto\-scaling instance launch configuration .SS "positional arguments:" .TP LAUNCHCONFIG name of the launch configuration to delete (required) .SS "optional arguments:" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-delete-notification-configuration.1000066400000000000000000000024041222241730200244520ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DELETE-NOTIFICATION-CONFIGURATION "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-delete-notification-configuration \- Delete an auto-scaling group's notification configuration .SH SYNOPSIS euscale\-delete\-notification\-configuration \fB\-t\fR TOPIC [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ASGROUP .SH DESCRIPTION Delete an auto\-scaling group's notification configuration .SS "positional arguments:" .TP ASGROUP name of the auto\-scaling group to update (required) .SS "optional arguments:" .TP \fB\-t\fR TOPIC, \fB\-\-topic\-arn\fR TOPIC ARN of the SNS topic associated with the configuration to delete .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-delete-policy.1000066400000000000000000000022131222241730200204140ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DELETE-POLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-delete-policy \- Delete a scaling policy .SH SYNOPSIS euscale\-delete\-policy \fB\-g\fR ASGROUP [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] POLICY .SH DESCRIPTION Delete a scaling policy .SS "positional arguments:" .TP POLICY name of the policy to delete (required) .SS "optional arguments:" .TP \fB\-g\fR ASGROUP, \fB\-\-auto\-scaling\-group\fR ASGROUP name of the auto\-scaling group the policy is associated with (required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-delete-scheduled-action.1000066400000000000000000000023021222241730200223270ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DELETE-SCHEDULED-ACTION "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-delete-scheduled-action \- Delete a scheduled action .SH SYNOPSIS euscale\-delete\-scheduled\-action \fB\-g\fR ASGROUP [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ACTION .SH DESCRIPTION Delete a scheduled action .SS "positional arguments:" .TP ACTION name of the scheduled action to delete (required) .SS "optional arguments:" .TP \fB\-g\fR ASGROUP, \fB\-\-auto\-scaling\-group\fR ASGROUP name of the auto\-scaling group the scheduled action is associated with (required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-delete-tags.1000066400000000000000000000030321222241730200200530ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DELETE-TAGS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-delete-tags \- Delete one or more resource tags .SH SYNOPSIS euscale\-delete\-tags \fB\-\-tag\fR "k=VALUE, id=VALUE, t=VALUE, v=VALUE, p={true,false}" [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Delete one or more resource tags .SS "optional arguments:" .TP \fB\-\-tag\fR "k=VALUE, id=VALUE, t=VALUE, v=VALUE, p={true,false}" attributes of a tag to affect. Tags follow the following format: "id=resource\-name, t=resource\-type, k=tag\-key, v=tag\-val, p=propagate\-at\-launch\-flag", where k is the tag's name, v is the tag's value, id is a resource ID, t is a resource type, and p is whether to propagate tags to instances created by the group. A value for 'k=' is required for each tag. The rest are optional. This argument may be used more than once. Each time affects a different tag. (at least 1 required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-adjustment-types.1000066400000000000000000000021461222241730200227600ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-ADJUSTMENT-TYPES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-adjustment-types \- Describe policy adjustment types usable with scaling policies .SH SYNOPSIS euscale\-describe\-adjustment\-types [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Describe policy adjustment types usable with scaling policies .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-auto-scaling-groups.1000066400000000000000000000023451222241730200233440ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-AUTO-SCALING-GROUPS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-auto-scaling-groups \- Describe auto-scaling groups .SH SYNOPSIS euscale\-describe\-auto\-scaling\-groups [\-\-show\-long] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [ASGROUP [ASGROUP ...]] .SH DESCRIPTION Describe auto\-scaling groups .SS "positional arguments:" .TP ASGROUP limit results to specific auto\-scaling groups .SS "optional arguments:" .TP \fB\-\-show\-long\fR show all of the groups' info .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-auto-scaling-instances.1000066400000000000000000000022711222241730200240120ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-AUTO-SCALING-INSTANCES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-auto-scaling-instances \- Describe instances in auto-scaling groups .SH SYNOPSIS euscale\-describe\-auto\-scaling\-instances [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [INSTANCE [INSTANCE ...]] .SH DESCRIPTION Describe instances in auto\-scaling groups .SS "positional arguments:" .TP INSTANCE limit results to specific instances .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-auto-scaling-notification-types.1000066400000000000000000000022031222241730200256460ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-AUTO-SCALING-NOTIFICATION-TYPES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-auto-scaling-notification-types \- List all notification types supported by the service .SH SYNOPSIS euscale\-describe\-auto\-scaling\-notification\-types [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List all notification types supported by the service .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-launch-configs.1000066400000000000000000000024441222241730200223410ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-LAUNCH-CONFIGS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-launch-configs \- Describe auto-scaling instance launch configurations .SH SYNOPSIS euscale\-describe\-launch\-configs [\-\-show\-long] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [LAUNCHCONFIG [LAUNCHCONFIG ...]] .SH DESCRIPTION Describe auto\-scaling instance launch configurations .SS "positional arguments:" .TP LAUNCHCONFIG limit results to specific launch configurations .SS "optional arguments:" .TP \fB\-\-show\-long\fR show all of the launch configurations' info .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-metric-collection-types.1000066400000000000000000000021411222241730200242110ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-METRIC-COLLECTION-TYPES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-metric-collection-types \- Describe auto-scaling metrics and granularities .SH SYNOPSIS euscale\-describe\-metric\-collection\-types [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Describe auto\-scaling metrics and granularities .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-notification-configurations.1000066400000000000000000000023771222241730200251640ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-NOTIFICATION-CONFIGURATIONS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-notification-configurations \- Describe notification actions associated with auto-scaling groups .SH SYNOPSIS euscale\-describe\-notification\-configurations [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [ASGROUP [ASGROUP ...]] .SH DESCRIPTION Describe notification actions associated with auto\-scaling groups .SS "positional arguments:" .TP ASGROUP limit results to specific auto\-scaling groups .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-policies.1000066400000000000000000000024231222241730200212450ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-POLICIES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-policies \- Describe auto-scaling policies .SH SYNOPSIS euscale\-describe\-policies [\-g ASGROUP] [\-\-show\-long] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [POLICY [POLICY ...]] .SH DESCRIPTION Describe auto\-scaling policies .SS "positional arguments:" .TP POLICY limit results to specific auto\-scaling policies .SS "optional arguments:" .HP \fB\-g\fR ASGROUP, \fB\-\-auto\-scaling\-group\fR ASGROUP .TP \fB\-\-show\-long\fR show all of the policies' info .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-process-types.1000066400000000000000000000020511222241730200222530ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-PROCESS-TYPES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-process-types \- List all types of scaling processes .SH SYNOPSIS euscale\-describe\-process\-types [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List all types of scaling processes .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-scaling-activities.1000066400000000000000000000026371222241730200232270ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-SCALING-ACTIVITIES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-scaling-activities \- Describe past and current auto-scaling activities .SH SYNOPSIS euscale\-describe\-scaling\-activities [\-g ASGROUP] [\-\-show\-long] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [ACTIVITY [ACTIVITY ...]] .SH DESCRIPTION Describe past and current auto\-scaling activities .SS "positional arguments:" .TP ACTIVITY limit results to specific auto\-scaling activities .SS "optional arguments:" .TP \fB\-g\fR ASGROUP, \fB\-\-auto\-scaling\-group\fR ASGROUP name of an Auto Scaling group by which to filter the request .TP \fB\-\-show\-long\fR show all of the activities' info .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-scheduled-actions.1000066400000000000000000000033021222241730200230310ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-SCHEDULED-ACTIONS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-scheduled-actions \- Describe scheduled auto-scaling group actions .SH SYNOPSIS euscale\-describe\-scheduled\-actions [\-g ASGROUP] [\-\-start\-time YYYY\-MM\-DDThh:mm:ssZ] [\-\-end\-time YYYY\-MM\-DDThh:mm:ssZ] [\-\-show\-long] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [ACTION [ACTION ...]] .SH DESCRIPTION Describe scheduled auto\-scaling group actions .SS "positional arguments:" .TP ACTION limit results to specific actions .SS "optional arguments:" .HP \fB\-g\fR ASGROUP, \fB\-\-group\fR ASGROUP .TP \fB\-\-start\-time\fR YYYY\-MM\-DDThh:mm:ssZ earliest start time to return scheduled actions for. This is ignored when specific action names are provided. .TP \fB\-\-end\-time\fR YYYY\-MM\-DDThh:mm:ssZ latest start time to return scheduled actions for. This is ignored when specific action names are provided. .TP \fB\-\-show\-long\fR show all of the scheduled actions' info .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-tags.1000066400000000000000000000021511222241730200203720ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-TAGS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-tags \- Describe auto-scaling tags .SH SYNOPSIS euscale\-describe\-tags [\-\-filter NAME=VALUE,...] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Describe auto\-scaling tags .SS "optional arguments:" .TP \fB\-\-filter\fR NAME=VALUE,... restrict results to those that meet criteria .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-describe-termination-policy-types.1000066400000000000000000000021611222241730200244250ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DESCRIBE-TERMINATION-POLICY-TYPES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-describe-termination-policy-types \- List all termination policies supported by the service .SH SYNOPSIS euscale\-describe\-termination\-policy\-types [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List all termination policies supported by the service .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-disable-metrics-collection.1000066400000000000000000000024071222241730200230620ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-DISABLE-METRICS-COLLECTION "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-disable-metrics-collection \- Disable monitoring of an auto-scaling group's group metrics .SH SYNOPSIS euscale\-disable\-metrics\-collection [\-m METRIC1,METRIC2,...] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ASGROUP .SH DESCRIPTION Disable monitoring of an auto\-scaling group's group metrics .SS "positional arguments:" .TP ASGROUP name of the auto\-scaling group to update (required) .SS "optional arguments:" .TP \fB\-m\fR METRIC1,METRIC2,..., \fB\-\-metrics\fR METRIC1,METRIC2,... list of metrics to disable (default: all metrics) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-enable-metrics-collection.1000066400000000000000000000026341222241730200227070ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-ENABLE-METRICS-COLLECTION "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-enable-metrics-collection \- Enable monitoring of an auto-scaling group's group metrics .SH SYNOPSIS euscale\-enable\-metrics\-collection \fB\-g\fR GRANULARITY [\-m METRIC1,METRIC2,...] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ASGROUP .SH DESCRIPTION Enable monitoring of an auto\-scaling group's group metrics .SS "positional arguments:" .TP ASGROUP name of the auto\-scaling group to update (required) .SS "optional arguments:" .TP \fB\-g\fR GRANULARITY, \fB\-\-granularity\fR GRANULARITY granularity at which to collect metrics (e.g., \&'1Minute') (required) .TP \fB\-m\fR METRIC1,METRIC2,..., \fB\-\-metrics\fR METRIC1,METRIC2,... list of metrics to collect (default: all metrics) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-execute-policy.1000066400000000000000000000026171222241730200206240ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-EXECUTE-POLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-execute-policy \- Manually set an auto-scaling instance's health status .SH SYNOPSIS euscale\-execute\-policy [\-g ASGROUP] [\-h] [\-H] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-\-help] POLICY .SH DESCRIPTION Manually set an auto\-scaling instance's health status .SS "positional arguments:" .TP POLICY name or ARN of the policy to run (required) .SS "optional arguments:" .TP \fB\-g\fR ASGROUP, \fB\-\-auto\-scaling\-group\fR ASGROUP name or ARN of the auto\-scaling group .TP \fB\-h\fR, \fB\-\-honor\-cooldown\fR reject the request if the group is in cooldown (default: override any cooldown period) .TP \fB\-H\fR, \fB\-\-no\-honor\-cooldown\fR override any cooldown period (this is the default) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-put-notification-configuration.1000066400000000000000000000027021222241730200240210ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-PUT-NOTIFICATION-CONFIGURATION "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-put-notification-configuration \- Create or replace an auto-scaling group's notification configuration .SH SYNOPSIS euscale\-put\-notification\-configuration \fB\-n\fR TYPE1,TYPE2,... \fB\-t\fR TOPIC [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ASGROUP .SH DESCRIPTION Create or replace an auto\-scaling group's notification configuration .SS "positional arguments:" .TP ASGROUP name of the auto\-scaling group to update (required) .SS "optional arguments:" .TP \fB\-n\fR TYPE1,TYPE2,..., \fB\-\-notification\-types\fR TYPE1,TYPE2,... comma\-separated list of event types that will trigger notification (required) .TP \fB\-t\fR TOPIC, \fB\-\-topic\-arn\fR TOPIC ARN of the SNS topic to publish notifications to (required) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-put-scaling-policy.1000066400000000000000000000042671222241730200214130ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-PUT-SCALING-POLICY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-put-scaling-policy \- Create or update an auto-scaling group's scaling policy .SH SYNOPSIS euscale\-put\-scaling\-policy \fB\-g\fR ASGROUP \fB\-a\fR SCALE \fB\-t\fR {ChangeInCapacity,ExactCapacity,PercentChangeInCapacity} [\-\-cooldown SECONDS] [\-s PERCENT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] POLICY .SH DESCRIPTION Create or update an auto\-scaling group's scaling policy .SS "positional arguments:" .TP POLICY name of the policy to create or update (required) .SS "optional arguments:" .TP \fB\-g\fR ASGROUP, \fB\-\-auto\-scaling\-group\fR ASGROUP name of the auto\-scaling group the policy is associated with (required) .TP \fB\-a\fR SCALE, \fB\-\-adjustment\fR SCALE amount to scale the group's capacity of the group. Use a negative value, as in "\-\-adjustment=\-1", to decrease capacity. (required) .TP \fB\-t\fR {ChangeInCapacity,ExactCapacity,PercentChangeInCapacity}, \fB\-\-type\fR {ChangeInCapacity,ExactCapacity,PercentChangeInCapacity} whether the adjustment is the new desired size or an increment to the group's current capacity. An increment can either be a fixed number or a percentage of current capacity. (required) .TP \fB\-\-cooldown\fR SECONDS waiting period after successful auto\-scaling activities during which later auto\-scaling activities will not execute .TP \fB\-s\fR PERCENT, \fB\-\-min\-adjustment\-step\fR PERCENT for a PercentChangeInCapacity type policy, guarantee that this policy will change the group's desired capacity by at least this much .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-put-scheduled-update-group-action.1000066400000000000000000000037631222241730200243230ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-PUT-SCHEDULED-UPDATE-GROUP-ACTION "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-put-scheduled-update-group-action \- Schedule a scaling action for an auto-scaling group .SH SYNOPSIS euscale\-put\-scheduled\-update\-group\-action \fB\-g\fR ASGROUP [\-b YYYY\-MM\-DDThh:mm:ssZ] [\-e YYYY\-MM\-DDThh:mm:ssZ] [\-r "MIN HOUR DATE MONTH DAY"] [\-\-desired\-capacity COUNT] [\-\-max\-size COUNT] [\-\-min\-size COUNT] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ACTION .SH DESCRIPTION Schedule a scaling action for an auto\-scaling group .SS "positional arguments:" .TP ACTION name of the new scheduled action .SS "optional arguments:" .TP \fB\-g\fR ASGROUP, \fB\-\-auto\-scaling\-group\fR ASGROUP auto\-scaling group the new action should affect (required) .TP \fB\-b\fR YYYY\-MM\-DDThh:mm:ssZ, \fB\-\-start\-time\fR YYYY\-MM\-DDThh:mm:ssZ time for this action to start .TP \fB\-e\fR YYYY\-MM\-DDThh:mm:ssZ, \fB\-\-end\-time\fR YYYY\-MM\-DDThh:mm:ssZ time for this action to end .TP \fB\-r\fR "MIN HOUR DATE MONTH DAY", \fB\-\-recurrence\fR "MIN HOUR DATE MONTH DAY" time when recurring future actions will start, in crontab format .TP \fB\-\-desired\-capacity\fR COUNT new capacity setting for the group .TP \fB\-\-max\-size\fR COUNT maximum number of instances to allow in the group .TP \fB\-\-min\-size\fR COUNT minimum number of instances to allow in the group .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-resume-processes.1000066400000000000000000000023601222241730200211640ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-RESUME-PROCESSES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-resume-processes \- Resume an auto-scaling group's auto-scaling processes .SH SYNOPSIS euscale\-resume\-processes [\-\-processes PROCESS1,PROCESS2,...] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ASGROUP .SH DESCRIPTION Resume an auto\-scaling group's auto\-scaling processes .SS "positional arguments:" .TP ASGROUP name of the auto\-scaling group to update (required) .SS "optional arguments:" .TP \fB\-\-processes\fR PROCESS1,PROCESS2,... comma\-separated list of auto\-scaling processes to resume (default: all processes) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-set-desired-capacity.1000066400000000000000000000026731222241730200216720ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-SET-DESIRED-CAPACITY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-set-desired-capacity \- Set an auto-scaling group's desired capacity .SH SYNOPSIS euscale\-set\-desired\-capacity \fB\-c\fR DESIREDCAPACITY [\-h] [\-H] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-\-help] ASGROUP .SH DESCRIPTION Set an auto\-scaling group's desired capacity .SS "positional arguments:" .TP ASGROUP name of the auto\-scaling group to update (required) .SS "optional arguments:" .TP \fB\-c\fR DESIREDCAPACITY, \fB\-\-desired\-capacity\fR DESIREDCAPACITY new capacity setting for the group (required) .TP \fB\-h\fR, \fB\-\-honor\-cooldown\fR reject the request if the group is in cooldown (default: override any cooldown period) .TP \fB\-H\fR, \fB\-\-no\-honor\-cooldown\fR override any cooldown period (this is the default) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-set-instance-health.1000066400000000000000000000030031222241730200215130ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-SET-INSTANCE-HEALTH "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-set-instance-health \- Manually set an auto-scaling instance's health status .SH SYNOPSIS euscale\-set\-instance\-health \fB\-s\fR {Healthy,Unhealthy} [\-\-respect\-grace\-period] [\-\-no\-respect\-grace\-period] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE .SH DESCRIPTION Manually set an auto\-scaling instance's health status .SS "positional arguments:" .TP INSTANCE ID of the instance to update (required) .SS "optional arguments:" .TP \fB\-s\fR {Healthy,Unhealthy}, \fB\-\-status\fR {Healthy,Unhealthy} new status (required) .TP \fB\-\-respect\-grace\-period\fR respect the associated auto\-scaling group's grace period (this is the default) .TP \fB\-\-no\-respect\-grace\-period\fR ignore the associated auto\-scaling group's grace period (default: respect the group's grace period) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-suspend-processes.1000066400000000000000000000023661222241730200213530ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-SUSPEND-PROCESSES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-suspend-processes \- Suspend an auto-scaling group's auto-scaling processes .SH SYNOPSIS euscale\-suspend\-processes [\-\-processes PROCESS1,PROCESS2,...] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ASGROUP .SH DESCRIPTION Suspend an auto\-scaling group's auto\-scaling processes .SS "positional arguments:" .TP ASGROUP name of the auto\-scaling group to update (required) .SS "optional arguments:" .TP \fB\-\-processes\fR PROCESS1,PROCESS2,... comma\-separated list of auto\-scaling processes to suspend (default: all processes) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-terminate-instance-in-auto-scaling-group.1000066400000000000000000000031731222241730200255770ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-TERMINATE-INSTANCE-IN-AUTO-SCALING-GROUP "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-terminate-instance-in-auto-scaling-group \- Manually terminate an auto-scaling instance .SH SYNOPSIS euscale\-terminate\-instance\-in\-auto\-scaling\-group (\fB\-d\fR | \fB\-D\fR) [\-\-show\-long] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] INSTANCE .SH DESCRIPTION Manually terminate an auto\-scaling instance .SS "positional arguments:" .TP INSTANCE ID of the instance to terminate (required) .SS "optional arguments:" .TP \fB\-d\fR, \fB\-\-decrement\-desired\-capacity\fR also reduce the desired capacity of the auto\-scaling group by 1 .TP \fB\-D\fR, \fB\-\-no\-decrement\-desired\-capacity\fR leave the auto\-scaling group's desired capacity as\-is. A new instance may be launched to compensate for the one being terminated. .TP \fB\-\-show\-long\fR show extra info about the instance being terminated .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euscale-update-auto-scaling-group.1000066400000000000000000000053551222241730200226670ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSCALE-UPDATE-AUTO-SCALING-GROUP "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euscale-update-auto-scaling-group \- Update an auto-scaling group's parameters .SH SYNOPSIS euscale\-update\-auto\-scaling\-group [\-\-default\-cooldown SECONDS] [\-\-desired\-capacity COUNT] [\-\-grace\-period SECONDS] [\-\-health\-check\-type {EC2,ELB}] [\-l LAUNCHCONFIG] [\-M COUNT] [\-m COUNT] [\-\-placement\-group PLACEMENTGROUP] [\-\-termination\-policies POLICY1,POLICY2,...] [\-\-vpc\-zone\-identifier ZONE1,ZONE2,...] [\-z ZONE1,ZONE2,...] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ASGROUP .SH DESCRIPTION Update an auto\-scaling group's parameters .SS "positional arguments:" .TP ASGROUP name of the auto\-scaling group to update (required) .SS "optional arguments:" .TP \fB\-\-default\-cooldown\fR SECONDS amount of time, in seconds, after a scaling activity completes before any further trigger\-related scaling activities may start .TP \fB\-\-desired\-capacity\fR COUNT number of running instances the group should contain .TP \fB\-\-grace\-period\fR SECONDS number of seconds to wait before starting health checks on newly\-created instances .TP \fB\-\-health\-check\-type\fR {EC2,ELB} service to obtain health check status from .TP \fB\-l\fR LAUNCHCONFIG, \fB\-\-launch\-configuration\fR LAUNCHCONFIG name of the launch configuration to use with the new group (required) .TP \fB\-M\fR COUNT, \fB\-\-max\-size\fR COUNT maximum group size (required) .TP \fB\-m\fR COUNT, \fB\-\-min\-size\fR COUNT minimum group size (required) .TP \fB\-\-placement\-group\fR PLACEMENTGROUP placement group in which to launch new instances .TP \fB\-\-termination\-policies\fR POLICY1,POLICY2,... ordered list of termination policies. The first has the highest precedence. .TP \fB\-\-vpc\-zone\-identifier\fR ZONE1,ZONE2,... comma\-separated list of subnet identifiers. If you specify availability zones as well, ensure the subnets' availability zones match the ones you specified .TP \fB\-z\fR ZONE1,ZONE2,..., \fB\-\-availability\-zones\fR ZONE1,ZONE2,... comma\-separated list of availability zones for the new group (required unless subnets are supplied) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL auto\-scaling service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eustore-describe-images.1000066400000000000000000000020071222241730200207460ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSTORE-DESCRIBE-IMAGES "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eustore-describe-images \- List images available for installation from EuStore .SH SYNOPSIS eustore\-describe\-images [\-v] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION List images available for installation from EuStore .SS "optional arguments:" .TP \fB\-v\fR, \fB\-\-verbose\fR display more information about images than the default .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL EuStore service URL .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/eustore-install-image.1000066400000000000000000000060741222241730200204610ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUSTORE-INSTALL-IMAGE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME eustore-install-image \- Download an image from EuStore and add it to your cloud .SH SYNOPSIS eustore\-install\-image (\fB\-i\fR EUIMAGE | \fB\-t\fR FILE) \fB\-b\fR BUCKET [\-s DESC] [\-a {i386,x86_64,armhf}] [\-p PREFIX] [\-\-hypervisor {xen,kvm,universal}] [\-d DIR] [\-\-kernel KERNEL] [\-\-ramdisk RAMDISK] [\-I KEY_ID] [\-S KEY] [\-c FILE] [\-\-privatekey FILE] [\-\-ec2cert FILE] [\-u ACCOUNT] [\-\-ec2\-url URL] [\-\-iam\-url URL] [\-\-s3\-url URL] [\-\-progress | \fB\-\-no\-progress]\fR [\-\-region USER@REGION | \fB\-U\fR URL] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Download an image from EuStore and add it to your cloud .SS "optional arguments:" .TP \fB\-i\fR EUIMAGE, \fB\-\-image\-name\fR EUIMAGE name of the image to download and install .TP \fB\-t\fR FILE, \fB\-\-tarball\fR FILE tarball to install the image from .TP \fB\-b\fR BUCKET, \fB\-\-bucket\fR BUCKET bucket to store the images in (required) .TP \fB\-s\fR DESC, \fB\-\-description\fR DESC image description (required for \fB\-t\fR) .TP \fB\-a\fR {i386,x86_64,armhf}, \fB\-\-architecture\fR {i386,x86_64,armhf} image architecture (required for \fB\-t\fR) .TP \fB\-p\fR PREFIX, \fB\-\-prefix\fR PREFIX prefix to use when naming the image .TP \fB\-\-hypervisor\fR {xen,kvm,universal} hypervisor the kernel image is built for (required for images with hypervisor\-specific kernels .TP \fB\-d\fR DIR, \fB\-\-directory\fR DIR location to place the image and other artifacts (default: dir named by TMPDIR, TEMP, or TMP environment variables, or otherwise \fI/var/tmp\fP) .TP \fB\-\-kernel\fR KERNEL ID of the kernel image to use instead of the one bundled with the image .TP \fB\-\-ramdisk\fR RAMDISK ID of the ramdisk image to use instead of the one bundled with the image .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-c\fR FILE, \fB\-\-cert\fR FILE file containing your signing certificate .TP \fB\-\-privatekey\fR FILE file containing the private key to sign the bundle's manifest with. This private key will also be required to unbundle the image in the future. .TP \fB\-\-ec2cert\fR FILE file containing the cloud's X.509 certificate .TP \fB\-u\fR ACCOUNT, \fB\-\-user\fR ACCOUNT your account ID .TP \fB\-\-ec2\-url\fR URL compute service endpoint URL .TP \fB\-\-iam\-url\fR URL identity service endpoint URL .TP \fB\-\-s3\-url\fR URL storage service endpoint URL .TP \fB\-\-progress\fR show progress (the default when run interactively) .TP \fB\-\-no\-progress\fR do not show progress (the default when run noninteractively) .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL EuStore service URL .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euwatch-delete-alarms.1000066400000000000000000000020751222241730200204210ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUWATCH-DELETE-ALARMS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euwatch-delete-alarms \- Delete alarms .SH SYNOPSIS euwatch\-delete\-alarms [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ALARM [ALARM ...] .SH DESCRIPTION Delete alarms .SS "positional arguments:" .TP ALARM names of the alarms to delete .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL instance monitoring service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euwatch-describe-alarm-history.1000066400000000000000000000031741222241730200222540ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUWATCH-DESCRIBE-ALARM-HISTORY "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euwatch-describe-alarm-history \- Retrieve history for one alarm or all alarms .SH SYNOPSIS euwatch\-describe\-alarm\-history [\-\-end\-date DATE] [\-\-history\-item\-type {Action,ConfigurationUpdate,StateUpdate}] [\-\-show\-long] [\-\-start\-date DATE] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [ALARM] .SH DESCRIPTION Retrieve history for one alarm or all alarms .SS "positional arguments:" .TP ALARM limit results to a specific alarm .SS "optional arguments:" .TP \fB\-\-end\-date\fR DATE limit results to history before a given point in time .TP \fB\-\-history\-item\-type\fR {Action,ConfigurationUpdate,StateUpdate} limit results to specific history item types .TP \fB\-\-show\-long\fR show detailed event data as machine\-readable JSON .TP \fB\-\-start\-date\fR DATE limit results to history after a given point in time .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL instance monitoring service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euwatch-describe-alarms-for-metric.1000066400000000000000000000035641222241730200230100ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUWATCH-DESCRIBE-ALARMS-FOR-METRIC "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euwatch-describe-alarms-for-metric \- Describe alarms for a single metric. .SH SYNOPSIS euwatch\-describe\-alarms\-for\-metric \fB\-\-metric\-name\fR METRIC \fB\-\-namespace\fR NAMESPACE [\-\-dimensions KEY1=VALUE1,KEY2=VALUE2,...] [\-\-period SECONDS] [\-\-show\-long] [\-\-statistic {Average,Maximum,Minimum,SampleCount,Sum}] [\-\-unit UNIT] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Describe alarms for a single metric. .SH DESCRIPTION Note that all of an alarm's metrics must match exactly to obtain any results. .SS "optional arguments:" .TP \fB\-\-metric\-name\fR METRIC name of the metric (required) .TP \fB\-\-namespace\fR NAMESPACE namespace of the metric (required) .TP \fB\-\-dimensions\fR KEY1=VALUE1,KEY2=VALUE2,... dimensions of the metric .TP \fB\-\-period\fR SECONDS period over which statistics are applied .TP \fB\-\-show\-long\fR show all of the alarms' info .TP \fB\-\-statistic\fR {Average,Maximum,Minimum,SampleCount,Sum} statistic of the metric on which to trigger alarms .TP \fB\-\-unit\fR UNIT unit of measurement for statistics .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL instance monitoring service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euwatch-describe-alarms.1000066400000000000000000000030731222241730200207360ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUWATCH-DESCRIBE-ALARMS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euwatch-describe-alarms \- Describe alarms .SH SYNOPSIS euwatch\-describe\-alarms [\-\-action\-prefix PREFIX] [\-\-alarm\-name\-prefix PREFIX] [\-\-show\-long] [\-\-state\-value {OK,ALARM,INSUFFICIENT_DATA}] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] [ALARM [ALARM ...]] .SH DESCRIPTION Describe alarms .SS "positional arguments:" .TP ALARM limit results to specific alarms .SS "optional arguments:" .TP \fB\-\-action\-prefix\fR PREFIX limit results to alarms whose actions' ARNs begin with a specific string .TP \fB\-\-alarm\-name\-prefix\fR PREFIX limit results to alarms whose names begin with a specific string .TP \fB\-\-show\-long\fR show all of the alarms' info .TP \fB\-\-state\-value\fR {OK,ALARM,INSUFFICIENT_DATA} limit results to alarms in a specific state .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL instance monitoring service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euwatch-disable-alarm-actions.1000066400000000000000000000022351222241730200220330ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUWATCH-DISABLE-ALARM-ACTIONS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euwatch-disable-alarm-actions \- Disable all actions for one or more alarms .SH SYNOPSIS euwatch\-disable\-alarm\-actions [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ALARM [ALARM ...] .SH DESCRIPTION Disable all actions for one or more alarms .SS "positional arguments:" .TP ALARM names of the alarms to disable actions for .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL instance monitoring service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euwatch-enable-alarm-actions.1000066400000000000000000000022271222241730200216570ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUWATCH-ENABLE-ALARM-ACTIONS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euwatch-enable-alarm-actions \- Enable all actions for one or more alarms .SH SYNOPSIS euwatch\-enable\-alarm\-actions [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ALARM [ALARM ...] .SH DESCRIPTION Enable all actions for one or more alarms .SS "positional arguments:" .TP ALARM names of the alarms to enable actions for .SS "optional arguments:" .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL instance monitoring service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euwatch-get-stats.1000066400000000000000000000037021222241730200176130ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUWATCH-GET-STATS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euwatch-get-stats \- Show a metric's statistics .SH SYNOPSIS euwatch\-get\-stats \fB\-n\fR NAMESPACE \fB\-s\fR STAT1,STAT2,... [\-\-dimensions KEY1=VALUE1,KEY2=VALUE2,...] [\-\-start\-time YYYY\-MM\-DDThh:mm:ssZ] [\-\-end\-time YYYY\-MM\-DDThh:mm:ssZ] [\-\-period SECONDS] [\-\-unit UNIT] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] METRIC .SH DESCRIPTION Show a metric's statistics .SS "positional arguments:" .TP METRIC name of the metric to get statistics for (required) .SS "optional arguments:" .TP \fB\-n\fR NAMESPACE, \fB\-\-namespace\fR NAMESPACE the metric's namespace (required) .TP \fB\-s\fR STAT1,STAT2,..., \fB\-\-statistics\fR STAT1,STAT2,... the metric statistics to show (at least 1 required) .TP \fB\-\-dimensions\fR KEY1=VALUE1,KEY2=VALUE2,... the dimensions of the metric to show .TP \fB\-\-start\-time\fR YYYY\-MM\-DDThh:mm:ssZ earliest time to retrieve data points for (default: one hour ago) .TP \fB\-\-end\-time\fR YYYY\-MM\-DDThh:mm:ssZ latest time to retrieve data points for (default: now) .TP \fB\-\-period\fR SECONDS granularity of the returned data points (must be a multiple of 60) .TP \fB\-\-unit\fR UNIT unit the metric is reported in .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL instance monitoring service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euwatch-list-metrics.1000066400000000000000000000026301222241730200203160ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUWATCH-LIST-METRICS "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euwatch-list-metrics \- Show a list of monitoring metrics .SH SYNOPSIS euwatch\-list\-metrics [\-d KEY1=VALUE1,KEY2=VALUE2,...] [\-m METRIC] [\-n NAMESPACE] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Show a list of monitoring metrics .SS "optional arguments:" .TP \fB\-d\fR KEY1=VALUE1,KEY2=VALUE2,..., \fB\-\-dimensions\fR KEY1=VALUE1,KEY2=VALUE2,... limit results to metrics with specific dimensions .TP \fB\-m\fR METRIC, \fB\-\-metric\-name\fR METRIC limit results to a specific metric .TP \fB\-n\fR NAMESPACE, \fB\-\-namespace\fR NAMESPACE limit results to metrics in a specific namespace .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL instance monitoring service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euwatch-put-data.1000066400000000000000000000041671222241730200174250ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUWATCH-PUT-DATA "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euwatch-put-data \- Add data points or statistics to a metric .SH SYNOPSIS euwatch\-put\-data \fB\-m\fR METRIC \fB\-n\fR NAMESPACE (\fB\-v\fR FLOAT | \fB\-s\fR Maximum=FLOAT,Minimum=FLOAT,SampleCount=FLOAT,Sum=FLOAT) [\-d KEY1=VALUE1,KEY2=VALUE2,...] [\-t YYYY\-MM\-DDThh:mm:ssZ] [\-u UNIT] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] .SH DESCRIPTION Add data points or statistics to a metric .SS "optional arguments:" .TP \fB\-m\fR METRIC, \fB\-\-metric\-name\fR METRIC name of the metric to add data points to (required) .TP \fB\-n\fR NAMESPACE, \fB\-\-namespace\fR NAMESPACE the metric's namespace (required) .TP \fB\-v\fR FLOAT, \fB\-\-value\fR FLOAT data value for the metric .TP \fB\-s\fR Maximum=FLOAT,Minimum=FLOAT,SampleCount=FLOAT,Sum=FLOAT, \fB\-\-statistic\-values\fR Maximum=FLOAT,Minimum=FLOAT,SampleCount=FLOAT,Sum=FLOAT, \fB\-\-statisticValues\fR Maximum=FLOAT,Minimum=FLOAT,SampleCount=FLOAT,Sum=FLOAT statistic values for the metric. Values for Maximum, Minimum, SampleCount, and Sum are all required. .TP \fB\-d\fR KEY1=VALUE1,KEY2=VALUE2,..., \fB\-\-dimensions\fR KEY1=VALUE1,KEY2=VALUE2,... the dimensions of the metric to add data points to .TP \fB\-t\fR YYYY\-MM\-DDThh:mm:ssZ, \fB\-\-timestamp\fR YYYY\-MM\-DDThh:mm:ssZ timestamp of the data point .TP \fB\-u\fR UNIT, \fB\-\-unit\fR UNIT unit the metric is being reported in .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL instance monitoring service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euwatch-put-metric-alarm.1000066400000000000000000000063011222241730200210610ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUWATCH-PUT-METRIC-ALARM "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euwatch-put-metric-alarm \- Create or update an alarm .SH SYNOPSIS euwatch\-put\-metric\-alarm \fB\-\-comparison\-operator\fR {GreaterThanOrEqualToThreshold,GreaterThanThreshold,LessThanThreshold,LessThanOrEqualToThreshold} \fB\-\-evaluation\-periods\fR COUNT \fB\-\-metric\-name\fR METRIC \fB\-\-namespace\fR NAMESPACE \fB\-\-period\fR SECONDS \fB\-\-statistic\fR {Average,Maximum,Minimum,SampleCount,Sum} \fB\-\-threshold\fR FLOAT [\-\-actions\-enabled {true,false}] [\-\-alarm\-actions ARN1,ARN2,...] [\-\-alarm\-description DESCRIPTION] [\-d KEY1=VALUE1,KEY2=VALUE2,...] [\-\-insufficient\-data\-actions ARN1,ARN2,...] [\-\-ok\-actions ARN1,ARN2,...] [\-\-unit UNIT] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ALARM .SH DESCRIPTION Create or update an alarm .SS "positional arguments:" .TP ALARM name of the alarm (required) .SS "optional arguments:" .TP \fB\-\-comparison\-operator\fR {GreaterThanOrEqualToThreshold,GreaterThanThreshold,LessThanThreshold,LessThanOrEqualToThreshold} arithmetic operator with which the comparison with the threshold will be made (required) .TP \fB\-\-evaluation\-periods\fR COUNT number of consecutive periods for which the value of the metric needs to be compared to the threshold (required) .TP \fB\-\-metric\-name\fR METRIC name for the alarm's associated metric (required) .TP \fB\-\-namespace\fR NAMESPACE namespace for the alarm's associated metric (required) .TP \fB\-\-period\fR SECONDS period over which the specified statistic is applied (required) .TP \fB\-\-statistic\fR {Average,Maximum,Minimum,SampleCount,Sum} statistic on which to alarm (required) .TP \fB\-\-threshold\fR FLOAT value to compare the statistic against (required) .TP \fB\-\-actions\-enabled\fR {true,false} whether this alarm's actions should be executed when it changes state .TP \fB\-\-alarm\-actions\fR ARN1,ARN2,... ARNs of SNS topics to publish to when the alarm changes to the ALARM state .TP \fB\-\-alarm\-description\fR DESCRIPTION description of the alarm .TP \fB\-d\fR KEY1=VALUE1,KEY2=VALUE2,..., \fB\-\-dimensions\fR KEY1=VALUE1,KEY2=VALUE2,... dimensions for the alarm's associated metric .TP \fB\-\-insufficient\-data\-actions\fR ARN1,ARN2,... ARNs of SNS topics to publish to when the alarm changes to the INSUFFICIENT_DATA state .TP \fB\-\-ok\-actions\fR ARN1,ARN2,... ARNs of SNS topics to publish to when the alarm changes to the OK state .TP \fB\-\-unit\fR UNIT unit for the alarm's associated metric .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL instance monitoring service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/man/euwatch-set-alarm-state.1000066400000000000000000000030131222241730200206760ustar00rootroot00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. .TH EUWATCH-SET-ALARM-STATE "1" "August 2013" "euca2ools 3.0.1" "User Commands" .SH NAME euwatch-set-alarm-state \- Temporarily set the state of an alarm .SH SYNOPSIS euwatch\-set\-alarm\-state \fB\-\-state\-value\fR {ALARM,INSUFFICIENT_DATA,OK} \fB\-\-state\-reason\fR REASON [\-\-state\-reason\-data JSON] [\-\-show\-empty\-fields] [\-\-region USER@REGION | \fB\-U\fR URL] [\-I KEY_ID] [\-S KEY] [\-\-debug] [\-\-debugger] [\-\-version] [\-h] ALARM .SH DESCRIPTION Temporarily set the state of an alarm .SS "positional arguments:" .TP ALARM name of the alarm to update (required) .SS "optional arguments:" .TP \fB\-\-state\-value\fR {ALARM,INSUFFICIENT_DATA,OK} state to set the alarm to (required) .TP \fB\-\-state\-reason\fR REASON human\-readable reason why the alarm was set to this state (required) .TP \fB\-\-state\-reason\-data\fR JSON JSON\-formatted reason why the alarm was set to this state .TP \fB\-\-show\-empty\-fields\fR show empty values as "(nil)" .TP \fB\-\-region\fR USER@REGION name of the region and/or user in config files to use to connect to the service .TP \fB\-U\fR URL, \fB\-\-url\fR URL instance monitoring service endpoint URL .HP \fB\-I\fR KEY_ID, \fB\-\-access\-key\-id\fR KEY_ID .HP \fB\-S\fR KEY, \fB\-\-secret\-key\fR KEY .TP \fB\-\-debug\fR show debugging output .TP \fB\-\-debugger\fR launch interactive debugger on error .TP \fB\-\-version\fR show the program's version and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit euca2ools-3.0.2/setup.py000066400000000000000000000145171222241730200151250ustar00rootroot00000000000000# Copyright 2009-2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from distutils.command.build_py import build_py from distutils.command.build_scripts import build_scripts from distutils.command.install_scripts import install_scripts from distutils.command.sdist import sdist import glob import os.path import re from setuptools import find_packages, setup from euca2ools import __version__ # Cheap hack: install symlinks separately from regular files. # cmd.copy_tree accepts a preserve_symlinks option, but when we call # ``setup.py install'' more than once the method fails when it encounters # symlinks that are already there. class build_scripts_except_symlinks(build_scripts): '''Like build_scripts, but ignoring symlinks''' def copy_scripts(self): orig_scripts = self.scripts self.scripts = [script for script in self.scripts if not os.path.islink(script)] build_scripts.copy_scripts(self) self.scripts = orig_scripts class install_scripts_and_symlinks(install_scripts): '''Like install_scripts, but also replicating nonexistent symlinks''' def run(self): install_scripts.run(self) # Replicate symlinks if they don't exist for script in self.distribution.scripts: if os.path.islink(script): target = os.readlink(script) newlink = os.path.join(self.install_dir, os.path.basename(script)) if not os.path.exists(newlink): os.symlink(target, newlink) class build_py_with_git_version(build_py): '''Like build_py, but also hardcoding the version in __init__.__version__ so it's consistent even outside of the source tree''' def build_module(self, module, module_file, package): build_py.build_module(self, module, module_file, package) print module, module_file, package if module == '__init__' and '.' not in package: version_line = "__version__ = '{0}'\n".format(__version__) old_init_name = self.get_module_outfile(self.build_lib, (package,), module) new_init_name = old_init_name + '.new' with open(new_init_name, 'w') as new_init: with open(old_init_name) as old_init: for line in old_init: if line.startswith('__version__ ='): new_init.write(version_line) else: new_init.write(line) new_init.flush() os.rename(new_init_name, old_init_name) class sdist_with_git_version(sdist): '''Like sdist, but also hardcoding the version in __init__.__version__ so it's consistent even outside of the source tree''' def make_release_tree(self, base_dir, files): sdist.make_release_tree(self, base_dir, files) version_line = "__version__ = '{0}'\n".format(__version__) old_init_name = os.path.join(base_dir, 'euca2ools/__init__.py') new_init_name = old_init_name + '.new' with open(new_init_name, 'w') as new_init: with open(old_init_name) as old_init: for line in old_init: if line.startswith('__version__ ='): new_init.write(version_line) else: new_init.write(line) new_init.flush() os.rename(new_init_name, old_init_name) setup(name="euca2ools", version=__version__, description="Eucalyptus Command Line Tools", long_description="Eucalyptus Command Line Tools", author="Eucalyptus Systems, Inc.", author_email="support@eucalyptus.com", url="http://www.eucalyptus.com", scripts=sum((glob.glob('bin/euare-*'), glob.glob('bin/euca-*'), glob.glob('bin/eulb-*'), glob.glob('bin/euscale-*'), glob.glob('bin/eustore-*'), glob.glob('bin/euwatch-*')), []), data_files=[('share/man/man1', glob.glob('man/*.1'))], packages=find_packages(), install_requires=['lxml', 'requestbuilder', 'requests', 'six'], license='BSD (Simplified)', platforms='Posix; MacOS X', classifiers=['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: Simplified BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet'], cmdclass={'build_py': build_py_with_git_version, 'build_scripts': build_scripts_except_symlinks, 'install_scripts': install_scripts_and_symlinks, 'sdist': sdist_with_git_version})