Class: Nexpose::EnginePoolSummary
- Inherits:
-
Object
- Object
- Nexpose::EnginePoolSummary
- Defined in:
- lib/nexpose/pool.rb
Overview
A summary of an engine pool.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Unique identifier of the engine pool.
-
#name ⇒ Object
readonly
Name of the engine pool.
-
#scope ⇒ Object
readonly
Whether the engine pool has global or silo scope.
Instance Method Summary collapse
- #as_xml ⇒ Object
-
#delete(conn) ⇒ Object
Deletes an engine pool.
-
#initialize(id, name, scope = 'silo') ⇒ EnginePoolSummary
constructor
A new instance of EnginePoolSummary.
Constructor Details
#initialize(id, name, scope = 'silo') ⇒ EnginePoolSummary
Returns a new instance of EnginePoolSummary.
38 39 40 41 42 |
# File 'lib/nexpose/pool.rb', line 38 def initialize(id, name, scope = 'silo') @id = id.to_i @name = name @scope = scope end |
Instance Attribute Details
#id ⇒ Object (readonly)
Unique identifier of the engine pool.
32 33 34 |
# File 'lib/nexpose/pool.rb', line 32 def id @id end |
#name ⇒ Object (readonly)
Name of the engine pool.
34 35 36 |
# File 'lib/nexpose/pool.rb', line 34 def name @name end |
#scope ⇒ Object (readonly)
Whether the engine pool has global or silo scope.
36 37 38 |
# File 'lib/nexpose/pool.rb', line 36 def scope @scope end |
Instance Method Details
#as_xml ⇒ Object
55 56 57 58 59 60 |
# File 'lib/nexpose/pool.rb', line 55 def as_xml xml = REXML::Element.new('EnginePool') xml.add_attribute('name', @name) xml.add_attribute('scope', @scope) xml end |
#delete(conn) ⇒ Object
Deletes an engine pool
48 49 50 51 52 53 |
# File 'lib/nexpose/pool.rb', line 48 def delete(conn) xml = conn.make_xml('EnginePoolDeleteRequest') xml.add_element(as_xml) result = conn.execute(xml, '1.2') result.success end |