def updateAgent(endpoint, agentDisplayName, agentDescription, excludeAssetDestinations, includeAssetDestinations, delimitedDestinationMap, agentEssential, transportURL, targetID, agentID, cookie): clearHTTPSession() data = { "agentDisplayName": agentDisplayName, "agentDescription": agentDescription, "excludeAssetDestinations": excludeAssetDestinations, "includeAssetDestinations": includeAssetDestinations, "delimitedDestinationMap": delimitedDestinationMap, "agentEssential": agentEssential, "transportURL": transportURL, "targetID": targetID, "agentID": agentID, "transportType": "RMI" } basepath = '/rest/model/com/oracle/ateam/bcctools/BCCActor' resourcename = 'updateAgent' params = None response = callRESTApi(endpoint, basepath, resourcename, data, 'POST', params, cookie) return response
def getAgent(endpoint, targetName, agentName, cookie): clearHTTPSession() data = {"targetName": targetName, "agentName": agentName} basepath = '/rest/model/com/oracle/ateam/bcctools/BCCActor' resourcename = 'getAgentByName' params = None response = callRESTApi(endpoint, basepath, resourcename, data, 'POST', params, cookie) return response
def isPrimaryTarget(endpoint, targetID, cookie): clearHTTPSession() data = {"targetID": targetID} basepath = '/rest/model/com/oracle/ateam/bcctools/BCCActor' resourcename = 'isPrimaryTarget' params = None response = callRESTApi(endpoint, basepath, resourcename, data, 'POST', params, cookie) return response
def login(endpoint, login, password, cookie): clearHTTPSession() data = {"password": password, "login": login} basepath = '/rest/model/atg/userprofiling/InternalProfileActor' resourcename = 'login' params = None response = callRESTApi(endpoint, basepath, resourcename, data, 'POST', params, cookie) return response
def initialDeployment(endpoint, switchTargetID, agentIDs, cookie): clearHTTPSession() data = {"switchTargetID": switchTargetID, "agentIDs": agentIDs} basepath = '/rest/model/com/oracle/ateam/bcctools/BCCActor' resourcename = 'switchAgentDatastores' params = None response = callRESTApi(endpoint, basepath, resourcename, data, 'POST', params, cookie) return response
def initializeTopology(endpoint, targetID, cookie): clearHTTPSession() data = {"surrogateTargetIDToInitOptionMap": targetID} basepath = '/rest/model/com/oracle/ateam/bcctools/BCCActor' resourcename = 'initializeTopology' params = None response = callRESTApi(endpoint, basepath, resourcename, data, 'POST', params, cookie) return response
def initialDeployment(endpoint, targetID, flagAgents, cookie): clearHTTPSession() data = {"initialDeploymentTargetID": targetID, "flagAgents": flagAgents} basepath = '/rest/model/com/oracle/ateam/bcctools/BCCActor' resourcename = 'createInitialDeployment' params = None response = callRESTApi(endpoint, basepath, resourcename, data, 'POST', params, cookie) return response
def listTopologies(endpoint, cookie): clearHTTPSession() basepath = '/rest/model/com/oracle/ateam/bcctools/BCCActor' resourcename = 'getAllTopologies' params = None data = None response = callRESTApi(endpoint, basepath, resourcename, data, 'POST', params, cookie) return response
def deleteAgent(endpoint, agentID, cookie): clearHTTPSession() data = {"agentID": agentID} basepath = '/rest/model/com/oracle/ateam/bcctools/BCCActor' resourcename = 'deleteAgent' params = None response = callRESTApi(endpoint, basepath, resourcename, data, 'POST', params, cookie) return response
def importFromBase64XML(endpoint, xmlData, cookie): clearHTTPSession() data = {"xmlData": xmlData} basepath = '/rest/model/com/oracle/ateam/bcctools/BCCActor' resourcename = 'importFromXML' params = None response = callRESTApi(endpoint, basepath, resourcename, data, 'POST', params, cookie) return response
def logout(endpoint, cookie): clearHTTPSession() basepath = '/rest/model/atg/userprofiling/InternalProfileActor' resourcename = 'logout' params = None data = None response = callRESTApi(endpoint, basepath, resourcename, data, 'POST', params, cookie) return response
def updateTarget(endpoint, targetName, description, flagAgents, targetOneOff, delimitedRepositoryMappings, targetID, cookie): clearHTTPSession() data = { "targetName": targetName, "description": description, "flagAgents": flagAgents, "targetOneOff": targetOneOff, "delimitedRepositoryMappings": delimitedRepositoryMappings, "targetID": targetID } basepath = '/rest/model/com/oracle/ateam/bcctools/BCCActor' resourcename = 'updateTarget' params = None response = callRESTApi(endpoint, basepath, resourcename, data, 'POST', params, cookie) return response
def getSessionConfirmationNumber(endpoint): clearHTTPSession() basepath = '/rest/model/atg/rest/SessionConfirmationActor' resourcename = 'getSessionConfirmationNumber' params = None data = None sessionConf = None cookie = {} response = callRESTApi(endpoint, basepath, resourcename, data, 'GET', params) if response is not None and 'set-cookie' in response.headers: cookie['JSESSIONID'] = response.cookies['JSESSIONID'] jsonResponse = json.loads(response.text) if 'sessionConfirmationNumber' in jsonResponse: sessionConf = jsonResponse['sessionConfirmationNumber'] cookie['_dynSessConf'] = sessionConf return cookie