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()
|
||||
|
||||
// Restore the snapshot.
|
||||
err = client.Snapshot().Restore(&api.WriteOptions{
|
||||
Datacenter: *datacenter,
|
||||
}, f)
|
||||
err = client.Snapshot().Restore(nil, f)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Error restoring snapshot: %s", err))
|
||||
return 1
|
||||
|
|
|
@ -83,7 +83,6 @@ func (c *SnapshotSaveCommand) Run(args []string) int {
|
|||
|
||||
// Take the snapshot.
|
||||
snap, qm, err := client.Snapshot().Save(&api.QueryOptions{
|
||||
Datacenter: *datacenter,
|
||||
AllowStale: *stale,
|
||||
})
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue