-
Notifications
You must be signed in to change notification settings - Fork 264
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
Add VmEndpointRequest in hcn for eventual usage in the shim #1005
Conversation
HCS today for adding a network adapter to a virtual machine sets up the switch port itself by making a VmEndpointRequest. There are cases where we will want to do this ourselves, and we need the switch ID for this which will only exist after this request. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
It isn't adding @microsoft/containerplat as a reviewer 😮 |
Resources json.RawMessage `json:",omitempty"` | ||
SharedContainers json.RawMessage `json:",omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious: why did you change these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easier to unmarshal into something as it's just bytes instead of an interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var exi ExtraInfo
if err := json.Unmarshal(ep.Health.Extra.Resources, &exi); err != nil {
return errors.Wrapf(err, "failed to unmarshal resource data from endpoint %q", endpointID)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, good point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related work items: microsoft#388, microsoft#389, microsoft#393, microsoft#394, microsoft#395, microsoft#396, microsoft#397, microsoft#398, microsoft#399, microsoft#400, microsoft#401, microsoft#402, microsoft#403, microsoft#404, microsoft#405, microsoft#931, microsoft#973, microsoft#1001, microsoft#1003, microsoft#1004, microsoft#1005, microsoft#1006, microsoft#1007, microsoft#1009, microsoft#1010, microsoft#1012, microsoft#1013, microsoft#1014, microsoft#1015, microsoft#1016, microsoft#1017, microsoft#1019, microsoft#1021, microsoft#1022, microsoft#1024, microsoft#1025, microsoft#1027, microsoft#1028, microsoft#1029, microsoft#1030, microsoft#1031, microsoft#1033
HCS today for adding a network adapter to a virtual machine sets up the switch port itself by making a VmEndpointRequest. There are cases where we will want to do this ourselves, and we need the switch ID for this which will only exist after this request.
Below is an example of using this:
Signed-off-by: Daniel Canter dcanter@microsoft.com