MACAddress -> MacAddress

Docker-DCO-1.1-Signed-off-by: Malte Janduda <mail@janduda.net> (github: MalteJ)
This commit is contained in:
Malte Janduda 2014-09-30 00:33:12 +02:00
parent bf54bdfd7f
commit d804790e8d
3 changed files with 5 additions and 5 deletions

View File

@ -260,7 +260,7 @@ func TestCreateBridgeWithMac(t *testing.T) {
}
}
func TestSetMACAddress(t *testing.T) {
func TestSetMacAddress(t *testing.T) {
if testing.Short() {
return
}

View File

@ -17,8 +17,8 @@ type Network struct {
// Prefix for the veth interfaces.
VethPrefix string `json:"veth_prefix,omitempty"`
// MACAddress contains the MAC address to set on the network interface
MACAddress string `json:"mac_address,omitempty"`
// MacAddress contains the MAC address to set on the network interface
MacAddress string `json:"mac_address,omitempty"`
// Address contains the IPv4 and mask to set on the network interface
Address string `json:"address,omitempty"`

View File

@ -60,8 +60,8 @@ func (v *Veth) Initialize(config *Network, networkState *NetworkState) error {
if err := ChangeInterfaceName(vethChild, defaultDevice); err != nil {
return fmt.Errorf("change %s to %s %s", vethChild, defaultDevice, err)
}
if config.MACAddress != "" {
if err := SetInterfaceMac(defaultDevice, config.MACAddress); err != nil {
if config.MacAddress != "" {
if err := SetInterfaceMac(defaultDevice, config.MacAddress); err != nil {
return fmt.Errorf("set %s mac %s", defaultDevice, err)
}
}