Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
00b9235
{Docs} Remove stale reference in README to closed issue about extensi…
dkmiller Apr 27, 2020
ab16df0
Merge remote-tracking branch 'upstream/release'
azclibot Apr 28, 2020
03436bc
Merge remote-tracking branch 'upstream/release'
azclibot Apr 30, 2020
7d98b1f
Merge remote-tracking branch 'upstream/release'
azclibot May 19, 2020
06f6ec5
Merge remote-tracking branch 'upstream/release'
azclibot Jun 2, 2020
adab2d2
Merge remote-tracking branch 'upstream/release'
azclibot Jun 23, 2020
c7b9f98
Merge remote-tracking branch 'upstream/release'
azclibot Jul 14, 2020
18e8b8d
Merge remote-tracking branch 'upstream/release'
azclibot Jul 16, 2020
1eb5074
Merge remote-tracking branch 'upstream/release'
azclibot Aug 4, 2020
cc3a159
Merge remote-tracking branch 'upstream/release' into master
azclibot Aug 6, 2020
af8f98e
Merge remote-tracking branch 'upstream/release' into master
azclibot Aug 26, 2020
0f904b9
Merge remote-tracking branch 'upstream/release' into master
azclibot Aug 28, 2020
53ae210
intial commit for migration support for autoscale
Aug 21, 2020
f6040c8
tests and their recordings
Aug 22, 2020
2394d3e
nit
Aug 22, 2020
6726e82
revert wrong version change
Aug 24, 2020
a7e7f99
fixing linting issues
Aug 25, 2020
f58d7d2
fixing linting issues
Aug 25, 2020
ec876c7
Merged into a single cmdlet
Aug 28, 2020
2b8ece2
uncommenting tests
Aug 28, 2020
32b8991
Lint fix
Aug 28, 2020
71d0b58
Update src/azure-cli/azure/cli/command_modules/cosmosdb/commands.py
MehaKaushik Sep 5, 2020
41501d6
lint and style fixes
Sep 5, 2020
07cf1dc
more fixes to style
Sep 7, 2020
defb97f
addressing comments
Sep 10, 2020
2109770
adding examples
Sep 14, 2020
ab0977f
Merge dev
Sep 14, 2020
dbc04e4
updating help
Sep 14, 2020
23e0437
Revert "updating help"
Sep 14, 2020
bb02872
Revert "adding examples"
Sep 14, 2020
52bbea8
Merge branch 'dev2' into autoscale_migration
Sep 16, 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 linting issues
  • Loading branch information
Meha Kaushik committed Sep 14, 2020
commit a7e7f9911ad9d515d51ace6274e27df91d7ab179
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,6 @@ def test_cosmosdb_sql_resource_throughput(self, resource_group):
ctn_througput_update = self.cmd('az cosmosdb sql container throughput update -g {rg} -a {acc} -d {db_name} -n {ctn_name} --throughput {tp2}').get_output_in_json()
assert ctn_througput_update["resource"]["throughput"] == tp2


@ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_resource_throughput_autoscale')
def test_cosmosdb_sql_resource_throughput_autoscale(self, resource_group):
tp1 = 800
Expand All @@ -952,15 +951,15 @@ def test_cosmosdb_sql_resource_throughput_autoscale(self, resource_group):
db_throughput_show = self.cmd('az cosmosdb sql database throughput show -g {rg} -a {acc} -n {db_name}').get_output_in_json()
assert db_throughput_show["resource"]["throughput"] == tp1

db_througput_migrate_to_autoscale = self.cmd('az cosmosdb sql database throughput migrate-to-autoscale -g {rg} -a {acc} -n {db_name}').get_output_in_json()
self.cmd('az cosmosdb sql database throughput migrate-to-autoscale -g {rg} -a {acc} -n {db_name}').get_output_in_json()

db_throughput_show = self.cmd('az cosmosdb sql database throughput show -g {rg} -a {acc} -n {db_name}').get_output_in_json()
assert db_throughput_show["resource"]["autoscaleSettings"]["maxThroughput"]

