forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmigrate_service_instances_command.go
24 lines (19 loc) · 1.32 KB
/
migrate_service_instances_command.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package v2
import (
"os"
"code.cloudfoundry.org/cli/cf/cmd"
"code.cloudfoundry.org/cli/commands"
"code.cloudfoundry.org/cli/commands/flags"
)
type MigrateServiceInstancesCommand struct {
RequiredArgs flags.MigrateServiceInstancesArgs `positional-args:"yes"`
Force bool `short:"f" description:"Force migration without confirmation"`
usage interface{} `usage:"CF_NAME migrate-service-instances v1_SERVICE v1_PROVIDER v1_PLAN v2_SERVICE v2_PLAN\n\nWARNING: This operation is internal to Cloud Foundry; service brokers will not be contacted and resources for service instances will not be altered. The primary use case for this operation is to replace a service broker which implements the v1 Service Broker API with a broker which implements the v2 API by remapping service instances from v1 plans to v2 plans. We recommend making the v1 plan private or shutting down the v1 broker to prevent additional instances from being created. Once service instances have been migrated, the v1 services and plans can be removed from Cloud Foundry."`
}
func (_ MigrateServiceInstancesCommand) Setup(config commands.Config, ui commands.UI) error {
return nil
}
func (_ MigrateServiceInstancesCommand) Execute(args []string) error {
cmd.Main(os.Getenv("CF_TRACE"), os.Args)
return nil
}