Remove upload_validations workflow and related action
Its only usage was remved in https://review.opendev.org/#/c/694287/. That patch incorrectly mentions that it's removed from tripleo-common. Task: #38839 Change-Id: I491aac723d58426b912c1b51873421b7077ed9da
This commit is contained in:
parent
903e3497d7
commit
f27d6bebe8
@ -134,7 +134,6 @@ mistral.actions =
|
||||
tripleo.validations.list_groups = tripleo_common.actions.validations:ListGroupsAction
|
||||
tripleo.validations.list_validations = tripleo_common.actions.validations:ListValidationsAction
|
||||
tripleo.validations.run_validation = tripleo_common.actions.validations:RunValidationAction
|
||||
tripleo.validations.upload = tripleo_common.actions.validations:UploadValidationsAction
|
||||
tripleo.files.make_temp_dir = tripleo_common.actions.files:MakeTempDir
|
||||
tripleo.files.remove_temp_dir = tripleo_common.actions.files:RemoveTempDir
|
||||
tripleo.ansible-generate-inventory = tripleo_common.actions.ansible:AnsibleGenerateInventoryAction
|
||||
|
@ -12,7 +12,6 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import tempfile
|
||||
|
||||
from glanceclient.v2 import client as glanceclient
|
||||
from heatclient.v1 import client as heatclient
|
||||
@ -28,7 +27,6 @@ from swiftclient import service as swift_service
|
||||
from zaqarclient.queues.v2 import client as zaqarclient
|
||||
|
||||
from tripleo_common.utils import keystone as keystone_utils
|
||||
from tripleo_common.utils import tarball
|
||||
|
||||
|
||||
class TripleOAction(actions.Action):
|
||||
@ -178,19 +176,3 @@ class TripleOAction(actions.Action):
|
||||
)
|
||||
|
||||
return nova_client(2, **conf)
|
||||
|
||||
|
||||
class UploadDirectoryAction(TripleOAction):
|
||||
"""Upload a directory to Swift."""
|
||||
def __init__(self, container, dir_to_upload):
|
||||
super(UploadDirectoryAction, self).__init__()
|
||||
self.container = container
|
||||
self.dir_to_upload = dir_to_upload
|
||||
|
||||
def run(self, context):
|
||||
with tempfile.NamedTemporaryFile() as tmp_tarball:
|
||||
tarball.create_tarball(self.dir_to_upload, tmp_tarball.name)
|
||||
tarball.tarball_extract_to_swift_container(
|
||||
self.get_object_client(context),
|
||||
tmp_tarball.name,
|
||||
self.container)
|
||||
|
@ -13,16 +13,30 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import tempfile
|
||||
|
||||
from tripleo_common.actions import base
|
||||
from tripleo_common import constants
|
||||
from tripleo_common.utils import plan as plan_utils
|
||||
from tripleo_common.utils import tarball
|
||||
|
||||
|
||||
class UploadTemplatesAction(base.UploadDirectoryAction):
|
||||
"""Upload default heat templates for TripleO."""
|
||||
class UploadTemplatesAction(base.TripleOAction):
|
||||
"""Upload templates directory to Swift."""
|
||||
|
||||
def __init__(self, container=constants.DEFAULT_CONTAINER_NAME,
|
||||
dir_to_upload=constants.DEFAULT_TEMPLATES_PATH):
|
||||
super(UploadTemplatesAction, self).__init__(container, dir_to_upload)
|
||||
super(UploadTemplatesAction, self).__init__()
|
||||
self.container = container
|
||||
self.dir_to_upload = dir_to_upload
|
||||
|
||||
def run(self, context):
|
||||
with tempfile.NamedTemporaryFile() as tmp_tarball:
|
||||
tarball.create_tarball(self.dir_to_upload, tmp_tarball.name)
|
||||
tarball.tarball_extract_to_swift_container(
|
||||
self.get_object_client(context),
|
||||
tmp_tarball.name,
|
||||
self.container)
|
||||
|
||||
|
||||
class UploadPlanEnvironmentAction(base.TripleOAction):
|
||||
|
@ -172,10 +172,3 @@ class RunValidationAction(base.TripleOAction):
|
||||
if inputs_file:
|
||||
utils.cleanup_inputs_file(inputs_file)
|
||||
return actions.Result(**mistral_result)
|
||||
|
||||
|
||||
class UploadValidationsAction(base.UploadDirectoryAction):
|
||||
"""Upload default validations for TripleO."""
|
||||
def __init__(self, container=constants.VALIDATIONS_CONTAINER_NAME,
|
||||
dir_to_upload=constants.DEFAULT_VALIDATIONS_PATH):
|
||||
super(UploadValidationsAction, self).__init__(container, dir_to_upload)
|
||||
|
@ -300,30 +300,3 @@ workflows:
|
||||
config_name: copy_ssh_key
|
||||
group: script
|
||||
queue_name: <% $.queue_name %>
|
||||
|
||||
upload_validations:
|
||||
tags:
|
||||
- tripleo-common-managed
|
||||
|
||||
input:
|
||||
- queue_name: tripleo
|
||||
|
||||
tasks:
|
||||
upload_validations:
|
||||
action: tripleo.validations.upload
|
||||
on-complete: send_message
|
||||
publish-on-error:
|
||||
status: FAILED
|
||||
message: <% task().result %>
|
||||
publish:
|
||||
status: SUCCESS
|
||||
message: <% task().result %>
|
||||
|
||||
send_message:
|
||||
workflow: tripleo.messaging.v1.send
|
||||
input:
|
||||
queue_name: <% $.queue_name %>
|
||||
type: <% execution().name %>
|
||||
status: <% $.status %>
|
||||
execution: <% execution() %>
|
||||
message: <% $.get('message', '') %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user