-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support migration of just Services (#40)
- Loading branch information
1 parent
6a61045
commit 23d03fe
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package main | ||
|
||
import ( | ||
log "github.com/sirupsen/logrus" | ||
"github.com/urfave/cli/v2" | ||
) | ||
|
||
func migrateServices(*cli.Context) error { | ||
promptConfirm := PromptDefaultInputs() | ||
if len(migrationReq.AppId) == 0 { | ||
promptConfirm = true | ||
migrationReq.AppId = TextInput("Please provide the application ID -") | ||
} | ||
|
||
promptConfirm = PromptOrgAndProject([]string{Project}) || promptConfirm | ||
|
||
logMigrationDetails() | ||
|
||
if promptConfirm { | ||
confirm := ConfirmInput("Do you want to proceed?") | ||
if !confirm { | ||
log.Fatal("Aborting...") | ||
} | ||
} | ||
|
||
log.Info("Importing the services....") | ||
CreateEntities(getReqBody(Service, Filter{ | ||
AppId: migrationReq.AppId, | ||
})) | ||
log.Info("Imported the services.") | ||
|
||
return nil | ||
} |