Commit Graph

20 Commits

Author SHA1 Message Date
Rabi Mishra ccefe28e4b Remove heat_capabilities action plugin
Moves the code for updating plan environment and parameter
caching related functionality to utils/plan.py.

Story: 2007212
Task: 38577
Task: 38578
Change-Id: I73407fdd6a1990e91ca2a8d8843901948ec256e3
2020-02-01 09:52:06 +05:30
Alex Schultz 550537acf4 Handle swift interactions are strings as necessary
To properly handle the differences between python2/python3 we need to
ensure that when we interact with swift and are dealing with string data
that we handle the types correctly. This change adds a swift utils
helper to call to get the string data from an object out of swift. For
example our json and yaml files are all strings so if we try to use
something like json.dumps() from data we pull from swift, it errors
because we're given a bytes like object in python3.

Change-Id: I7996cc08cdd3bddf3f4ba0fb2e48f926f944c0dd
Related-Blueprint: python3-support
2019-03-01 15:45:56 -07:00
Ryan Brady 27c7ee28c2 Makes sorting environments with capabilities-map optional
This patch adds an argument to the UpdateCapabilitesAction to
optionally enable the sorting of environments utilizing the
capabilites-map file in the plan.  This patch also restores
the unit tests before the introduction of the additional
sorting and adds a new test for the optional sorting.

Change-Id: I6944ba7f673344f0d40c0bdf8cfba78e2d758da5
2018-07-19 11:15:57 -04:00
Ryan Brady bae4296502 Fixes ordering of environment files in a deployment plan
Sometimes making changes in basic deployment breaks the order of
passed env files and leads to a failed deployment.  This patch
orders the environment files according to the rules defined in
the capabilities-map.yaml file.

Change-Id: Idbb6f0f3adebebd429bcb3447e559838180f4b1c
2018-06-29 10:48:04 -04:00
Jaganathan Palanisamy 7d0c3c3f07 Copyright content changes
Copyright content is available twice in parameters.py
and year update in heat_capabilities.py

Change-Id: I953e2d2308dda2b2d4731cf2623b6d96519ad072
2017-07-13 12:09:53 -04:00
Adriano Petrich 76b3e025b7 use Result from mistral_lib instead of mistral
This is part of the ongoing change to remove the mistral
dependency from tripleo-common and use mistral_lib instead

In order to do that we are using the Result class from mistral_lib

Change-Id: I59ce8c6d68de9e9719d84cbaa82462fbd8d647e2
Depends-on: Icc0036bae3c969112f2f67c4a8264bae18f3cc73
2017-06-23 14:20:45 +01:00
Ana Krivokapic bd4e26e823 Use Swift to store Plan environment
Start using the plan environment file in Swift for plan environment
storage instead of Mistral.

Add util functions to get/update environment data.

Remove CreatePlanAction and UpdatePlanAction as all they did was
sync between Mistral and Swift environments. Amend the corresponding
workflows to account for removal of these actions.

Implements: blueprint stop-using-mistral-env
Co-Authored-By: Julie Pichon <jpichon@redhat.com>
Depends-On: I3bcef27413e685c498165b43a8b59c8c9cc5cf5e
Change-Id: Ieedecf92113142e43925131dcbccc4c0cd5b1a18
2017-06-07 16:51:28 +02:00
Adriano Petrich fbfe481ee4 move mistral base action dependency to mistral_lib
mistral_lib base TripleoAction has a context in the run method
signature. These changes remove the mistral.context and make use
of the one provide by the default executor

Change-Id: Ib1a5aa8d5735b05f5308dc943ac088b5eeeec253
2017-05-17 23:51:05 +01:00
Adriano Petrich 78807dff26 add caching the GetParametersAction
This caching in swift changes the time for the GetParametersAction from
15s to 3s

Added tests for plan.UpdatePlanAction as there were none there.

