Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2fe3ae4
updated sdk version
Jun 15, 2020
0d8a926
replaced ipRangeFilter by IpRules
Jun 15, 2020
e222acc
fixing IpRules
Jun 16, 2020
6224d47
Added autoscale related changes
Jun 16, 2020
063bfa4
tests for autoscale
Jun 16, 2020
3c52f90
Changes for ip_rules
Jun 17, 2020
939f147
init for updates in database account properties
Jun 16, 2020
9ea26bd
final changes and tests for enableFreeTier, serverVersion and enableA…
Jun 17, 2020
4bc3129
error message
Jun 17, 2020
8d48d6e
added analytical ttl in mongo collection
Jun 17, 2020
27bd4d7
fixes
Jun 17, 2020
e62c0b5
analytical_storage_ttl in cassandra table
Jun 17, 2020
0f46ce8
updated all tests
Jun 17, 2020
7a8cfab
[CosmosDB] Allow creating fixed collections (#13950)
MehaKaushik Jun 17, 2020
40beea1
Cherrypicking latest master CosmosDB
shurd Jun 17, 2020
d5be0d4
updated tests
Jun 18, 2020
abd4c7c
Merge upstream/dev
Jun 18, 2020
9516285
fixing lint issue
Jun 18, 2020
71adb50
fixing style check
Jun 19, 2020
5d1f99f
Addressed comments
Jun 26, 2020
39d2ab7
Removed preview tag from RuntimeResources
Jun 26, 2020
ee920e4
fixing cosmosdb in network
Jun 30, 2020
7852ac3
Fixing cosmosdb network tests
Jun 30, 2020
b20c3d7
missed private_endpint_connection yaml
Jun 30, 2020
202bf3a
Merge remote-tracking branch 'upstream/dev' into temp
Jul 2, 2020
665d105
missed private_endpint_connection yaml
Jun 30, 2020
2d07475
re-added network tests
Jul 2, 2020
db0cd1e
re-running tests
Jul 2, 2020
e3e04c1
fixture for CI
Jul 2, 2020
fe96d0a
changes to address github issue 14191
Jul 2, 2020
de2e4bf
nit
Jul 2, 2020
ec6def8
addressed PR comments
Jul 7, 2020
ec8e363
re-ran the network tests for cosmosdb
Jul 7, 2020
d11513c
lint fix
Jul 7, 2020
7c0cd0c
re-added network module tests
Jul 7, 2020
d185e0f
addressed comment
Jul 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixing style check
  • Loading branch information
Meha Kaushik committed Jun 19, 2020
commit 71adb505d34f3d617bd625f82138dbb65f5cc7ce
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def validate_failover_policies(ns):
fp_dict.append(FailoverPolicy(location_name=comps[0], failover_priority=int(comps[1])))
ns.failover_policies = fp_dict


def validate_private_endpoint_connection_id(ns):
if ns.connection_id:
from azure.cli.core.util import parse_proxy_resource_id
Expand Down
7 changes: 7 additions & 0 deletions src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ def cli_cosmosdb_update(client,
docdb_account = client.get(resource_group_name, account_name) # Workaround
return docdb_account


def get_ip_rules(ip_rules):
_ip_rules = []
if ip_rules:
Expand All @@ -229,13 +230,15 @@ def get_ip_rules(ip_rules):
_ip_rules.append(_ip_address_or_range)
return _ip_rules


def cli_cosmosdb_list(client, resource_group_name=None):
""" Lists all Azure Cosmos DB database accounts within a given resource group or subscription. """
if resource_group_name:
return client.list_by_resource_group(resource_group_name)

return client.list()


# pylint: disable=line-too-long
def cli_cosmosdb_keys(client, resource_group_name, account_name, key_type=CosmosKeyTypes.keys.value):
if key_type == CosmosKeyTypes.keys.value:
Expand Down Expand Up @@ -1076,6 +1079,7 @@ def cli_cosmosdb_table_throughput_update(client,
throughput_update_resource = _get_throughput_settings_update_parameters(throughput, max_throughput)
return client.update_table_throughput(resource_group_name, account_name, table_name, throughput_update_resource)


def _get_throughput_settings_update_parameters(throughput=None, max_throughput=None):

if throughput and max_throughput:
Expand All @@ -1087,6 +1091,7 @@ def _get_throughput_settings_update_parameters(throughput=None, max_throughput=N

return ThroughputSettingsUpdateParameters(resource=throughput_resource)


def cli_cosmosdb_network_rule_list(client, resource_group_name, account_name):
""" Lists the virtual network accounts associated with a Cosmos DB account """
cosmos_db_account = client.get(resource_group_name, account_name)
Expand Down Expand Up @@ -1207,6 +1212,7 @@ def reject_private_endpoint_connection(client, resource_group_name, account_name
description=description
)


def _get_options(throughput=None, max_throughput=None):
options = {}
if throughput and max_throughput:
Expand All @@ -1217,6 +1223,7 @@ def _get_options(throughput=None, max_throughput=None):
options['autoscaleSettings'] = AutoscaleSettings(max_throughput=max_throughput)
return options


######################
# data plane APIs
######################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def test_update_database_account(self, resource_group):
JMESPathCheck('kind', 'MongoDB'),
self.check('ipRules[0].ipAddressOrRange', '20.10.10.10'),
self.check('apiProperties.serverVersion', '3.2'),
self.check('enableAnalyticalStorage','True'),
self.check('enableFreeTier','False')
self.check('enableAnalyticalStorage', 'True'),
self.check('enableFreeTier', 'False')
])

self.cmd('az cosmosdb update -n {acc} -g {rg} --capabilities EnableAggregationPipeline')
Expand Down