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 .partition_safety_check import PartitionSafetyCheck
class WaitForPrimaryPlacementSafetyCheck(PartitionSafetyCheck):
"""Safety check that waits for the primary replica that was moved out of the
node due to upgrade to be placed back again on that node.
All required parameters must be populated in order to send to Azure.
:param kind: Required. Constant filled by server.
:type kind: str
:param partition_id: Id of the partition which is undergoing the safety
check.
:type partition_id: str
"""
_validation = {
'kind': {'required': True},
}
def __init__(self, **kwargs):
super(PartitionSafetyCheck, self).__init__(**kwargs)
self.partition_id = kwargs.get('partition_id', None)
self.kind = 'PartitionSafetyCheck'
# 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 .partition_safety_check import PartitionSafetyCheck
class EnsureAvailabilitySafetyCheck(PartitionSafetyCheck):
"""Safety check that waits to ensure the availability of the partition. It
waits until there are replicas available such that bringing down this
replica will not cause availability loss for the partition.
All required parameters must be populated in order to send to Azure.
:param kind: Required. Constant filled by server.
:type kind: str
:param partition_id: Id of the partition which is undergoing the safety
check.
:type partition_id: str
"""
_validation = {
'kind': {'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 .partition_safety_check import PartitionSafetyCheck
class WaitForReconfigurationSafetyCheck(PartitionSafetyCheck):
"""Safety check that waits for the current reconfiguration of the partition to
be completed before starting an upgrade.
All required parameters must be populated in order to send to Azure.
:param kind: Required. Constant filled by server.
:type kind: str
:param partition_id: Id of the partition which is undergoing the safety
check.
:type partition_id: str
"""
_validation = {
'kind': {'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 .partition_safety_check import PartitionSafetyCheck
class WaitForInbuildReplicaSafetyCheck(PartitionSafetyCheck):
"""Safety check that waits for the replica build operation to finish. This
indicates that there is a replica that is going through the copy or is
providing data for building another replica. Bring the node down will abort
this copy operation which are typically expensive involving data movements.
All required parameters must be populated in order to send to Azure.
:param kind: Required. Constant filled by server.
:type kind: str
:param partition_id: Id of the partition which is undergoing the safety
check.
:type partition_id: str
"""
_validation = {
'kind': {'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 .partition_safety_check import PartitionSafetyCheck
class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck):
"""Safety check that waits for the primary replica to be moved out of the node
before starting an upgrade to ensure the availability of the primary
replica for the partition.
All required parameters must be populated in order to send to Azure.
:param kind: Required. Constant filled by server.
:type kind: str
:param partition_id: Id of the partition which is undergoing the safety
check.
:type partition_id: str
"""
_validation = {
'kind': {'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 .partition_safety_check import PartitionSafetyCheck
class EnsurePartitionQurumSafetyCheck(PartitionSafetyCheck):
"""Safety check that ensures that a quorum of replicas are not lost for a
partition.
All required parameters must be populated in order to send to Azure.
:param kind: Required. Constant filled by server.
:type kind: str
:param partition_id: Id of the partition which is undergoing the safety
check.
:type partition_id: str
"""
_validation = {
'kind': {'required': True},
}