private void EnterMaintenanceMode(Host host)
        {
            Pool pool = Helpers.GetPool(host.Connection);

            if (pool != null && pool.ha_enabled && host.IsMaster())
            {
                new ThreeButtonDialog(
                    new ThreeButtonDialog.Details(
                        SystemIcons.Error, 
                        String.Format(Messages.HA_CANNOT_EVACUATE_MASTER, 
                            Helpers.GetName(host).Ellipsise(Helpers.DEFAULT_NAME_TRIM_LENGTH)), 
                        Messages.XENCENTER)).ShowDialog(Parent);
            }
            else
            {
                MainWindowCommandInterface.ShowPerXenModelObjectWizard(host, new EvacuateHostDialog(host));
            }
        }
 private bool HostCannotParticipateInPowerManagement(Host host)
 {
     return host.IsMaster() || (string.IsNullOrEmpty(host.power_on_mode) && Helpers.MidnightRideOrGreater(_connection));
 }
Exemple #3
0
 protected static bool IsSlave(Host host)
 {
     return !host.IsMaster();
 }
Exemple #4
0
 protected static bool IsMaster(Host host)
 {
     return host.IsMaster();
 }
 public DataGridViewRowUpgrade(Host host)
     : this()
 {
     Host = host;
     taskCell.Value = string.Format(Host.IsMaster() ? Messages.UPGRADE_POOL_MASTER : Messages.UPGRADE_SLAVE, host.Name);
     UpdateStatus(HostUpgradeState.NotUpgraded, Messages.NOT_UPGRADED);
 }
 private static bool CanExecute(Host host)
 {
     bool disconnected = host.Connection != null && !host.Connection.IsConnected;
     return disconnected || host.IsMaster();
 }
 private bool HostCannotParticipateInPowerManagement(Host host)
 {
     return host.IsMaster() || string.IsNullOrEmpty(host.power_on_mode);
 }