Finishes move of datacenter into client vs. options. (#2470)

This commit is contained in:
James Phillips 2016-11-03 14:21:02 -07:00 committed by GitHub
parent ed0712a68f
commit 2d43dcfc0c
2 changed files with 1 additions and 4 deletions

View File

@ -87,9 +87,7 @@ func (c *SnapshotRestoreCommand) Run(args []string) int {
defer f.Close() defer f.Close()
// Restore the snapshot. // Restore the snapshot.
err = client.Snapshot().Restore(&api.WriteOptions{ err = client.Snapshot().Restore(nil, f)
Datacenter: *datacenter,
}, f)
if err != nil { if err != nil {
c.Ui.Error(fmt.Sprintf("Error restoring snapshot: %s", err)) c.Ui.Error(fmt.Sprintf("Error restoring snapshot: %s", err))
return 1 return 1

View File

@ -83,7 +83,6 @@ func (c *SnapshotSaveCommand) Run(args []string) int {
// Take the snapshot. // Take the snapshot.
snap, qm, err := client.Snapshot().Save(&api.QueryOptions{ snap, qm, err := client.Snapshot().Save(&api.QueryOptions{
Datacenter: *datacenter,
AllowStale: *stale, AllowStale: *stale,
}) })
if err != nil { if err != nil {