nomad: add device name for network

This commit is contained in:
Armon Dadgar 2015-09-12 19:13:00 -07:00
parent 5b6d365709
commit a829c8db50
2 changed files with 3 additions and 2 deletions

View file

@ -20,7 +20,7 @@ func Node() *structs.Node {
IOPS: 150,
Networks: []*structs.NetworkResource{
&structs.NetworkResource{
Public: true,
Device: "eth0",
CIDR: "192.168.0.100/32",
ReservedPorts: []int{22},
MBits: 1000,
@ -119,7 +119,7 @@ func Alloc() *structs.Allocation {
IOPS: 10,
Networks: []*structs.NetworkResource{
&structs.NetworkResource{
Public: true,
Device: "eth0",
CIDR: "192.168.0.100/32",
ReservedPorts: []int{12345},
MBits: 100,

View file

@ -656,6 +656,7 @@ func (r *Resources) Add(delta *Resources) error {
// NetworkResource is used to represesent available network
// resources
type NetworkResource struct {
Device string // Name of the device
CIDR string // CIDR block of addresses
IP string // IP address
ReservedPorts []int // Reserved ports