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

Function DeleteStack

integration/helpers/stack.go:96–105  ·  view source on GitHub ↗

DeleteStack deletes a specific stack

(name string)

Source from the content-addressed store, hash-verified

94
95// DeleteStack deletes a specific stack
96func DeleteStack(name string) {
97 session := CF("stack", "--guid", name)
98 Eventually(session).Should(Exit(0))
99 guid := strings.TrimSpace(string(session.Out.Contents()))
100
101 session = CF("curl", "-v", "-X", "DELETE", "/v3/stacks/"+guid)
102
103 Eventually(session).Should(Say("204 No Content"))
104 Eventually(session).Should(Exit(0))
105}
106
107// EnsureMinimumNumberOfStacks ensures there are at least <num> stacks in the foundation by creating new ones if there
108// are fewer than the specified number

Calls 1

CFFunction · 0.85

Tested by

no test coverage detected