Azure / Azure/azure-libraries-for-java

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

Abierto
#8 16 comentarios 1 reacción 0 asignados Ver en GitHub
customer-reported Mgmt Question
Lenguaje dominante
Java
Estrellas
97
Forks
102
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start by tracing the Fluent SDK's VM CreateAsync provisioning path and reviewing the issue discussion for the intended completion semantics. Determine whether the requested VM ID, primary private IP, and NIC ID are available before the machine is ready; done means documenting or implementing a supported return point that matches those requirements.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
azure, java
Área
api, cloud
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.