def addDUT(connection, sessionUrl, dutDict=None): ''' This method is used to add a DUT resource to the active test on the given session Returns the id of the newly added DUT Args: - connection is the connection object that manages the HTTP data transfers between the client and the REST API - dutListUrl is the address that contains the list of DUTs - dutDict contains a comment, the name or the type of the DUT (or all three) DUT types:: Firewall ExternalServer PacketSwitch ServerLoadBalancer VirtualDut By default, when posting using dutDict=None, dutType will be SLB ''' dutListUrl = "%s/ixload/test/activeTest/dutList" % (sessionUrl) return performGenericPost(connection, dutListUrl, dutDict)