Convergence Functions

sth::emulation_convergence_config

Purpose

Spirent Extension (for Spirent HLTAPI only)

This is a Spirent Extension created to configure, modify, or delete a control plane convergence configuration

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_convergence_config
    [-handle < convergence_config_handle>]
    [-mode {create | modify | delete}]
    [-convergence_proto {bfd | ospfv2 | ospfv3 | isis | bgp}]
    [-load_test {true | false}]
    [-stream_convergence_threshold <0-4294967295>]
    [-selected_stream_block <ALPHANUM>]
    [-primary_router <ALPHANUM>]
    [-backup_router <ALPHANUM>]

Arguments

-handle

The convergence handle returned from the current function. This argument is Mandatory for modify and delete modes.

-mode

Specifies the action to perform. Possible values are create, modify, and delete. This argument is Mandatory . The modes are described below:

create      Creates a new control plane convergence

modify      Modifies the parameters on the control plane convergence
            specified by -handle

delete      Deletes the specified control plane convergence handles
            or convergence path handles
-convergence_proto

Specifies the protocol type for the convergence test. This argument is Mandatory . Possible values are bfd, ospfv2, ospfv3, isis, and bgp.

-load_test

Enables or disables single-port (primary) load test. A single-port load test calculates the traffic convergence time to reach 100% starting from 0%. Possible values are true (enable) and false (disable). The default value is false. You must set it to true when the test type is load test.

-stream_convergence_threshold

Specifies the stream convergence threshold. Possible values range from 0 to 4294967295. The default value is 10.

-selected_stream_block

Specifies a list of streamblock handles relevant to the convergence path configuration

-primary_router

Specifies a list of the primary router handles or primary route protocol handles

-backup_router

Specifies a list of backup router handles or backup route protocol handles

Arguments Unsupported by Save as HLTAPI

This function is not currently supported by Save as HLTAPI.

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):

Handle          The convergence handle. Returned when the status is 1 and
                -mode is create
handles         A list of convergence path handles
status          Success (1) or failure (0) of the operation
log             An error message (if the operation failed)

Description

The sth::emulation_convergence_config function creates, modifies, or deletes a control plane convergence. (See the -mode argument description for information about the actions.)

When you create a convergence, the function returns a handle for it. Use this handle as the input for the modify and delete modes. The function also returns a list of convergence path handles. You can use -handle or -handles for the input of the -delete mode.

If a creation, configuration, or deletion fails, Spirent HLTAPI returns an error message.

Examples

The following example creates a control plane convergence:

sth::emulation_convergence_config\
   -mode                     create\
   -convergence_proto         bgp\
   -selected_stream_block    "$streamblock0 $streamblock1"\
   -primary_router            "router0 router1"\
   -backup_router            $router2"\

Sample Output:

{handle convergenceconfig1} {handles {convergencepathconfig1 convergencepathconfig2}}
{status 1}

The following example modifies the specified convergence:

sth::emulation_convergence_config\
     -handle                     convergenceconfig0\
     -mode                       modify\
     -convergence_proto          bgp\
     -selected_stream_block      $stream_id0\
     -primary_router             $bgp_router0\
     -backup_router              $bgp_router1\

Sample Output:

{handles convergencepathconfig3} {status 1}

End of Procedure Header

sth::emulation_convergence_control

Purpose

This is a Spirent Extension created to control the behavior of the convergence test

Synopsis

Note

M indicates that the argument is Mandatory .

Spirent Extension (for Spirent HLTAPI only).

sth::emulation_convergence_control
    [-handle < convergence_config_handle_list>]
    [-mode {setup|collector|reset}]
    [-timeout <10-600>]
    [-test_type {convergence|load|reversion}]
    [-mismatch_warning {true|false}]

Arguments

-handle

Specifies a list of control plane convergence handles on which to set up the collector, or reset a control plane convergence test. This argument is Mandatory .

-mode

Specifies the action to be taken. This argument is Mandatory . Possible values are:

setup       Sets up a control plane convergence test

collector   Collects results for a control plane convergence test

reset       Resets the protocol-based convergence system
-timeout

