Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .chaos_event import ChaosEvent
class TestErrorChaosEvent(ChaosEvent):
"""Describes a Chaos event that gets generated when an unexpected event occurs
in the Chaos engine.
For example, due to the cluster snapshot being inconsistent, while faulting
an entity, Chaos found that the entity was already faulted -- which would
be an unexpected event.
All required parameters must be populated in order to send to Azure.
:param time_stamp_utc: Required. The UTC timestamp when this Chaos event
was generated.
:type time_stamp_utc: datetime
:param kind: Required. Constant filled by server.
:type kind: str
:param reason: Describes why TestErrorChaosEvent was generated. For
example, Chaos tries to fault a partition but finds that the partition is
no longer fault tolerant, then a TestErrorEvent gets generated with the
def __init__(self, **kwargs):
super(ChaosEvent, self).__init__(**kwargs)
self.time_stamp_utc = kwargs.get('time_stamp_utc', None)
self.kind = None
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .chaos_event import ChaosEvent
class WaitingChaosEvent(ChaosEvent):
"""Describes a Chaos event that gets generated when Chaos is waiting for the
cluster to become ready for faulting, for example, Chaos may be waiting for
the on-going upgrade to finish.
All required parameters must be populated in order to send to Azure.
:param time_stamp_utc: Required. The UTC timestamp when this Chaos event
was generated.
:type time_stamp_utc: datetime
:param kind: Required. Constant filled by server.
:type kind: str
:param reason: Describes why the WaitingChaosEvent was generated, for
example, due to a cluster upgrade.
:type reason: str
"""
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .chaos_event import ChaosEvent
class ExecutingFaultsChaosEvent(ChaosEvent):
"""Describes a Chaos event that gets generated when Chaos has decided on the
faults for an iteration. This Chaos event contains the details of the
faults as a list of strings.
All required parameters must be populated in order to send to Azure.
:param time_stamp_utc: Required. The UTC timestamp when this Chaos event
was generated.
:type time_stamp_utc: datetime
:param kind: Required. Constant filled by server.
:type kind: str
:param faults: List of string description of the faults that Chaos decided
to execute in an iteration.
:type faults: list[str]
"""
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .chaos_event import ChaosEvent
class StartedChaosEvent(ChaosEvent):
"""Describes a Chaos event that gets generated when Chaos is started.
All required parameters must be populated in order to send to Azure.
:param time_stamp_utc: Required. The UTC timestamp when this Chaos event
was generated.
:type time_stamp_utc: datetime
:param kind: Required. Constant filled by server.
:type kind: str
:param chaos_parameters: Defines all the parameters to configure a Chaos
run.
:type chaos_parameters: ~azure.servicefabric.models.ChaosParameters
"""
_validation = {
'time_stamp_utc': {'required': True},
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .chaos_event import ChaosEvent
class ValidationFailedChaosEvent(ChaosEvent):
"""Chaos event corresponding to a failure during validation.
All required parameters must be populated in order to send to Azure.
:param time_stamp_utc: Required. The UTC timestamp when this Chaos event
was generated.
:type time_stamp_utc: datetime
:param kind: Required. Constant filled by server.
:type kind: str
:param reason: Describes why the ValidationFailedChaosEvent was generated.
This may happen because more than MaxPercentUnhealthyNodes are unhealthy
for more than MaxClusterStabilizationTimeout. This reason will be in the
Reason property of the ValidationFailedChaosEvent as a string.
:type reason: str
"""
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .chaos_event import ChaosEvent
class StoppedChaosEvent(ChaosEvent):
"""Describes a Chaos event that gets generated when Chaos stops because either
the user issued a stop or the time to run was up.
All required parameters must be populated in order to send to Azure.
:param time_stamp_utc: Required. The UTC timestamp when this Chaos event
was generated.
:type time_stamp_utc: datetime
:param kind: Required. Constant filled by server.
:type kind: str
:param reason: Describes why Chaos stopped. Chaos can stop because of
StopChaos API call or the timeToRun provided in ChaosParameters is over.
:type reason: str
"""
_validation = {