summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/create_keypairs.py
AgeCommit message (Collapse)AuthorFilesLines
2017-11-20Refactoring of KeypairSettings to extend KeypairConfigspisarski1-41/+7
KeypairSettings and glance_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the KeypairSettings class. JIRA: SNAPS-219 Change-Id: I92f51ecb77238444697e922c8f089e78d1c643aa Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-09Deleting files created when obtaining keypair settings from heat.spisarski1-0/+2
When Heat creates a keypair and SNAPS-OO attempts to generate a KeypairSettings object, the private key is getting stored into a file that was not getting cleaned up in some of the tests. JIRA: SNAPS-177 Change-Id: I50759a74efbd1d0df4de0780da43b9e56432d28c Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-12Improved creator/state machine classes class hierarchy.spisarski1-18/+24
Created abstract superclasses for all classes responsible for deploying and maintaining the state of objects deployed to OpenStack which should help developers better understand the library. JIRA: SNAPS-183 Change-Id: I7651bd338f0d4e4086abbc11755e6be4f19058bd Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-09-08Enhanced launch.py app to support all types.spisarski1-6/+14
Added application support for users, projects, and security groups. In addition, added support for multiple credential sets so one can manage multiple projects potentially on multiple clouds. Added Jinja2 template support for substituting values in the template file with values contained in the environment file. Added ansible substituion value for a VM's floating IP. Changed credentials interface attribute's default value from 'admin' to 'public'. Added optional pre_sleep_time attribute to ansible execution that will wait for a given number of seconds prior to attempting to apply a playbook to a set of VMs. JIRA: SNAPS-4, SNAPS-5, SNAPS-6, SNAPS-26 Change-Id: I67b8d69a3b06a43631d80e8fe0c56e02773dbfbe Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-24Added method to return OpenStackVmInstance from Heat.spisarski1-1/+1
OpenStackHeatStack now can introspect the VMs that the template was responsible for deploying and return an instanitated instance of OpenStackVmInstance for each VM deployed. When the VM has a Floating IP, these instances have the ability to connect via SSH just like one created from scratch. JIRA: SNAPS-172 Change-Id: I5a7ed3a09bb871afc55c718aa80a9069b1eb4da7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-26Added configuration for keypair size.spisarski1-4/+11
Removed hardcoded key byte value of 1024 and added the abiltiy for the user to define their key size. JIRA: SNAPS-20 Change-Id: I81654420e558aae8a03bed902bb8be8f025b992c Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-24Added keypair config for key file deletion.spisarski1-4/+29
Added KeypairSetting attribute named 'delete_on_clean' which is used to override the keypair creator's logic for deleting its associated public/private key files. JIRA: SNAPS-105 Change-Id: I337db99daa6bf7d4b42e8729a92a4baef5c73140 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-20Created new class KeypairSettingsError.spisarski1-1/+7
Raising KeypairSettingsError in KeypairSettings instead of Exception. JIRA: SNAPS-133 Change-Id: Ie67f1da429f7d7a5e1c71c4f2f30bf9d11bbe209 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-02Add a warning of keypair creationboucherv1-0/+4
Put a warning if the public key already exist in OpenStack but the private key file is not found Change-Id: Ie2dc5b9f6a6abb0831e1826130d5c283cf3f34ec Signed-off-by: boucherv <valentin.boucher@orange.com>
2017-06-20Changes to KeypairSettings constructor to use kwargs.spisarski1-31/+35
And changed line lengths to 79 for pep8. JIRA: SNAPS-98 Change-Id: I01f7f459bc46ed818d75d30f8bea7b1e09b5b376 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-25Updated installation documents and fixed problems found during investigation.spisarski1-0/+7
The code changes are primarily required when the runtime environment is Windows. JIRA: SNAPS-75 Change-Id: Ia2134861dd96e1d2c4b597f42fb348929e787a51 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-16Ensure creators' constructors cannot raise exceptions.spisarski1-0/+3
While creating unit tests for vPing that is using SNAPS, exceptions can be raised when retrieving their respective OpenStack clients with incorrect credentials. Moved client retrieval to the create() method which one should expect exceptions to be raised. JIRA: SNAPS-81 Change-Id: Id8e4279f60b97704b25a89c6312dcf2ebdc3f459 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-08Modified code to support both Python 2.7 and 3.xspisarski1-24/+18
* Tested on Python 2.7.10 and 3.4.4 * Updated installation documentation JIRA: SNAPS-30 Change-Id: I94a37d218be8ea47bbbcfb560197737430fcb3ba Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-02-15Initial patch with all code from CableLabs repository.spisarski1-0/+121
Change-Id: I70a2778718c5e7f21fd14e4ad28c9269d3761cc7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>