def changeCardsInterfaceMode(connection, chassisChainUrl, chassisIp, cardIdList, mode): ''' This method is used to change the interface mode on a list of cards from a chassis. In order to call this method, the desired chassis must be already added and connected. Args: - connection is the connection object that manages the HTTP data transfers between the client and the REST API - chassisChainUrl is the address of the chassisChain resource - chassisIp is the IP or hostname of the chassis that contains the card(s) - cardIdList is a list of card IDs - mode is the interface mode that will be set on the cards. Possible options are (depending on card type): 1G, 10G, 40G, 100G ''' changeCardsInterfaceModeOperationUrl = "%s/operations/changeCardsInterfaceMode" % chassisChainUrl cardIdStr = ",".join([str(cardId) for cardId in cardIdList]) data = {"chassisIp":chassisIp, "cardIdList":cardIdStr, "mode":mode} performGenericOperation(connection, changeCardsInterfaceModeOperationUrl, data)