예제 #1
0
파일: lxd.go 프로젝트: makyo/juju
func addNetworkDeviceToProfile(client *lxdclient.Client, profile, parentDevice, deviceName, hwAddr string, mtu int) (*lxd.Response, error) {
	props, err := nicProperties(parentDevice, deviceName, hwAddr, mtu)
	if err != nil {
		return nil, errors.Trace(err)
	}
	logger.Infof("adding nic device %q with properties %+v to profile %q", deviceName, props, profile)
	return client.ProfileDeviceAdd(profile, deviceName, "nic", props)
}