class TaskRole

Attributes

name[R]
parent[R]
resources_HMCConsole[R]
resources_cec[R]
resources_frame[R]
resources_raw[R]

Public Class Methods

new(string) click to toggle source
# File lib/HMC/TaskRole.rb, line 16
def initialize(string)

  parse(string) unless string.empty?
end

Public Instance Methods

parse(string) click to toggle source

name=hmcservicerep,parent=Predefined,“resources=”“frame:CheckPSN+DeactivateFrameIO+FrameInitialize+LaunchFrameAsm+ListFrameProperty+ManageFrameServEvents+ManagePSN+RefreshFrame,cec:ActivateSystemProfile+BackupProfileData+CECPowerOff+CECPowerOn+CaptureSystemTemplate+CollectCECVPDInfo+DeployPartitionTemplate+DeviceMaintenance+LSProfileSpace+LaunchAsm+ListCECProperty+ListCoDInformation+ListNPortLogin+ListPCIeTopology+ListRioTopology+ListSSP+ListSystemProfileProperty+ListUtilizationData+ListVETInfo+ManageCECServEvents+ManageDumps+ManageSPP+ManageSysProfile+ManageUtilizationData+RebuildCEC+UpdateLIC+ValidateSystemProfile+ViewDumps+ViewPowerManagement+ViewSPP,lpar:ActivateLPAR+CapturePartitionTemplate+ChangeNPortLogin+CloseVTerm+Connect5250VTerm+DlparOperation+ListLPARProperty+ListProfileProperty+ManageLPARServEvents+ManageProfile+Open5250VTerm+OpenVTerm+RebootLPAR+ShutdownLPAR+VirtualIOServerCommand,HMCConsole:5250Task+BackupHMCData+ChangeHMCConfiguration+ChangeLocale+ChangeUserPasswords+CollectVPDInfo+CustServiceSettings+FormatMedia+GetUpgradeFiles+GroupingApp+ListConnections+ListHMCConfiguration+ListSNMPServiceSettings+ListServiceableEvents+ListStorageMedia+ManageConsoleDumps+ManageSNMPServiceSettings+ManageServEvents+RepairServEvent+RestoreUpgradeData+SaveUpgradeData+ShutdownHMC+TemplateLibrary+TipOfTheDay+UpdateHMC+UserSettings+ViewConsoleEvents+ViewHMCFileSystems”“”

# File lib/HMC/TaskRole.rb, line 22
def parse(string)

  hash = HmcString.parse(string)

  @name = hash['name']
  @parent = hash['parent']
  @resources_raw = hash['resources']

  parseResorces(@resources_raw)

end
parseResorces(string) click to toggle source
# File lib/HMC/TaskRole.rb, line 34
def parseResorces(string)
  regexp = /frame:(.*),cec:(.*),HMCConsole:(.*)/
  match = regexp.match(string)
  if (match)
    resources_frame = match[1].split("+")
  else
    raise "can't find regexp"
  end

end