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
Added autoscale related changes
  • Loading branch information
Meha Kaushik committed Jun 16, 2020
commit 6224d470bad20ffa582f7cd7ba89f2a899be1cf4
19 changes: 19 additions & 0 deletions src/azure-cli/azure/cli/command_modules/cosmosdb/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from azure.cli.command_modules.cosmosdb.custom import (
CosmosKeyTypes)


SQL_GREMLIN_INDEXING_POLICY_EXAMPLE = """--idx "{\\"indexingMode\\": \\"consistent\\", \\"automatic\\": true, \\"includedPaths\\": [{\\"path\\": \\"/*\\"}], \\"excludedPaths\\": [{ \\"path\\": \\"/headquarters/employees/?\\"}, { \\"path\\": \\"/\\\\"_etag\\\\"/?\\"}]}"
"""

Expand Down Expand Up @@ -128,6 +129,7 @@ def load_arguments(self, _):
c.argument('account_name', account_name_type, id_part=None)
c.argument('database_name', options_list=['--name', '-n'], help="Database name")
c.argument('throughput', help='The throughput of SQL database (RU/s). Default value is 400')
c.argument('max_throughput', help='The maximum throughput of SQL database can scale to (RU/s). Provided when the container is autoscale enabled.')

# SQL container
with self.argument_context('cosmosdb sql container') as c:
Expand All @@ -140,6 +142,7 @@ def load_arguments(self, _):
c.argument('unique_key_policy', options_list=['--unique-key-policy', '-u'], type=shell_safe_json_parse, completer=FilesCompleter(), help='Unique Key Policy, you can enter it as a string or as a file, e.g., --unique-key-policy @policy-file.json or ' + SQL_UNIQUE_KEY_POLICY_EXAMPLE)
c.argument('conflict_resolution_policy', options_list=['--conflict-resolution-policy', '-c'], type=shell_safe_json_parse, completer=FilesCompleter(), help='Conflict Resolution Policy, you can enter it as a string or as a file, e.g., --conflict-resolution-policy @policy-file.json or ' + SQL_GREMLIN_CONFLICT_RESOLUTION_POLICY_EXAMPLE)
c.argument('throughput', help='The throughput of SQL container (RU/s). Default value is 400')
c.argument('max_throughput', help='The maximum throughput of SQL container can scale to (RU/s). Provided when the container is autoscale enabled.')

# SQL stored procedure
with self.argument_context('cosmosdb sql stored-procedure') as c:
Expand Down Expand Up @@ -172,6 +175,7 @@ def load_arguments(self, _):
c.argument('account_name', account_name_type, id_part=None)
c.argument('database_name', options_list=['--name', '-n'], help="Database name")
c.argument('throughput', help='The throughput of MongoDB database (RU/s). Default value is 400')
c.argument('max_throughput', help='The maximum throughput of MongoDB database can scale to (RU/s). Provided when the container is autoscale enabled.')

with self.argument_context('cosmosdb mongodb collection') as c:
c.argument('account_name', account_name_type, id_part=None)
Expand All @@ -180,12 +184,14 @@ def load_arguments(self, _):
c.argument('shard_key_path', options_list=['--shard'], help="Sharding key path.")
c.argument('indexes', options_list=['--idx'], type=shell_safe_json_parse, completer=FilesCompleter(), help='Indexes, you can enter it as a string or as a file, e.g., --idx @indexes-file.json or ' + MONGODB_INDEXES_EXAMPLE)
c.argument('throughput', help='The throughput of MongoDB collection (RU/s). Default value is 400')
c.argument('max_throughput', help='The maximum throughput of MongoDB collection can scale to (RU/s). Provided when the container is autoscale enabled.')

# Cassandra
with self.argument_context('cosmosdb cassandra keyspace') as c:
c.argument('account_name', account_name_type, id_part=None)
c.argument('keyspace_name', options_list=['--name', '-n'], help="Keyspace name")
c.argument('throughput', help='The throughput of Cassandra keyspace (RU/s). Default value is 400')
c.argument('max_throughput', help='The maximum throughput of Cassandra keyspace can scale to (RU/s). Provided when the container is autoscale enabled.')

with self.argument_context('cosmosdb cassandra table') as c:
c.argument('account_name', account_name_type, id_part=None)
Expand All @@ -194,12 +200,14 @@ def load_arguments(self, _):
c.argument('default_ttl', options_list=['--ttl'], type=int, help='Default TTL. If the value is missing or set to "-1", items don’t expire. If the value is set to "n", items will expire "n" seconds after last modified time.')
c.argument('schema', type=shell_safe_json_parse, completer=FilesCompleter(), help='Schema, you can enter it as a string or as a file, e.g., --schema @schema-file.json or ' + CASSANDRA_SCHEMA_EXAMPLE)
c.argument('throughput', help='The throughput of Cassandra table (RU/s). Default value is 400')
c.argument('max_throughput', help='The maximum throughput of Cassandra table can scale to (RU/s). Provided when the container is autoscale enabled.')

# Gremlin
with self.argument_context('cosmosdb gremlin database') as c:
c.argument('account_name', account_name_type, id_part=None)
c.argument('database_name', options_list=['--name', '-n'], help="Database name")
c.argument('throughput', help='The throughput Gremlin database (RU/s). Default value is 400')
c.argument('max_throughput', help='The maximum throughput of Gremlin database can scale to (RU/s). Provided when the container is autoscale enabled.')

