Video Functions¶
emulation video config¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Spirent Extension (for Spirent HLTAPI only).
Configures or modifies a video emulation on the specified device
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation video config
mode= {enable | modify } M
handle= <device_handle|session_handle> M
type= {client | server} M
server_clip_file= <file_name>
client_clip_file= <file_name>
event_rec_enable= {true | false}
rtsp_enable= {true | false}
rtsp_port_num= <NUMERIC>
server_name= <string>
use_partial_block_state= {true | false}
server_profile= <profile_handle>
client_name= <string>
dst_ip_addr= <a.b.c.d>
dst_port= <NUMERIC>
dynamic_load= <1-1000000>
client_profile= <profile_handle>
load_profile= <profile_handle>
connected_server= <string>
Arguments:
handle
Specifies the device handle under which to enable or modify the
video test configurations. This argument is `Mandatory`.
mode
Specifies the action to perform. This argument is `Mandatory`.
Possible values are::
enable Enables the video test configurations on the device
specified by handle
modify Modifies the video protocol configuration specified by
handle. (The value is obtained from -session_handle
returned by the function)
type
Specifies whether to enable client or server on the device. This
argument is `Mandatory`. Possible values are client and server.
server_clip_file
Specifies the video clips available for the current server test.
The clip files specified here must have been uploaded to the
chassis, either using Spirent TestCenter GUI or the
``emulation video clips manage`` function. This argument is
available when type is set to server.
client_clip_file
Identifies the video files to be requested by the client. The
available file list is the clip file list specified by
server_clip_file. This argument is available when -type is set
to server.
event_rec_enable
Specifies whether to enable event recording. This argument is
available when type is set to server. Possible values are
true and false. When it is set to true, server session results
will be reported. The default value is false.
rtsp_enable
Enables/disables Rapid Spanning Tree Protocol (RTSP) for the
video server. This argument is available when type is set to
server. Possible values are true (enable) and false (disable).
The default value is true.
rtsp_port_num
Specifies the port number to be used by RTSP. This argument is
available when type is set to server. The default value is 554.
server_profile
Specifies the server profile for the video server emulation. The
handle is returned by the ``emulation profile config`` function.
dst_ip_addr
Specifies the destination IP address of the requested video
stream. Leave it at the default value (the IP address of
the client). This argument is available when type is set to
client.
dst_port
Specifies the port number of the client. This argument is
available when type is set to client. The default value is
50050.
loop
Enable this argument to play the clip continuously. Possible
values are true (enable) and false (disable). The default value
is false.
client_profile
Specifies the client profile for the video client emulation. The
handle is returned by the ``emulation profile config`` function.
This argument is available when type is set to client.
load_profile
Specifies the load profile for the video client emulation. The
handle is returned from emulation profile config. This
argument is available when type is set to client.
connected_server
Specifies the name of the device block for the video server. This
argument is available when type is set to client.
- Return Values:
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
status $SUCCESS (1) or $FAILURE (0) log Error message if command returns {status 0} session_handle The video test session handle returned by the function. The value will be passed to handle when the mode is modify.
- Description:
The
emulation video config
function creates or modifies video testing sessions on the specified device. Use mode to specify the action to perform, and use type to specify whether you want to configure a video server or client. (See Arguments for more information.)Before enabling the video emulation, make sure there are already video server/client/load profile handles returned by the emulation profile config function.
Examples:
The following example configures a video server on the specified device:
set device_ret0_videoserverprotocolconfig [emulation video config mode= enable handle= $device_created type= server event_rec_enable= true rtsp_enable= true server_clip_file= "craft.mp4 medicine.mp4" rtsp_port_num= 65535 server_profile= $serverprofilehandle2 ]Sample output:
{session_handle videoserverprotocolconfig1} {status 1}End of Procedure Header
emulation video server streams config¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Spirent Extension (for Spirent HLTAPI only).
Creates or modifies video server streams. You can create multiple streams to emulate different destinations and transports.
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation video server streams config
mode= {create|modify} M
handle= <server_protocol_handle >
stream_handle= <stream_handle>
dst_ip_addr= <a.b.c.d>|<aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh>
dst_port= <NUMERIC>
loop_enable= {true|false}
transport_type= {udp|rtp}
name= <string>
Arguments:
handle
Specifies the video server configuration handle under which to
create video server streams. The handle is returned by the
``emulation video config`` function.
stream_handle
Specifies the handle of the video server stream to modify
mode
Specifies the action to perform. This argument is `Mandatory`.
Possible values are::
create Creates video server streams with the specified handle
modify Modifies the video server stream specified by stream_handle
name
Specifies the name of the video server stream, in string format.
dst_ip_addr
Specifies the IPv4 or IPv6 address of the client. The default
value is 0.0.0.0.
dst_port
Specifies the port number of the client. Possible values range
from 0 to 65535. The default value is 50050.
loop_enable
Once enabled, Spirent HLTAPI will play the stream continuously.
Possible values are true (enable) and false (disable). The
default value is true.
transport_type
Specifies the transport protocol. possible values are udp (UDP)
and rtp (RTP). The default value is udp.
- Return Values:
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
status $SUCCESS (1) or $FAILURE (0) log Error message if command returns {status 0} stream_handle The video server stream handle returned by the function
- Description:
- The
emulation video server streams config
function creates or modifies video server streams. You can create multiple streams to emulate different destinations and transports. Use mode to specify the action to perform. - Examples:
The following example creates a video server stream for the specified video server:
emulation video server streams config mode= create handle= $session_created loop_enable= true dst_ip_addr= 1.1.1.1 transport_type= udp dst_port= 2000
Sample Output:
{handle videoserverstream1} {status 1}
End of Procedure Header
emulation profile config¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Spirent Extension (for Spirent HLTAPI only).
Creates or modifies the client, server, or load profile for the video test session
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation profile config
mode= {create|modify} M
profile_type= {client|server|load}
handle= <profile_handle>
load_type= {connections|connections_per_time_unit|transactions|
transactions_per_time_unit|bandwidth|playlists}]
max_connections_attempted= <NUMERIC>
max_open_connections= <NUMERIC>
max_transactions_attempted= <NUMERIC>
randomization_seed= <NUMERIC>
use_dynamic_load= {true|false}
delayed_ack_enable= {true|false}
ipv4_tos= <0-255>
ipv6_traffic_class= <0-255>
profile_name= <string>
rx_window_size_limit= <NUMERIC>
tostype= {tos|diffserv}
Arguments:
mode
Specifies the action to perform. This argument is `Mandatory`.
Possible values are::
create Creates a specified type of profile under the project
modify Modifies the profile specified by handle
handle
The profile handle returned by the function. It is required for
mode modify.
profile_type
Specifies the type of the profile to create. Depending on the
type of the profile, different sets of arguments are available.
Possible values are::
client Creates a profile to define the type of user behavior
for all video clients to emulate
server Creates a profile to define a video server to emulate
load Creates a load profile to configure the amount
of network traffic to generate for a test
It is required for mode create.
load_type
Specifies the type of traffic that is measured for the load. This
argument is available when profile_type is set to load.
Possible values are::
connections
Denotes a TCP connection. Defines the number
of simultaneous network connections
generated. This setting generates enough load
to reach and sustain the desired number of
open TCP connections.
connections_per_time_unit
Specifies the number of new connections to be
opened in a specified time unit, regardless of the
number of connections currently open. If
connections are longlived (the number of
transactions or the data size is large), this
could result in a large number of connections
being open at once.
transactions
Defines the number of simultaneous transactions
generated
transactions_per_time_unit
Gradually ramps up the number of transactions per
time unit for the duration of the test
bandwidth
Sets the load in terms of bandwidth, sent on a
besteffort basis. Set -use_dynamic_load to true
to allow the load to be changed dynamically
during the test.
playlists
Runs a protocol playlist. Height specifies the
maximum number of concurrent playlists.
The default value is connections.
max_connections_attempted
Specifies the upper limit for the number of connection attempts
that are made throughout the test. This argument is available
when profile_type is set to load. Possible values range from 0 to
4294967295. The default value is 4294967295.
max_open_connections
Specifies the upper limit for the number of open connections
throughout the test. This argument is available when
profile_type is set to load. Possible values range from 0 to
4294967295. The default value is 4096.
max_transactions_attempted
Specifies the upper limit for the number of transaction attempts
that are made throughout the test. This argument is available
when profile_type is set to load. Possible values range from 0 to
4294967295. The default value is 4294967295.
randomization_seed
Specifies a number to define the heights in the random phases of
the test. If the value is zero, the seed is determined by the
time the test is executed. This argument is available when
profile_type is set to load. Possible values range from 0 to
4294967295. The default value is 123456.
use_dynamic_load
Enables or disables dynamic load when load_type is set to
bandwidth. Possible values are true (enable) and false (disable).
The default value is false.
delayed_ack_enable
Enables or disables delayed ACK on TCP connections. This argument
is available when profile_type is set to client or server.
Possible values are true (enable) and false (disable). The
default value is false.
ipv4_tos
Specifies the IPv4 Type of Service (ToS)/Diffserv setting to use
for application layer traffic. This argument is available when
profile_type is set to client or server. Possible values range
from 0 to 255. The default value is 0.
ipv6_traffic_class
Specifies the IPv6 traffic class setting to use for application
layer traffic. This argument is available when profile_type is
set to client or server. Possible values range from 0 to 255. The
default value is 0.
profile_name
Specifies the name of the profile to create or modify
rx_window_size_limit
Specifies the size of the receive window (in bytes) for TCP
connections. This argument is available when profile_type is set
to client or server. Possible values range from 0 to 4294967295.
The default value is 32768
tostype
Specifies the ToS type. Possible values are tos and diffserv. The
default value is tos.
- Return Values:
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
status $SUCCESS (1) or $FAILURE (0) log Error message if command returns {status 0} handle The profile handle returned by the function
- Description:
The emulation profile config creates, modifies, or deletes a load, client, or server profile for video testing. Use mode to specify the action to perform, and use profile_type specify the type of profile to be created.
Before you configure video testing sessions on the specified devices, you must create all three types of profiles. The corresponding profiles will be contained in the keyed list returned by the function.
- Examples:
The following example creates a video server profile:
emulation profile config mode= create profile_type= server tostype= tos ipv4_tos= 192 ipv6_traffic_class= 0 rx_window_size_limit= 32768 profile_name= DefaultServerProfile delayed_ack_enable= false\
Sample Output:
{handle serverprofile1} {status 1}
The following example creates a video client profile:
set device_cfg_ret0_clientprofile1 [emulation profile config mode= create profile_type= client ipv4_tos= 89 ipv6_traffic_class= 32 rx_window_size_limit= 90876 profile_name= Client_Profile_1 delayed_ack_enable= true ] set clientprofilehandle1 [keylget device_cfg_ret0_clientprofile1 handle]
Sample Output:
{handle clientprofile1} {status 1}
The following example creates a video load profile:
set device_cfg_ret0_loadprofile1 [emulation profile config mode= create profile_type= load load_type= connections profile_name= load_Profile_1 max_connections_attempted= 4294967295 max_open_connections= 4294967295 max_transactions_attempted= 4294967295 randomization_seed= 4294967295 ] set loadprofilehandle1 [keylget device_cfg_ret0_loadprofile1 handle]
Sample Output:
{handle clientloadprofile1} {status 1}
End of Procedure Header
emulation client load phase config¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Spirent Extension (for Spirent HLTAPI only).
Configures or modifies client load phases for the video test session. A video test session consists of a sequence of phases defined in a load profile.
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation client load phase config
mode= {create|modify} M
load_pattern= {stair|flat|burst|sinusoid|random|sawtooth}
duration_units= {milliseconds|seconds|minutes|hours}
phase_name= <string>
phase_num= <0-7>
profile_handle= <load_profile_handle>
phase_handle= <phase_handle>
height= <NUMERIC>
ramp_time= <0-4294967295>
repetitions= <0-4294967295>
steady_time= <0-4294967295>
burst_time= <0-4294967295>
pause_time= <0-4294967295>
period= <0-4294967295>
Arguments:
mode
Specifies the action to perform. This argument is `Mandatory`.
Possible values are::
create Creates a load phase under the client load profile
specified by profile_handle
modify Modifies the configuration of the load phase specified
by phase_handle
load_pattern
Specifies a load pattern to determine the traffic pattern in
which the load is generated for the test phase.
Possible values are::
stair
Controls the workload as it climbs or descends through a
series of steps.
flat
Holds the amount of load steady. The flat pattern phase is
often set to zero, and adds a delay phase into the
workload.
burst
Introduces sudden increases (spikes) in a load for a
relatively short period of time, after which the load
decreases.
sinusoid
Defines an arbitrary curve that represents a neutral to
high workload, then neutral to low, and back to neutral.
When repeated, this pattern graphically resembles a
wavelike curve.
random
Shows the bounds of where values occur in the workload.
sawtooth
The ending load height is the same as the beginning
(similar to burst).
The default value is flat.
duration_units
Specifies the unit of time for the selected phase's load
generation. Possible values are milliseconds, seconds, minutes,
and hours. The default value is seconds.
phase_name
Specifies the name of the client load phase
phase_num
Specifies the current phase number. Possible values range from 0
to 7.
profile_handle
Specifies the load profile handle under which the client load
phase will be created. The load profile handle is returned by
the ``emulation profile config`` function.
phase_handle
Specifies the client load phase handle. Use it when you want to
modify the client load phaseIt is required for mode modify.
height
Specifies the total amount of load related to the load type that
the system achieves. To keep the system from overwhelming your
network, start small and increase these parameters
proportionately. This argument is available when load_pattern is
set to not random. Possible values range from 0 to 10000000.
The default value is 30.
When load_type is set to bandwidth, the value range is
0-500000kbps.
ramp_time
Specifies the amount of time each step takes to reach the load
type applied to height. This argument is available when
load_pattern is set to stair, flat, sinusoid, or random. The
value of duration_units determines the unit for this argument.
Possible values range from 0 to 40000000. The default value is
20.
repetitions
Specifies the number of times that you want the pattern to
repeat. The system performs best when the values are between
1 and 10. Values above 50 can cause the display to redraw slowly.
The actual load generation while running the test will not be
adversely affected. This argument is available when load_pattern
is set to stair, burst, sinusoid, random, or sawtooth. Possible
values range from 0 to 100. The default value is 1.
steady_time
Specifies the amount of time for each step. The value of
duration_units determines the unit for this argument. This
argument is available when load_pattern is set to stair, flat,
sinusoid, random, or sawtooth. Possible values range from 0 to
40000000. The default value is 40.
burst_time
Specifies the duration of the burst. The value of duration_units
determines the unit for this argument. This argument is available
when load_pattern is set to burst. Possible values range from 0
to 40000000. The default value is 20.
pause_time
Specifies the pause time between bursts. The value of
duration_units determines the unit for this argument. This
argument is available when load_pattern is set to burst or
sawtooth. Possible values range from 0 to 40000000. The default
value is 20.
period
Specifies the amount of time to gradually achieve the total load
specified by height. The value of -duration_units determine the
unit for this argument. This argument is available when
load_pattern is set to sinusoid. Possible values range from 0 to
1000.
- Description:
The
emulation client load phase config
function configures or modifies client load phases for the video test session.In the create mode, one or more video client phases can be created for the same load profile and the corresponding phase handles will be returned.
If the creation or modification fails, Spirent HLTAPI returns an error message.
- Return Values:
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
load_phase_handle The load phase handle created status Success (1) or failure (0) of the operation log An error message (if the operation failed)
- Examples:
The following example creates a load phase for the specified profile:
set load_phase_config1 [emulation client load phase config mode= create load_pattern= stair duration_units= minutes phase_name= Load1 profile_handle= "$loadprofilehandle1" height= 10000000 ramp_time= 40000000 repetitions= 100 steady_time= 40000000 burst_time= 40000000 pause_time= 40000000 period= 1000 ]
Sample Output:
{load_phase_handle clientloadphase1} {status 1}
End of Procedure Header
emulation video control¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Spirent Extension (for Spirent HLTAPI only).
Starts or stops the video device
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation video control
mode= {start|stop} M
port_handle= <port_handle_list>
handle= <device_handle_list>
Arguments:
port_handle
Specifies a list of ports on which the actions will be performed.
You must specify either handle or -port_handle. If both are
specified, port_handle will take effect.
handle
Specifies a list of devices on which to perform the action. You
must specify either handle or -port_handle. If both are specified,
port_handle will take effect.
mode
Specifies the action to be performed. This argument is
`Mandatory`. Possible values are start and stop.
- Return Values:
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
status $SUCCESS (1) or $FAILURE (0) log Error message if command returns {status 0}
- Description:
The
emulation http control
function starts or stops the configured video devices. Use mode to specify the action to be performed.You must specify either handle or -port_handle. If both are specified, port_handle will take effect.
- Examples:
The following example starts the video test session configured on $port2:
emulation video control port_handle= "$port2 " mode= start
Sample Output:
{status 1}
End of Procedure Header
emulation video clips manage¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Spirent Extension (for Spirent HLTAPI only).
Uploads video clip files to the chassis, or deletes them from the chassis
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation video clips manage
mode= {upload|delete} M
file_name= <string>
[server_list <handle_list>]
Arguments:
mode
Specifies the action to be performed. This argument is `Mandatory`.
Possible values are::
upload Uploads video clip files to the chassis
delete Deletes video clip files from the chassis
file_name
Specifies the name of the file to be uploaded to, or deleted from,
the chassis.
server_list
Specifies a list of configuration handles from which the video
server ports are determined. The handle can be a client, server
or port handle.
- Return Values:
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
status $SUCCESS (1) or $FAILURE (0) log Error message if command returns {status 0}
- Description:
- The
emulation video clips manage
function uploads video clip files to the chassis, or deletes them from the chassis. Use mode to specify the action to perform. - Examples:
The following example uploads a video file to the chassis:
set video_clips_manage_config [emulation video clips manage mode= load file_name= "craft.mp4" server_list= "$port1" ]
Sample Output:
{status 1}
End of Procedure Header
emulation video stats¶
Execute Tester Command ${rt_handle} command=test_control <additional key=value arguments>
- Purpose:
Spirent Extension (for Spirent HLTAPI only).
The result of the video server and client
Synopsis:
Note: M indicates the argument is `Mandatory`.
emulation video stats
mode= {client|server} M
port_handle= <port_handle>
handle= <device_handle>
Arguments:
port_handle
Specifies the port from which to retrieve statistics
handle
Specifies the handle of the device from which to retrieve
statistics. If both port_handle and -handle are specified,
handle will be used.
mode
Specifies the type of video results to retrieve. This argument
is `Mandatory`. Possible values are client and server.
- Return Values:
Depending on the specific language that HLTAPI uses, the function returns a keyed list/dictionary/hash (See Introduction for more information on return value formats) using the following keys (with corresponding data):
status $SUCCESS (1) or $FAILURE (0) log Error message if command returns {status 0}
The following keys will be returned when mode is set to client:
- aborted_connections
- Total number of aborted connections from the client block
- aborted_transactions
- Total number of aborted transactions from the client block
- attempted_connections
- Total number of attempted connections from the client block
- attempted_transactions
- Total number of attempted transactions from the client block
- block_index
- Internally allocated index for this video client block
- last_modified
- Timestamp when the result was last modified
- parent_name
- Name of the parent protocol for which the results apply
- rx_response_code200
- Count of received response code with value 200
- rx_response_code400
- Count of received response code with value 400
- rx_response_code403
- Count of received response code with value 403
- rx_response_code404
- Count of received response code with value 404
- rx_response_code405
- Count of received response code with value 405
- rx_response_code454
- Count of received response code with value 454
- rx_response_code459
- Count of received response code with value 459
- rx_response_code461
- Count of received response code with value 461
- successful_connections
- Total number of successful connections from the client block
- successful_transactions
- Total number of successful transactions from the client block
- unsuccessful_connections
- Total number of unsuccessful connections from the client block
- unsuccessful_transactions
- Total number of unsuccessful transactions from the client block
The following keys will be returned when mode is set to server:
- block_index
- Internally allocated index for this video server block
- last_modified
- Timestamp when the result was last modified
- parent_name
- Name of the parent protocol for which the results apply
- successful_transactions
- Total number of successful transactions from the server block
- total_connections
- Total number of connections handled by this video server
- tx_response_code200
- Count of transmitted response codes with value 200
- tx_response_code400
- Count of transmitted response codes with value 400
- tx_response_code403
- Count of transmitted response codes with value 403
- tx_response_code404
- Count of transmitted response codes with value 404
- tx_response_code405
- Count of transmitted response codes with value 405
- tx_response_code454
- Count of transmitted response codes with value 454
- tx_response_code459
- Count of transmitted response codes with value 459
- tx_response_code461
- Count of transmitted response codes with value 461
- unsuccessful_transactions
- Total number of unsuccessful transactions from the server block
- Description:
The
emulation video stats
function provides statistics for the video emulation. Use handle or port_handle to specify the scope of statistics that you want to retrieve.This function returns the requested data and a status value (1 for success). If there is an error, the function returns the status value (0) and an error message.
- Examples:
Sample Input:
# server statistics emulation video stats handle $device_list mode server
Sample Output:
{host2 {{successful_transactions 0} {parent_name {Video Server 1}} {unsuccessful_transactions 0} {sotal_connections 0} {tx_response_code200 0} {tx_response_code400 0} {tx_response_code454 0} {block_index 0} {tx_response_code403 0} {last_modified 0} {tx_response_code404 0} {tx_response_code405 0} {tx_response_code459 0} {tx_response_code461 0}}} {status 1}
End of Procedure Header