class OpenvasCli::VasNVTFamily
Category for NVT rules
Attributes
is_growing[RW]
name[RW]
Category Name
nvt_count[RW]
Number of rules in the family
Public Class Methods
from_xml_node(node)
click to toggle source
# File lib/openvas-cli/vas_nvt_family.rb, line 37 def self.from_xml_node(node) family = VasNVTFamily.new family.name = extract_value_from('name', node) family.nvt_count = extract_value_from('max_nvt_count', node).to_i family.is_growing = (extract_value_from("growing", node).to_i > 0) family end
get_all(options = {})
click to toggle source
Pulls all NVT Families defined on the server.
Options:¶ ↑
None.
# File lib/openvas-cli/vas_nvt_family.rb, line 21 def self.get_all(options = {}) req = Nokogiri::XML::Builder.new { |xml| xml.get_nvt_families } fams = connection.send_receive(req.doc) ret = [] fams.xpath('//family').each { |f| ret << from_xml_node(f) } ret end