Class: Nexpose::EngineSummary
- Inherits:
-
Object
- Object
- Nexpose::EngineSummary
- 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.login()
# 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
-
#address ⇒ Object
readonly
The hostname or IP address of the engine.
-
#id ⇒ Object
readonly
A unique ID that identifies this scan engine.
-
#name ⇒ Object
readonly
The name of this scan engine.
-
#port ⇒ Object
readonly
The port there the engine is listening.
-
#scope ⇒ Object
readonly
A parameter that specifies whether the engine has a global or silo-specific scope.
-
#status ⇒ Object
readonly
The engine status (active|pending-auth| incompatible|not-responding|unknown).
Instance Method Summary collapse
-
#initialize(id, name, address, port, status, scope = 'silo') ⇒ EngineSummary
constructor
Constructor EngineSummary(id, name, address, port, status, scope).
- #to_s ⇒ Object
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
#address ⇒ Object (readonly)
The hostname or IP address of the engine
73 74 75 |
# File 'lib/nexpose/scan_engine.rb', line 73 def address @address end |
#id ⇒ Object (readonly)
A unique ID that identifies this scan engine
69 70 71 |
# File 'lib/nexpose/scan_engine.rb', line 69 def id @id end |
#name ⇒ Object (readonly)
The name of this scan engine
71 72 73 |
# File 'lib/nexpose/scan_engine.rb', line 71 def name @name end |
#port ⇒ Object (readonly)
The port there the engine is listening
75 76 77 |
# File 'lib/nexpose/scan_engine.rb', line 75 def port @port end |
#scope ⇒ Object (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 |
#status ⇒ Object (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_s ⇒ Object
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 |