Renamed all instances of Iface to NetworkInterface.

This commit is contained in:
Antoine POPINEAU
2015-10-02 09:29:18 +02:00
parent 2a08cbaeb2
commit 256d390789
5 changed files with 10 additions and 10 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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