Specifies the maximum number of seconds to wait for streams. Possible values range from 10 to 600. The default value is 10.

-test_type

Specifies the test type. Possible values are:

convergence     A two-port test (primary and secondary) that
                measures the time to switch from the primary port
                to the secondary port
load            A single-port (primary) test that calculates
                the traffic convergence time to reach 100%
                starting from 0%
reversion       A two-port test (primary and secondary) that
                measures the time to switch from the secondary
                port to the primary port
-mismatch_warning

Specifies whether to compare the running state with the configured state. Possible values are true and false. When the value is true, Spirent HLTAPI will compare the states, and give a warning if the running state does not match the configured state. The default value is true.

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) of the operation

log     An error message (if the operation failed)

Description

The sth::emulation_convergence_control function controls the convergence test. You can set up the convergence test, collect results of the test, or reset the convergence system. Use the -mode argument to specify the action to perform.

You must specify a convergence handle.

Examples

The following example sets up a convergence test:

sth::emulation_convergence_control\
    -handle         convergenceconfig1\
    -mode           setup\
    -test_type      convergence \

End of Procedure Header

sth::emulation_convergence_info

Purpose

Returns information from the convergence test

Synopsis

Note

M indicates that the argument is Mandatory .

sth::emulation_convergence_info
   [-handle <convergence_config_handle>  M]
   [-mode {stats}  M]

Arguments

-handle

Specifies the control plane convergence handle from which you want information. This argument is Mandatory .

-mode

Specifies the kind of information you want to see. This argument is mandatory. The following option is available:

stats   Returns convergence summary results statistics

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) of the operation

The following keys are returned when you specify -mode stats:

avg_convergence_time                        Average single-stream convergence time
avg_reversion_convergence_time              Average single-stream reversion
                                            convergence time
converged_streams                           Number of converged streams
convergence_time                            Overall convergence time
expected_streams                            Number of expected streams
first_event_timestamp                       First event timestamp
first_event_timestamp_reversion             First event timestamp in reversion
packet_timestamp_first_stream               First packet timestamp on first stream
traffic_timestamp_first_stream_reversion    Traffic timestamp on first stream in
                                            reversion
packet_timestamp_last_stream                First packet timestamp on last stream
traffic_timestamp_last_stream_reversion     Traffic timestamp on last stream in
                                            reversion
last_event_timestamp                        Last event timestamp
last_event_timestamp_reversion              Last event timestamp in reversion
max_convergence_time                        Maximum single-stream convergence time
max_reversion_convergence_time              Maximum single-stream reversion
                                            convergence time
min_convergence_time                        Minimum single-stream convergence time
min_reversion_convergence_time              Minimum single-stream reversion
                                            convergence time
non_converged_streams                       Number of non-converged streams
primary_streams                             Number of primary streams
reversion_convergence_time                  Overall reversion convergence time
streams_exceeding_threshold                 Number of streams exceeding threshold count
unexpected_converged_streams                Number of unexpected converged streams

Description

The sth::emulation_convergence_info function retrieves statistics for the specified convergence test.

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

The following example returns information from the specified convergence handle:

sth::emulation_convergence_info\
    -handle convergenceconfig1\
    -mode stats\

Sample Output:

{min_convergence_time 2318.32000732422} {expected_streams 5}
{traffic_timestamp_first_stream_reversion 0} {primary_streams 5}
{max_convergence_time 7044.94998168945} {avg_convergence_time 4678.8719909668}
{converged_streams 5} {min_reversion_convergence_time 0} {first_event_timestamp
219094272915.13} {convergence_time 7044.94998168945}
{packet_timestamp_first_stream 219094275233.45} {streams_exceeding_threshold 5}
{max_reversion_convergence_time 0} {avg_reversion_convergence_time 0}
{last_event_timestamp 219094272915.13} {first_event_timestamp_reversion 0}
{reversion_convergence_time 0} {packet_timestamp_last_stream 219094279960.08}
{last_event_timestamp_reversion 0} {non_converged_streams 0}
{traffic_timestamp_last_stream_reversion 0} {unexpected_converged_streams 0}
{status 1}