users = 20 direction = "SRC_TO_DEST" topology = "FULL_MESH" appmix = ixchariotApi.createApplicationMix(name, objective, users, direction, topology) session.httpPost("config/ixchariot/appMixes", data=appmix) # Configure endpoints for the AppMix # This demonstrates how to manually assign endpoints to the test configuration using known IP addresses. # If you want to assign an endpoint discovered by the Registration Server, use the ixchariotApi.getEndpointFromResourcesLibrary() function # to get the data for httpPost for src_Endpoint in src_EndpointsList: ips = src_Endpoint.split('/') session.httpPost("config/ixchariot/appMixes/1/network/sourceEndpoints", data=ixchariotApi.createEndpoint(ips[0], ips[1])) for dst_Endpoint in dst_EndpointsList: ips = dst_Endpoint.split('/') session.httpPost( "config/ixchariot/appMixes/1/network/destinationEndpoints", data=ixchariotApi.createEndpoint(ips[0], ips[1])) # Add applications to the AppMix # appName appRatio appList = [["Facebook", 10], ["Yahoo Mail", 40], ["YouTube Enterprise", 50]] for i in range(0, len(appList)): appData = appList[i] appName = appData[0] appRatio = appData[1]
# Create a new FlowGroup name = "FlowGroup 1" direction = "SRC_TO_DEST" topology = "FULL_MESH" flowgroup = ixchariotApi.createFlowGroup(name, direction, topology) session.httpPost("config/ixchariot/flowGroups", data = flowgroup) # Configure endpoints for the FlowGroup # This demonstrates how to manually assign endpoints to the test configuration using known IP addresses. # If you want to assign an endpoint discovered by the Registration Server, use the ixchariotApi.getEndpointFromResourcesLibrary() function # to get the data for httpPost for src_Endpoint in src_EndpointsList: ips = src_Endpoint.split('/') session.httpPost("config/ixchariot/flowGroups/1/network/sourceEndpoints", data = ixchariotApi.createEndpoint(ips[0], ips[1])) for dst_Endpoint in dst_EndpointsList: ips = dst_Endpoint.split('/') session.httpPost("config/ixchariot/flowGroups/1/network/destinationEndpoints", data = ixchariotApi.createEndpoint(ips[0], ips[1])) # Add flows to the FlowGroup # flowName, users, protocol, source QoS, destination QoS flowList = [ # Voice Flow ["G.711u (64 kbps)", 1, "RTP", "Voice", "None"], ] for i in range (0, len(flowList)):