with self.argument_context('cosmosdb gremlin graph') as c:
c.argument('account_name', account_name_type, id_part=None)
Expand All @@ -210,59 +218,70 @@ def load_arguments(self, _):
c.argument('indexing_policy', options_list=['--idx'], type=shell_safe_json_parse, completer=FilesCompleter(), help='Indexing Policy, you can enter it as a string or as a file, e.g., --idx @policy-file.json or ' + SQL_GREMLIN_INDEXING_POLICY_EXAMPLE)
c.argument('conflict_resolution_policy', options_list=['--conflict-resolution-policy', '-c'], type=shell_safe_json_parse, completer=FilesCompleter(), help='Conflict Resolution Policy, you can enter it as a string or as a file, e.g., --conflict-resolution-policy @policy-file.json or ' + SQL_GREMLIN_CONFLICT_RESOLUTION_POLICY_EXAMPLE)
c.argument('throughput', help='The throughput of Gremlin graph (RU/s). Default value is 400')
c.argument('max_throughput', help='The maximum throughput of Gremlin graph can scale to (RU/s). Provided when the container is autoscale enabled.')

# Table
with self.argument_context('cosmosdb table') as c:
c.argument('account_name', account_name_type, id_part=None)
c.argument('table_name', options_list=['--name', '-n'], help="Table name")
c.argument('throughput', help='The throughput of Table (RU/s). Default value is 400')
c.argument('max_throughput', help='The maximum throughput Table can scale to (RU/s). Provided when the container is autoscale enabled.')

# Throughput
with self.argument_context('cosmosdb sql database throughput') as c:
c.argument('account_name', account_name_type, id_part=None)
c.argument('database_name', options_list=['--name', '-n'], help="Database name")
c.argument('throughput', type=int, help='The throughput of SQL database (RU/s).')
c.argument('max_throughput', help='The maximum throughput SQL database can scale to (RU/s). Provided when the container is autoscale enabled.')

with self.argument_context('cosmosdb sql container throughput') as c:
c.argument('account_name', account_name_type, id_part=None)
c.argument('database_name', database_name_type)
c.argument('container_name', options_list=['--name', '-n'], help="Container name")
c.argument('throughput', type=int, help='The throughput of SQL container (RU/s).')
c.argument('max_throughput', help='The maximum throughput SQL container can scale to (RU/s). Provided when the container is autoscale enabled.')

with self.argument_context('cosmosdb mongodb database throughput') as c:
c.argument('account_name', account_name_type, id_part=None)
c.argument('database_name', options_list=['--name', '-n'], help="Database name")
c.argument('throughput', type=int, help='The throughput of MongoDB database (RU/s).')
c.argument('max_throughput', help='The maximum throughput MongoDB database can scale to (RU/s). Provided when the container is autoscale enabled.')

with self.argument_context('cosmosdb mongodb collection throughput') as c:
c.argument('account_name', account_name_type, id_part=None)
c.argument('database_name', database_name_type)
c.argument('collection_name', options_list=['--name', '-n'], help="Collection name")
c.argument('throughput', type=int, help='The throughput of MongoDB collection (RU/s).')
c.argument('max_throughput', help='The maximum throughput Table can scale to (RU/s). Provided when the container is autoscale enabled.')

with self.argument_context('cosmosdb cassandra keyspace throughput') as c:
c.argument('account_name', account_name_type, id_part=None)
c.argument('keyspace_name', options_list=['--name', '-n'], help="Keyspace name")
c.argument('throughput', type=int, help='The throughput of Cassandra keyspace (RU/s).')
c.argument('max_throughput', help='The maximum throughput Cassandra keyspace can scale to (RU/s). Provided when the container is autoscale enabled.')

with self.argument_context('cosmosdb cassandra table throughput') as c:
c.argument('account_name', account_name_type, id_part=None)
c.argument('keyspace_name', options_list=['--keyspace-name', '-k'], help="Keyspace name")
c.argument('table_name', options_list=['--name', '-n'], help="Table name")
c.argument('throughput', type=int, help='The throughput of Cassandra table (RU/s).')
c.argument('max_throughput', help='The maximum throughput Cassandra table can scale to (RU/s). Provided when the container is autoscale enabled.')

with self.argument_context('cosmosdb gremlin database throughput') as c:
c.argument('account_name', account_name_type, id_part=None)
c.argument('database_name', options_list=['--name', '-n'], help="Database name")
c.argument('throughput', type=int, help='The throughput of Gremlin database (RU/s).')
c.argument('max_throughput', help='The maximum throughput Gremlin database can scale to (RU/s). Provided when the container is autoscale enabled.')

with self.argument_context('cosmosdb gremlin graph throughput') as c:
c.argument('account_name', account_name_type, id_part=None)
c.argument('database_name', database_name_type)
c.argument('graph_name', options_list=['--name', '-n'], help="Grapth name")
c.argument('throughput', type=int, help='The throughput Gremlin graph (RU/s).')
c.argument('max_throughput', help='The maximum throughput Gremlin graph can scale to (RU/s). Provided when the container is autoscale enabled.')

with self.argument_context('cosmosdb table throughput') as c:
c.argument('account_name', account_name_type, id_part=None)
c.argument('table_name', options_list=['--name', '-n'], help="Table name")
c.argument('throughput', type=int, help='The throughput of Table (RU/s).')
c.argument('max_throughput', help='The maximum throughput of Table can scale to (RU/s). Provided when the container is autoscale enabled.')
Loading