HuaweiTech/cli — pull request #19 by SrinivasChilveri (2014-12-03 06:58:42+00:00)
Title: Fix in clearing spacefileds of config data on 'cf space-delete' 

Before Fix: If cf user does
htipl@cf5:~/go/src/github.com/cloudfoundry/cli$ cf target
API endpoint: https://api.10.244.0.34.xip.io (API version: 2.13.0)
User: admin
Org: SriniOrg
Space: SriniSpace
htipl@cf5:~/go/src/github.com/cloudfoundry/cli$ cf spaces
Getting spaces in org SriniOrg as admin...
name
SriniSpace
htipl@cf5:~/go/src/github.com/cloudfoundry/cli$ cf delete-space srinispace
Really delete the space srinispace?> y
Deleting space srinispace in org SriniOrg as admin...
OK
htipl@cf5:~/go/src/github.com/cloudfoundry/cli$ cf spaces
Getting spaces in org SriniOrg as admin...
name
No spaces found
htipl@cf5:~/go/src/github.com/cloudfoundry/cli$ cf target
API endpoint: https://api.10.244.0.34.xip.io (API version: 2.13.0)
User: admin
Org: SriniOrg
Space: SriniSpace

After Fix:If cf user does
htipl@cf5:~/go/src/github.com/cloudfoundry/cli$ ./out/cf target

API endpoint: https://api.10.244.0.34.xip.io (API version: 2.13.0)
User: admin
Org: SriniOrg
Space: SriniSpace
htipl@cf5:~/go/src/github.com/cloudfoundry/cli$ ./out/cf spaces
Getting spaces in org SriniOrg as admin...
name
SriniSpace
htipl@cf5:~/go/src/github.com/cloudfoundry/cli$ ./out/cf delete-space srinispace
Really delete the space srinispace?> y
Deleting space srinispace in org SriniOrg as admin...
OK
TIP: No space targeted, use 'cf target -s' to target a space
htipl@cf5:~/go/src/github.com/cloudfoundry/cli$ ./out/cf spaces
Getting spaces in org SriniOrg as admin...
name
No spaces found
htipl@cf5:~/go/src/github.com/cloudfoundry/cli$ ./out/cf target
API endpoint: https://api.10.244.0.34.xip.io (API version: 2.13.0)
User: admin
Org: SriniOrg
Space: No space targeted, use 'cf target -s SPACE'

http://rnd-github.huawei.com/paas/cli/issues/28