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

View file

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