Change-Id: I0b543e082a3b02a35e3e979339698ae237b32ce4
Closes-Bug: #1647301
2017-04-12 14:49:04 +01:00
Jenkins 66a5f3bee4 Merge "Enhance plan creation and update with plan-environment" 2017-03-26 07:14:29 +00:00
Ana Krivokapic 71ca8096fe Enhance plan creation and update with plan-environment
This change enhances the plan creation and update workflows to consume
the plan environment file and import its contents into the Mistral
environment. It also removes importing the root template and root
environment from the capabilities map file, as these fields will
now be imported from the plan environment file.

Implements: blueprint enhance-plan-creation-with-plan-environment
Depends-On: I95e3e3a25104623d6fcf38e99403cebbd591b92d
Change-Id: I961624723d127aebbaacd0c2b481211d83dde3f6
2017-03-15 21:43:08 +01:00
Steven Hardy 0c1ed05bb5 UpdateCapabilitiesAction add purge_missing option
Currently any paths not included in the input map are ignored,
but for the CLI we have an exact list we want to set, which will
be easier with this option.

Change-Id: I7ebc8b657ff5ab9cc275b29b4d17053888a251ee
Partial-Bug: #1635409
2017-03-10 11:25:19 +00:00
Dougal Matthews 9d3d03436a Remove the underscore from the base action client methods
The underscore typically designates these methods as private, but
they are intended to be used by any/all of the subclasses. This
change clarifies the API.

Change-Id: I4dc95a0e1f84570b184f8b75f51a2c1456909fb9
2016-11-28 13:09:38 +00:00
Dougal Matthews b771918bba Use kwargs to pass in data and error to Mistral Result
This standardises how we create mistral.workflow.utils.Result instances.
Previously we used a combination of passing empty strings or None values
to pass errors only. Using kwargs makes this clearer and cleaner. This
is also means we use the Result class in the same way as the builtin
Mistral actions.

Change-Id: Ic94c0513b1fba030de70263ac1df32b4ab130e9a
2016-11-23 13:14:26 +00:00
Jeff Peeler 86d1c56185 Include environments in capabilities output
Not only were custom environments missing, but standard environments
were not being marked as enabled in the capabilities-map translated
output.

Change-Id: I3520f1050ac72d49c2ee1a0d2d6f9310c2ab7d50
Closes-bug: #1612819
2016-09-02 12:23:20 +01:00
Jeff Peeler 07435ec261 Change output for GetCapabilitiesAction
The desired format was not correct, so this changes it to be JSON with
structure very similar to the capabilities map.

Change-Id: I090791d381e228fb61a0c632865463357f5986e8
Closes-bug: #1607423
2016-08-23 14:59:34 +00:00
Jenkins 7dd3b500d5 Merge "Change input for UpdateCapabilitiesAction" 2016-08-22 21:44:40 +00:00
Ryan Brady 8f2ee4a380 Adds action for template processing
This patch moves the code that deals with calling out to
heatclient to process multiple files and environments from
utils/templates.py into an action that will provide a base object
for the deployment and parameters actions to inherit from. This
patch also removes the resulting dead code (utils/templates.py)
and its associated test.

Co-Authored-By: Dougal Matthews <dougal@redhat.com>
Change-Id: I8efb53ac14c3b952743d1871df8d63d32685b6b1
2016-08-17 23:25:13 -04:00
Jeff Peeler c8f613835a Change input for UpdateCapabilitiesAction
The format has changed slightly with the values no longer being a dict,
but simply being true/false.

Change-Id: I24c0189b2164c7a839be359e9c5858c9c23d9ab0
Closes-bug: #1608539
2016-08-03 09:49:41 -04:00
Ryan Brady c00e4e28df Add Heat Capabilities Actions
This patch adds the Actions for retrieving and updating the capabilites
for a given deployment.

Change-Id: I27b00613afc8d9ab07ac3270221d8dc58b0150dc
2016-06-07 08:34:14 -04:00