-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbackgrounds.py
More file actions
30 lines (27 loc) · 979 Bytes
/
backgrounds.py
File metadata and controls
30 lines (27 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from clients.azure.vm import (
AzureVMDeploymentProperties,
wait_for_deployment_completeness,
)
from clients.guacamole import GuacamoleClient
def wait_for_deploy(
vm_deployment_properties: AzureVMDeploymentProperties,
guacamole_client: GuacamoleClient,
):
deployment_information = wait_for_deployment_completeness(
vm_deployment_properties.deployment_process
)
if (
deployment_information
and deployment_information.name
and deployment_information.properties
and deployment_information.properties.outputs
):
guacamole_client.create_connection(
name=vm_deployment_properties.project_name,
ip_address=deployment_information.properties.outputs["privateIPVM"][
"value"
],
password=vm_deployment_properties.password,
username=vm_deployment_properties.username,
vm_size=vm_deployment_properties.vm_size,
)