Skip to content

Commit

Permalink
code and test (Azure#23121)
Browse files Browse the repository at this point in the history
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
Co-authored-by: Yuchao Yan <[email protected]>
  • Loading branch information
2 people authored and rakshith91 committed Apr 10, 2022
1 parent d3d7f0d commit 5e470b5
Show file tree
Hide file tree
Showing 98 changed files with 34,785 additions and 17,280 deletions.
78 changes: 78 additions & 0 deletions sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,83 @@
# Release History

## 7.0.0b3 (2022-02-18)

**Features**

- Added operation CassandraClustersOperations.get_backup
- Added operation CassandraClustersOperations.list_backups
- Added operation CassandraResourcesOperations.begin_create_update_cassandra_view
- Added operation CassandraResourcesOperations.begin_delete_cassandra_view
- Added operation CassandraResourcesOperations.begin_migrate_cassandra_view_to_autoscale
- Added operation CassandraResourcesOperations.begin_migrate_cassandra_view_to_manual_throughput
- Added operation CassandraResourcesOperations.begin_update_cassandra_view_throughput
- Added operation CassandraResourcesOperations.get_cassandra_view
- Added operation CassandraResourcesOperations.get_cassandra_view_throughput
- Added operation CassandraResourcesOperations.list_cassandra_views
- Added operation GremlinResourcesOperations.begin_retrieve_continuous_backup_information
- Added operation MongoDBResourcesOperations.begin_create_update_mongo_role_definition
- Added operation MongoDBResourcesOperations.begin_create_update_mongo_user_definition
- Added operation MongoDBResourcesOperations.begin_delete_mongo_role_definition
- Added operation MongoDBResourcesOperations.begin_delete_mongo_user_definition
- Added operation MongoDBResourcesOperations.get_mongo_role_definition
- Added operation MongoDBResourcesOperations.get_mongo_user_definition
- Added operation MongoDBResourcesOperations.list_mongo_role_definitions
- Added operation MongoDBResourcesOperations.list_mongo_user_definitions
- Added operation SqlResourcesOperations.begin_create_update_client_encryption_key
- Added operation SqlResourcesOperations.get_client_encryption_key
- Added operation SqlResourcesOperations.list_client_encryption_keys
- Added operation TableResourcesOperations.begin_retrieve_continuous_backup_information
- Added operation group DataTransferJobsOperations
- Added operation group GraphResourcesOperations
- Added operation group RestorableGremlinDatabasesOperations
- Added operation group RestorableGremlinGraphsOperations
- Added operation group RestorableGremlinResourcesOperations
- Added operation group RestorableTableResourcesOperations
- Added operation group RestorableTablesOperations
- Added operation group ServiceOperations
- Model ARMResourceProperties has a new parameter identity
- Model CassandraKeyspaceCreateUpdateParameters has a new parameter identity
- Model CassandraKeyspaceGetResults has a new parameter identity
- Model CassandraTableCreateUpdateParameters has a new parameter identity
- Model CassandraTableGetResults has a new parameter identity
- Model DataCenterResourceProperties has a new parameter authentication_method_ldap_properties
- Model DatabaseAccountCreateUpdateParameters has a new parameter diagnostic_log_settings
- Model DatabaseAccountCreateUpdateParameters has a new parameter enable_materialized_views
- Model DatabaseAccountGetResults has a new parameter diagnostic_log_settings
- Model DatabaseAccountGetResults has a new parameter enable_materialized_views
- Model DatabaseAccountUpdateParameters has a new parameter diagnostic_log_settings
- Model DatabaseAccountUpdateParameters has a new parameter enable_materialized_views
- Model GremlinDatabaseCreateUpdateParameters has a new parameter identity
- Model GremlinDatabaseGetResults has a new parameter identity
- Model GremlinGraphCreateUpdateParameters has a new parameter identity
- Model GremlinGraphGetResults has a new parameter identity
- Model LocationProperties has a new parameter status
- Model MongoDBCollectionCreateUpdateParameters has a new parameter identity
- Model MongoDBCollectionGetResults has a new parameter identity
- Model MongoDBDatabaseCreateUpdateParameters has a new parameter identity
- Model MongoDBDatabaseGetResults has a new parameter identity
- Model RestoreParameters has a new parameter gremlin_databases_to_restore
- Model RestoreParameters has a new parameter tables_to_restore
- Model SqlContainerCreateUpdateParameters has a new parameter identity
- Model SqlContainerGetResults has a new parameter identity
- Model SqlDatabaseCreateUpdateParameters has a new parameter identity
- Model SqlDatabaseGetResults has a new parameter identity
- Model SqlStoredProcedureCreateUpdateParameters has a new parameter identity
- Model SqlStoredProcedureGetResults has a new parameter identity
- Model SqlTriggerCreateUpdateParameters has a new parameter identity
- Model SqlTriggerGetResults has a new parameter identity
- Model SqlUserDefinedFunctionCreateUpdateParameters has a new parameter identity
- Model SqlUserDefinedFunctionGetResults has a new parameter identity
- Model TableCreateUpdateParameters has a new parameter identity
- Model TableGetResults has a new parameter identity
- Model ThroughputSettingsGetResults has a new parameter identity
- Model ThroughputSettingsUpdateParameters has a new parameter identity

**Breaking changes**

- Operation RestorableMongodbCollectionsOperations.list has a new signature
- Operation RestorableMongodbCollectionsOperations.list has a new signature

## 7.0.0b2 (2021-10-26)

**Features**
Expand Down
10 changes: 5 additions & 5 deletions sdk/cosmos/azure-mgmt-cosmosdb/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.5",
"autorest": "3.7.2",
"use": [
"@autorest/python@5.8.4",
"@autorest/[email protected].2"
"@autorest/python@5.12.0",
"@autorest/[email protected].3"
],
"commit": "a87e536b2060dfe47c4d2bbf24a7f32d67944f9c",
"commit": "c731fa175f77b7b53ef0579eb877c61b5d0467d6",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/[email protected].2 --version=3.4.5",
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/[email protected].3 --version=3.7.2",
"readme": "specification/cosmos-db/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
__version__ = VERSION
__all__ = ['CosmosDBManagementClient']

try:
from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass
# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential


Expand All @@ -35,20 +33,19 @@ class CosmosDBManagementClientConfiguration(Configuration):

def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
**kwargs # type: Any
):
# type: (...) -> None
credential: "TokenCredential",
subscription_id: str,
**kwargs: Any
) -> None:
super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-10-15"
self.api_version = "2021-11-15-preview"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION))
self._configure(**kwargs)
Expand All @@ -68,4 +65,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Loading

0 comments on commit 5e470b5

Please sign in to comment.