mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-30 18:23:35 +08:00
_getModule fix
This commit is contained in:
@@ -249,6 +249,11 @@ func _getModule(session *mcclient.ClientSession, name string) (BaseManagerInterf
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("No such module %s for version %s", name, session.GetApiVersion())
|
||||
}
|
||||
|
||||
if len(mods) == 1 {
|
||||
return mods[0], nil
|
||||
}
|
||||
|
||||
for _, mod := range mods {
|
||||
url, e := session.GetServiceURL(mod.ServiceType(), mod.EndpointType())
|
||||
if e != nil {
|
||||
|
||||
Reference in New Issue
Block a user