GetCFTarget initializes and retrieves the CF Target with the current user
()
| 157 | |
| 158 | // GetCFTarget initializes and retrieves the CF Target with the current user |
| 159 | func (c *BaseCommand) GetCFTarget() (util.CloudFoundryTarget, error) { |
| 160 | cfContext := util.NewCloudFoundryContext(c.cliConnection) |
| 161 | username, err := cfContext.GetUsername() |
| 162 | if err != nil { |
| 163 | return util.CloudFoundryTarget{}, err |
| 164 | } |
| 165 | org, err := cfContext.GetOrg() |
| 166 | if err != nil { |
| 167 | return util.CloudFoundryTarget{}, err |
| 168 | } |
| 169 | space, err := cfContext.GetSpace() |
| 170 | if err != nil { |
| 171 | return util.CloudFoundryTarget{}, err |
| 172 | } |
| 173 | return util.NewCFTarget(org, space, username), nil |
| 174 | } |
| 175 | |
| 176 | // ExecuteAction executes the action over the process specified with operationID |
| 177 | func (c *BaseCommand) ExecuteAction(operationID, actionID string, retries uint, host string, cfTarget util.CloudFoundryTarget) ExecutionStatus { |
no test coverage detected