aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/vCPE/scripts
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2018-06-07 12:45:35 -0400
committerMarco Platania <platania@research.att.com>2018-06-07 12:45:35 -0400
commitc4ad09e8e4f30acc2f29441a0efb3fca103a5d9c (patch)
treeec160a848556e5d612ebe0754fcd5a273009e1ea /vnfs/vCPE/scripts
parent93884c653fbc8552c2945437c227e8e59ae9fd32 (diff)
Add script for Change Management
Change-Id: Id59d701913d18cdb0cf0bfdcc79cd79563db4aa4 Issue-ID: SO-602 Signed-off-by: Marco Platania <platania@research.att.com>
Diffstat (limited to 'vnfs/vCPE/scripts')
-rw-r--r--vnfs/vCPE/scripts/inPlaceSoftwareUpgrade_vGW.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/vnfs/vCPE/scripts/inPlaceSoftwareUpgrade_vGW.sh b/vnfs/vCPE/scripts/inPlaceSoftwareUpgrade_vGW.sh
new file mode 100644
index 00000000..6b71b533
--- /dev/null
+++ b/vnfs/vCPE/scripts/inPlaceSoftwareUpgrade_vGW.sh
@@ -0,0 +1,49 @@
+root@onap-so:~# cat /root/inPlaceSoftwareUpgrade_vGW.sh
+#!/bin/bash
+
+tmp=/tmp/send$$
+trap "rm -f $tmp.*; exit 1" 0 1 2 15
+
+user="InfraPortalClient:password1$"
+serviceInstance="a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+vnf="1ae8197f-8496-41e1-9695-dce9fd77315a"
+apiVer=v6
+
+url="http://localhost:8080/ecomp/mso/infra/serviceInstances/$apiVer/$serviceInstance/vnfs/$vnf/inPlaceSoftwareUpdate"
+
+(
+cat << 'XEOF'
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "ek1439"
+ },
+ "cloudConfiguration": {
+ "tenantId": "d570c718cbc545029f40e50b75eb13df",
+ "lcpCloudRegionId": "RegionOne"
+ },
+ "requestParameters": {
+ "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}",
+ "controllerType": "sdnc"
+ }
+ },
+ "serviceInstanceId": "$serviceInstance",
+ "vnfInstanceId": "$vnf"
+}
+
+XEOF
+) > $tmp.content || exit 1
+
+# Enabling debug logging for API-Handler-Infra . . .
+curl -o /dev/null -w '%{http_code}' --user 'MSOClient:password1$' 'http://mso:8080/ecomp/mso/infra/logging/debug?enable=true'
+
+# Enabling debug logging for BPMN . . .
+curl -o /dev/null -w '%{http_code}' 'http://mso:8080/mso/logging/debug?enable=true'
+
+# Enabling debug logging for SDNC-Adapter . . .
+curl -o /dev/null -w '%{http_code}' --user 'MSOClient:password1$' 'http://mso:8080/adapters/rest/logging/debug?enable=true'
+
+# Send the request
+curl -v -X POST -d @$tmp.content --user "$user" "$url" --header "Content-Type:application/json"