summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/utils/heat_utils.py
AgeCommit message (Collapse)AuthorFilesLines
2018-03-13Reverse engineer OpenStackHeatStackspisarski1-2/+2
Added support for obtaining an initialized OpenStackHeatStack object from an existing Stack object JIRA: SNAPS-278 Change-Id: I68cb0c85179868e4e3899b5516316dda3321e9f6 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-03-12Closing keystone sessions after done with them.spisarski1-2/+4
By not closing all of the keystone sessions being created when running all of the tests, this may be the root cause to the IOError occasionally being observed: IOError: [Errno 24] Too many open files JIRA: SNAPS-285 Change-Id: I7fc7ab0c6cdd02f1ae32bb3ae4f121cb465d5693 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-03-07Updated stack tests to only use an admin user when necessary.spisarski1-2/+10
Changed super test class OSIntegrationTestCase to allow subclasses to set the user roles when required. For all heat stack test, the user role will always be 'heat_stack_owner'. 'admin' will be used for tests requiring this role (i.e. heat template creates flavors) JIRA: SNAPS-268 Change-Id: I0ec01cfea6297547a6a158eec8e5c69af6d6c7d7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-02-22Changed pattern on how objects lookup themselves by name and project.spisarski1-4/+5
The pattern being replaced has unwittingly added the requirement that all creator credentials must be of type 'admin' as when looking up the associated project ID required a call to keystone.projects.list(). As the SNAPS integration tests were always creating users with an 'admin' role, this issue was not caught. As part of this patch, integration test users will no longer be admin. JIRA: SNAPS-274 Change-Id: I02957f69e31a9d4dfa63362d371f061687e59fbf Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-02-16Ensure project IDs are handled correctly for Network/Subnetsspisarski1-3/+4
JIRA: SNAPS-265 Change-Id: If58f5817e52e21be377d2b06a5f7c3a413454350 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-01-11Fixed vm instance instantiation from Heat when using nested resourcesspisarski1-17/+37
* Simplified the configuration of file resources * Added integration test JIRA: SNAPS-255 Change-Id: I1065d9352865d7a9f946a5d9947e32e7340f20bc Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-12-29Added support for Heat resource files.spisarski1-0/+3
Change-Id: I936c0ef5570b5b417e4649504a817f0ca216812f Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-12-18Refactored VmInst domain class for Ports.spisarski1-2/+4
Removed network dict and replaced with a list of Port domain objects. The old network member was directly copied into the VmInst object from neutron meaning that Neutron implementation details were leaking through. This refactor not only makes VmInst objects easier to use, it also ensures that future Neutron API changes will not break the library. JIRA: SNAPS-251 Change-Id: I3e5e811e433bf7670ecd80405186ac2ac0739def Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-16Minor copy/paste logging value fixes.spisarski1-2/+2
Change-Id: I729265575583eec7fb7adc1fc49c6d91c06ad603 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-06Added method to OpenStackHeatStack to return OpenStackSecurityGroup objects.spisarski1-0/+20
Continuation of the story SNAPS-153 for adding creator/state machine instances for OpenStack objects deployed via Heat. JIRA: SNAPS-207 Change-Id: Id479b69c2b166ab38724c3886096d8483998f819 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-06Merge "Added logging when a heat stack fails."Steven Pisarski1-4/+7
2017-11-02Added logging when a heat stack fails.spisarski1-6/+8
Added the stack resource reason to the error logs for each resource who's status is 'CREATE_FAILED'. All resons will be output to debug. JIRA: SNAPS-190 Change-Id: Ieb1cdb2089eb6e1c1a7c96c143b82af1b7a9efb7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-02Added method to OpenStackHeatStack to return OpenStackRouter objects.spisarski1-2/+20
Continuation of the story SNAPS-153 for adding creator/state machine instances for OpenStack objects deployed via Heat. JIRA: SNAPS-173 Change-Id: Iac9138ef7827c10db1637447d3a909e714a0301b Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-31Added method to OpenStackHeatStack to return OpenStackFlavor objects.spisarski1-0/+23
Continuation of the story SNAPS-153 for adding creator/state machine instances for OpenStack objects deployed via Heat. JIRA: SNAPS-174 Change-Id: I791e427efc487045c0f72cd836dabd9a66a4f60f Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-30Added method to OpenStackHeatStack to return OpenStackKeypair objects.spisarski1-2/+24
Continuation of the story SNAPS-153 for adding creator/state machine instances for OpenStack objects deployed via Heat. JIRA: SNAPS-175 Change-Id: I7196279086b1935b4ec4a01483d46921cc567b15 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-27Return OpenStackVolume and OpenStackVolumeType instances from heat.spisarski1-26/+71
Added a methods to OpenStackHeatStack to return any OpenStackVolume and OpenStackVolumeType objects it was responsible for spawning. Changes include all of the necessary changes to the heat and settings utilities and associated tests. JIRA: SNAPS-199, SNAPS-200 Change-Id: I6da4bce1e90f080e22c96ab1b46eca8b85991ebf Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-19Add reason for stack creation failureTaseer Ahmed1-0/+10
JIRA: SNAPS-190 Change-Id: I59b7d416ef16cd1f301ccbdcdd8a7529527b3dd6 Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
2017-08-24Added method to return OpenStackVmInstance from Heat.spisarski1-13/+51
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-08-09SNAPS Stack creators can now return SNAPS network creators.spisarski1-2/+50
As Heat Stacks are responsible for spawning objects in OpenStack, the class OpenStackHeatStack which is responsible for applying and managing the state of a stack now can retrieve OpenStackNetwork objects for the networks created in the stack for clients who would like to query the networks and subnets or update them outside of Heat. JIRA: SNAPS-171 Change-Id: I9bf0b81d4f7bfeb1b6392f345022c7d9a57d0415 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-31Changed heat_utils#get_stack_by_name to get_stack.spisarski1-6/+16
Added stack_settings parameter to allow for more robust queries based on the known settings as required. JIRA: SNAPS-158 Change-Id: I538826f822307365b1afe997b71280b9ea500eab Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-25Added region support.spisarski1-1/+2
Added region_name attribute to OSCreds Added region_name to neutron, nova, glance, heat, and keystone client retrieval Fixed false positive heat connection test. JIRA: SNAPS-50 & SNAPS-146 Change-Id: If3471ed7a2bdd0e6bfc281455c996386d031235d Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-20Changes required for running CI tests (Pike pod).spisarski1-4/+8
Added support for HTTPS proxies HTTPS OSCreds settings for both RC file and os_env.yaml OSCreds 'cacert' T/F and cert file path support OSCreds API version support cleanup including the addition of heat Added more OSCreds test validations Disabling of InsecureRequestWarning PEP8 line width refactoring heat_utils_test.py fix when stack status is error test suite for CI removed default flavor metadata of mem_page_size: Any to None JIRA: SNAPS-80 Change-Id: I333e83ca79d7403bf43a9b74da4c072b4da976ba Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-05Added support for applying Heat Templatesspisarski1-0/+139
Second patch expanded support to both files and dict() objects. Third patch exposes new accessor for status and outputs. JIRA: SNAPS-86 Change-Id: Ie7e8d883b4cc1a08dbe851fc9cbf663396334909 Signed-off-by: spisarski <s.pisarski@cablelabs.com>