Beispiel #1
0
            public void UpdateDetails()
            {
                Enabled = !Network.IsSlave();

                DeregisterPifEvents();

                Pif = Helpers.FindPIF(Network, Xmo as Host);

                RegisterPifEvents();

                ImageCell.Value       = Properties.Resources._000_Network_h32bit_16;
                NameCell.Value        = NetworkName();
                DescriptionCell.Value = Network.Description();
                NicCell.Value         = Helpers.GetName(Pif);
                VlanCell.Value        = Helpers.VlanString(Pif);
                AutoCell.Value        = Network.GetAutoPlug() ? Messages.YES : Messages.NO;
                LinkStatusCell.Value  = Xmo is Pool?Network.LinkStatusString() :
                                            Pif == null ? Messages.NONE : Pif.LinkStatusString();

                MacCell.Value = Pif != null && Pif.IsPhysical() ? Pif.MAC : Messages.SPACED_HYPHEN;
                MtuCell.Value = Network.CanUseJumboFrames() ? Network.MTU.ToString() : Messages.SPACED_HYPHEN;
            }
Beispiel #2
0
            public void UpdateDetails()
            {
                Enabled = !Network.IsSlave();

                DeregisterPifEvents();

                Pif = Helpers.FindPIF(Network, Xmo as Host);

                RegisterPifEvents();

                ImageCell.Value       = Properties.Resources._000_Network_h32bit_16;
                NameCell.Value        = NetworkName();
                DescriptionCell.Value = Network.Description();
                NicCell.Value         = Helpers.GetName(Pif);
                VlanCell.Value        = Helpers.VlanString(Pif);
                AutoCell.Value        = Network.GetAutoPlug() ? Messages.YES : Messages.NO;
                LinkStatusCell.Value  = Xmo is Pool?Network.LinkStatusString() :
                                            Pif == null ? Messages.NONE : Pif.LinkStatusString();

                MacCell.Value = Pif != null && Pif.IsPhysical() ? Pif.MAC : Messages.SPACED_HYPHEN;
                MtuCell.Value = Network.CanUseJumboFrames() ? Network.MTU.ToString() : Messages.SPACED_HYPHEN;

                var networkSriov = Pif != null?Pif.NetworkSriov() : null;

                if (networkSriov == null)
                {
                    SriovCell.Value = Messages.NO;
                }
                else
                {
                    var sriov = Pif.Connection.Resolve(networkSriov);
                    SriovCell.Value = sriov == null
                        ? Messages.NO
                        : sriov.requires_reboot
                            ? Messages.HOST_NEEDS_REBOOT_ENABLE_SRIOV
                            : Messages.YES;
                }
            }