From edd5b8faee9702698aab323c5a62e9442c77c0d4 Mon Sep 17 00:00:00 2001
From: Dmitry Tantsur <divius.inside@gmail.com>
Date: Wed, 19 Sep 2018 15:34:01 +0200
Subject: [PATCH] Expose IronicImageDownloadSource as a parameter

Setting this to "http" allows using the direct deploy interface
without Swift. It is particularly useful in the Edge case, as it
allows to download an image once to the conductor, and serve it
to all nodes within the location, without having Swift there.

Depends-On: https://review.openstack.org/#/c/601314/
Change-Id: Ifc6a809a45a2a08e5bb11f95b04ac4d69dada3c4
---
 puppet/services/ironic-conductor.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/puppet/services/ironic-conductor.yaml b/puppet/services/ironic-conductor.yaml
index 8816f60a7a..a850d4ddb8 100644
--- a/puppet/services/ironic-conductor.yaml
+++ b/puppet/services/ironic-conductor.yaml
@@ -164,6 +164,12 @@ parameters:
     default: false
     description: Whether to enable use of staging drivers.
     type: boolean
+  IronicImageDownloadSource:
+    default: swift
+    description: Image delivery method for the "direct" deploy interface.
+                 Use "swift" for the Object Storage temporary URLs,
+                 use "http" for the local HTTP server (the same as for iPXE).
+    type: string
   IronicIPXEEnabled:
     default: true
     description: Whether to use iPXE instead of PXE for deployment.
@@ -299,6 +305,7 @@ outputs:
               - service_debug
               - 'always'
               - 'on_failure'
+            ironic::drivers::agent::image_download_source: {get_param: IronicImageDownloadSource}
             # NOTE(emilien): ILO defaulting to UEFI does not match other drivers so bios is used.
             ironic::drivers::ilo::default_boot_mode: 'bios'
             ironic::drivers::interfaces::enabled_bios_interfaces: {get_param: IronicEnabledBiosInterfaces}