db_througput_update = self.cmd('az cosmosdb sql database throughput update -g {rg} -a {acc} -n {db_name} --max-throughput {tp2}').get_output_in_json()
assert db_througput_update["resource"]["autoscaleSettings"]["maxThroughput"] == tp2

db_througput_migrate_to_manual = self.cmd('az cosmosdb sql database throughput migrate-to-manual-throughput -g {rg} -a {acc} -n {db_name}').get_output_in_json()
self.cmd('az cosmosdb sql database throughput migrate-to-manual-throughput -g {rg} -a {acc} -n {db_name}').get_output_in_json()

self.cmd('az cosmosdb sql container create -g {rg} -a {acc} -d {db_name} -n {ctn_name} -p {part} --throughput {tp3}')
ctn_throughput_show = self.cmd('az cosmosdb sql container throughput show -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json()
Expand All @@ -973,7 +972,6 @@ def test_cosmosdb_sql_resource_throughput_autoscale(self, resource_group):

ctn_througput_migrate_to_manual = self.cmd('az cosmosdb sql container throughput migrate-to-manual-throughput -g {rg} -a {acc} -d {db_name} -n {ctn_name}').get_output_in_json()


@ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_mongodb_resource_throughput_autoscale')
def test_cosmosdb_mongodb_resource_throughput_autoscale(self, resource_group):
tp1 = 800
Expand All @@ -998,15 +996,15 @@ def test_cosmosdb_mongodb_resource_throughput_autoscale(self, resource_group):
db_throughput_show = self.cmd('az cosmosdb mongodb database throughput show -g {rg} -a {acc} -n {db_name}').get_output_in_json()
assert db_throughput_show["resource"]["throughput"] == tp1

db_througput_migrate_to_autoscale = self.cmd('az cosmosdb mongodb database throughput migrate-to-autoscale -g {rg} -a {acc} -n {db_name}').get_output_in_json()
self.cmd('az cosmosdb mongodb database throughput migrate-to-autoscale -g {rg} -a {acc} -n {db_name}').get_output_in_json()

db_throughput_show = self.cmd('az cosmosdb mongodb database throughput show -g {rg} -a {acc} -n {db_name}').get_output_in_json()
assert db_throughput_show["resource"]["autoscaleSettings"]["maxThroughput"]

db_througput_update = self.cmd('az cosmosdb mongodb database throughput update -g {rg} -a {acc} -n {db_name} --max-throughput {tp2}').get_output_in_json()
assert db_througput_update["resource"]["autoscaleSettings"]["maxThroughput"] == tp2

db_througput_migrate_to_manual = self.cmd('az cosmosdb mongodb database throughput migrate-to-manual-throughput -g {rg} -a {acc} -n {db_name}').get_output_in_json()
self.cmd('az cosmosdb mongodb database throughput migrate-to-manual-throughput -g {rg} -a {acc} -n {db_name}').get_output_in_json()

self.cmd('az cosmosdb mongodb collection create -g {rg} -a {acc} -d {db_name} -n {col_name} -p {part} --throughput {tp3} --shard {shard_key}')
col_throughput_show = self.cmd('az cosmosdb mongodb collection throughput show -g {rg} -a {acc} -d {db_name} -n {col_name}').get_output_in_json()
Expand All @@ -1019,7 +1017,6 @@ def test_cosmosdb_mongodb_resource_throughput_autoscale(self, resource_group):

col_througput_migrate_to_manual = self.cmd('az cosmosdb mongodb collection throughput migrate-to-manual-throughput -g {rg} -a {acc} -n {col_name}').get_output_in_json()


@ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_mongodb_resource_throughput_autoscale')
def test_cosmosdb_mongodb_resource_throughput_autoscale(self, resource_group):
tp1 = 800
Expand All @@ -1044,15 +1041,15 @@ def test_cosmosdb_mongodb_resource_throughput_autoscale(self, resource_group):
db_throughput_show = self.cmd('az cosmosdb mongodb database throughput show -g {rg} -a {acc} -n {db_name}').get_output_in_json()
assert db_throughput_show["resource"]["throughput"] == tp1

db_througput_migrate_to_autoscale = self.cmd('az cosmosdb mongodb database throughput migrate-to-autoscale -g {rg} -a {acc} -n {db_name}').get_output_in_json()
self.cmd('az cosmosdb mongodb database throughput migrate-to-autoscale -g {rg} -a {acc} -n {db_name}').get_output_in_json()

db_throughput_show = self.cmd('az cosmosdb mongodb database throughput show -g {rg} -a {acc} -n {db_name}').get_output_in_json()
assert db_throughput_show["resource"]["autoscaleSettings"]["maxThroughput"]

db_througput_update = self.cmd('az cosmosdb mongodb database throughput update -g {rg} -a {acc} -n {db_name} --max-throughput {tp2}').get_output_in_json()
assert db_througput_update["resource"]["autoscaleSettings"]["maxThroughput"] == tp2

db_througput_migrate_to_manual = self.cmd('az cosmosdb mongodb database throughput migrate-to-manual-throughput -g {rg} -a {acc} -n {db_name}').get_output_in_json()
self.cmd('az cosmosdb mongodb database throughput migrate-to-manual-throughput -g {rg} -a {acc} -n {db_name}').get_output_in_json()

self.cmd('az cosmosdb mongodb collection create -g {rg} -a {acc} -d {db_name} -n {col_name} --throughput {tp3} --shard {shard_key}')
col_throughput_show = self.cmd('az cosmosdb mongodb collection throughput show -g {rg} -a {acc} -d {db_name} -n {col_name}').get_output_in_json()
Expand All @@ -1065,7 +1062,6 @@ def test_cosmosdb_mongodb_resource_throughput_autoscale(self, resource_group):

col_througput_migrate_to_manual = self.cmd('az cosmosdb mongodb collection throughput migrate-to-manual-throughput -g {rg} -a {acc} -d {db_name} -n {col_name}').get_output_in_json()


@ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_cassandra_resource_throughput_autoscale')
def test_cosmosdb_cassandra_resource_throughput_autoscale(self, resource_group):
tp1 = 800
Expand All @@ -1090,15 +1086,15 @@ def test_cosmosdb_cassandra_resource_throughput_autoscale(self, resource_group):
ks_throughput_show = self.cmd('az cosmosdb cassandra keyspace throughput show -g {rg} -a {acc} -n {ks_name}').get_output_in_json()
assert ks_throughput_show["resource"]["throughput"] == tp1

ks_througput_migrate_to_autoscale = self.cmd('az cosmosdb cassandra keyspace throughput migrate-to-autoscale -g {rg} -a {acc} -n {ks_name}').get_output_in_json()
self.cmd('az cosmosdb cassandra keyspace throughput migrate-to-autoscale -g {rg} -a {acc} -n {ks_name}').get_output_in_json()

ks_throughput_show = self.cmd('az cosmosdb cassandra keyspace throughput show -g {rg} -a {acc} -n {ks_name}').get_output_in_json()
assert ks_throughput_show["resource"]["autoscaleSettings"]["maxThroughput"]

ks_througput_update = self.cmd('az cosmosdb cassandra keyspace throughput update -g {rg} -a {acc} -n {ks_name} --max-throughput {tp2}').get_output_in_json()
assert ks_througput_update["resource"]["autoscaleSettings"]["maxThroughput"] == tp2

ks_througput_migrate_to_manual = self.cmd('az cosmosdb cassandra keyspace throughput migrate-to-manual-throughput -g {rg} -a {acc} -n {ks_name}').get_output_in_json()
self.cmd('az cosmosdb cassandra keyspace throughput migrate-to-manual-throughput -g {rg} -a {acc} -n {ks_name}').get_output_in_json()

self.cmd('az cosmosdb cassandra table create -g {rg} -a {acc} --keyspace-name {ks_name} -n {tb_name} --throughput {tp3} --schema {schema}')
tb_throughput_show = self.cmd('az cosmosdb cassandra table throughput show -g {rg} -a {acc} --keyspace-name {ks_name} -n {tb_name}').get_output_in_json()
Expand All @@ -1111,7 +1107,6 @@ def test_cosmosdb_cassandra_resource_throughput_autoscale(self, resource_group):

tb_througput_migrate_to_manual = self.cmd('az cosmosdb cassandra table throughput migrate-to-manual-throughput -g {rg} -a {acc} --keyspace-name {ks_name} -n {tb_name}').get_output_in_json()


@ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_gremlin_resource_throughput_autoscale')
def test_cosmosdb_gremlin_resource_throughput_autoscale(self, resource_group):
tp1 = 800
Expand All @@ -1136,15 +1131,15 @@ def test_cosmosdb_gremlin_resource_throughput_autoscale(self, resource_group):
db_throughput_show = self.cmd('az cosmosdb gremlin database throughput show -g {rg} -a {acc} -n {db_name}').get_output_in_json()
assert db_throughput_show["resource"]["throughput"] == tp1

db_througput_migrate_to_autoscale = self.cmd('az cosmosdb gremlin database throughput migrate-to-autoscale -g {rg} -a {acc} -n {db_name}').get_output_in_json()
self.cmd('az cosmosdb gremlin database throughput migrate-to-autoscale -g {rg} -a {acc} -n {db_name}').get_output_in_json()

db_throughput_show = self.cmd('az cosmosdb gremlin database throughput show -g {rg} -a {acc} -n {db_name}').get_output_in_json()
assert db_throughput_show["resource"]["autoscaleSettings"]["maxThroughput"]

db_througput_update = self.cmd('az cosmosdb gremlin database throughput update -g {rg} -a {acc} -n {db_name} --max-throughput {tp2}').get_output_in_json()
assert db_througput_update["resource"]["autoscaleSettings"]["maxThroughput"] == tp2

db_througput_migrate_to_manual = self.cmd('az cosmosdb gremlin database throughput migrate-to-manual-throughput -g {rg} -a {acc} -n {db_name}').get_output_in_json()
self.cmd('az cosmosdb gremlin database throughput migrate-to-manual-throughput -g {rg} -a {acc} -n {db_name}').get_output_in_json()

self.cmd('az cosmosdb gremlin graph create -g {rg} -a {acc} -d {db_name} -n {graph_name} -p {part} --throughput {tp3}')
graph_throughput_show = self.cmd('az cosmosdb gremlin graph throughput show -g {rg} -a {acc} -d {db_name} -n {graph_name}').get_output_in_json()
Expand All @@ -1157,7 +1152,6 @@ def test_cosmosdb_gremlin_resource_throughput_autoscale(self, resource_group):

graph_througput_migrate_to_manual = self.cmd('az cosmosdb gremlin graph throughput migrate-to-manual-throughput -g {rg} -a {acc} -d {db_name} -n {graph_name}').get_output_in_json()


@ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_table_resource_throughput_autoscale')
def test_cosmosdb_table_resource_throughput_autoscale(self, resource_group):
tp1 = 800
Expand Down Expand Up @@ -1186,7 +1180,6 @@ def test_cosmosdb_table_resource_throughput_autoscale(self, resource_group):

table_througput_migrate_to_manual = self.cmd('az cosmosdb table throughput migrate-to-manual-throughput -g {rg} -a {acc} -n {table_name}').get_output_in_json()


@ResourceGroupPreparer(name_prefix='cli_test_cosmosdb_sql_resource_max_throughput')
def test_cosmosdb_sql_resource_max_throughput(self, resource_group):
tp1 = 6000
Expand Down