def addChassisList(connection, sessionUrl, chassisList): ''' This method is used to add one or more chassis to the chassis list. Args: - connection is the connection object that manages the HTTP data transfers between the client and the REST API - sessionUrl is the address of the session that should run the test - chassisList is the list of chassis that will be added to the chassis chain. ''' chassisListUrl = "%s/ixload/chassisChain/chassisList" % (sessionUrl) for chassisName in chassisList: data = {"name": chassisName} chassisId = performGenericPost(connection, chassisListUrl, data) #refresh the chassis refreshConnectionUrl = "%s/%s/operations/refreshConnection" % (chassisListUrl, chassisId) performGenericOperation(connection, refreshConnectionUrl, {}) Name: #agentActionListUrl = "%s/%s/agent/actionList" % (activityListUrl, activity.objectID) agentUrl = "%s/%s/agent" % (activityListUrl, activity.objectID) agent = connection.httpGet(agentUrl) for link in agent.links: if link.rel in ['actionList', 'commandList']: commandListUrl = normalizeLink(link.href) return commandListUrl