Horizon: service: Default to v2 API 27/45627/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 18 Oct 2017 21:19:50 +0000 (23:19 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 18 Oct 2017 22:01:45 +0000 (22:01 +0000)
Horizon service definition hardcodes the API version to v3, and
also overrides the value in our reclass model during interpolation.
Adjust the default to '2'.

While at it, move 'reclass' patching later in `salt.sh`, after
the salt formula packages are installed.

JIRA: FUEL-284

Change-Id: I6f63b4d00ae85c82b076b3efef857e7cc4f3fd35
Signed-off-by: Ting Wu <ting.wu@enea.com>
Signed-off-by: Junaid Ali <junaidali.yahya@gmail.com>
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
(cherry picked from commit 68ff467c4c2d9d0f201e2912c97616402f8109a3)

mcp/patches/0011-service.horizon.server.cluster-Default-to-v2-API.patch [new file with mode: 0644]
mcp/patches/patches.list
mcp/scripts/salt.sh

diff --git a/mcp/patches/0011-service.horizon.server.cluster-Default-to-v2-API.patch b/mcp/patches/0011-service.horizon.server.cluster-Default-to-v2-API.patch
new file mode 100644 (file)
index 0000000..2f2fb7c
--- /dev/null
@@ -0,0 +1,33 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2017 Mirantis Inc., Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Thu, 19 Oct 2017 02:03:01 +0200
+Subject: [PATCH] service.horizon.server.cluster: Default to v2 API
+
+Horizon service definition hardcodes the API version to v3, and
+also overrides the value in our reclass model during interpolation.
+Adjust the default to '2'.
+
+Signed-off-by: Ting Wu <ting.wu@enea.com>
+Signed-off-by: Junaid Ali <junaidali.yahya@gmail.com>
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+
+diff --git a/service/horizon/server/cluster.yml b/service/horizon/server/cluster.yml
+--- a/service/horizon/server/cluster.yml
++++ b/service/horizon/server/cluster.yml
+@@ -6,7 +6,7 @@
+   _param:
+     horizon_version: liberty
+     horizon_identity_host: localhost
+-    horizon_identity_version: 3
++    horizon_identity_version: 2
+     horizon_identity_encryption: none
+     horizon_identity_endpoint_type: internalURL
+   horizon:
index 744304d..accdb6b 100644 (file)
@@ -14,3 +14,4 @@
 /usr/share/salt-formulas/env: 0008-Handle-file_recv-option.patch
 /usr/share/salt-formulas/env: 0009-seedng-module-Sync-salt-version.patch
 /usr/share/salt-formulas/env: 0010-maas-region-allow-timeout-override.patch
+/usr/share/salt-formulas/reclass: 0011-service.horizon.server.cluster-Default-to-v2-API.patch
index 0a2b6bb..fc6b101 100755 (executable)
@@ -47,7 +47,6 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s -e << SALT_INSTALL_END
   cp -r ${OPNFV_FUEL_DIR}/mcp/metadata/service /usr/share/salt-formulas/reclass
   cd /srv/salt/reclass/classes/service && \
     ln -sf /usr/share/salt-formulas/reclass/service/opendaylight
-  cd ${OPNFV_FUEL_DIR}/mcp/patches && ./patch.sh patches.list reclass
 
   cd /srv/salt/scripts
   export DEBIAN_FRONTEND=noninteractive
@@ -59,6 +58,7 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s -e << SALT_INSTALL_END
 
   cp -r ${OPNFV_FUEL_DIR}/mcp/salt-formulas/* /usr/share/salt-formulas/env
   cd ${OPNFV_FUEL_DIR}/mcp/patches && ./patch.sh patches.list formulas
+  cd ${OPNFV_FUEL_DIR}/mcp/patches && ./patch.sh patches.list reclass
 
   salt-call state.apply salt
   salt '*' saltutil.sync_all