Switchback module¶
Reference to the cloud.switchback.py module.
switchback
¶
Classes for working with Nextmv Cloud switchback tests.
This module provides classes for interacting with switchback tests in Nextmv Cloud. It details the core data structures for these types of experiments.
| CLASS | DESCRIPTION |
|---|---|
TestComparisonSingle |
A structure to define a single comparison for tests. |
SwitchbackPlanUnit |
A structure to define a single unit in the switchback plan. |
SwitchbackPlan |
A structure to define the switchback plan for tests. |
SwitchbackTestMetadata |
Metadata for a Nextmv Cloud switchback test. |
SwitchbackTest |
A Nextmv Cloud switchback test definition. |
TestComparisonSingle
¶
Bases: BaseModel
A structure to define a single comparison for tests.
You can import the TestComparisonSingle class directly from cloud:
| PARAMETER | DESCRIPTION |
|---|---|
|
ID of the baseline instance for comparison.
TYPE:
|
|
ID of the candidate instance for comparison.
TYPE:
|
SwitchbackPlanUnit
¶
Bases: BaseModel
A structure to define a single unit in the switchback plan.
You can import the SwitchbackPlanUnit class directly from cloud:
| PARAMETER | DESCRIPTION |
|---|---|
|
Duration of this interval in minutes.
TYPE:
|
|
ID of the instance to run during this unit.
TYPE:
|
|
Index of this unit in the switchback plan.
TYPE:
|
SwitchbackPlan
¶
Bases: BaseModel
A structure to define the switchback plan for tests.
You can import the SwitchbackPlan class directly from cloud:
| PARAMETER | DESCRIPTION |
|---|---|
|
Start time of the switchback test.
TYPE:
|
|
List of switchback plan units.
TYPE:
|
start
class-attribute
instance-attribute
¶
start: datetime | None = None
Start time of the switchback test.
units
class-attribute
instance-attribute
¶
units: list[SwitchbackPlanUnit] | None = None
List of switchback plan units.
SwitchbackTestMetadata
¶
Bases: BaseModel
Metadata for a Nextmv Cloud switchback test.
You can import the SwitchbackTestMetadata class directly from cloud:
| PARAMETER | DESCRIPTION |
|---|---|
|
The unique identifier of the switchback test.
TYPE:
|
|
Name of the switchback test.
TYPE:
|
|
Description of the switchback test.
TYPE:
|
|
ID of the application to which the switchback test belongs.
TYPE:
|
|
Creation date of the switchback test.
TYPE:
|
|
Last update date of the switchback test.
TYPE:
|
|
The current status of the switchback test.
TYPE:
|
switchback_test_id
class-attribute
instance-attribute
¶
switchback_test_id: str | None = Field(
serialization_alias="id",
validation_alias=AliasChoices(
"id", "switchback_test_id"
),
default=None,
)
The unique identifier of the switchback test.
description
class-attribute
instance-attribute
¶
description: str | None = None
Description of the switchback test.
app_id
class-attribute
instance-attribute
¶
app_id: str | None = None
ID of the application to which the switchback test belongs.
created_at
class-attribute
instance-attribute
¶
created_at: datetime | None = None
Creation date of the switchback test.
updated_at
class-attribute
instance-attribute
¶
updated_at: datetime | None = None
Last update date of the switchback test.
status
class-attribute
instance-attribute
¶
The current status of the switchback test.
SwitchbackTest
¶
Bases: BaseModel
A Nextmv Cloud switchback test definition.
A switchback test is a type of experiment where runs are executed in sequential intervals, alternating between different instances to compare their performance.
You can import the SwitchbackTest class directly from cloud:
| PARAMETER | DESCRIPTION |
|---|---|
|
The unique identifier of the switchback test.
TYPE:
|
|
Name of the switchback test.
TYPE:
|
|
Description of the switchback test.
TYPE:
|
|
ID of the application to which the switchback test belongs.
TYPE:
|
|
Creation date of the switchback test.
TYPE:
|
|
Last update date of the switchback test.
TYPE:
|
|
The current status of the switchback test.
TYPE:
|
|
Start date of the switchback test, if applicable.
TYPE:
|
|
Completion date of the switchback test, if applicable.
TYPE:
|
|
Test comparison defined in the switchback test.
TYPE:
|
|
Switchback plan defining the intervals and instance switching.
TYPE:
|
|
List of runs in the switchback test.
TYPE:
|
switchback_test_id
class-attribute
instance-attribute
¶
switchback_test_id: str | None = Field(
serialization_alias="id",
validation_alias=AliasChoices(
"id", "switchback_test_id"
),
default=None,
)
The unique identifier of the switchback test.
description
class-attribute
instance-attribute
¶
description: str | None = None
Description of the switchback test.
app_id
class-attribute
instance-attribute
¶
app_id: str | None = None
ID of the application to which the switchback test belongs.
created_at
class-attribute
instance-attribute
¶
created_at: datetime | None = None
Creation date of the switchback test.
updated_at
class-attribute
instance-attribute
¶
updated_at: datetime | None = None
Last update date of the switchback test.
status
class-attribute
instance-attribute
¶
The current status of the switchback test.
started_at
class-attribute
instance-attribute
¶
started_at: datetime | None = None
Start date of the switchback test, if applicable.
completed_at
class-attribute
instance-attribute
¶
completed_at: datetime | None = None
Completion date of the switchback test, if applicable.
comparison
class-attribute
instance-attribute
¶
comparison: TestComparisonSingle | None = None
Test comparison defined in the switchback test.
plan
class-attribute
instance-attribute
¶
plan: SwitchbackPlan | None = None
Switchback plan defining the intervals and instance switching.