From 2dd743fd26c444ac7750b3af52b8633955474e6f Mon Sep 17 00:00:00 2001 From: PClem-Sma <65218134+PClem-Sma@users.noreply.github.com> Date: Wed, 13 May 2020 11:51:43 +0200 Subject: [PATCH] Hycu-VM-Archive-Y.json Opcon WebServices Template to run Hycu VM archive to dedicated archive target with YEAR archivingType. Set "@vm_uuid" variable as Hycu uuid of the VM you want to backup. --- Hycu-VM-Archive/Hycu-VM-Archive-Y.json | 68 ++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Hycu-VM-Archive/Hycu-VM-Archive-Y.json diff --git a/Hycu-VM-Archive/Hycu-VM-Archive-Y.json b/Hycu-VM-Archive/Hycu-VM-Archive-Y.json new file mode 100644 index 0000000..3de552c --- /dev/null +++ b/Hycu-VM-Archive/Hycu-VM-Archive-Y.json @@ -0,0 +1,68 @@ +{ + "templateid" : "Hycu-VM-Archive-Year", + "steps" : [ { + "function" : "POST", + "url" : "[[myHycuServer]]/rest/v1.0/vms/archive", + "request" : { + "headers" : [ { + "attribute" : "Authorization", + "value" : "Basic" + } ], + "body" : "{\r\n \"archivingType\": \"YEAR\",\r\n \"vmUuid\": \"@vm_uuid\"\r\n}", + "fileName" : null + }, + "response" : { + "ignoreResult" : false, + "stepCompletionCode" : 202, + "responseDataCheck" : null, + "fileName" : null, + "variables" : [ { + "name" : "@jobUuid", + "value" : "entities[0].jobUuid" + } ] + } + }, { + "function" : "GET", + "url" : "[[myHycuServer]]/rest/v1.0/jobs/@jobUuid", + "request" : { + "headers" : [ { + "attribute" : "Authorization", + "value" : "Basic" + }, { + "attribute" : "Content-Type", + "value" : "application/json" + }, { + "attribute" : "jobUuid", + "value" : "@jobUuid" + } ], + "body" : null, + "fileName" : null + }, + "response" : { + "ignoreResult" : false, + "stepCompletionCode" : 200, + "responseDataCheck" : { + "goodFin" : "OK/WARNING", + "badFin" : "ERROR/FATAL/ABORTED", + "attributeToCheck" : "entities[0].status", + "poll" : true, + "pollDelay" : 10, + "pollInterval" : 20, + "pollMaxTime" : 240 + }, + "fileName" : null, + "variables" : [ ] + } + } ], + "variables" : [ { + "name" : "@User", + "value" : "[[HycuUser]]" + }, { + "name" : "@Password", + "value" : "[[HycuPwd]]" + }, { + "name" : "@vm_uuid", + "value" : "??????" + } ], + "properties" : [ ] +}