// newRightScaleCloud creates a new instance of RightScaleCloud configured to talk to the RightScale API.
newRightScaleCloud creates a new instance of RightScaleCloud configured to talk to the RightScale API.
// newRightScaleCloud creates a new instance of RightScaleCloud configured to talk to the RightScale API .
func newRightScaleCloud(config io.Reader) (*RightScaleCloud, error) {
	if config == nil {
		return nil, fmt.Errorf("missing configuration file for RightScale cloud provider")
	}
	var cloud RightScaleCloud
	if err := gcfg.ReadInto(&cloud, config); err != nil {
		return nil, err
	}
	if cloud.Rll.Secret == "" {
		return nil, errors.New("missing 'Secret' configuration setting")
	}
	if cloud.Rll.Port == "" {
		return nil, errors.New("missing 'Port' configuration setting")
	}
	return &cloud, nil
}
func newRightScaleCloud ( config io . Reader ) ( * RightScaleCloud , error ) { if config == nil { return nil , fmt . Errorf ( " " ) } var cloud RightScaleCloud if err := gcfg . ReadInto ( & cloud , config ) ; err != nil { return nil , err } if cloud . Rll . Secret == " " { return nil , errors . New ( " " ) } if cloud . Rll . Port == " " { return nil , errors . New ( " " ) } return & cloud , nil }
newRightScaleCloud creates a new instance of RightScaleCloud configured to talk to the RightScale API.
newRightScaleCloud creates a new instance of RightScaleCloud configured to talk to the RightScale API .