client, structs comments

This commit is contained in:
Lang Martin
2019-03-29 10:44:52 -04:00
parent fc309cb430
commit be2838d6ba
2 changed files with 7 additions and 1 deletions

View File

@@ -1227,6 +1227,8 @@ func (c *Client) updateNodeFromFingerprint(response *fingerprint.FingerprintResp
}
// COMPAT(0.10): Remove in 0.10
// update the response networks with the config
// if we still have node changes, merge them
if response.Resources != nil {
response.Resources.Networks = updateNetworks(
c.config.Node.Resources.Networks,
@@ -1238,6 +1240,8 @@ func (c *Client) updateNodeFromFingerprint(response *fingerprint.FingerprintResp
}
}
// update the response networks with the config
// if we still have node changes, merge them
if response.NodeResources != nil {
response.NodeResources.Networks = updateNetworks(
c.config.Node.NodeResources.Networks,

View File

@@ -1811,7 +1811,7 @@ func (r *Resources) Equals(o *Resources) bool {
type ResourceDevices []*RequestedDevice
// COMPAT(0.10): Remove in 0.10
// Equals ResourceDevices as set on Name
// Equals ResourceDevices as set keyed by Name
func (d *ResourceDevices) Equals(o *ResourceDevices) bool {
if d == nil && o == nil {
return true
@@ -2145,6 +2145,7 @@ func (r *RequestedDevice) Equals(o *RequestedDevice) bool {
}
// r.Constraints == o.Constraints, order sensitive
// REVIEW: should this be a set comparison?
if len(r.Constraints) != len(o.Constraints) {
return false
}
@@ -2346,6 +2347,7 @@ func (n *NodeResources) Equals(o *NodeResources) bool {
return true
}
// Equals equates Networks as a set
func (n *Networks) Equals(o *Networks) bool {
if n == o {
return true