Skip to content

Commit

Permalink
[AutoRelease] t2-mongocluster-2024-09-25-24276(can only be merged by …
Browse files Browse the repository at this point in the history
…SDK owner) (#37563)

* code and test

* update-testcase

* Update CHANGELOG.md

* Update CHANGELOG.md

---------

Co-authored-by: azure-sdk <PythonSdkPipelines>
Co-authored-by: ChenxiJiang333 <[email protected]>
Co-authored-by: ChenxiJiang333 <[email protected]>
Co-authored-by: Yuchao Yan <[email protected]>
  • Loading branch information
4 people authored Sep 27, 2024
1 parent 2bfcd9f commit a61273f
Show file tree
Hide file tree
Showing 47 changed files with 427 additions and 252 deletions.
37 changes: 37 additions & 0 deletions sdk/mongocluster/azure-mgmt-mongocluster/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# Release History

## 1.0.0 (2024-09-26)

### Features Added

- Model `ConnectionString` added property `name`
- Model `MongoClusterProperties` added property `administrator`
- Model `MongoClusterProperties` added property `high_availability`
- Model `MongoClusterProperties` added property `storage`
- Model `MongoClusterProperties` added property `sharding`
- Model `MongoClusterProperties` added property `compute`
- Model `MongoClusterProperties` added property `backup`
- Model `MongoClusterUpdateProperties` added property `administrator`
- Model `MongoClusterUpdateProperties` added property `high_availability`
- Model `MongoClusterUpdateProperties` added property `storage`
- Model `MongoClusterUpdateProperties` added property `sharding`
- Model `MongoClusterUpdateProperties` added property `compute`
- Model `MongoClusterUpdateProperties` added property `backup`
- Added model `AdministratorProperties`
- Added model `BackupProperties`
- Added model `ComputeProperties`
- Added enum `HighAvailabilityMode`
- Added model `HighAvailabilityProperties`
- Added model `ShardingProperties`
- Added model `StorageProperties`

### Breaking Changes

- Model `MongoClusterProperties` deleted or renamed its instance variable `administrator_login`
- Model `MongoClusterProperties` deleted or renamed its instance variable `administrator_login_password`
- Model `MongoClusterProperties` deleted or renamed its instance variable `earliest_restore_time`
- Model `MongoClusterProperties` deleted or renamed its instance variable `node_group_specs`
- Model `MongoClusterUpdateProperties` deleted or renamed its instance variable `administrator_login`
- Model `MongoClusterUpdateProperties` deleted or renamed its instance variable `administrator_login_password`
- Model `MongoClusterUpdateProperties` deleted or renamed its instance variable `node_group_specs`
- Deleted or renamed model `NodeGroupSpec`
- Deleted or renamed model `NodeKind`

## 1.0.0b2 (2024-09-23)

### Features Added
Expand Down
2 changes: 1 addition & 1 deletion sdk/mongocluster/azure-mgmt-mongocluster/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"commit": "465d34792335e02d9bf8de153734420d769adac1",
"commit": "f93850874010501f216ceadf19459402efd16d9e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/mongocluster/DocumentDB.MongoCluster.Management",
"@azure-tools/typespec-python": "0.33.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ class MongoClusterMgmtClient: # pylint: disable=client-accepts-api-version-keyw
:type subscription_id: str
:param base_url: Service host. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: The API version to use for this operation. Default value is
"2024-06-01-preview". Note that overriding this default value may result in unsupported
behavior.
:keyword api_version: The API version to use for this operation. Default value is "2024-07-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ class MongoClusterMgmtClientConfiguration: # pylint: disable=too-many-instance-
:type subscription_id: str
:param base_url: Service host. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: The API version to use for this operation. Default value is
"2024-06-01-preview". Note that overriding this default value may result in unsupported
behavior.
:keyword api_version: The API version to use for this operation. Default value is "2024-07-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

Expand All @@ -43,7 +42,7 @@ def __init__(
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
api_version: str = kwargs.pop("api_version", "2024-06-01-preview")
api_version: str = kwargs.pop("api_version", "2024-07-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b2"
VERSION = "1.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ class MongoClusterMgmtClient: # pylint: disable=client-accepts-api-version-keyw
:type subscription_id: str
:param base_url: Service host. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: The API version to use for this operation. Default value is
"2024-06-01-preview". Note that overriding this default value may result in unsupported
behavior.
:keyword api_version: The API version to use for this operation. Default value is "2024-07-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ class MongoClusterMgmtClientConfiguration: # pylint: disable=too-many-instance-
:type subscription_id: str
:param base_url: Service host. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: The API version to use for this operation. Default value is
"2024-06-01-preview". Note that overriding this default value may result in unsupported
behavior.
:keyword api_version: The API version to use for this operation. Default value is "2024-07-01".
Note that overriding this default value may result in unsupported behavior.
:paramtype api_version: str
"""

Expand All @@ -43,7 +42,7 @@ def __init__(
base_url: str = "https://management.azure.com",
**kwargs: Any
) -> None:
api_version: str = kwargs.pop("api_version", "2024-06-01-preview")
api_version: str = kwargs.pop("api_version", "2024-07-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,25 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._models import AdministratorProperties
from ._models import BackupProperties
from ._models import CheckNameAvailabilityRequest
from ._models import CheckNameAvailabilityResponse
from ._models import ComputeProperties
from ._models import ConnectionString
from ._models import ErrorAdditionalInfo
from ._models import ErrorDetail
from ._models import ErrorResponse
from ._models import FirewallRule
from ._models import FirewallRuleProperties
from ._models import HighAvailabilityProperties
from ._models import ListConnectionStringsResult
from ._models import MongoCluster
from ._models import MongoClusterProperties
from ._models import MongoClusterReplicaParameters
from ._models import MongoClusterRestoreParameters
from ._models import MongoClusterUpdate
from ._models import MongoClusterUpdateProperties
from ._models import NodeGroupSpec
from ._models import Operation
from ._models import OperationDisplay
from ._models import PrivateEndpoint
Expand All @@ -36,15 +39,17 @@
from ._models import Replica
from ._models import ReplicationProperties
from ._models import Resource
from ._models import ShardingProperties
from ._models import StorageProperties
from ._models import SystemData
from ._models import TrackedResource

from ._enums import ActionType
from ._enums import CheckNameAvailabilityReason
from ._enums import CreateMode
from ._enums import CreatedByType
from ._enums import HighAvailabilityMode
from ._enums import MongoClusterStatus
from ._enums import NodeKind
from ._enums import Origin
from ._enums import PreviewFeature
from ._enums import PrivateEndpointConnectionProvisioningState
Expand All @@ -60,22 +65,25 @@
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"AdministratorProperties",
"BackupProperties",
"CheckNameAvailabilityRequest",
"CheckNameAvailabilityResponse",
"ComputeProperties",
"ConnectionString",
"ErrorAdditionalInfo",
"ErrorDetail",
"ErrorResponse",
"FirewallRule",
"FirewallRuleProperties",
"HighAvailabilityProperties",
"ListConnectionStringsResult",
"MongoCluster",
"MongoClusterProperties",
"MongoClusterReplicaParameters",
"MongoClusterRestoreParameters",
"MongoClusterUpdate",
"MongoClusterUpdateProperties",
"NodeGroupSpec",
"Operation",
"OperationDisplay",
"PrivateEndpoint",
Expand All @@ -90,14 +98,16 @@
"Replica",
"ReplicationProperties",
"Resource",
"ShardingProperties",
"StorageProperties",
"SystemData",
"TrackedResource",
"ActionType",
"CheckNameAvailabilityReason",
"CreateMode",
"CreatedByType",
"HighAvailabilityMode",
"MongoClusterStatus",
"NodeKind",
"Origin",
"PreviewFeature",
"PrivateEndpointConnectionProvisioningState",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ class CreateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Create a replica cluster in the same geographic region as the source cluster."""


class HighAvailabilityMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The high availability modes for a cluster."""

DISABLED = "Disabled"
"""High availability mode is disabled. This mode is can see availability impact during faults or
maintenance and is not recommended for production."""
SAME_ZONE = "SameZone"
"""High availability mode is enabled, where each server in a shard is placed in the same
availability zone."""
ZONE_REDUNDANT_PREFERRED = "ZoneRedundantPreferred"
"""High availability mode is enabled and preferences ZoneRedundant if availability zones capacity
is available in the region, otherwise falls-back to provisioning with SameZone."""


class MongoClusterStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The status of the Mongo cluster resource."""

Expand All @@ -73,13 +87,6 @@ class MongoClusterStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The mongo cluster resource is being dropped."""


class NodeKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The kind of the node on the cluster."""

SHARD = "Shard"
"""The node is a shard kind."""


class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit
logs UX. Default value is "user,system".
Expand Down
Loading

0 comments on commit a61273f

Please sign in to comment.