mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-24 22:06:59 +01:00
CP-35898: Do not show SMAPIv3 SRs as of unknown type if the type can be inferred from the SM plugin.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
a109f5f22d
commit
29f3f9cd33
@ -120,7 +120,19 @@ namespace XenAPI
|
||||
|
||||
public string FriendlyTypeName()
|
||||
{
|
||||
return GetFriendlyTypeName(GetSRType(false));
|
||||
var srType = GetSRType(false);
|
||||
|
||||
if (srType == SRTypes.unknown)
|
||||
{
|
||||
var sm = SM.GetByType(Connection, type);
|
||||
|
||||
if (sm != null &&
|
||||
Version.TryParse(sm.required_api_version, out var smapiVersion) &&
|
||||
smapiVersion.CompareTo(new Version(3, 0)) >= 0)
|
||||
return !string.IsNullOrEmpty(sm.name_label) ? sm.name_label : type;
|
||||
}
|
||||
|
||||
return GetFriendlyTypeName(srType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user