MCPcopy Create free account
hub / github.com/cloudfoundry/cli / RenameSpaceByNameAndOrganizationGUID

Method RenameSpaceByNameAndOrganizationGUID

actor/v7action/space.go:272–285  ·  view source on GitHub ↗
(oldSpaceName, newSpaceName, orgGUID string)

Source from the content-addressed store, hash-verified

270}
271
272func (actor Actor) RenameSpaceByNameAndOrganizationGUID(oldSpaceName, newSpaceName, orgGUID string) (resources.Space, Warnings, error) {
273 var allWarnings Warnings
274
275 space, getWarnings, err := actor.GetSpaceByNameAndOrganization(oldSpaceName, orgGUID)
276 allWarnings = append(allWarnings, getWarnings...)
277 if err != nil {
278 return resources.Space{}, allWarnings, err
279 }
280
281 ccSpace, updateWarnings, err := actor.CloudControllerClient.UpdateSpace(resources.Space{GUID: space.GUID, Name: newSpaceName})
282 allWarnings = append(allWarnings, Warnings(updateWarnings)...)
283
284 return resources.Space(ccSpace), allWarnings, err
285}

Callers

nothing calls this directly

Implementers 1

FakeActorcommand/v7/v7fakes/fake_actor.go

Calls 4

SpaceStruct · 0.92
WarningsTypeAlias · 0.70
UpdateSpaceMethod · 0.65

Tested by

no test coverage detected