Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgmt, mongocluster, update commit ID after 0.61 #42297

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 5 additions & 10 deletions sdk/mongocluster/azure-resourcemanager-mongocluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,12 @@ mongoCluster = mongoClusterManager.mongoClusters()
.withExistingResourceGroup(resourceGroupName)
.withProperties(
new MongoClusterProperties()
.withAdministratorLogin(loginUser)
.withAdministratorLoginPassword(loginPwd)
.withAdministrator(new AdministratorProperties().withUserName(loginUser).withPassword(loginPwd))
.withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
.withNodeGroupSpecs(Arrays.asList(
new NodeGroupSpec()
.withKind(NodeKind.SHARD)
.withSku("M30")
.withDiskSizeGB(128L)
.withEnableHa(true)
.withNodeCount(1)
))
.withStorage(new StorageProperties().withSizeGb(128L))
.withCompute(new ComputeProperties().withTier("M30"))
.withHighAvailability(new HighAvailabilityProperties().withTargetMode(HighAvailabilityMode.DISABLED))
.withSharding(new ShardingProperties().withShardCount(1))
.withServerVersion("7.0")
)
.create();
Expand Down
16 changes: 3 additions & 13 deletions sdk/mongocluster/azure-resourcemanager-mongocluster/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) TypeSpec Code Generator.
Licensed under the MIT License.
Code generated by Microsoft (R) TypeSpec Code Generator.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -46,13 +46,9 @@
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.3.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
Expand All @@ -68,12 +64,6 @@
<artifactId>azure-core-test</artifactId>
<version>1.27.0-beta.2</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-jdk-httpclient</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.azure</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ public void beforeTest() {
final TokenCredential credential = new AzurePowerShellCredentialBuilder().build();
final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);

mongoClusterManager = MongoClusterManager
.configure()
mongoClusterManager = MongoClusterManager.configure()
.withLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC))
.authenticate(credential, profile);

resourceManager = ResourceManager
.configure()
resourceManager = ResourceManager.configure()
.withLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC))
.authenticate(credential, profile)
.withDefaultSubscription();
Expand All @@ -60,10 +58,7 @@ public void beforeTest() {
if (testEnv) {
resourceGroupName = testResourceGroup;
} else {
resourceManager.resourceGroups()
.define(resourceGroupName)
.withRegion(REGION)
.create();
resourceManager.resourceGroups().define(resourceGroupName).withRegion(REGION).create();
}
}

Expand All @@ -87,22 +82,23 @@ public void testCreateMongoCluster() {
.define(clusterName)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroupName)
.withProperties(
new MongoClusterProperties()
.withAdministrator(new AdministratorProperties().withUserName(loginUser).withPassword(loginPwd))
.withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
.withStorage(new StorageProperties().withSizeGb(128L))
.withCompute(new ComputeProperties().withTier("M30"))
.withHighAvailability(new HighAvailabilityProperties().withTargetMode(HighAvailabilityMode.DISABLED))
.withSharding(new ShardingProperties().withShardCount(1))
.withServerVersion("7.0")
)
.withProperties(new MongoClusterProperties()
.withAdministrator(new AdministratorProperties().withUserName(loginUser).withPassword(loginPwd))
.withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
.withStorage(new StorageProperties().withSizeGb(128L))
.withCompute(new ComputeProperties().withTier("M30"))
.withHighAvailability(
new HighAvailabilityProperties().withTargetMode(HighAvailabilityMode.DISABLED))
.withSharding(new ShardingProperties().withShardCount(1))
.withServerVersion("7.0"))
.create();
// @embedmeEnd
mongoCluster.refresh();
Assertions.assertEquals(clusterName, mongoCluster.name());
Assertions.assertEquals(mongoCluster.name(), mongoClusterManager.mongoClusters().getById(mongoCluster.id()).name());
Assertions.assertTrue(mongoClusterManager.mongoClusters().listByResourceGroup(resourceGroupName).stream().count() > 0);
Assertions.assertEquals(mongoCluster.name(),
mongoClusterManager.mongoClusters().getById(mongoCluster.id()).name());
Assertions.assertTrue(
mongoClusterManager.mongoClusters().listByResourceGroup(resourceGroupName).stream().count() > 0);
} finally {
if (mongoCluster != null) {
mongoClusterManager.mongoClusters().deleteById(mongoCluster.id());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/mongocluster/DocumentDB.MongoCluster.Management
commit: 2cec543b4bf04ccd1971ae69a136cf06878439b2
commit: 07bdede4651ce2ea0e4039d76e81a69df23a3d6e
repo: Azure/azure-rest-api-specs
additionalDirectories: