Class: Nexpose::SiloSummary
- Inherits:
-
Object
- Object
- Nexpose::SiloSummary
- Defined in:
- lib/nexpose/silo.rb
Overview
Object that represents the summary of a Nexpose Site.
Instance Attribute Summary collapse
-
#assets ⇒ Object
readonly
The asset count for this silo.
-
#description ⇒ Object
readonly
A description of the silo.
-
#id ⇒ Object
readonly
The silo ID.
-
#max_assets ⇒ Object
readonly
The asset count limit for this silo.
-
#max_hosted_assets ⇒ Object
readonly
The hosted asset count limit for this silo.
-
#max_users ⇒ Object
readonly
The user count limit for this silo.
-
#name ⇒ Object
readonly
The silo name.
-
#profile_id ⇒ Object
readonly
The ID of the silo profile being used for this silo.
-
#users ⇒ Object
readonly
The user count for this silo.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(&block) ⇒ SiloSummary
constructor
A new instance of SiloSummary.
Constructor Details
#initialize(&block) ⇒ SiloSummary
Returns a new instance of SiloSummary.
333 334 335 |
# File 'lib/nexpose/silo.rb', line 333 def initialize(&block) instance_eval &block if block_given? end |
Instance Attribute Details
#assets ⇒ Object (readonly)
The asset count for this silo
323 324 325 |
# File 'lib/nexpose/silo.rb', line 323 def assets @assets end |
#description ⇒ Object (readonly)
A description of the silo.
319 320 321 |
# File 'lib/nexpose/silo.rb', line 319 def description @description end |
#id ⇒ Object (readonly)
The silo ID.
315 316 317 |
# File 'lib/nexpose/silo.rb', line 315 def id @id end |
#max_assets ⇒ Object (readonly)
The asset count limit for this silo.
325 326 327 |
# File 'lib/nexpose/silo.rb', line 325 def max_assets @max_assets end |
#max_hosted_assets ⇒ Object (readonly)
The hosted asset count limit for this silo.
327 328 329 |
# File 'lib/nexpose/silo.rb', line 327 def max_hosted_assets @max_hosted_assets end |
#max_users ⇒ Object (readonly)
The user count limit for this silo.
331 332 333 |
# File 'lib/nexpose/silo.rb', line 331 def max_users @max_users end |
#name ⇒ Object (readonly)
The silo name.
317 318 319 |
# File 'lib/nexpose/silo.rb', line 317 def name @name end |
#profile_id ⇒ Object (readonly)
The ID of the silo profile being used for this silo.
321 322 323 |
# File 'lib/nexpose/silo.rb', line 321 def profile_id @profile_id end |
#users ⇒ Object (readonly)
The user count for this silo
329 330 331 |
# File 'lib/nexpose/silo.rb', line 329 def users @users end |
Class Method Details
.parse(xml) ⇒ Object
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/nexpose/silo.rb', line 337 def self.parse(xml) new do @id = xml.attributes['id'] @name = xml.attributes['name'] @description = xml.attributes['description'] @profile_id = xml.attributes['silo-profile-id'] xml.elements.each('LicenseSummary') do |license| @assets = license.attributes['assets'] @max_assets = license.attributes['max-assets'] @max_hosted_assets = license.attributes['max-hosted-assets'] @users = license.attributes['users'] @max_users = license.attributes['max-users'] end end end |