Skip to content

Commit bab1b90

Browse files
committed
add comments for instanceID usage
1 parent 22332f3 commit bab1b90

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/cloud/instance.go

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ type VMIface interface {
4141
// Set infrastructure spec and status from the CloudStack API's virtual machine metrics type.
4242
func setMachineDataFromVMMetrics(vmResponse *cloudstack.VirtualMachinesMetric, csMachine *infrav1.CloudStackMachine) {
4343
csMachine.Spec.ProviderID = pointer.StringPtr(fmt.Sprintf("cloudstack:///%s", vmResponse.Id))
44+
// InstanceID is later used as required parameter to destroy VM.
4445
csMachine.Spec.InstanceID = pointer.StringPtr(vmResponse.Id)
4546
csMachine.Status.Addresses = []corev1.NodeAddress{{Type: corev1.NodeInternalIP, Address: vmResponse.Ipaddress}}
4647
newInstanceState := vmResponse.State

0 commit comments

Comments
 (0)