From c375ce55bc1c3372645b2ccec3a4f3e439fca9e4 Mon Sep 17 00:00:00 2001
From: root <root@oscloud5.stglabs.ibm.com>
Date: Wed, 1 Nov 2017 16:52:00 +0000
Subject: [PATCH] openstack-tripleo-common

---
 workbooks/baremetal.yaml   |  4 ----
 workbooks/validations.yaml | 39 ++++++++-------------------------------
 2 files changed, 8 insertions(+), 35 deletions(-)

diff --git a/workbooks/baremetal.yaml b/workbooks/baremetal.yaml
index 90bca8a..e1f978d 100644
--- a/workbooks/baremetal.yaml
+++ b/workbooks/baremetal.yaml
@@ -147,8 +147,6 @@ workflows:
      - nodes_json
      - remove: False
      - queue_name: tripleo
-     - kernel_name: null
-     - ramdisk_name: null
      - instance_boot_option: local
      - initial_state: manageable
 
@@ -181,8 +179,6 @@ workflows:
         input:
            nodes_json: <% $.nodes_json %>
            remove: <% $.remove %>
-           kernel_name: <% $.kernel_name %>
-           ramdisk_name: <% $.ramdisk_name %>
            instance_boot_option: <% $.instance_boot_option %>
         publish:
           registered_nodes: <% task(register_or_update_nodes).result %>
diff --git a/workbooks/validations.yaml b/workbooks/validations.yaml
index 5cb9ad7..2bd72b8 100644
--- a/workbooks/validations.yaml
+++ b/workbooks/validations.yaml
@@ -273,15 +273,11 @@ workflows:
 
   check_boot_images:
     input:
-      - deploy_kernel_name: 'bm-deploy-kernel'
-      - deploy_ramdisk_name: 'bm-deploy-ramdisk'
       - run_validations: true
       - queue_name: tripleo
     output:
       errors: <% $.errors %>
       warnings: <% $.warnings %>
-      kernel_id: <% $.kernel_id %>
-      ramdisk_id: <% $.ramdisk_id %>
     tags:
       - tripleo-common-managed
     tasks:
@@ -300,18 +296,12 @@ workflows:
         action: tripleo.validations.check_boot_images
         input:
           images: <% $.images %>
-          deploy_kernel_name: <% $.deploy_kernel_name %>
-          deploy_ramdisk_name: <% $.deploy_ramdisk_name %>
         on-success: send_message
         on-error: fail_check_images
         publish:
-          kernel_id: <% task(check_images).result.kernel_id %>
-          ramdisk_id: <% task(check_images).result.ramdisk_id %>
           warnings: <% task(check_images).result.warnings %>
           errors: <% task(check_images).result.errors %>
         publish-on-error:
-          kernel_id: <% task(check_images).result.kernel_id %>
-          ramdisk_id: <% task(check_images).result.ramdisk_id %>
           warnings: <% task(check_images).result.warnings %>
           errors: <% task(check_images).result.errors %>
 
@@ -333,8 +323,6 @@ workflows:
                 status: <% $.get('status', 'SUCCESS') %>
                 message: <% $.get('message', '') %>
                 execution: <% execution() %>
-                kernel_id: <% $.kernel_id %>
-                ramdisk_id: <% $.ramdisk_id %>
                 errors: <% $.errors %>
                 warnings: <% $.warnings %>
         on-success:
@@ -400,8 +388,6 @@ workflows:
 
   check_ironic_boot_configuration:
     input:
-      - kernel_id: null
-      - ramdisk_id: null
       - run_validations: true
       - queue_name: tripleo
     output:
@@ -419,7 +405,7 @@ workflows:
 
       get_ironic_nodes:
         action: ironic.node_list
-        on-success: check_node_boot_configuration
+        on-success: get_images
         on-error: failed_get_ironic_nodes
         input:
           provision_state: available
@@ -434,12 +420,17 @@ workflows:
           status: FAILED
           message: <% task(get_ironic_nodes).result %>
 
+      get_images:
+        action: glance.images_list
+        on-success: check_node_boot_configuration
+        publish:
+          images: <% task(get_images).result %>
+
       check_node_boot_configuration:
         action: tripleo.validations.check_node_boot_configuration
         input:
           node: <% $.node %>
-          kernel_id: <% $.kernel_id %>
-          ramdisk_id: <% $.ramdisk_id %>
+          images: <% $.images %>
         with-items: node in <% $.nodes %>
         on-success: send_message
         on-error: fail_check_node_boot_configuration
@@ -672,8 +663,6 @@ workflows:
 
   check_pre_deployment_validations:
     input:
-      - deploy_kernel_name: 'bm-deploy-kernel'
-      - deploy_ramdisk_name: 'bm-deploy-ramdisk'
       - roles_info: {}
       - stack_id: overcloud
       - parameters: {}
@@ -684,8 +673,6 @@ workflows:
     output:
       errors: <% $.errors %>
       warnings: <% $.warnings %>
-      kernel_id: <% $.kernel_id %>
-      ramdisk_id: <% $.ramdisk_id %>
       flavors: <% $.flavors %>
       statistics: <% $.statistics %>
     tags:
@@ -700,20 +687,14 @@ workflows:
       check_boot_images:
         workflow: check_boot_images
         input:
-          deploy_kernel_name: <% $.deploy_kernel_name %>
-          deploy_ramdisk_name: <% $.deploy_ramdisk_name %>
           run_validations: <% $.run_validations %>
           queue_name: <% $.queue_name %>
         publish:
           errors: <% $.errors + task(check_boot_images).result.errors %>
           warnings: <% $.warnings + task(check_boot_images).result.warnings %>
-          kernel_id: <% task(check_boot_images).result.kernel_id %>
-          ramdisk_id: <% task(check_boot_images).result.ramdisk_id %>
         publish-on-error:
           errors: <% $.errors + task(check_boot_images).result.errors %>
           warnings: <% $.warnings + task(check_boot_images).result.warnings %>
-          kernel_id: <% task(check_boot_images).result.kernel_id %>
-          ramdisk_id: <% task(check_boot_images).result.ramdisk_id %>
           status: FAILED
         on-success: collect_flavors
         on-error: collect_flavors
@@ -739,8 +720,6 @@ workflows:
       check_ironic_boot_configuration:
         workflow: check_ironic_boot_configuration
         input:
-          kernel_id: <% $.kernel_id %>
-          ramdisk_id: <% $.ramdisk_id %>
           run_validations: <% $.run_validations %>
           queue_name: <% $.queue_name %>
         publish:
@@ -801,8 +780,6 @@ workflows:
                 status: <% $.get('status', 'SUCCESS') %>
                 message: <% $.get('message', '') %>
                 execution: <% execution() %>
-                kernel_id: <% $.kernel_id %>
-                ramdisk_id: <% $.ramdisk_id %>
                 flavors: <% $.flavors %>
                 statistics: <% $.statistics %>
                 errors: <% $.errors %>
-- 
1.8.3.1

