Logs for Restart

Signed-off-by: David Gageot <david@gageot.net>
This commit is contained in:
David Gageot 2015-12-30 11:57:37 +01:00
parent 8258a77086
commit 80518f988a
1 changed files with 8 additions and 11 deletions

View File

@ -400,6 +400,14 @@ func (d *Driver) Stop() error {
return d.client.StopInstance(d)
}
func (d *Driver) Restart() error {
if err := d.initCompute(); err != nil {
return err
}
return d.client.RestartInstance(d)
}
func (d *Driver) Remove() error {
log.Debug("deleting instance...", map[string]string{"MachineId": d.MachineId})
log.Info("Deleting OpenStack instance...")
@ -417,17 +425,6 @@ func (d *Driver) Remove() error {
return nil
}
func (d *Driver) Restart() error {
log.Info("Restarting OpenStack instance...", map[string]string{"MachineId": d.MachineId})
if err := d.initCompute(); err != nil {
return err
}
if err := d.client.RestartInstance(d); err != nil {
return err
}
return nil
}
func (d *Driver) Kill() error {
return d.Stop()
}