Azure / Azure/azure-libraries-for-java

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

Đang mở
#8 16 bình luận 1 reaction 0 người được giao Xem trên GitHub
customer-reported Mgmt Question
Ngôn ngữ chính
Java
Star
97
Fork
102
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

_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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách lần theo quy trình cấp phát của VM CreateAsync trong Fluent SDK và xem lại phần thảo luận của issue về ngữ nghĩa hoàn tất dự kiến. Xác định xem VM ID, IP riêng chính và NIC ID được yêu cầu có sẵn trước khi máy sẵn sàng hay không; hoàn tất có nghĩa là ghi lại tài liệu hoặc triển khai một điểm trả về được hỗ trợ, phù hợp với các yêu cầu đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
azure, java
Lĩnh vực
api, cloud
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.