Azure / Azure/azure-libraries-for-java

How can I get async behavior out of the Fluent SDK?

オープン
#8 コメント 16 件 リアクション 1 件 担当者 0 名 GitHub で見る
customer-reported Mgmt Question
主要言語
Java
スター
97
フォーク
102
PR マージ指標
30日以内にマージされた PR はありません

説明

_From @awesley on June 23, 2017 19:25_

Hiya,

I'm creating VMs using the Fluent SDK. Here's a code snippet:

```
var vm = await this.azure

.VirtualMachines

.Define(vmName)

.WithRegion(region)

.WithExistingResourceGroup(resourceGroupName)

.WithExistingPrimaryNetwork(network)

.WithSubnet(subNetName)

.WithPrimaryPrivateIPAddressDynamic()

.WithoutPrimaryPublicIPAddress()

.WithWindowsCustomImage(image)

.WithAdminUsername(adminUserName)

.WithAdminPassword(adminPassword)

.WithSize(vmSize)

.WithNewStorageAccount(storageAccountName)

.WithTag(TagKeyNames.StorageAccountId, storageAccount.Id)

.CreateAsync();
```

This task does not complete until the machine is entirely provisioned and booting - a period of over ten minutes. That doesn't seem async to me. Is there something I am doing wrong? I want the call to return prior to the machine's availability.

For comparison, when provisioning a VM on Amazon EC2 returns nearly immediately, well before the machine is fully provisioned and booted.

I need from the call is the Id (`vm.Id`), the Primary Private IP (`vm.GetPrimaryNetworkInterface().PrimaryPrivateIP`), and the primary NIC Id (`vm.PrimaryNetworkInterfaceId`). I do not need the machine to be ready.

Thanks!

_Copied from original issue: Azure/azure-sdk-for-net#3411_

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず Fluent SDK の VM CreateAsync のプロビジョニングパスを追跡し、意図された完了セマンティクスについて issue の議論を確認します。マシンの準備が完了する前に、要求された VM ID、プライマリプライベート IP、NIC ID が利用可能かどうかを判断します。完了とは、それらの要件に一致するサポートされた戻りポイントを文書化または実装することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, java
領域
api, cloud
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。