Exemplo n.º 1
0
// NewDriver instantiates a Rackspace driver.
func NewDriver(machineName, storePath string) drivers.Driver {
	log.WithFields(log.Fields{
		"machineName": machineName,
	}).Debug("Instantiating Rackspace driver.")

	inner := openstack.NewDerivedDriver(machineName, storePath)

	return &Driver{
		Driver: inner,
	}
}
Exemplo n.º 2
0
// NewDriver instantiates a Rackspace driver.
func NewDriver(machineName, storePath string) drivers.Driver {
	log.Debug("Instantiating Rackspace driver.", map[string]string{"machineName": machineName})

	inner := openstack.NewDerivedDriver(machineName, storePath)
	driver := &Driver{
		Driver: inner,
	}
	inner.SetClient(&Client{
		driver: driver,
	})

	return driver
}
Exemplo n.º 3
0
// NewDriver instantiates a Rackspace driver.
func NewDriver(machineName string, storePath string, caCert string, privateKey string) (drivers.Driver, error) {
	log.WithFields(log.Fields{
		"machineName": machineName,
		"storePath":   storePath,
		"caCert":      caCert,
		"privateKey":  privateKey,
	}).Debug("Instantiating Rackspace driver.")

	client := &Client{}
	inner, err := openstack.NewDerivedDriver(machineName, storePath, client, caCert, privateKey)
	if err != nil {
		return nil, err
	}

	driver := &Driver{Driver: inner}
	client.driver = driver
	return driver, nil
}
Exemplo n.º 4
0
func main() {
	plugin.RegisterDriver(&Driver{
		Driver: openstack.NewDerivedDriver("", ""),
	})
}