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, {})