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.
334 335 336 |
# File 'lib/nexpose/silo.rb', line 334 def initialize(&block) instance_eval(&block) if block_given? end |
Instance Attribute Details
#assets ⇒ Object (readonly)
The asset count for this silo
324 325 326 |
# File 'lib/nexpose/silo.rb', line 324 def assets @assets end |
#description ⇒ Object (readonly)
A description of the silo.
320 321 322 |
# File 'lib/nexpose/silo.rb', line 320 def description @description end |
#id ⇒ Object (readonly)
The silo ID.
316 317 318 |
# File 'lib/nexpose/silo.rb', line 316 def id @id end |
#max_assets ⇒ Object (readonly)
The asset count limit for this silo.
326 327 328 |
# File 'lib/nexpose/silo.rb', line 326 def max_assets @max_assets end |
#max_hosted_assets ⇒ Object (readonly)
The hosted asset count limit for this silo.
328 329 330 |
# File 'lib/nexpose/silo.rb', line 328 def max_hosted_assets @max_hosted_assets end |
#max_users ⇒ Object (readonly)
The user count limit for this silo.
332 333 334 |
# File 'lib/nexpose/silo.rb', line 332 def max_users @max_users end |
#name ⇒ Object (readonly)
The silo name.
318 319 320 |
# File 'lib/nexpose/silo.rb', line 318 def name @name end |
#profile_id ⇒ Object (readonly)
The ID of the silo profile being used for this silo.
322 323 324 |
# File 'lib/nexpose/silo.rb', line 322 def profile_id @profile_id end |
#users ⇒ Object (readonly)
The user count for this silo
330 331 332 |
# File 'lib/nexpose/silo.rb', line 330 def users @users end |
Class Method Details
.parse(xml) ⇒ Object
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/nexpose/silo.rb', line 338 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 |