本文整理汇总了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);
}