MCPcopy Index your code
hub / github.com/cloudfoundry/cli / DeleteSecurityGroup

Method DeleteSecurityGroup

actor/v7action/security_group.go:313–331  ·  view source on GitHub ↗
(securityGroupName string)

Source from the content-addressed store, hash-verified

311}
312
313func (actor Actor) DeleteSecurityGroup(securityGroupName string) (Warnings, error) {
314 var allWarnings Warnings
315
316 securityGroup, warnings, err := actor.GetSecurityGroup(securityGroupName)
317 allWarnings = append(allWarnings, warnings...)
318 if err != nil {
319 return allWarnings, err
320 }
321
322 jobURL, ccv3Warnings, err := actor.CloudControllerClient.DeleteSecurityGroup(securityGroup.GUID)
323 allWarnings = append(allWarnings, ccv3Warnings...)
324 if err != nil {
325 return allWarnings, err
326 }
327
328 pollingWarnings, err := actor.CloudControllerClient.PollJob(jobURL)
329 allWarnings = append(allWarnings, pollingWarnings...)
330 return allWarnings, err
331}
332
333func getSecurityGroupSpaces(actor Actor, stagingSpaceGUIDs []string, runningSpaceGUIDs []string) ([]SecurityGroupSpace, ccv3.Warnings, error) {
334 var warnings ccv3.Warnings

Callers

nothing calls this directly

Implementers 1

FakeActorcommand/v7/v7fakes/fake_actor.go

Calls 3

GetSecurityGroupMethod · 0.95
DeleteSecurityGroupMethod · 0.65
PollJobMethod · 0.65

Tested by

no test coverage detected