From 256d390789d11e5a9760b78a086829e4e479156f Mon Sep 17 00:00:00 2001 From: Antoine POPINEAU Date: Fri, 2 Oct 2015 09:29:18 +0200 Subject: [PATCH] Renamed all instances of `Iface` to `NetworkInterface`. --- client/config/config.go | 2 +- client/fingerprint/network_unix.go | 4 ++-- command/agent/agent.go | 4 ++-- command/agent/config.go | 6 +++--- website/source/docs/agent/config.html.md | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/client/config/config.go b/client/config/config.go index 66542b5e7..185b31012 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -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 diff --git a/client/fingerprint/network_unix.go b/client/fingerprint/network_unix.go index b1592ce1d..b74062848 100644 --- a/client/fingerprint/network_unix.go +++ b/client/fingerprint/network_unix.go @@ -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 diff --git a/command/agent/agent.go b/command/agent/agent.go index a33280c83..f5e99c6c6 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -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 diff --git a/command/agent/config.go b/command/agent/config.go index 86960ca28..781ee0441 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -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 diff --git a/website/source/docs/agent/config.html.md b/website/source/docs/agent/config.html.md index 8a96b8c83..c6bad8156 100644 --- a/website/source/docs/agent/config.html.md +++ b/website/source/docs/agent/config.html.md @@ -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