Skip to content

Commit

Permalink
Update the path for generating DR Operation tokens (#3578)
Browse files Browse the repository at this point in the history
  • Loading branch information
briankassouf authored and jefferai committed Nov 14, 2017
1 parent 81f968f commit 58ce26a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/sys_generate_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ func (c *Sys) GenerateRootStatus() (*GenerateRootStatusResponse, error) {
}

func (c *Sys) GenerateDROperationTokenStatus() (*GenerateRootStatusResponse, error) {
return c.generateRootStatusCommon("/v1/sys/generate-dr-operation-token/attempt")
return c.generateRootStatusCommon("/v1/sys/replication/dr/secondary/generate-operation-token/attempt")
}

func (c *Sys) generateRootStatusCommon(path string) (*GenerateRootStatusResponse, error) {
Expand All @@ -26,7 +26,7 @@ func (c *Sys) GenerateRootInit(otp, pgpKey string) (*GenerateRootStatusResponse,
}

func (c *Sys) GenerateDROperationTokenInit(otp, pgpKey string) (*GenerateRootStatusResponse, error) {
return c.generateRootInitCommon("/v1/sys/generate-dr-operation-token/attempt", otp, pgpKey)
return c.generateRootInitCommon("/v1/sys/replication/dr/secondary/generate-operation-token/attempt", otp, pgpKey)
}

func (c *Sys) generateRootInitCommon(path, otp, pgpKey string) (*GenerateRootStatusResponse, error) {
Expand Down Expand Up @@ -56,7 +56,7 @@ func (c *Sys) GenerateRootCancel() error {
}

func (c *Sys) GenerateDROperationTokenCancel() error {
return c.generateRootCancelCommon("/v1/sys/generate-dr-operation-token/attempt")
return c.generateRootCancelCommon("/v1/sys/replication/dr/secondary/generate-operation-token/attempt")
}

func (c *Sys) generateRootCancelCommon(path string) error {
Expand All @@ -73,7 +73,7 @@ func (c *Sys) GenerateRootUpdate(shard, nonce string) (*GenerateRootStatusRespon
}

func (c *Sys) GenerateDROperationTokenUpdate(shard, nonce string) (*GenerateRootStatusResponse, error) {
return c.generateRootUpdateCommon("/v1/sys/generate-dr-operation-token/update", shard, nonce)
return c.generateRootUpdateCommon("/v1/sys/replication/dr/secondary/generate-operation-token/update", shard, nonce)
}

func (c *Sys) generateRootUpdateCommon(path, shard, nonce string) (*GenerateRootStatusResponse, error) {
Expand Down

0 comments on commit 58ce26a

Please sign in to comment.