mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-13 07:46:56 +08:00
mcclient: 修复project-delete
- Hosts没有project概念,tenant=xx参数会被忽略 - 指定tenant=xx需要同时指定admin=1才生效
This commit is contained in:
@@ -241,8 +241,9 @@ func (this *ProjectManagerV3) Delete(session *mcclient.ClientSession, id string,
|
||||
func (this *ProjectManagerV3) DeleteInContexts(session *mcclient.ClientSession, id string, body jsonutils.JSONObject, ctxs []ManagerContext) (jsonutils.JSONObject, error) {
|
||||
if ctxs == nil {
|
||||
p := jsonutils.NewDict()
|
||||
p.Add(jsonutils.JSONTrue, "admin")
|
||||
p.Add(jsonutils.NewString(id), "tenant")
|
||||
ret, e := Hosts.List(session, p)
|
||||
ret, e := Servers.List(session, p)
|
||||
if e != nil {
|
||||
return nil, e
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user