Ejemplo n.º 1
0
        public void DeleteSlave(OpenVASSlave slave)
        {
            if (slave.RemoteSlaveID == Guid.Empty)
            {
                throw new Exception("Can't delete slave that hasn't been created.");
            }

            XmlDocument response = this.DeleteSlave(slave.RemoteSlaveID.ToString());

            foreach (XmlAttribute attr in response.Attributes)
            {
                if (attr.Name == "status" && attr.Value != "200")
                {
                    throw new Exception("Deleting slave failed.");
                }
            }
        }
Ejemplo n.º 2
0
        public void DeleteSlave(OpenVASSlave slave)
        {
            if (slave.RemoteSlaveID == Guid.Empty)
                throw new Exception("Can't delete slave that hasn't been created.");

            XmlDocument response = this.DeleteSlave(slave.RemoteSlaveID.ToString());

            foreach (XmlAttribute attr in response.Attributes)
            {
                if (attr.Name == "status" && attr.Value != "200")
                    throw new Exception("Deleting slave failed.");
            }
        }