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, compute support withplan for VMSS #25323

Merged
merged 9 commits into from
Nov 15, 2021

Conversation

haolingdong-msft
Copy link
Member

@haolingdong-msft haolingdong-msft commented Nov 11, 2021

Description

Add feature, issue link: #24301

Code Change

  1. Update VirtualMachineScaleSet and VirtualMachineScaleSetImpl to add withPlan() interface and plan() getter
  2. Add test to test creating virtual machine scale set with plan, the LIVE test passed
  3. Record the test and add session records.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Comment on lines 130 to 131
.withUnmanagedDisks()
.withNewStorageAccount(generateRandomResourceName("stg", 15))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using unmanaged disk.

.withRegion(region)
.withExistingResourceGroup(resourceGroup)
.withSku(VirtualMachineScaleSetSkuTypes.STANDARD_A0)
.withExistingPrimaryNetworkSubnet(network, "subnet1")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually it is easier to call withNewNetwork?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refer to other tests to add the network configuration part, will try withNewNetWork(). Thanks

@@ -382,6 +382,11 @@ RunCommandResult runShellScriptInVMInstance(
*/
AdditionalCapabilities additionalCapabilities();

/**
* @return the plan value
Copy link
Member

@weidongxu-microsoft weidongxu-microsoft Nov 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a better javadoc? the plan value is just useless as the method is already called plan()...

@@ -127,7 +127,7 @@ public void canCreateVMSSWithPlan() {
.withSpecificLinuxImageVersion(imageReference)
.withRootUsername(uname)
.withSsh(sshPublicKey())
.withUnmanagedDisks()
.withNewDataDisk(1)
.withNewStorageAccount(generateRandomResourceName("stg", 15))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need the storage account?

@haolingdong-msft haolingdong-msft self-assigned this Nov 15, 2021
@haolingdong-msft haolingdong-msft merged commit d78281c into Azure:main Nov 15, 2021
XiaofeiCao pushed a commit to XiaofeiCao/azure-sdk-for-java that referenced this pull request Nov 18, 2021
* Code change to support withplan for compute virtual machine scale set

* Add test to create VMSS with plan

* Add session records

* Update CHANGELOG

* Update test to use withNewDataDisk() instead of withUnmanagedDisks()

* Remove withNewStorageAccount() in test

* update javadoc

* Update session-records due to network upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants