This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
def getAuthToken(context, inputs): | |
if "verify" not in inputs.keys(): | |
inputs["verify"] = True | |
headers = {'Content-type':'application/json','Accept':'application/json'} | |
payload = { | |
'username':inputs["username"], | |
'authSource':inputs["authSource"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
def getResourceId(context, inputs): | |
if "verify" not in inputs.keys(): | |
inputs["verify"] = True | |
headers = {'Content-type':'application/json','Accept':'application/json','Authorization':'vRealizeOpsToken '+ inputs["token"]} | |
payload = { | |
'propertyName':'summary|UUID', | |
'propertyValue':inputs["vmUUID"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
def installAgent(context, inputs): | |
if "verify" not in inputs.keys(): | |
inputs["verify"] = True | |
print(inputs["verify"]) | |
headers = {'Content-type':'application/json','Accept':'application/json','Authorization':'vRealizeOpsToken '+ inputs["token"]} | |
payload = { | |
"resourceCredentials" : [ { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import logging | |
def getBootstrapStatus(context, inputs): | |
if "verify" not in inputs.keys(): | |
inputs["verify"] = True | |
headers = {'Content-type':'application/json','Accept':'application/json','Authorization':'vRealizeOpsToken '+ inputs["token"]} | |
r = requests.request('GET','https://'+inputs["vropsHost"]+'/suite-api/api/applications/agents/'+inputs["taskId"]+'/status', headers=headers, verify=inputs["verify"]) | |
if (r.status_code == 200): |
OlderNewer