Merge "Handle barbican endpoint options"
diff --git a/oslo_templates/files/queens/castellan/_barbican.conf b/oslo_templates/files/queens/castellan/_barbican.conf
index 9068b67..d7b231d 100644
--- a/oslo_templates/files/queens/castellan/_barbican.conf
+++ b/oslo_templates/files/queens/castellan/_barbican.conf
@@ -6,6 +6,9 @@
# Use this endpoint to connect to Barbican, for example:
# "http://localhost:9311/" (string value)
#barbican_endpoint = <None>
+{%- if _data.barbican_endpoint is defined %}
+barbican_endpoint = {{ _data.barbican_endpoint }}
+{%- endif %}
# Version of the Barbican API, for example: "v1" (string value)
#barbican_api_version = <None>
@@ -26,11 +29,11 @@
# certificate will not be validated (boolean value)
#verify_ssl = true
-# Specifies the type of endpoint. Allowed values are: public, private, and
+# Specifies the type of endpoint. Allowed values are: public, internal, and
# admin (string value)
# Possible values:
# public - <No description provided>
# internal - <No description provided>
# admin - <No description provided>
#barbican_endpoint_type = public
-
+barbican_endpoint_type = {{ _data.get('barbican_endpoint_type', 'internal') }}
diff --git a/tests/pillar/queens/castellan/_barbican.sls b/tests/pillar/queens/castellan/_barbican.sls
index d22c970..0b30fc2 100644
--- a/tests/pillar/queens/castellan/_barbican.sls
+++ b/tests/pillar/queens/castellan/_barbican.sls
@@ -15,3 +15,5 @@
user_id: id
user: user
version: v1
+ barbican_endpoint: 'http://localhost:9311/'
+ barbican_endpoint_type: public