class Nexpose::RoleSummary

Role summary object encapsulating information about a role.

Attributes

description[RW]

A description of the role.

enabled[RW]

Whether or not the role is enabled.

full_name[RW]

The full name of the role. Must be unique.

id[RW]

The unique identifier of the role.

name[RW]

The short name of the role. Must be unique.

scope[RW]

Specifies if the role has global or silo scope. @see Nexpose::Scope

Public Class Methods

new(name, full_name, id, description, enabled = true, scope = Scope::SILO) click to toggle source
# File lib/nexpose/role.rb, line 101
def initialize(name, full_name, id, description, enabled = true, scope = Scope::SILO)
  @name        = name
  @full_name   = full_name
  @id          = id.to_i
  @description = description
  @enabled     = enabled
  @scope       = scope
end
parse(xml) click to toggle source
# File lib/nexpose/role.rb, line 110
def self.parse(xml)
  new(xml.attributes['name'],
      xml.attributes['full-name'],
      xml.attributes['id'].to_i,
      xml.attributes['description'],
      xml.attributes['enabled'] == 'true',
      xml.attributes['scope'])
end