nomad: removing public field of network

This commit is contained in:
Armon Dadgar
2015-09-12 17:32:08 -07:00
parent c6b4bd3fa3
commit dc8d1af0e8
2 changed files with 1 additions and 8 deletions

View File

@@ -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 {

View File

@@ -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