We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22332f3 commit bab1b90Copy full SHA for bab1b90
pkg/cloud/instance.go
@@ -41,6 +41,7 @@ type VMIface interface {
41
// Set infrastructure spec and status from the CloudStack API's virtual machine metrics type.
42
func setMachineDataFromVMMetrics(vmResponse *cloudstack.VirtualMachinesMetric, csMachine *infrav1.CloudStackMachine) {
43
csMachine.Spec.ProviderID = pointer.StringPtr(fmt.Sprintf("cloudstack:///%s", vmResponse.Id))
44
+ // InstanceID is later used as required parameter to destroy VM.
45
csMachine.Spec.InstanceID = pointer.StringPtr(vmResponse.Id)
46
csMachine.Status.Addresses = []corev1.NodeAddress{{Type: corev1.NodeInternalIP, Address: vmResponse.Ipaddress}}
47
newInstanceState := vmResponse.State
0 commit comments