From 0060ac933f070acde1ead1f8db4cdd232f1c04cd Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Wed, 23 Sep 2015 18:01:49 -0700 Subject: [PATCH] Add dynamic ports to api resources; copy dynamic ports into offer --- api/resources.go | 1 + nomad/structs/network.go | 1 + 2 files changed, 2 insertions(+) diff --git a/api/resources.go b/api/resources.go index b8de46e75..0b49c496e 100644 --- a/api/resources.go +++ b/api/resources.go @@ -16,5 +16,6 @@ type NetworkResource struct { Public bool CIDR string ReservedPorts []int + DynamicPorts []string MBits int } diff --git a/nomad/structs/network.go b/nomad/structs/network.go index 2a1e61ae8..9221adc7a 100644 --- a/nomad/structs/network.go +++ b/nomad/structs/network.go @@ -162,6 +162,7 @@ func (idx *NetworkIndex) AssignNetwork(ask *NetworkResource) (out *NetworkResour Device: n.Device, IP: ipStr, ReservedPorts: ask.ReservedPorts, + DynamicPorts: ask.DynamicPorts, } // Check if we need to generate any ports