Skip to content

Commit 3141f7f

Browse files
authored
{Cosmosdb-preview} Adding param azure-connection-method to Managed cassandra cluster Create (Azure#8637)
* adding param azure-connection-method for managed cassandra VPN * lint fixes * add test case for azure-connection-method for VPN MI cassandra cluster * reducing the size of option name for lint concern * adding release versions and details
1 parent ad5bcba commit 3141f7f

File tree

6 files changed

+1881
-5
lines changed

6 files changed

+1881
-5
lines changed

src/cosmosdb-preview/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
.. :changelog:
22
Release History
33
===============
4+
1.3.0
5+
* Add support for VPN cluster deployments in managed cassandra.
6+
7+
+++++++
48
1.2.1
59
* 'az cosmosdb restore': Remove restore validations which would cause timeouts for large restore
610

src/cosmosdb-preview/azext_cosmosdb_preview/_params.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ def load_arguments(self, _):
183183
c.argument('initial_cassandra_admin_password', options_list=['--initial-cassandra-admin-password', '-i'], help="The intial password to be configured when a cluster is created for authentication_method Cassandra.")
184184
c.argument('restore_from_backup_id', help="The resource id of a backup. If provided on create, the backup will be used to prepopulate the cluster. The cluster data center count and node counts must match the backup.")
185185
c.argument('cluster_name_override', help="If a cluster must have a name that is not a valid azure resource name, this field can be specified to choose the Cassandra cluster name. Otherwise, the resource name will be used as the cluster name.")
186+
c.argument('azure_connection_method', options_list=['--azure-connection-method', '-q'], help="This field can be specified to create VPN based Cassandra cluster, where the datacenter is in customers vnet with limited permissions to azure.")
186187

187188
# Managed Cassandra Cluster
188189
for scope in ['managed-cassandra cluster backup show']:

src/cosmosdb-preview/azext_cosmosdb_preview/custom.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ def cli_cosmosdb_managed_cassandra_cluster_create(client,
339339
hours_between_backups=None,
340340
repair_enabled=None,
341341
cluster_type='Production',
342-
extensions=None):
342+
extensions=None,
343+
azure_connection_method=None):
343344

344345
"""Creates an Azure Managed Cassandra Cluster"""
345346

@@ -362,7 +363,8 @@ def cli_cosmosdb_managed_cassandra_cluster_create(client,
362363
hours_between_backups=hours_between_backups,
363364
repair_enabled=repair_enabled,
364365
cluster_type=cluster_type,
365-
extensions=extensions)
366+
extensions=extensions,
367+
azure_connection_method=azure_connection_method)
366368

367369
managed_service_identity_parameter = ManagedCassandraManagedServiceIdentity(
368370
type=identity_type
@@ -451,8 +453,8 @@ def cli_cosmosdb_managed_cassandra_cluster_update(client,
451453
external_seed_nodes=cluster_resource.properties.external_seed_nodes,
452454
seed_nodes=cluster_resource.properties.seed_nodes,
453455
cluster_type=cluster_type,
454-
extensions=extensions
455-
)
456+
extensions=extensions,
457+
azure_connection_method=cluster_resource.properties.azure_connection_method)
456458

457459
cluster_resource_create_update_parameters = ClusterResource(
458460
location=cluster_resource.location,

0 commit comments

Comments
 (0)