func ReadLXDProfile(r io.Reader) (*LXDProfile, error) {
	data, err := ioutil.ReadAll(r)
	if err != nil {
		return nil, err
	}
	var profile LXDProfile
	if err := yaml.Unmarshal(data, &profile); err != nil {
		return nil, errors.Annotate(err, "failed to unmarshall lxd-profile.yaml")
	}
	return &profile, nil
}
// ReadLXDProfile reads in a LXDProfile from a charm's lxd-profile.yaml.
// It is not validated at this point so that the caller can choose to override
// any validation.
ReadLXDProfile reads in a LXDProfile from a charm's lxd-profile.yaml.
It is not validated at this point so that the caller can choose to override
any validation.
// ReadLXDProfile reads in a LXDProfile from a charm ' s lxd - profile . yaml . // It is not validated at this point so that the caller can choose to override // any validation .
func ReadLXDProfile(r io.Reader) (*LXDProfile, error) {
	data, err := ioutil.ReadAll(r)
	if err != nil {
		return nil, err
	}
	var profile LXDProfile
	if err := yaml.Unmarshal(data, &profile); err != nil {
		return nil, errors.Annotate(err, "failed to unmarshall lxd-profile.yaml")
	}
	return &profile, nil
}
func ReadLXDProfile ( r io . Reader ) ( * LXDProfile , error ) { data , err := ioutil . ReadAll ( r ) if err != nil { return nil , err } var profile LXDProfile if err := yaml . Unmarshal ( data , & profile ) ; err != nil { return nil , errors . Annotate ( err , " " ) } return & profile , nil }
ReadLXDProfile reads in a LXDProfile from a charm's lxd-profile.yaml.
ReadLXDProfile reads in a LXDProfile from a charm ' s lxd - profile . yaml .