Ejemplo n.º 1
0
        private void LoadDetails()
        {
            // Check if vSwitch Controller is configured for the pool (CA-46299)
            Pool pool = Helpers.GetPoolOfOne(connection);
            var  vSwitchController = !Helpers.StockholmOrGreater(connection) && pool != null && pool.vSwitchController();

            if (vSwitchController)
            {
                tableLayoutPanel3.Enabled    = checkboxQoS.Enabled = checkboxQoS.Checked = false;
                tableLayoutPanelInfo.Visible = true;
            }
            else
            {
                if (ExistingVif == null)
                {
                    promptTextBoxQoS.Text = "";
                    checkboxQoS.Checked   = false;
                }
                else
                {
                    promptTextBoxQoS.Text = ExistingVif.LimitString();
                    checkboxQoS.Checked   = ExistingVif.qos_algorithm_type == VIF.RATE_LIMIT_QOS_VALUE;
                }

                tableLayoutPanel3.Enabled    = checkboxQoS.Enabled = true;
                tableLayoutPanelInfo.Visible = false;
            }

            if (ExistingVif == null)
            {
                radioButtonAutogenerate.Checked = true;
                return;
            }

            foreach (NetworkComboBoxItem item in comboBoxNetwork.Items)
            {
                if (item.Network != null && item.Network.opaque_ref == ExistingVif.network.opaque_ref)
                {
                    comboBoxNetwork.SelectedItem = item;
                }
            }

            promptTextBoxMac.Text = ExistingVif.MAC;

            if (!string.IsNullOrEmpty(ExistingVif.MAC))
            {
                radioButtonMac.Checked = true;
            }
            else
            {
                radioButtonAutogenerate.Checked = true;
            }
        }
Ejemplo n.º 2
0
        private void LoadDetails()
        {
            if (vSwitchController)
            {
                flowLayoutPanelQoS.Enabled      = checkboxQoS.Enabled = checkboxQoS.Checked = false;
                panelLicenseRestriction.Visible = true;
            }
            else
            {
                if (ExistingVif == null)
                {
                    promptTextBoxQoS.Text = "";
                    checkboxQoS.Checked   = false;
                }
                else
                {
                    promptTextBoxQoS.Text = ExistingVif.LimitString();
                    checkboxQoS.Checked   = ExistingVif.qos_algorithm_type == VIF.RATE_LIMIT_QOS_VALUE;
                }
                flowLayoutPanelQoS.Enabled = checkboxQoS.Enabled = true;

                panelLicenseRestriction.Visible = false;
            }

            if (ExistingVif == null)
            {
                radioButtonAutogenerate.Checked = true;
                return;
            }
            foreach (NetworkComboBoxItem item in comboBoxNetwork.Items)
            {
                if (item.Network != null && item.Network.opaque_ref == ExistingVif.network.opaque_ref)
                {
                    comboBoxNetwork.SelectedItem = item;
                }
            }
            promptTextBoxMac.Text = ExistingVif.MAC;
            if (!string.IsNullOrEmpty(ExistingVif.MAC))
            {
                radioButtonMac.Checked = true;
            }
            else
            {
                radioButtonAutogenerate.Checked = true;
            }
        }
Ejemplo n.º 3
0
            public void UpdateDetails()
            {
                if (Metrics != null)
                {
                    Metrics.PropertyChanged -= Server_PropertyChanged;
                }

                Metrics = Vif.Connection.Resolve(Vif.metrics);

                if (Metrics != null)
                {
                    Metrics.PropertyChanged += Server_PropertyChanged;
                }

                ImageCell.Value    = Properties.Resources._000_Network_h32bit_16;
                DeviceCell.Value   = Vif.device;
                MacCell.Value      = Helpers.GetMacString(Vif.MAC);
                LimitCell.Value    = Vif.qos_algorithm_type != "" ? Vif.LimitString() : "";
                NetworkCell.Value  = Vif.NetworkName();
                IpCell.Value       = Vif.IPAddressesAsString();
                AttachedCell.Value = Vif.currently_attached ? Messages.YES : Messages.NO;
            }