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

Method RenameOrganization

actor/v7action/organization.go:72–88  ·  view source on GitHub ↗
(oldOrgName, newOrgName string)

Source from the content-addressed store, hash-verified

70}
71
72func (actor Actor) RenameOrganization(oldOrgName, newOrgName string) (resources.Organization, Warnings, error) {
73 var allWarnings Warnings
74
75 org, warnings, err := actor.GetOrganizationByName(oldOrgName)
76 allWarnings = append(allWarnings, warnings...)
77 if err != nil {
78 return resources.Organization{}, allWarnings, err
79 }
80
81 org.Name = newOrgName
82 org, warnings, err = actor.updateOrganization(org)
83 allWarnings = append(allWarnings, warnings...)
84 if err != nil {
85 return resources.Organization{}, allWarnings, err
86 }
87 return org, allWarnings, nil
88}
89
90func (actor Actor) DeleteOrganization(name string) (Warnings, error) {
91 var allWarnings Warnings

Callers

nothing calls this directly

Implementers 1

FakeActorcommand/v7/v7fakes/fake_actor.go

Calls 2

GetOrganizationByNameMethod · 0.95
updateOrganizationMethod · 0.95

Tested by

no test coverage detected