/// <summary>
        /// Updates  esight connect status.
        /// </summary>
        /// <param name="hostIp">The host ip.</param>
        /// <param name="latestStatus">The latest status.</param>
        /// <param name="latestConnectInfo">The latest connect information.</param>
        public void UpdateESightConnectStatus(string hostIp, string latestStatus, string latestConnectInfo)
        {
            IObjectReader <EnterpriseManagementObject> items =
                OM12Connection.Query <EnterpriseManagementObject>(ESightAppliance.EntityClassName, $"Host='{hostIp}'");
            EnterpriseManagementObject managementObject = items.FirstOrDefault();

            if (managementObject == null)
            {
                throw new Exception($"Can not find the eSight:{hostIp}");
            }

            var props = OM12Connection.GetManagementPackProperties(managementObject);

            managementObject[props["LastModifiedOn"]].Value    = DateTime.UtcNow;
            managementObject[props["LatestStatus"]].Value      = latestStatus;
            managementObject[props["LatestConnectInfo"]].Value = latestConnectInfo;

            managementObject.Overwrite();
        }
        /// <summary>
        /// Updates the esight alarm.
        /// </summary>
        /// <param name="hostIp">The host ip.</param>
        /// <param name="alarmStatus">The alarm status.</param>
        /// <param name="error">The error.</param>
        public void UpdateESightNeDevice(string hostIp, int alarmStatus, string error)
        {
            IObjectReader <EnterpriseManagementObject> items =
                OM12Connection.Query <EnterpriseManagementObject>(ESightAppliance.EntityClassName, $"Host='{hostIp}'");
            EnterpriseManagementObject managementObject = items.FirstOrDefault();

            if (managementObject == null)
            {
                throw new Exception($"Can not find the eSight:{hostIp}");
            }

            var props = OM12Connection.GetManagementPackProperties(managementObject);

            managementObject[props["LastModifiedOn"]].Value             = DateTime.UtcNow;
            managementObject[props["SubscripeNeDeviceError"]].Value     = error;
            managementObject[props["SubscriptionNeDeviceStatus"]].Value = alarmStatus;

            managementObject.Overwrite();
        }