Пример #1
0
        private void ISCSiStatus()
        {
            try
            {
                bool isPer         = ISCSiAPI.IsPersistentConnetionType();
                bool isConnected   = ISCSiAPI.IsIscsiConneted();
                bool isDiskAlready = ISCSiAPI.DisksAlready();
                if (!isPer)
                {
                    MessageBox.Show("ISCSi not persistent.");
                }

                if (!isConnected)
                {
                    MessageBox.Show("ISCSi not connected.");
                }

                if (!isDiskAlready)
                {
                    MessageBox.Show("ISCSi not online.");
                }
                ChangeStatus(CheckModule.ISCSiConnection, isPer && isConnected && isDiskAlready);
            }
            catch (Exception ex)
            {
                logger.Debug(ex.ToString());
                MessageBox.Show("Iscsi Error:" + ex.Message);
            }
        }
Пример #2
0
        public void DiskAlreadyTest()
        {
            bool expected = false; // TODO: 初始化為適當值
            bool actual;

            actual = ISCSiAPI.DisksAlready();
            Assert.AreEqual(expected, actual);
        }