Skip to content

Commit

Permalink
Cancel migration API to cancel the running migration (#6653)
Browse files Browse the repository at this point in the history
* added changes for the cancel migration API

Signed-off-by: Vinay Sharma <vsharma@chef.io>

* Added changes to update the status and clear off data

Signed-off-by: Kallol Roy <karoy@progress.com>

* Fixed SQL query

Signed-off-by: Kallol Roy <karoy@progress.com>

Co-authored-by: Kallol Roy <karoy@progress.com>
  • Loading branch information
vinay033 and kalroy committed Mar 9, 2022
1 parent 45ab993 commit f8e5d07
Show file tree
Hide file tree
Showing 23 changed files with 865 additions and 97 deletions.
85 changes: 73 additions & 12 deletions api/external/infra_proxy/migrations/migrations.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 120 additions & 0 deletions api/external/infra_proxy/migrations/migrations.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions api/external/infra_proxy/migrations/migrations.pb.policy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion api/external/infra_proxy/migrations/migrations.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import "google/api/annotations.proto";
import "external/annotations/iam/annotations.proto";

import "external/infra_proxy/migrations/request/migrations.proto";

import "external/infra_proxy/migrations/response/migrations.proto";

service InfraProxyMigration {
Expand All @@ -16,4 +15,10 @@ service InfraProxyMigration {
option (chef.automate.api.iam.policy).resource = "infra:infraServers";
option (chef.automate.api.iam.policy).action = "infra:infraServers:get";
};

rpc CancelMigration (infra_proxy.migrations.request.CancelMigrationRequest) returns (infra_proxy.migrations.response.CancelMigrationResponce) {
option (google.api.http).get = "/api/v0/infra/servers/{server_id}/migrations/cancel_migration/{migration_id}";
option (chef.automate.api.iam.policy).resource = "infra:infraServers:{server_id}:migrations:{migration_id}";
option (chef.automate.api.iam.policy).action = "infra:infraServers:get";
};
}
55 changes: 55 additions & 0 deletions api/external/infra_proxy/migrations/migrations.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f8e5d07

Please sign in to comment.