-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for VirtualMachine.networkDevices #118
Comments
@balajiv113 Thanks for creating a new issue! I will work for it in Sat (JST) because I'm a little busy 🙏 |
I'm sorry too late. This is a delegate method which meant that the method will be held by a different object than VZVirtualMachine, which has VZVirtualMachine as a property. So I may take a little time to design... |
Note that this understanding is wrong. They are not dependent on each other.
Here is a good example. I use the delegate to use the GUI; the object we specify for delegate is not a VZVirtualMachine object. |
This is one idea, although the long method names are annoying. vm, err := vz.NewVirtualMachine(config)
if err != nil {
return err
}
vm.WatchNetworkDeviceAttachmentWasDisconnected(func(networkDevice *vz.NetworkDevice, err error) {
// Do something here...
})
vm.Start() |
@balajiv113 Do you have any idea about this method signature? |
@Code-Hex you mean the signature of attachmentWasDisconnectedWithError ?? |
@balajiv113 Yes, I think this usage is may difficult 🤔 |
True but this was better compared to creating delegate object as a whole in go. This will be extensible as well when new methods comes up as far as i see. Internally we will manage the delegate and users doesn't have to know much about it. One thing to watch out is, we need to support both this and GUI delegate. |
@balajiv113 Thanks. Yeah I think so :D
|
@balajiv113 I'm sorry for the delayed response. |
Is your feature request related to a problem? Please describe.
Currently there are some network issues. Mostly this happens in cases where system is put on sleep. This support help to debug network issues better and also mostly resolve by reconnecting
Describe the solution you'd like
Support for VirtualMachine.networkDevices. With this support, we can use attachmentWasDisconnectedWithError to understand what went wrong and also this provides support for updating the network attachment on the fly.
Additional context
https://developer.apple.com/documentation/virtualization/vzvirtualmachinedelegate/3869835-virtualmachine?language=objc
https://developer.apple.com/documentation/virtualization/vznetworkdevice/3869833-attachment?language=objc
The text was updated successfully, but these errors were encountered: