mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Renamed all instances of Iface to NetworkInterface.
This commit is contained in:
@@ -32,7 +32,7 @@ type Config struct {
|
||||
Region string
|
||||
|
||||
// Network interface to be used in network fingerprinting
|
||||
Iface string
|
||||
NetworkInterface string
|
||||
|
||||
// Servers is a list of known server addresses. These are as "host:port"
|
||||
Servers []string
|
||||
|
||||
@@ -40,8 +40,8 @@ func (f *NetworkFingerprint) Fingerprint(cfg *config.Config, node *structs.Node)
|
||||
defaultDevice = "en0"
|
||||
}
|
||||
// User-defined override for the default interface
|
||||
if cfg.Iface != "" {
|
||||
defaultDevice = cfg.Iface
|
||||
if cfg.NetworkInterface != "" {
|
||||
defaultDevice = cfg.NetworkInterface
|
||||
}
|
||||
|
||||
newNetwork.Device = defaultDevice
|
||||
|
||||
@@ -192,8 +192,8 @@ func (a *Agent) setupClient() error {
|
||||
conf.AllocDir = a.config.Client.AllocDir
|
||||
}
|
||||
conf.Servers = a.config.Client.Servers
|
||||
if a.config.Client.Iface != "" {
|
||||
conf.Iface = a.config.Client.Iface
|
||||
if a.config.Client.NetworkInterface != "" {
|
||||
conf.NetworkInterface = a.config.Client.NetworkInterface
|
||||
}
|
||||
|
||||
// Setup the node
|
||||
|
||||
@@ -141,7 +141,7 @@ type ClientConfig struct {
|
||||
Meta map[string]string `hcl:"meta"`
|
||||
|
||||
// Interface to use for network fingerprinting
|
||||
Iface string `hcl:"iface"`
|
||||
NetworkInterface string `hcl:"network_interface"`
|
||||
}
|
||||
|
||||
// ServerConfig is configuration specific to the server mode
|
||||
@@ -387,8 +387,8 @@ func (a *ClientConfig) Merge(b *ClientConfig) *ClientConfig {
|
||||
if b.NodeClass != "" {
|
||||
result.NodeClass = b.NodeClass
|
||||
}
|
||||
if b.Iface != "" {
|
||||
result.Iface = b.Iface
|
||||
if b.NetworkInterface != "" {
|
||||
result.NetworkInterface = b.NetworkInterface
|
||||
}
|
||||
|
||||
// Add the servers
|
||||
|
||||
@@ -203,8 +203,8 @@ configured on server nodes.
|
||||
and has no default.
|
||||
* `meta`: This is a key/value mapping of metadata pairs. This is a free-form
|
||||
map and can contain any string values.
|
||||
* `iface`: This is a string to force network fingerprinting to use a specific
|
||||
network interface
|
||||
* `network_interface`: This is a string to force network fingerprinting to use
|
||||
a specific network interface
|
||||
|
||||
## Atlas Options
|
||||
|
||||
|
||||
Reference in New Issue
Block a user