nomad: add device name for network
This commit is contained in:
parent
5b6d365709
commit
a829c8db50
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue