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

Function fetchAPIVersion

integration/helpers/version.go:159–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157var CcRootCache *ccRoot
158
159func fetchAPIVersion() ccRoot {
160 cacheLock.Lock()
161 defer cacheLock.Unlock()
162 if CcRootCache == nil {
163 session := CF("curl", "/")
164 Eventually(session).Should(Exit(0))
165 var result ccRoot
166 err := json.Unmarshal(session.Out.Contents(), &result)
167 Expect(err).ToNot(HaveOccurred())
168 CcRootCache = &result
169 }
170 return *CcRootCache
171}
172
173func getAPIVersionV3() string {
174 return fetchAPIVersion().Links.CloudControllerV3.Meta.Version

Callers 3

IsUAAVersionAtLeastFunction · 0.85
GetAPIVersionV2Function · 0.85
getAPIVersionV3Function · 0.85

Calls 1

CFFunction · 0.85

Tested by

no test coverage detected