mirror of https://github.com/status-im/consul.git
Finishes move of datacenter into client vs. options. (#2470)
This commit is contained in:
parent
ed0712a68f
commit
2d43dcfc0c
|
@ -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
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue