lib/nexpose/scan.rb
# Perform an ad hoc scan of a subset of assets for a site.
# Only assets from a single site should be submitted per request.
# Method is designed to take objects filtered from Site#assets.
#
# For example:
#   site = Site.load(nsc, 5)
#   nsc.scan_assets(5, site.assets.take(10))
#
# @param [Fixnum] site_id Site ID that the assets belong to.
# @param [Array[HostName|IPRange]] assets List of assets to scan.
# @return [Scan] Scan launch information.
#
Perform an ad hoc scan of a subset of assets for a site.
Only assets from a single site should be submitted per request.
Method is designed to take objects filtered from Site#assets.


Perform an ad hoc scan of a subset of assets for a site . Only assets from a single site should be submitted per request . Method is designed to take objects filtered from Site#assets .
def scan_assets(site_id, assets)
      xml = make_xml('SiteDevicesScanRequest', { 'site-id' => site_id })
      hosts = REXML::Element.new('Hosts')
      assets.each { |asset| _append_asset!(hosts, asset) }
      xml.add_element(hosts)
      _scan_ad_hoc(xml)
    end
def scan_assets ( site_id , assets ) xml = make_xml ( 'SiteDevicesScanRequest' , { 'site-id' => site_id } ) hosts = REXML :: Element . new ( 'Hosts' ) assets . each { | asset | _append_asset! ( hosts , asset ) } xml . add_element ( hosts ) _scan_ad_hoc ( xml ) end
Perform an ad hoc scan of a subset of assets for a site.
Perform an ad hoc scan of a subset of assets for a site .
Scan launch information.
Scan launch information .
Scan
site_id
<not_specific>
assets
<not_specific>
<not_specific>
site_id Site ID that the assets belong to.
site_id Site ID that the assets belong to .
]
<not_specific>
assets List of assets to scan.
assets List of assets to scan .