vsphere/internal/virtualdevice/virtual_machine_device_subresource.go
func computeDevAddr(device types.BaseVirtualDevice, ctlr types.BaseVirtualController) (string, error) {
	vd := device.GetVirtualDevice()
	vc := ctlr.GetVirtualController()
	ctype, err := controllerTypeToClass(ctlr)
	if err != nil {
		return "", err
	}
	parts := []string{
		ctype,
		strconv.Itoa(int(vc.BusNumber)),
		strconv.Itoa(int(structure.DeRef(vd.UnitNumber).(int32))),
	}
	return strings.Join(parts, ":"), nil
}
func computeDevAddr(device types.BaseVirtualDevice, ctlr types.BaseVirtualController) (string, error) {
	vd := device.GetVirtualDevice()
	vc := ctlr.GetVirtualController()
	ctype, err := controllerTypeToClass(ctlr)
	if err != nil {
		return "", err
	}
	parts := []string{
		ctype,
		strconv.Itoa(int(vc.BusNumber)),
		strconv.Itoa(int(structure.DeRef(vd.UnitNumber).(int32))),
	}
	return strings.Join(parts, ":"), nil
}
func computeDevAddr ( device types . BaseVirtualDevice , ctlr types . BaseVirtualController ) ( string , error ) { vd := device . GetVirtualDevice ( ) vc := ctlr . GetVirtualController ( ) ctype , err := controllerTypeToClass ( ctlr ) if err != nil { return " " , err } parts := [ ] string { ctype , strconv . Itoa ( int ( vc . BusNumber ) ) , strconv . Itoa ( int ( structure . DeRef ( vd . UnitNumber ) . ( int32 ) ) ) , } return strings . Join ( parts , " " ) , nil }
// computeDevAddr handles the logic for SaveDevIDs and allows it to be used
// outside of a subresource.
computeDevAddr handles the logic for SaveDevIDs and allows it to be used outside of a subresource .