本文整理匯總了C#中XenAPI.Host.IsFreeLicense方法的典型用法代碼示例。如果您正苦於以下問題:C# Host.IsFreeLicense方法的具體用法?C# Host.IsFreeLicense怎麽用?C# Host.IsFreeLicense使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XenAPI.Host
的用法示例。
在下文中一共展示了Host.IsFreeLicense方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CanActivate
public static bool CanActivate(Host host)
{
//This check used to be "_expiresText != Messages.LICENSE_NEVER" but I've swapped it for
//"!host.isOEM" according to the ticket CA-37336 where this 3rd part of the check was added
//OEM licenses (< XS ver 5.5) have perpetual (2036) expiry dates
return host.IsFreeLicense() && host.IsFloodgateOrLater() && !host.isOEM && !Helpers.ClearwaterOrGreater(host);
}
示例2: PaidHostFreeMaster
private static bool PaidHostFreeMaster(Host slave, Host master)
{
if (slave == null || master == null)
return false;
// Is using per socket generation licenses?
if (Helpers.ClearwaterOrGreater(slave) && Helpers.ClearwaterOrGreater(master))
return !slave.IsFreeLicense() && master.IsFreeLicense();
return (!Host.RestrictHA(slave) && Host.RestrictHA(master));
}
示例3: FreeHostPaidMaster
public static bool FreeHostPaidMaster(Host slave, Host master, bool allowLicenseUpgrade)
{
if (slave == null || master == null)
return false;
// Is using per socket generation licenses?
if (Helpers.ClearwaterOrGreater(slave) && Helpers.ClearwaterOrGreater(master))
return slave.IsFreeLicense() && !master.IsFreeLicense() && !allowLicenseUpgrade;
if (Host.RestrictHA(slave) && !Host.RestrictHA(master))
{
// See http://scale.ad.xensource.com/confluence/display/engp/v6+licensing+for+XenServer+Essentials, req R21a.
// That section implies that we should downgrade a paid host to join a free pool, but that can't be the intention
// (confirmed by Carl Fischer). Carl's also not concerned about fixing up Enterprise/Platinum mismatches.
if (allowLicenseUpgrade)
return false;
return true;
}
return false;
}
示例4: CanActivate
public static bool CanActivate(Host host)
{
return host.IsFreeLicense() && !Helpers.ClearwaterOrGreater(host);
}