Allow to configure public_endpoint

Setting public endpoint is requred when API runing
under Apache/Nginx with https enabled.

Change-Id: Ib40fc50e9556f546fb20b83011ebe35bb57d032f
Related-Prod: PROD-18020
diff --git a/ironic/files/newton/ironic.conf b/ironic/files/newton/ironic.conf
index 2d1b554..07f1015 100644
--- a/ironic/files/newton/ironic.conf
+++ b/ironic/files/newton/ironic.conf
@@ -626,7 +626,11 @@
 # If the API is operating behind a proxy, you will want to
 # change this to represent the proxy's URL. Defaults to None.
 # (string value)
+{%- if api.public_endpoint is defined %}
+public_endpoint = {{ api.public_endpoint }}
+{%- else %}
 #public_endpoint = <None>
+{%- endif %}
 
 # Number of workers for OpenStack Ironic API service. The
 # default is equal to the number of CPUs available if that can
diff --git a/ironic/files/ocata/ironic.conf b/ironic/files/ocata/ironic.conf
index a701d2a..0509bad 100644
--- a/ironic/files/ocata/ironic.conf
+++ b/ironic/files/ocata/ironic.conf
@@ -924,7 +924,11 @@
 # If the API is operating behind a proxy, you will want to
 # change this to represent the proxy's URL. Defaults to None.
 # (string value)
+{%- if api.public_endpoint is defined %}
+public_endpoint = {{ api.public_endpoint }}
+{%- else %}
 #public_endpoint = <None>
+{%- endif %}
 
 # Number of workers for OpenStack Ironic API service. The
 # default is equal to the number of CPUs available if that can
diff --git a/ironic/files/pike/ironic.conf b/ironic/files/pike/ironic.conf
index a701d2a..0509bad 100644
--- a/ironic/files/pike/ironic.conf
+++ b/ironic/files/pike/ironic.conf
@@ -924,7 +924,11 @@
 # If the API is operating behind a proxy, you will want to
 # change this to represent the proxy's URL. Defaults to None.
 # (string value)
+{%- if api.public_endpoint is defined %}
+public_endpoint = {{ api.public_endpoint }}
+{%- else %}
 #public_endpoint = <None>
+{%- endif %}
 
 # Number of workers for OpenStack Ironic API service. The
 # default is equal to the number of CPUs available if that can