8.3.2.5. Connection Group
This module contains the L47 connection group classes that deal with configuration of TCP connections and are specific to L47. The commands have the form P4G_<xxx>
and require a module index id and a port index id, and a connection group index id.
A Connection Group (CG) is the basic building block when creating L47 traffic. A CG consists of a number of TCP connections - between one and millions. A CG has a role, which is either client or server. In order to create TCP connections between two ports on a L47 chassis, two matching CGs must be configured - one on each port - one configured as client and the other configured as server.
The number of connections in a CG, is defined by the server range and the client range. A server/client range is a number of TCP connection endpoints defined by a number of IP addresses and a number of TCP ports. A server/client range is configured by specifying a start IP address, a number of IP addresses, a start TCP port and a number of TCP addresses. The number of clients is the number of client IP addresses times the number of client TCP ports, and the same goes for the number of servers. The number of TCP connections in a CG is the number of clients times the number of servers, that is TCP connections are created from all clients in the CG to all servers in the CG.
Note
Connection Group index must start from 0.
Note
When configuring a CG, both client AND server range must be configured on both CGs - that is, the server CG must also know the client range and vice versa.
A CG must be configured with a Load Profile, which is an envelope over the TCP connection’s lifetime. A connection in the CG goes through three phases. A load profile defines a start time and a duration of each of these phases. During the ramp-up phase connections are established at a rate defined by the number of connections divided by the ramp-up duration. During the steady-state phase connections may transmit and receive payload data, depending on the configuration of test application and test scenario for the CG. During the ramp-down phase connections are closed at a rate defined by the number of connections divided by the ramp-up duration, if they were not already closed as a result of the traffic scenario configured.
Note
Just like client and server range, both the client and server CGs must be configured with the load profile.
Next the CG must be configured with a test application, which defines what kind of traffic is transported in the TCP payload. Currently there are two kinds of test applications:
NONE
, which means that no payload is sent on the TCP connections. This test application is suitable for a test, where the only purpose is to measure TCP connection open and close rates.RAW
, which means that the TCP connections transmit and receive user defined raw data. The contents of the raw TCP payload can be configured using the P4G_RAW_PAYLOAD command. Raw TCP payload can also be specified as random and incrementing data.
Using test application RAW
, the CG must also be configured with a test scenario, which defines the data flow between the TCP client and server. Currently the following test scenarios can be configured: download
, upload
, and both
.
By combining several CGs on a port, it is possible to create more complex traffic scenarios and more complex load profile shapes than the individual CG allows.
- class P4G_APP_REPLAY_COUNTERS[source]
Bases:
object
Returns NAT collisions of a replay application.
- class P4G_APP_TRANSACTION_COUNTERS[source]
Bases:
object
Returns request/response transaction statistics.
- class P4G_APP_TRANSACTION_HIST[source]
Bases:
object
Returns a histogram over completed request/response transactions per connection, with start and interval values as configured by P4G_TRANSACTION_HIST_CONF`.
- class P4G_CLEAR_COUNTERS[source]
Bases:
object
Clears all run-time statistics for the Connection Group.
- class P4G_CLEAR_POST_STAT[source]
Bases:
object
Clears all TCP Connection Group post-test statistics.
- class P4G_CLIENT_RANGE[source]
Bases:
object
Specifies a number of client sockets (ip address, port number)
- get()[source]
Get the number of client sockets (ip address, port number)
- Returns:
the number of client sockets (ip address, port number)
- Return type:
P4G_CLIENT_RANGE.GetDataAttr
- set(ipv4_address, address_count, start_port, port_count, max_address_count)[source]
Set the number of client sockets (ip address, port number)
- Parameters:
ipv4_address (ipaddress.IPv4Address) – the start IP address of the address range
address_count (int) – the number of IP addresses
start_port (int) – the starting port number of the port range
port_count (int) – the number of ports
max_address_count (int) – the maximum number of IP addresses that this Connection Group will use, when connection incarnation is set to
REINCARNATE
- class P4G_COMMENT[source]
Bases:
object
The description of a Connection Group.
- class P4G_CREATE[source]
Bases:
object
Creates an empty Connection Group with the specified sub-index value.
- class P4G_DELETE[source]
Bases:
object
Deletes a Connection Group with the specified sub-index value.
- class P4G_ENABLE[source]
Bases:
object
Enable/disable/suppress a previously created Connection Group with the specified sub-index value.
- get()[source]
Get the state of a Connection Group on a port.
- Returns:
the state of a Connection Group on a port.
- Return type:
P4G_ENABLE.GetDataAttr
- set(status)[source]
Enable/disable/suppress a previously created Connection Group with the specified sub-index value.
- Parameters:
status (OnOffWithSuppress) – specifies the state of the Connection Group.
- set_off()
Disable a Connection Group of with the specified index.
- set_on()
Enable a Connection Group of with the specified index.
- set_suppress()
Suppress a Connection Group of with the specified index.
- class P4G_INDICES[source]
Bases:
object
The full list of Connection Groups on this port. These are the sub-index that are used for the parameters that specify TCP connection behavior.
- class P4G_IPV4_CLIENT_ADDRESS_POOL[source]
Bases:
object
Configure the group’s client to use ip addresses from this pool
- set(concurrent_address_count, start_port, port_count, address_pool)[source]
Set a pool of ip addresses for the client role of this group
- Parameters:
concurrent_address_count (int) – the number of concurrent ip addresses, this value should be less than the number of addresses in the address pool
start_port (int) – the starting port number of the port range
port_count (int) – the number of ports
address_pool (List[GroupAddressElem]) –
IP address
Subnet Mask
MAC address
- class P4G_IPV4_SERVER_ADDRESS_POOL[source]
Bases:
object
Configure the group’s server to use ip addresses from this pool
- set(concurrent_address_count, start_port, port_count, address_pool)[source]
Set a pool of ip addresses for the server role of this group
- Parameters:
concurrent_address_count (int) – the number of concurrent ip addresses, this value should be less than the number of addresses in the address pool
start_port (int) – the starting port number of the port range
port_count (int) – the number of ports
address_pool (List[GroupAddressElem]) –
IP address
Subnet Mask
MAC address
- class P4G_IPV6_CLIENT_RANGE[source]
Bases:
object
Specifies the number of client sockets (IPv6 address, port number).
- get()[source]
Get the number of client sockets (IPv6 address, port number).
- Returns:
the number of client sockets (IPv6 address, port number).
- Return type:
P4G_IPV6_CLIENT_RANGE.GetDataAttr
- set(ipv6_address, address_count, start_port, port_count, max_address_count)[source]
Set the number of client sockets (IPv6 address, port number).
- Parameters:
ipv6_address (ipaddress.IPv6Address) – the start ip address of the address range
address_count (int) – the number of IPv6 addresses
start_port (int) – the start port number of the port range
port_count (int) – the number of ports
max_address_count (int) – the maximum number of IPv6 addresses that this Connection Group will use, when connection incarnation is set to
REINCARNATE
- class P4G_IPV6_FLOW_LABEL[source]
Bases:
object
Configure the value of the flow label field of the IPv6 header.
- class P4G_IPV6_SERVER_RANGE[source]
Bases:
object
Specifies the number of server sockets (IPv6 address, port number)
- get()[source]
Get the number of server sockets (IPv6 address, port number).
- Returns:
the number of server sockets (IPv6 address, port number)
- Return type:
P4G_IPV6_SERVER_RANGE.GetDataAttr
- set(ipv6_address, address_count, start_port, port_count)[source]
Set the number of server sockets (IPv6 address, port number).
- Parameters:
ipv6_address (ipaddress.IPv6Address) – the start IPv6 address of the address range
address_count (int) – the number of IPv6 addresses
start_port (int) – the start port number of the port range
port_count (int) – the number of ports
- class P4G_IPV6_TRAFFIC_CLASS[source]
Bases:
object
Configure the value of the traffic class field of the IPv6 header.
- class P4G_IP_DS_MASK[source]
Bases:
object
Specify a bit mask to be applied to the DS field. If the fixed value is fixed, the current (calculated) value is curr, and the mask is mask, then the effective DS will be calculated as follows: (fixed AND (NOT mask)) OR (curr AND mask) or in C syntax (fixed & (~mask)) | (curr & mask)
- class P4G_IP_DS_MINMAX[source]
Bases:
object
Configure the min and max values of the range for the calculated part of the DS value. Both values are included in the range. Relevant when P4G_IP_DS_TYPE` is set to
INCREMENT
orRANDOM
.
- class P4G_IP_DS_STEP[source]
Bases:
object
Specifies the incrementing step size for the calculated part of the DS value. Relevant when P4G_IP_DS_TYPE` is set to
INCREMENT
.
- class P4G_IP_DS_TYPE[source]
Bases:
object
Configure the mode of the DS field of the IP header of this Connection Group.
- get()[source]
Get the value of the DS field of the IP header of this Connection Group.
- Returns:
the mode of the DS field
- Return type:
P4G_IP_DS_TYPE.GetDataAttr
- set(ds_type)[source]
Set the value of the DS field of the IP header of this Connection Group.
- Parameters:
ds_type (MSSType) – specifying how to fill out the DS field
- set_fixed()
Use fixed value for DS.
- set_increment()
Use incrementing values for DS.
- set_random()
Use pseudorandom values for DS.
- class P4G_IP_DS_VALUE[source]
Bases:
object
Specify the (FIXED) value used for DS.
- class P4G_IP_VERSION[source]
Bases:
object
Specifies either IPv4 or IPv6.
- get()[source]
Get the IP version of a Connection Group.
- Returns:
the IP version of a Connection Group.
- Return type:
P4G_IP_VERSION.GetDataAttr
- set(version_number)[source]
Set the IP version of a Connection Group.
- Parameters:
version_number (L47IPVersion) – IP version
- set_ipv4()
Set IP version to IPv4.
- set_ipv6()
Set IP version to IPv6.
- class P4G_L2_CLIENT_MAC[source]
Bases:
object
Configure the client MAC address. This is either a single static MAC address or an embedding of the four byte IPv4 address into the lower 4 bytes of the 6 byte MAC address.
- get()[source]
Get the client MAC address.
- Returns:
the client MAC address
- Return type:
P4G_L2_CLIENT_MAC.GetDataAttr
- set(mac_address, mode)[source]
Set the client MAC address.
- Parameters:
mac_address (Hex) – the MAC address specified as hexadecimal
mode (EmbedIP) – whether to embed the IP address in MAC
- set_dont_embed_ip(mac_address, *, mode=EmbedIP.DONT_EMBED_IP)
Not embed IP address in MAC address.
- set_embed_ip(mac_address, *, mode=EmbedIP.EMBED_IP)
Embed IP address in MAC address.
- class P4G_L2_GW[source]
Bases:
object
Specify a default gateway for IPv4.
- get()[source]
Get the settings of the default gateway for IPv4.
- Returns:
IPv4 address and MAC address of the default gateway for IPv4.
- Return type:
P4G_L2_GW.GetDataAttr
- set(ipv4_address, mac_address)[source]
Set a default gateway for IPv4.
- Parameters:
ipv4_address (ipaddress.IPv4Address) – IPv5 address of the gateway
mac_address (Hex) – the MAC address of the gateway
- class P4G_L2_IPV6_GW[source]
Bases:
object
Specify a default gateway for IPv6.
- get()[source]
Get the settings of the default gateway for IPv6.
- Returns:
IPv6 address and MAC address of the default gateway for IPv6.
- Return type:
P4G_L2_IPV6_GW.GetDataAttr
- set(ipv6_address, mac_address)[source]
Set the default gateway for IPv6.
- Parameters:
ipv6_address (ipaddress.IPv6Address) – the 16 bytes of IPv6 address of gateway
mac_address (Hex) – the MAC address of the gateway
- class P4G_L2_SERVER_MAC[source]
Bases:
object
Configure the server MAC address. This is either a single static MAC address or an embedding of the four byte IPv4 address into the lower 4 bytes of the 6 byte MAC address.
- get()[source]
Get the server MAC address.
- Returns:
the server MAC address
- Return type:
P4G_L2_SERVER_MAC.GetDataAttr
- set(mac_address, mode)[source]
Set the server MAC address.
- Parameters:
mac_address (Hex) – the MAC address specified as hexadecimal
mode (EmbedIP) – whether to embed the IP address in MAC
- set_dont_embed_ip(mac_address, *, mode=EmbedIP.DONT_EMBED_IP)
Not embed IP address in MAC address.
- set_embed_ip(mac_address, *, mode=EmbedIP.EMBED_IP)
Embed IP address in MAC address.
- class P4G_L2_USE_ADDRESS_RES[source]
Bases:
object
Specify whether to use ARP and NDP to resolve hardware (MAC) addresses in the
pre_run
phase.- get()[source]
Get the status of using ARP and NDP to resolve hardware (MAC) addresses.
- Returns:
specifying whether to use ARP and NDP to resolve hardware (MAC) addresses.
- Return type:
P4G_L2_USE_ADDRESS_RES.GetDataAttr
- set(is_enabled)[source]
Set the status of using ARP and NDP to resolve hardware (MAC) addresses.
- Parameters:
is_enabled (YesNo) – specifying whether to use ARP and NDP to resolve hardware (MAC) addresses.
- set_no()
Disable using ARP and NDP to resolve hardware (MAC) addresses.
- set_yes()
Enable using ARP and NDP to resolve hardware (MAC) addresses.
- class P4G_L2_USE_GW[source]
Bases:
object
Specify whether to use the resolved default gateway’s MAC address as the destination MAC address in the packets.
- get()[source]
Get the status of using the resolved default gateway’s MAC address as the destination MAC address in the packets.
- Returns:
the status of using the resolved default gateway’s MAC address as the destination MAC address in the packets
- Return type:
P4G_L2_USE_GW.GetDataAttr
- set(is_enabled)[source]
Set the status of using the resolved default gateway’s MAC address as the destination MAC address in the packets.
- Parameters:
is_enabled (YesNo) – specifying whether to use gateway’s MAC address as the destination MAC address in the packets.
- set_no()
Disable using gateway’s MAC address as the destination MAC address.
- set_yes()
Enable using gateway’s MAC address as the destination MAC address.
- class P4G_L4_PROTOCOL[source]
Bases:
object
Specifies either TCP or UDP as Layer 4 protocol.
- get()[source]
Get the Layer 4 protocol used by the Connection Group.
- Returns:
the Layer 4 protocol used by the Connection Group.
- Return type:
P4G_L4_PROTOCOL.GetDataAttr
- set(protocol_type)[source]
Set the Layer 4 protocol used by the Connection Group.
- Parameters:
protocol_type (L47ProtocolType) – the Layer 4 protocol
- set_tcp()
Use TCP as the Layer 4 protocol of the Connection Group.
- set_udp()
Use UDP as the Layer 4 protocol of the Connection Group.
- class P4G_LP_SHAPE[source]
Bases:
object
Specifies a load profile time duration. Time is measured from the beginning of the test when
P€G_TRAFFIC
is set toON
.- get()[source]
Get the load profile time duration.
- Returns:
the load profile time duration
- Return type:
P4G_LP_SHAPE.GetDataAttr
- class P4G_LP_TIME_SCALE[source]
Bases:
object
Specifies the time scale of the load profile.
- get()[source]
Get the time scale of the load profile.
- Returns:
the time scale of the load profile.
- Return type:
P4G_LP_TIME_SCALE.GetDataAttr
- set(timescale)[source]
Set the time scale of the load profile.
- Parameters:
timescale (Timescale) – specifying the time scale.
- set_hours()
Set the time scale of the load profile to Hours.
- set_minutes()
Set the time scale of the load profile to Minutes.
- set_msecs()
Set the time scale of the load profile to Milliseconds.
- set_seconds()
Set the time scale of the load profile to Seconds.
- class P4G_NAT[source]
Bases:
object
Specify whether to support DUT Source NAT functionality. NAT should be enabled on both Client and Server ports that belong to the same Connection Group.
- get()[source]
Get whether to support DUT Source NAT functionality.
- Returns:
whether to support DUT Source NAT functionality.
- Return type:
P4G_NAT.GetDataAttr
- set(on_off)[source]
Set whether to support DUT Source NAT functionality.
- Parameters:
on_off (OnOff) – specifying whether to enable Source NAT support
- set_off()
Disable source NAT support.
- set_on()
Enable source NAT support.
- class P4G_PAYLOAD_HIST_CONF[source]
Bases:
object
Sets the start value and the interval size for the payload histograms.
- class P4G_RAW_BURSTY_CONF[source]
Bases:
object
Specifies active and inactive periods of bursty transmission in milliseconds. The burst period starts with the active part.
- get()[source]
Get active and inactive periods of bursty transmission in milliseconds.
- Returns:
active and inactive period of bursty transmission in milliseconds.
- Return type:
P4G_RAW_BURSTY_CONF.GetDataAttr
- class P4G_RAW_BURSTY_TX[source]
Bases:
object
Enables or disables bursty transmission.
- get()[source]
Get whether to use bursty transmission.
- Returns:
whether to use bursty transmission.
- Return type:
P4G_RAW_BURSTY_TX.GetDataAttr
- set(bursty)[source]
Set whether to use bursty transmission.
- Parameters:
bursty (OnOff) – whether bursty transmission is on or off.
- set_off()
Disable bursty transmission.
- set_on()
Enable bursty transmission.
- class P4G_RAW_CLOSE_CONN[source]
Bases:
object
Specify how to close TCP connection when all payload has been transmitted.
In raw test scenario
DOWNLOAD
, the server can close the connection, when all payload has been transmitted.In raw test scenario
UPLOAD
, the client can close the connection, when all payload has been transmitted. In any case, both server and client Connection Groups must be configured with the same value of this parameter.In raw test scenario
BOTH
(bidirectional), this parameter is N/A and will be ignored.In a transaction scenario, where P4G_RAW_HAS_DOWNLOAD_REQ` is set to
YES
, both client and server can close the connection, when the last transaction has been completed.When P4G_RAW_CONN_INCARNATION` is set to
IMMORTAL
orREINCARNATE
, and this command is set toNONE
, connections will be closed after ‘connection lifetime’, set by P4G_RAW_CONN_LIFETIME`.Note
This parameter is N/A when P4G_L4_PROTOCOL` is configured as UDP.
- get()[source]
Get how to close TCP connection when all payload has been transmitted.
- Returns:
how to close TCP connection when all payload has been transmitted
- Return type:
P4G_RAW_CLOSE_CONN.GetDataAttr
- set(who_close)[source]
Set how to close TCP connection when all payload has been transmitted.
- Parameters:
who_close (WhoClose) – specifying how to close TCP connection
- set_client()
Client closes the connection after last byte is receiver/transmitted.
- set_none()
Keep the connection open after last byte is transmitted.
- set_server()
Server closes the connection after last byte is transmitted.
- class P4G_RAW_CONN_INCARNATION[source]
Bases:
object
Defines the lifecycle of a connection and how new connections should be established as old connections are closed.
- get()[source]
Get the lifecycle of a connection and how new connections should be established.
- Returns:
the lifecycle of a connection and how new connections should be established.
- Return type:
P4G_RAW_CONN_INCARNATION.GetDataAttr
- set(mode)[source]
Set the lifecycle of a connection and how new connections should be established.
- Parameters:
mode (LifecycleMode) – connection lifecycle mode
- set_immortal()
Connections are established during the ramp-up phase of the load profile, and are closed after the configured lifetime (configured by P4G_RAW_CONN_LIFETIME`). As connections close, new connections are established, attempting to keep the concurrent number of established connections constant. A new connection will have the same IP address as the connection it replaces, but will have a new TCP port number. This will simulate that the user (defined by the client IP address) is living on, and creates new connections as old connections close.
- set_once()
Connections are established during the ramp-up phase and not closed until the ramp-down phase of the load profile. That is, each configured connection only exists once.
- set_reincarnate()
Connections are established during the ramp-up phase of the load profile, and are closed after the configured lifetime (configured by P4G_RAW_CONN_LIFETIME`). As connections close, new connections are established, attempting to keep the concurrent number of established connections constant. A new connection will have the same TCP port number as the connection it replaces, but will have a new IP address. This will simulate that the user (defined by the client IP address) ceases to exist, and new users appear as old users die.
- class P4G_RAW_CONN_LIFETIME[source]
Bases:
object
Defines the lifetime of a connection, when P4G_RAW_CONN_INCARNATION` is set to
IMMORTAL
orREINCARNATE
.- get()[source]
Get the lifetime of a connection.
- Returns:
the lifetime of a connection
- Return type:
P4G_RAW_CONN_LIFETIME.GetDataAttr
- set_hours(lifetime)
Set the time scale of a connection lifetime to hours.
- set_minutes(lifetime)
Set the time scale of a connection lifetime to minutes.
- set_msecs(lifetime)
Set the time scale of a connection lifetime to milliseconds.
- set_seconds(lifetime)
Set the time scale of a connection lifetime to seconds.
- class P4G_RAW_CONN_REPETITIONS[source]
Bases:
object
Defines how many times a new connection should be created, after an old connection has been closed, when P4G_RAW_CONN_INCARNATION` is set to
IMMORTAL
orREINCARNATE
.- get()[source]
Get how many times a new connection should be created after an old connection is closed.
- Returns:
how many times a new connection should be created after an old connection is closed.
- Return type:
P4G_RAW_CONN_REPETITIONS.GetDataAttr
- set(mode, repetition_count)[source]
Set how many times a new connection should be created after an old connection is closed.
- Parameters:
mode (InfiniteOrFinite) – repetition mode.
repetition_count (int) – number of repetitions
- set_finite(repetition_count)
Each configured connection is closed and re-established repetitions number of times.
- set_infinite(repetition_count)
New connections are generated as long as the load profile allows.
- class P4G_RAW_DOWNLOAD_REQUEST[source]
Bases:
object
Specify the content of the download request sent by the client and expected by the server as hex bytes.
Note
This parameter is N/A when P4G_L4_PROTOCOL is configured as UDP.
- class P4G_RAW_HAS_DOWNLOAD_REQ[source]
Bases:
object
Specify whether the server waits for a request from the client before it starts transmitting.
Note
This parameter is N/A when P4G_L4_PROTOCOL` is configured as UDP.
- get()[source]
Get whether the server waits for a request from the client before it starts transmitting.
- Returns:
whether the server waits for a request from the client before it starts transmitting.
- Return type:
P4G_RAW_HAS_DOWNLOAD_REQ.GetDataAttr
- set(on_off)[source]
Set whether the server waits for a request from the client before it starts transmitting.
- Parameters:
on_off (YesNo) – whether the server waits for a request from the client before it starts transmitting.
- set_no()
The server does not wait for a request from the client before it starts transmitting.
- set_yes()
The server waits for a request from the client before it starts transmitting.
- class P4G_RAW_PAYLOAD[source]
Bases:
object
Specify raw payload as hex bytes. This command can be called several times to build a custom payload.
- class P4G_RAW_PAYLOAD_REPEAT_LEN[source]
Bases:
object
Specify the length of the raw payload, which is defined by one or more P4G_RAW_PAYLOAD` commands, to repeat.
P4G_RAW_PAYLOAD_REPEAT_LEN` number of bytes will be repeated until P4G_RAW_PAYLOAD_TOTAL_LEN` bytes are transmitted on the connection.
- class P4G_RAW_PAYLOAD_TOTAL_LEN[source]
Bases:
object
Configure the total amount of payload to transmit on one connection.
- get()[source]
Get the total amount of payload to transmit on one connection.
- Returns:
the total amount of payload to transmit on one connection
- Return type:
P4G_RAW_PAYLOAD_TOTAL_LEN.GetDataAttr
- set(mode, length)[source]
Set the total amount of payload to transmit on one connection.
- Parameters:
mode (InfiniteOrFinite) – generation mode.
length (int) – size of the payload
- set_finite(length)
Stop generating payload after length bytes are transmitted.
- set_infinite(length)
Generates payload as long as test is running.
- class P4G_RAW_PAYLOAD_TYPE[source]
Bases:
object
Specify the payload generation method.
- get()[source]
Get the payload generation method.
- Returns:
payload generation method
- Return type:
P4G_RAW_PAYLOAD_TYPE.GetDataAttr
- set(gen_method)[source]
Set the payload generation method.
- Parameters:
gen_method (PayloadGenerationMethod) – payload generation method
- set_fixed()
Payload has a fixed value - as specified by the P4G_RAW_PAYLOAD` command.
- set_increment()
Payload consist of incrementing bytes.
- set_longrandom()
Payload consists of pseudo random bytes with a repeat cycle of 4 GB.
- set_random()
Payload consists of pseudo random bytes with a repeat cycle of 1 MB.
- class P4G_RAW_REQUEST_REPEAT[source]
Bases:
object
Specify the number of request/response transactions to perform - if P4G_RAW_HAS_DOWNLOAD_REQ` is set to
YES
.Note
This parameter is N/A when P4G_L4_PROTOCOL` is configured as UDP.
- get()[source]
Get the number of request/response transactions to perform.
- Returns:
the number of request/response transactions to perform
- Return type:
P4G_RAW_REQUEST_REPEAT.GetDataAttr
- set(mode, repeat)[source]
Set the number of request/response transactions to perform.
- Parameters:
mode (InfiniteOrFinite) – specifying the transaction mode.
repeat (int) – number of request/response transactions to perform , if mode is
FINITE
.
- set_finite(repeat)
Stop generating request/response transactions after a number of cycles
- set_infinite(repeat)
Repeats request/response transactions as long as test is running.
- class P4G_RAW_RX_PAYLOAD_LEN[source]
Bases:
object
Specify the length of the payload the Client should expect to receive before sending the next download request to the Server. Should be configured identical to the P4G_RAW_PAYLOAD_TOTAL_LEN` for the Server. If mode is set to INFINITE, effectively no request/response repetitions will be performed.
Note
This parameter is N/A when P4G_L4_PROTOCOL` is configured as UDP.
- get()[source]
Get the length of the payload the Client should expect to receive before sending the next download request to the Server.
- Returns:
the length of the payload the Client should expect to receive before sending the next download request to the Server.
- Return type:
P4G_RAW_RX_PAYLOAD_LEN.GetDataAttr
- set(mode, length)[source]
Set the length of the payload the Client should expect to receive before sending the next download request to the Server.
- Parameters:
mode (InfiniteOrFinite) – specifying the payload length mode
length (int) – number of payload bytes the client should receive before sending the next request, if mode is
FINITE
.
- set_finite(length)
Expects a number of bytes of payload defined by the command.
- set_infinite(length)
Expects payload as long as test is running.
- class P4G_RAW_TEST_SCENARIO[source]
Bases:
object
Configure the traffic direction scenario for RAW mode.
- get()[source]
Get the traffic scenario for RAW mode.
- Returns:
the traffic scenario for RAW mode.
- Return type:
P4G_RAW_TEST_SCENARIO.GetDataAttr
- set(scenario)[source]
Set the traffic scenario for RAW mode.
- Parameters:
scenario (TrafficScenario) – traffic scenario
- set_both()
Payload is transmitted in both directions.
- set_download()
Server transmits payload to client.
- set_echo()
Client transmits payload to server, server echoes the payload back
- set_upload()
Client transmits payload to server.
- class P4G_RAW_TX_DURING_RAMP[source]
Bases:
object
Specify if TCP payload transmission should take place during ramp-up and ramp-down.
Note
For UDP connections payload transmission will always take place during ramp-up and ramp-down, and this parameter is therefore N/A.
- get()[source]
Get whether TCP payload transmission should take place during ramp-up and ramp-down.
- Returns:
whether TCP payload transmission should take place during ramp-up and ramp-down.
- Return type:
P4G_RAW_TX_DURING_RAMP.GetDataAttr
- class P4G_RAW_TX_TIME_OFFSET[source]
Bases:
object
Specify a time offset to the transmit start and stop time, if P4G_TX_DURING_RAMP` is set to
NO
for ramp-up and ramp-down respectively.- get()[source]
Get the time offset to the transmit start and stop time.
- Returns:
the time offset to the transmit start and stop time
- Return type:
P4G_RAW_TX_TIME_OFFSET.GetDataAttr
- class P4G_RAW_UTILIZATION[source]
Bases:
object
Specify the link layer bandwidth utilization for all the generated traffic from the specified Raw Connection Group.
- class P4G_RECALC_PAYLOAD_HIST[source]
Bases:
object
Recalculates connection payload histograms (retrieved with: P4G_TCP_RX_TOTAL_BYTES_HIST`, P4G_TCP_RX_GOOD_BYTES_HIST`, P4G_TCP_TX_TOTAL_BYTES_HIST` and P4G_TCP_TX_GOOD_BYTES_HIST`). Used in case payload histogram configuration has been changed (using P4G_PAYLOAD_HIST_CONF`)
- class P4G_RECALC_TIME_HIST[source]
Bases:
object
Recalculates connection time histograms (retrieved with: P4G_TCP_ESTABLISH_HIST` and P4G_TCP_CLOSE_HIST`). Used in case time histogram configuration has been changed (using P4G_TIME_HIST_CONF`).
- class P4G_RECALC_TRANSACTION_HIST[source]
Bases:
object
Recalculates transaction histograms (retrieved with: P4G_APP_TRANSACTION_HIST`). Used in case transaction histogram configuration has been changed (using P4G_TRANSACTION_HIST_CONF`)
- class P4G_REPLAY_FILE_CLEAR[source]
Bases:
object
Clears a Replay File index, so no Replay File is configured for that index.
- class P4G_REPLAY_FILE_INDICES[source]
Bases:
object
Returns an index list of configured Replay Files for this Connection Group. These are the Replay File Index that are used for P4G_REPLAY_FILE_NAME` and P4G_REPLAY_FILE_CLEAR` commands. More than one Replay File can be configured for a Connection Group. When configuring a Replay File for a Connection Group, it must have an index.
- class P4G_REPLAY_FILE_NAME[source]
Bases:
object
More than one Replay File can be configured for a Connection Group. When configuring a Replay File for a Connection Group, it must have an index. The indices at which Replay Files are configured does not have to be continuous.
- class P4G_REPLAY_USER_INCARNATION[source]
Bases:
object
Defines the lifecycle mode of a user and its connections, and how new users should be established as old connections are closed.
- get()[source]
Get the lifecycle mode of a user and its connections.
- Returns:
the lifecycle mode of a user and its connections
- Return type:
P4G_REPLAY_USER_INCARNATION.GetDataAttr
- set(mode)[source]
Set the lifecycle mode of a user and its connections.
- Parameters:
mode (LifecycleMode) – defines the lifecycle mode of connections.
- set_immortal()
Users are created and its connections are established during the ramp-up phase of the load profile. Each connection is closed when all payload in the Replay File for that connection has been transmitted. A user is destroyed when all its connections are closed. As users are destroyed, new users are created, attempting to keep the concurrent number of users constant. A new user will have the same IP address as the user he replaces, but the new connections will have new TCP/UDP port numbers. This will simulate that the user is living on, and creates new connections as old connections close.
- set_once()
Users are created and its connections are established during the ramp-up phase and not closed until the ramp-down phase of the load profile. That is, each configured user only exists once.
- set_reincarnate()
Users are created and its connections are established during the ramp-up phase of the load profile. Each connection is closed when all payload in the Replay File for that connection has been transmitted. A user is destroyed when all its connections are closed. As users are destroyed, new users are created, attempting to keep the concurrent number of users constant. A new user will have a different IP address than the user it replaces, but its connection will have the same TCP/UDP port numbers. This will simulate that the user ceases to exist, and new users appear as old users die.
- class P4G_REPLAY_USER_REPETITIONS[source]
Bases:
object
Defines how many times a new user should be created after an old user has been destroyed, when P4G_REPLAY_USER_INCARNATION` is set to
IMMORTAL
orREINCARNATE
.- get()[source]
Get how many times a new user should be created, after an old user has been destroyed.
- Returns:
how many times a new user should be created, after an old user has been destroyed
- Return type:
P4G_REPLAY_USER_REPETITIONS.GetDataAttr
- set(mode, repetition_count)[source]
Set how many times a new user should be created, after an old user has been destroyed.
- Parameters:
mode (InfiniteOrFinite) – the repetition mode
repetition_count (int) – number of repetitions
- set_finite(repetition_count)
Each configured user is destroyed and re-created repetitions number of times.
- set_infinite(repetition_count)
New users are generated as long as the load profile allows.
- class P4G_REPLAY_UTILIZATION[source]
Bases:
object
Specify the link layer bandwidth utilization for all the generated traffic from the specified Replay Connection Group.
- class P4G_ROLE[source]
Bases:
object
Specifies the client or server role for this Connection Group. A server passively waits for the clients to establish connections.
- get()[source]
Get the role of the Connection Group.
- Returns:
the role of the Connection Group.
- Return type:
P4G_ROLE.GetDataAttr
- set(role)[source]
Set the role of the Connection Group.
- Parameters:
role (Role) – the role of the Connection Group.
- set_client()
Set the role of the Connection Group to Client.
- set_server()
Set the role of the Connection Group to Server.
- class P4G_SERVER_RANGE[source]
Bases:
object
Specifies a number of server sockets (ip address, port number)
- get()[source]
Get the number of server sockets (ip address, port number)
- Returns:
the number of server sockets (ip address, port number)
- Return type:
P4G_SERVER_RANGE.GetDataAttr
- set(ipv4_address, address_count, start_port, port_count)[source]
Set the number of server sockets (ip address, port number)
- Parameters:
ipv4_address (ipaddress.IPv4Address) – the start IP address of the address range
address_count (int) – the number of IP addresses
start_port (int) – the starting port number of the port range
port_count (int) – the number of ports
- class P4G_TCP_ACK_FREQUENCY[source]
Bases:
object
Number of received packets before a pure-ACK is sent.
- class P4G_TCP_ACK_TIMEOUT[source]
Bases:
object
Delayed ACK timeout in microsecondsA pure ACK for the last RX packet will be sent after P4G_TCP_ACK_TIMEOUT` microseconds in case it cannot be sent by other means, ie. a number of packets received since last ACK is less than P4G_TCP_ACK_FREQUENCY` and there is no TX packets to sent (to piggy-back an ACK)
- class P4G_TCP_CLOSE_HIST[source]
Bases:
object
Returns a histogram over TCP connection close times, with start and interval values as configured by P4G_TIME_HIST_CONF`.
- class P4G_TCP_CONGESTION_MODE[source]
Bases:
object
Configure the TCP congestion control algorithm.
- get()[source]
Get the TCP congestion control algorithm.
- Returns:
the TCP congestion control algorithm.
- Return type:
P4G_TCP_CONGESTION_MODE.GetDataAttr
- set(congestion_type)[source]
Set the TCP congestion control algorithm.
- Parameters:
congestion_type (CongestionType) – specifying congestion algorithm type
- set_new_reno()
Enable New RENO congestion control algorithm.
- set_none()
Disable congestion control.
- set_reno()
Enable RENO congestion control algorithm.
- class P4G_TCP_DUP_THRES[source]
Bases:
object
Configure the value of the TCP duplicate ACK threshold.
- class P4G_TCP_ESTABLISH_HIST[source]
Bases:
object
Returns a histogram over TCP connection establish times, with start and interval values as configured by P4G_TIME_HIST_CONF`.
- class P4G_TCP_ICWND_CALC_METHOD[source]
Bases:
object
Select the algorithm to calculate the TCP initial congestion window (ICWND).
- get()[source]
Get the algorithm to calculate the TCP initial congestion window (ICWND).
- Returns:
the algorithm to calculate the TCP initial congestion window (ICWND).
- Return type:
P4G_TCP_ICWND_CALC_METHOD.GetDataAttr
- set(method, factor)[source]
Set the algorithm to calculate the TCP initial congestion window (ICWND).
- Parameters:
method (AlgorithmMethod) – specifying the algorithm
factor (int) – factor to multiply the senders MSS with, when method is set to
FIXED_FACTOR
. Otherwise the value is ignored.
- set_fixed_factor(factor)
ICWND is set to a FACTOR * SMSS (Sender’s MSS)
- set_rfc2581(factor)
ICWND is set according to RFC2581
- set_rfc5681(factor)
ICWND is set according to RFC5681.
- class P4G_TCP_ISSTHRESH[source]
Bases:
object
Configure the TCP initial slow start threshold (ISSTHRESH).
- get()[source]
Get the TCP initial slow start threshold (ISSTHRESH).
- Returns:
the TCP initial slow start threshold (ISSTHRESH).
- Return type:
P4G_TCP_ISSTHRESH.GetDataAttr
- set(mode, threshold)[source]
Set the TCP initial slow start threshold (ISSTHRESH).
- Parameters:
mode (AutoOrManual) – specifying TCP initial slow start mode
threshold (int) – number of bytes, value ignored when mode is set to
MANUAL
- set_automatic(threshold)
TCP initial slow start mode set to Automatic
- set_manual(threshold)
TCP initial slow start mode set to Manual
- class P4G_TCP_MSS_MINMAX[source]
Bases:
object
Configure the min and max values of the range for MSS. Both values are included in the range. Relevant when P4G_TCP_MSS_TYPE is set to INCREMENT or RANDOM.
- class P4G_TCP_MSS_TYPE[source]
Bases:
object
Specifies the Maximum Segment size (MSS) type for a Connection Group. The MSS can either be fixed size identical for all connections in the Connection Group, incrementing or random. The individual MSS for a specific connection is always constant once the incrementing or random value has been created. Refer to P4G_TCP_MSS_MINMAX` command for information on how to configure min and max values.
- get()[source]
Get the Maximum Segment size (MSS) type for a Connection Group.
- Returns:
the Maximum Segment size (MSS) type for a Connection Group
- Return type:
P4G_TCP_MSS_TYPE.GetDataAttr
- set(mss_type)[source]
Set the Maximum Segment size (MSS) type for a Connection Group.
- Parameters:
mss_type (MSSType) – specifying how MSS is set
- set_fixed()
Use fixed value for TCP MSS.
- set_increment()
Use incrementing value for TCP MSS.
- set_random()
Use pseudorandom value for TCP MSS.
- class P4G_TCP_MSS_VALUE[source]
Bases:
object
Configure the fixed MSS value. Relevant when P4G_TCP_MSS_TYPE is set to FIXED.
- class P4G_TCP_RETRANSMIT_COUNTERS[source]
Bases:
object
Returns a list of TCP retransmission counters.
- class P4G_TCP_RTO[source]
Bases:
object
Configure the value of the TCP retransmission timeout, max retries and max backoff.
- get()[source]
Get the value of the TCP retransmission timeout, max retries and max backoff.
- Returns:
the value of the TCP retransmission timeout, max retries and max backoff.
- Return type:
P4G_TCP_RTO.GetDataAttr
- set(rto_type, retrans_timeout, retry_count, backoff)[source]
Set the value of the TCP retransmission timeout, max retries and max backoff.
- set_dynamic(retrans_timeout, retry_count, backoff)
RTO is dynamic and depending on round trip time (RTT)
- set_static(retrans_timeout, retry_count, backoff)
RTO is constant as configured
- class P4G_TCP_RTO_MINMAX[source]
Bases:
object
Configure the min and max values of the TCP retransmission timeout, when rto type is set to dynamic. If the calculated rto fall outside the interval, the value is clamped to the min or max value.
- class P4G_TCP_RTO_PROLONGED_MODE[source]
Bases:
object
Configure TCP retransmission prolonged mode. When enabled, TCP will, after exceeding max number of retransmission retries, continue trying retransmit until success, whereafter it will operate normally.
- get()[source]
Get TCP retransmission prolonged mode.
- Returns:
TCP retransmission prolonged mode
- Return type:
P4G_TCP_RTO_PROLONGED_MODE.GetDataAttr
- set_disable(timeout)
Disable TCP retransmission prolonged mode.
- set_enable(timeout)
Enable TCP retransmission prolonged mode.
- class P4G_TCP_RTT_VALUE[source]
Bases:
object
Returns values that can be used to calculate the RTT value of all connections in a Connection Group.
- class P4G_TCP_RX_GOOD_BYTES_HIST[source]
Bases:
object
Returns a histogram over number of good TCP bytes received, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.
- class P4G_TCP_RX_PACKET_COUNTERS[source]
Bases:
object
Returns a list of the TCP RX packet counters.
- class P4G_TCP_RX_PAYLOAD_COUNTERS[source]
Bases:
object
Returns a list of the TCP Rx payload counters.
- class P4G_TCP_RX_TOTAL_BYTES_HIST[source]
Bases:
object
Returns a histogram over number of total TCP bytes received, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.
- class P4G_TCP_STATE_CURRENT[source]
Bases:
object
Returns a list of the current TCP state counters. The counters returned corresponds the the following TCP states:
CLOSED
LISTEN
SYN_SENT
TCP_SYN_RCVD
ESTABLISHED
FIN_WAIT_1
FIN_WAIT_2
CLOSE_WAIT
CLOSING
LAST_ACK
TIME_WAIT
- class P4G_TCP_STATE_RATE[source]
Bases:
object
Returns a list of the TCP state rates measured in connections/second. The counters returned corresponds the the following TCP state rates:
CLOSED
LISTEN
SYN_SENT
TCP_SYN_RCVD
ESTABLISHED
FIN_WAIT_1
FIN_WAIT_2
CLOSE_WAIT
CLOSING
LAST_ACK
TIME_WAIT
- class P4G_TCP_STATE_TOTAL[source]
Bases:
object
Returns a list of the total TCP state counters. The counters returned corresponds the the following TCP states:
CLOSED
LISTEN
SYN_SENT
TCP_SYN_RCVD
ESTABLISHED
FIN_WAIT_1
FIN_WAIT_2
CLOSE_WAIT
CLOSING
LAST_ACK
TIME_WAIT
- class P4G_TCP_SYN_RTO[source]
Bases:
object
Configure the value of the TCP SYN retransmission timeout, max retries and max backoff.
- get()[source]
Get the value of the TCP SYN retransmission timeout, max retries and max backoff.
- Returns:
the value of the TCP SYN retransmission timeout, max retries and max backoff.
- Return type:
P4G_TCP_SYN_RTO.GetDataAttr
- class P4G_TCP_TX_GOOD_BYTES_HIST[source]
Bases:
object
Returns a histogram over number of good TCP bytes transmitted, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.
- class P4G_TCP_TX_PACKET_COUNTERS[source]
Bases:
object
Returns a list of the TCP TX packet counters.
- class P4G_TCP_TX_PAYLOAD_COUNTERS[source]
Bases:
object
Returns a list of the TCP Tx payload counters.
- class P4G_TCP_TX_TOTAL_BYTES_HIST[source]
Bases:
object
Returns a histogram over number of total TCP bytes transmitted, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.
- class P4G_TCP_WINDOW_SCALING[source]
Bases:
object
Enable window scaling for the Connection Group. Note to use windows scaling it need to be enabled in both the client and server Connection Group. .
- get()[source]
Get TCP window scaling settings for the Connection Group.
- Returns:
TCP window scaling settings for the Connection Group.
- Return type:
P4G_TCP_WINDOW_SCALING.GetDataAttr
- set_no(factor)
Disable TCP window scaling.
- set_yes(factor)
Enable TCP window scaling.
- class P4G_TCP_WINDOW_SIZE[source]
Bases:
object
Configure the value of the TCP RWND.
- class P4G_TEST_APPLICATION[source]
Bases:
object
Configure the application layer mode. This command affects whether TCP payload is generated.
NONE
means that TCP connections are created according to the client and server ranges, and ramped up/down as specified in the load profile. But no payload is transmitted.RAW
differs fromNONE
in that it transmits payload when the TCP connection is established.REPLAY
refers to PCAP replay.
- get()[source]
Get the application layer mode.
- Returns:
the application layer mode
- Return type:
P4G_TEST_APPLICATION.GetDataAttr
- set(behavior)[source]
Set he application layer mode.
- Parameters:
behavior (ApplicationLayerBehavior) – the application layer mode
- set_none()
Application layer is set to connection-only.
- set_raw()
Application layer is set to connection + payload.
- set_replay()
Application layer is set to pcap replay.
- class P4G_TIME_HIST_CONF[source]
Bases:
object
Sets the start value and the interval size for the time histograms (P4G_TCP_ESTABLISH_HIST` and P4G_TCP_CLOSE_HIST`).
- class P4G_TLS_ALERT_FATAL_COUNTERS[source]
Bases:
object
Returns a list of TLS error counters. The counters returned corresponds the the following TLS warnings:
close_notify
unexpected_message
bad_record_mac
record_overflow
decompression_failure
handshake_failure
bad_certificate
unsupported_certificate
certificate_revoked
certificate_expired
certificate_unknown
illegal_parameter
unknown_ca
access_denied
decode_error
decrypt_error
protocol_version
insufficient_security
internal_error
user_canceled
no_renegotiation
unsupported_extension
unknown.
- class P4G_TLS_ALERT_WARNING_COUNTERS[source]
Bases:
object
Returns a list of TLS warning counters. The counters returned corresponds the the following TLS warnings:
close_notify
unexpected_message
bad_record_mac
record_overflow
decompression_failure
handshake_failure
bad_certificate
unsupported_certificate
certificate_revoked
certificate_expired
certificate_unknown
illegal_parameter
unknown_ca
access_denied
decode_error
decrypt_error
protocol_version
insufficient_security
internal_error
user_canceled
no_renegotiation
unsupported_extension
unknown.
- class P4G_TLS_CIPHER_SUITES[source]
Bases:
object
Configure the list of ciphers to announce in order of priorities.
- class P4G_TLS_CLOSE_NOTIFY[source]
Bases:
object
Enable/Disable TLS sending close notify alert on connection tear-down.
- get()[source]
Get whether TLS sends close notify alert on connection tear-down.
- Returns:
whether TLS sends close notify alert on connection tear-down.
- Return type:
P4G_TLS_CLOSE_NOTIFY.GetDataAttr
- set(on_off)[source]
Set whether TLS sends close notify alert on connection tear-down.
- Parameters:
on_off (YesNo) – whether TLS sends close notify alert on connection tear-down.
- set_no()
TLS does not send close notify alert on connection tear-down.
- set_yes()
TLS sends close notify alert on connection tear-down.
- class P4G_TLS_DHPARAMS_FILENAME[source]
Bases:
object
Configure TLS DH parameters, if not set a default set will be used.
- class P4G_TLS_ENABLE[source]
Bases:
object
Enable/Disable TLS.
- get()[source]
Get whether TLS is enabled.
- Returns:
whether TLS is enabled.
- Return type:
P4G_TLS_ENABLE.GetDataAttr
- set(on_off)[source]
Set whether TLS is enabled.
- Parameters:
on_off (YesNo) – specifying whether to enable TLS
- set_no()
Disable TLS.
- set_yes()
Enable TLS.
- class P4G_TLS_HANDSHAKE_HIST[source]
Bases:
object
Returns a histogram over TLS connection handshake times, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.
- class P4G_TLS_MAX_RECORD_SIZE[source]
Bases:
object
Configure the maximum outgoing TLS record size.
- class P4G_TLS_MIN_REQ_PROTOCOL_VER[source]
Bases:
object
Returns the minimum TLS protocol version required by the configured list of cipher suites. Each cipher suite has a minimum required TLS protocol version that will support the cipher suite. The minimum required TLS protocol version for a list of cipher suites is the lowest minimum required TLS protocol version of all the cipher suites in the list.
- class P4G_TLS_PRIVATE_KEY_FILENAME[source]
Bases:
object
Configure the private key matching the TLS certificate.
- class P4G_TLS_PROTOCOL_VER[source]
Bases:
object
Configures the desired TLS protocol version. More specifically the TLS version configured is the protocol version advertised by the client in the Client Hello message, and the highest TLS protocol version accepted by the server. If the protocol_version in the Client Hello message is higher than the highest protocol version accepted by the server, the TLS Handshake will fail.
- get()[source]
Get the highest supported TLS protocol version.
- Returns:
the highest supported TLS protocol version
- Return type:
P4G_TLS_PROTOCOL_VER.GetDataAttr
- set(tls_version)[source]
Set the highest supported TLS protocol version.
- Parameters:
tls_version (TLSVersion) – the highest supported TLS protocol version
- set_sslv3()
The highest supported TLS protocol version is set to SSLv3.
- set_tls10()
The highest supported TLS protocol version is set to TLS 1.0.
- set_tls11()
The highest supported TLS protocol version is set to TLS 1.1.
- set_tls12()
The highest supported TLS protocol version is set to TLS 1.2.
- class P4G_TLS_RX_PAYLOAD_BYTES_HIST[source]
Bases:
object
Returns a histogram over number of TLS Payload bytes received, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.
- class P4G_TLS_RX_PAYLOAD_COUNTERS[source]
Bases:
object
Returns a list of the TLS Rx payload counters.
- class P4G_TLS_SERVER_NAME[source]
Bases:
object
Configure the server name advertised by the client in the TLS SNI (Server Name Indication) extension. Both the client and server must be configured with the same server_name, as the server will check the server name in Client Hello message. If server name is not configured (or configured blank), the SNI extension will not be inserted in the Client Hello message.
- class P4G_TLS_STATE_CURRENT[source]
Bases:
object
Returns a list of the current TLS state counters. The counters returned corresponds the the following TLS states:
TLS_INACTIVE
TLS_HANDSHAKING
TLS_HANDSHAKE_DONE
TLS_HANDSHAKE_FAILED
TLS_FAILED
TLS_INTERNAL_FAILED
TLS_CLOSE_NOTIFY
TLS_DONE
- class P4G_TLS_STATE_RATE[source]
Bases:
object
Returns a list of the TLS state rates measured in per second. The counters returned corresponds the the following TLS states:
TLS_INACTIVE
TLS_HANDSHAKING
TLS_HANDSHAKE_DONE
TLS_HANDSHAKE_FAILED
TLS_FAILED
TLS_INTERNAL_FAILED
TLS_CLOSE_NOTIFY
TLS_DONE
- class P4G_TLS_STATE_TOTAL[source]
Bases:
object
Returns a list of the total TLS state counters. The counters returned corresponds the the following TLS states:
TLS_INACTIVE
TLS_HANDSHAKING
TLS_HANDSHAKE_DONE
TLS_HANDSHAKE_FAILED
TLS_FAILED
TLS_INTERNAL_FAILED
TLS_CLOSE_NOTIFY
TLS_DONE
- class P4G_TLS_TX_PAYLOAD_BYTES_HIST[source]
Bases:
object
Returns a histogram over number of TLS Payload bytes transmitted, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.
- class P4G_TLS_TX_PAYLOAD_COUNTERS[source]
Bases:
object
Returns a list of the TLS Tx payload counters.
- class P4G_TRANSACTION_HIST_CONF[source]
Bases:
object
Sets the start value and the interval size for the transaction histogram (P4G_APP_TRANSACTION_HIST`).
- class P4G_UDP_PACKET_SIZE_MINMAX[source]
Bases:
object
Configure the minimum and maximum values of the range for UDP packet size. Both values are included in the range. Relevant when P4G_UDP_PACKET_SIZE_TYPE is set to INCREMENT or RANDOM.
- class P4G_UDP_PACKET_SIZE_TYPE[source]
Bases:
object
Specifies the UDP packet size type for a Connection Group. The packet size can either be fixed size identical for all connections in the Connection Group, incrementing or random. The individual packet size for a specific connection is always constant once the incrementing or random value has been created. Refer to P4G_UDP_PACKET_SIZE_MINMAX` command for information on how to configure min and max values.
- get()[source]
Get the UDP packet size type for the Connection Group.
- Returns:
the UDP packet size for the Connection Group.
- Return type:
P4G_UDP_PACKET_SIZE_TYPE.GetDataAttr
- set(packet_size_type)[source]
Set the UDP packet size type for the Connection Group.
- Parameters:
packet_size_type (MSSType) – specifying how UDP packet size is set
- set_fixed()
Use fixed value for UDP packet size.
- set_increment()
Use incrementing value for UDP packet size.
- set_random()
Use pseudorandom value for UDP packet size.
- class P4G_UDP_PACKET_SIZE_VALUE[source]
Bases:
object
Configure the fixed UDP packet size value. Relevant when P4G_UDP_PACKET_SIZE_TYPE is set to FIXED.
- class P4G_UDP_RX_BYTES_HIST[source]
Bases:
object
Returns a histogram over number of UDP bytes received, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.
- class P4G_UDP_RX_PACKET_COUNTERS[source]
Bases:
object
Returns a list of the UDP RX packet counters.
- class P4G_UDP_RX_PAYLOAD_COUNTERS[source]
Bases:
object
Returns a list of the UDP RX payload counters.
- class P4G_UDP_STATE_CURRENT[source]
Bases:
object
Returns a list of the current UDP state counters. The counters returned corresponds the the following UDP states:
CLOSED
The connection structure has been created, but has not been ‘ramped up’ yet.OPEN
The connection has been ‘ramped up’, and is ready to transmit or receive data.ACTIVE
. The connection is actively transmitting data.
- class P4G_UDP_STATE_RATE[source]
Bases:
object
Returns a list of the UDP state rates measured in connections/second. The counters returned corresponds the the following UDP state rates:
CLOSED
The connection structure has been created, but has not been ‘ramped up’ yet.OPEN
The connection has been ‘ramped up’, and is ready to transmit or receive dataACTIVE
The connection is actively transmitting data.
- class P4G_UDP_STATE_TOTAL[source]
Bases:
object
Returns a list of the total UDP state counters. The counters returned corresponds the the following UDP states:
CLOSED
The connection structure has been created, but has not been ‘ramped up’ yet.OPEN
The connection has been ‘ramped up’, and is ready to transmit or receive data.ACTIVE
The connection is actively transmitting data.
- class P4G_UDP_TX_BYTES_HIST[source]
Bases:
object
Returns a histogram over number of UDP bytes transmitted, with start and interval values as configured by P4G_PAYLOAD_HIST_CONF`.
- class P4G_UDP_TX_PACKET_COUNTERS[source]
Bases:
object
Returns a list of the UDP TX packet counters.
- class P4G_UDP_TX_PAYLOAD_COUNTERS[source]
Bases:
object
Returns a list of the UDP TX payload counters.
- class P4G_USER_STATE_CURRENT[source]
Bases:
object
Returns a list of the current user state counters. A user is identified by a Client IP address. The counters returned corresponds the the following user states:
INIT
The user has been created, but has no open connections yet.ACTIVE
The user has at least one open connection.SUCCESS
The user has successfully transmitted and received all payload.FAILED
The user has failed in transmitting or receiving all payload. STOPPED The user has been stopped due to ramp-down.INACTIVE
All the users connection is closed, but the user has not been destroyed yet.
- class P4G_USER_STATE_RATE[source]
Bases:
object
Returns a list of the user state rates measured in users/second. A user is identified by a Client IP address. The counters returned corresponds the the following user states:
INIT
The user has been created, but has no open connections yet.ACTIVE
The user has at least one open connection.SUCCESS
The user has successfully transmitted and received all payload.FAILED
The user has failed in transmitting or receiving all payload.STOPPED
The user has been stopped due to ramp-down.INACTIVE
All the users connection is closed, but the user has not been destroyed yet.
- class P4G_USER_STATE_TOTAL[source]
Bases:
object
Returns a list of the total user state counters. A user is identified by a Client IP address. The counters returned corresponds the the following user states:
INIT
The user has been created, but has no open connections yet.ACTIVE
The user has at least one open connection.SUCCESS
The user has successfully transmitted and received all payload.FAILED
The user has failed in transmitting or receiving all payload.STOPPED
The user has been stopped due to ramp-down.INACTIVE
All the users connection is closed, but the user has not been destroyed yet.
- class P4G_VLAN_ENABLE[source]
Bases:
object
Specify whether to insert a VLAN tag header upon transmit.
- get()[source]
Get whether to insert a VLAN tag header upon transmit.
- Returns:
whether to insert a VLAN tag header upon transmit.
- Return type:
P4G_VLAN_ENABLE.GetDataAttr
- set(on_off)[source]
Set whether to insert a VLAN tag header upon transmit.
- Parameters:
on_off (OnOff) – specifying whether to enable VLAN tag
- set_off()
Disable VLAN tag insertion upon transmit.
- set_on()
Enable VLAN tag insertion upon transmit.