Class: Nexpose::EngineSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/nexpose/scan_engine.rb

Overview

Description

Object that represents the summary of a scan engine.

Examples

# Create a new Nexpose Connection on the default port and Login
nsc = Connection.new("10.1.40.10","nxadmin","password")
nsc.()

# Get the engine listing for the connection
enginelisting = EngineListing.new(nsc)

# Print out the status of the first scan engine
puts enginelisting.engines[0].status

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, name, address, port, status, scope = 'silo') ⇒ EngineSummary

Constructor EngineSummary(id, name, address, port, status, scope)



84
85
86
87
88
89
90
91
# File 'lib/nexpose/scan_engine.rb', line 84

def initialize(id, name, address, port, status, scope = 'silo')
  @id = id
  @name = name
  @address = address
  @port = port
  @status = status
  @scope = scope
end

Instance Attribute Details

#addressObject (readonly)

The hostname or IP address of the engine



73
74
75
# File 'lib/nexpose/scan_engine.rb', line 73

def address
  @address
end

#idObject (readonly)

A unique ID that identifies this scan engine



69
70
71
# File 'lib/nexpose/scan_engine.rb', line 69

def id
  @id
end

#nameObject (readonly)

The name of this scan engine



71
72
73
# File 'lib/nexpose/scan_engine.rb', line 71

def name
  @name
end

#portObject (readonly)

The port there the engine is listening



75
76
77
# File 'lib/nexpose/scan_engine.rb', line 75

def port
  @port
end

#scopeObject (readonly)

A parameter that specifies whether the engine has a global or silo-specific scope.



80
81
82
# File 'lib/nexpose/scan_engine.rb', line 80

def scope
  @scope
end

#statusObject (readonly)

The engine status (active|pending-auth| incompatible|not-responding|unknown)



77
78
79
# File 'lib/nexpose/scan_engine.rb', line 77

def status
  @status
end

Instance Method Details

#to_sObject



93
94
95
# File 'lib/nexpose/scan_engine.rb', line 93

def to_s
  "Engine: #@name [ID: #@id] #@address:#@port, Status: #@status, Scope: #@scope"
end