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

Method DeleteOrganization

actor/v7action/organization.go:90–109  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

88}
89
90func (actor Actor) DeleteOrganization(name string) (Warnings, error) {
91 var allWarnings Warnings
92
93 org, warnings, err := actor.GetOrganizationByName(name)
94 allWarnings = append(allWarnings, warnings...)
95 if err != nil {
96 return allWarnings, err
97 }
98
99 jobURL, deleteWarnings, err := actor.CloudControllerClient.DeleteOrganization(org.GUID)
100 allWarnings = append(allWarnings, Warnings(deleteWarnings)...)
101 if err != nil {
102 return allWarnings, err
103 }
104
105 ccWarnings, err := actor.CloudControllerClient.PollJob(jobURL)
106 allWarnings = append(allWarnings, Warnings(ccWarnings)...)
107
108 return allWarnings, err
109}
110
111func (actor Actor) GetDefaultDomain(orgGUID string) (resources.Domain, Warnings, error) {
112 domain, warnings, err := actor.CloudControllerClient.GetDefaultDomain(orgGUID)

Callers

nothing calls this directly

Implementers 1

FakeActorcommand/v7/v7fakes/fake_actor.go

Calls 4

GetOrganizationByNameMethod · 0.95
WarningsTypeAlias · 0.70
DeleteOrganizationMethod · 0.65
PollJobMethod · 0.65

Tested by

no test coverage detected