From dc8d1af0e87730b03cb0cca718075fb4d10d8cc6 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Sat, 12 Sep 2015 17:32:08 -0700 Subject: [PATCH] nomad: removing public field of network --- nomad/structs/funcs.go | 6 ------ nomad/structs/structs.go | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/nomad/structs/funcs.go b/nomad/structs/funcs.go index 016b327ca..513b10cdc 100644 --- a/nomad/structs/funcs.go +++ b/nomad/structs/funcs.go @@ -61,12 +61,6 @@ func PortsOvercommited(r *Resources) bool { func AllocsFit(node *Node, allocs []*Allocation) (bool, *Resources, error) { // Compute the utilization from zero used := new(Resources) - for _, net := range node.Resources.Networks { - used.Networks = append(used.Networks, &NetworkResource{ - Public: net.Public, - CIDR: net.CIDR, - }) - } // Add the reserved resources of the node if node.Reserved != nil { diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index c493e51ec..dee2616f7 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -656,9 +656,8 @@ func (r *Resources) Add(delta *Resources) error { // NetworkResource is used to represesent available network // resources type NetworkResource struct { - Public bool // Is this a public address? CIDR string // CIDR block of addresses - IP string // IP address of the network. + IP string // IP address ReservedPorts []int // Reserved ports MBits int // Throughput DynamicPorts int // Dynamically assigned ports