--data '{"account": [ { "name": "osmjuju", "account-type": "juju", "juju": { "ip-address": "'$JUJU_CONTROLLER_IP'", "port": "17070", "user": "admin", "secret": "'$JUJU_PASSWD'" } } ]}')
[[ $result =~ .*success.* ]] || FATAL "Failed config-agent configuration: $result"
+ #R1/R2 config line
+ #result=$(curl -k --request PUT \
+ # --url https://$SO_CONTAINER_IP:8008/api/config/resource-orchestrator \
+ # --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 '{ "openmano": { "host": "'$RO_CONTAINER_IP'", "port": "9090", "tenant-id": "'$RO_TENANT_ID'" }, "name": "osmopenmano", "account-type": "openmano" }')
+
result=$(curl -k --request PUT \
- --url https://$SO_CONTAINER_IP:8008/api/config/resource-orchestrator \
+ --url https://$SO_CONTAINER_IP:8008/api/config/project/default/ro-account/account \
--header 'accept: application/vnd.yang.data+json' \
--header 'authorization: Basic YWRtaW46YWRtaW4=' \
- --header 'cache-control: no-cache' \
+ --header 'cache-control: no-cache' \
--header 'content-type: application/vnd.yang.data+json' \
- --data '{ "openmano": { "host": "'$RO_CONTAINER_IP'", "port": "9090", "tenant-id": "'$RO_TENANT_ID'" }, "name": "osmopenmano", "account-type": "openmano" }')
+ --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"
}
# if develop, we force master
[ -z "$COMMIT_ID" ] && [ -n "$DEVELOP" ] && COMMIT_ID="master"
-# if master, force install from source
-[ -n "$COMMIT_ID" ] && [ "$COMMIT_ID" == "master" ] && INSTALL_FROM_SOURCE="y"
+# forcing source from master removed. Now only install from source when explicit
+# [ -n "$COMMIT_ID" ] && [ "$COMMIT_ID" == "master" ] && INSTALL_FROM_SOURCE="y"
if [ -n "$TEST_INSTALLER" ]; then
echo -e "\nUsing local devops repo for OSM installation"
wget -q -O- https://osm-download.etsi.org/ftp/osm-2.0-two/README.txt &> /dev/null
+# use local devops for containers
+export OSM_USE_LOCAL_DEVOPS=true
if [ -z "$INSTALL_FROM_SOURCE" ]; then
echo -e "\nCreating the containers and installing from binaries ..."
$OSM_DEVOPS/jenkins/host/install RO $REPOSITORY $RELEASE $REPOSITORY_KEY $REPOSITORY_BASE || FATAL "RO install failed"