MCPcopy
hub / github.com/cloudfoundry/cli / Setup

Method Setup

command/v7/base_command.go:23–38  ·  view source on GitHub ↗
(config command.Config, ui command.UI)

Source from the content-addressed store, hash-verified

21}
22
23func (cmd *BaseCommand) Setup(config command.Config, ui command.UI) error {
24 cmd.UI = ui
25 cmd.Config = config
26 sharedActor := sharedaction.NewActor(config)
27 cmd.SharedActor = sharedActor
28
29 ccClient, uaaClient, routingClient, err := shared.GetNewClientsAndConnectToCF(config, ui, "")
30 if err != nil {
31 return err
32 }
33 cmd.cloudControllerClient = ccClient
34 cmd.uaaClient = uaaClient
35
36 cmd.Actor = v7action.NewActor(ccClient, config, sharedActor, uaaClient, routingClient, clock.NewClock())
37 return nil
38}
39
40func (cmd *BaseCommand) GetClients() (*ccv3.Client, *uaa.Client) {
41 return cmd.cloudControllerClient, cmd.uaaClient

Callers

nothing calls this directly

Calls 3

NewActorFunction · 0.92
NewActorFunction · 0.92

Tested by

no test coverage detected