CloudMigrations: Refactor API for async work (#89084)

* rename some stuff

* more renaming

* clean up api

* rename more functions

* rename cms -> gms

* update comment

* update swagger gen

* update endpoints

* overzealous

* final touches

* dont modify existing migrations

* break structs into domain and dtos

* add some conversion funcs

* fix build

* update frontend

* try to make swagger happy
This commit is contained in:
Michael Mandrus
2024-06-13 13:58:59 -04:00
committed by GitHub
parent 06c0ce4325
commit 9d3a4e236d
27 changed files with 831 additions and 594 deletions
+9 -10
View File
@@ -11,17 +11,16 @@ type Service interface {
GetToken(ctx context.Context) (gcom.TokenView, error)
// CreateToken Creates a cloud migration token.
CreateToken(ctx context.Context) (CreateAccessTokenResponse, error)
// ValidateToken Sends a request to CMS to test the token.
ValidateToken(ctx context.Context, mig CloudMigration) error
// ValidateToken Sends a request to GMS to test the token.
ValidateToken(ctx context.Context, mig CloudMigrationSession) error
DeleteToken(ctx context.Context, uid string) error
CreateMigration(ctx context.Context, req CloudMigrationRequest) (*CloudMigrationResponse, error)
GetMigration(ctx context.Context, migUID string) (*CloudMigration, error)
DeleteMigration(ctx context.Context, migUID string) (*CloudMigration, error)
UpdateMigration(ctx context.Context, migUID string, request CloudMigrationRequest) (*CloudMigrationResponse, error)
GetMigrationList(context.Context) (*CloudMigrationListResponse, error)
CreateSession(ctx context.Context, req CloudMigrationSessionRequest) (*CloudMigrationSessionResponse, error)
GetSession(ctx context.Context, migUID string) (*CloudMigrationSession, error)
DeleteSession(ctx context.Context, migUID string) (*CloudMigrationSession, error)
GetSessionList(context.Context) (*CloudMigrationSessionListResponse, error)
RunMigration(ctx context.Context, migUID string) (*MigrateDataResponseDTO, error)
GetMigrationStatus(ctx context.Context, runUID string) (*CloudMigrationRun, error)
GetMigrationRunList(ctx context.Context, migUID string) (*CloudMigrationRunList, error)
RunMigration(ctx context.Context, migUID string) (*MigrateDataResponse, error)
GetMigrationStatus(ctx context.Context, runUID string) (*CloudMigrationSnapshot, error)
GetMigrationRunList(ctx context.Context, migUID string) (*SnapshotList, error)
}