From 34151f2a7405af3ab3aab76cafeae97d4eb494af Mon Sep 17 00:00:00 2001 From: Jeremy Mordkoff <Jeremy.Mordkoff@riftio.com> Date: Wed, 4 Oct 2017 19:45:37 -0400 Subject: [PATCH] switch from CLI to REST for consistency and because the CLI hates question marks Signed-off-by: Jeremy Mordkoff <Jeremy.Mordkoff@riftio.com> Change-Id: Icd0a4b5e7bc0e83b5c9017c065f5da36747fb444 BUG 348 --- installers/install_osm.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/installers/install_osm.sh b/installers/install_osm.sh index 896eaefd..9d10308c 100755 --- a/installers/install_osm.sh +++ b/installers/install_osm.sh @@ -229,10 +229,24 @@ function configure(){ --data '{"rw-ro-account:account": [ { "openmano": { "host": "'$RO_CONTAINER_IP'", "port": "9090", "tenant-id": "'$RO_TENANT_ID'"}, "name": "osmopenmano", "ro-account-type": "openmano" }]}') [[ $result =~ .*success.* ]] || FATAL "Failed resource-orchestrator configuration: $result" - lxc exec SO-ub -- /usr/rift/rift-shell -- rwcli --username admin --passwd admin <<EOF -config -openidc-provider-config rw-ui-client redirect-uri https://$DEFAULT_IP:8443/callback post-logout-redirect-uri https://$DEFAULT_IP:8443/ -EOF + result=$(curl -k --request PATCH \ + --url https://$SO_CONTAINER_IP:8008/v2/api/config/openidc-provider-config/rw-ui-client/redirect-uri \ + --header 'accept: application/vnd.yang.data+json' \ + --header 'authorization: Basic YWRtaW46YWRtaW4=' \ + --header 'cache-control: no-cache' \ + --header 'content-type: application/vnd.yang.data+json' \ + --data '{"redirect-uri": "https://'$DEFAULT_IP':8443/callback" }') + [[ $result =~ .*success.* ]] || FATAL "Failed redirect-uri configuration: $result" + + result=$(curl -k --request PATCH \ + --url https://$SO_CONTAINER_IP:8008/v2/api/config/openidc-provider-config/rw-ui-client/post-logout-redirect-uri \ + --header 'accept: application/vnd.yang.data+json' \ + --header 'authorization: Basic YWRtaW46YWRtaW4=' \ + --header 'cache-control: no-cache' \ + --header 'content-type: application/vnd.yang.data+json' \ + --data '{"post-logout-redirect-uri": "https://'$DEFAULT_IP':8443/?api_server=https://'$DEFAULT_IP'" }') + [[ $result =~ .*success.* ]] || FATAL "Failed post-logout-redirect-uri configuration: $result" + lxc exec SO-ub -- tee /etc/network/interfaces.d/60-rift.cfg <<EOF auto lo:1 iface lo:1 inet static -- GitLab