Class: TaskRole
- Inherits:
-
Object
- Object
- TaskRole
- Defined in:
- lib/HMC/TaskRole.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#resources_cec ⇒ Object
readonly
Returns the value of attribute resources_cec.
-
#resources_frame ⇒ Object
readonly
Returns the value of attribute resources_frame.
-
#resources_HMCConsole ⇒ Object
readonly
Returns the value of attribute resources_HMCConsole.
-
#resources_raw ⇒ Object
readonly
Returns the value of attribute resources_raw.
Instance Method Summary collapse
-
#initialize(string) ⇒ TaskRole
constructor
A new instance of TaskRole.
-
#parse(string) ⇒ Object
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”“”.
- #parseResorces(string) ⇒ Object
Constructor Details
#initialize(string) ⇒ TaskRole
Returns a new instance of TaskRole.
16 17 18 19 |
# File 'lib/HMC/TaskRole.rb', line 16 def initialize(string) parse(string) unless string.empty? end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/HMC/TaskRole.rb', line 9 def name @name end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
10 11 12 |
# File 'lib/HMC/TaskRole.rb', line 10 def parent @parent end |
#resources_cec ⇒ Object (readonly)
Returns the value of attribute resources_cec.
13 14 15 |
# File 'lib/HMC/TaskRole.rb', line 13 def resources_cec @resources_cec end |
#resources_frame ⇒ Object (readonly)
Returns the value of attribute resources_frame.
12 13 14 |
# File 'lib/HMC/TaskRole.rb', line 12 def resources_frame @resources_frame end |
#resources_HMCConsole ⇒ Object (readonly)
Returns the value of attribute resources_HMCConsole.
14 15 16 |
# File 'lib/HMC/TaskRole.rb', line 14 def resources_HMCConsole @resources_HMCConsole end |
#resources_raw ⇒ Object (readonly)
Returns the value of attribute resources_raw.
11 12 13 |
# File 'lib/HMC/TaskRole.rb', line 11 def resources_raw @resources_raw end |
Instance Method Details
#parse(string) ⇒ Object
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”“”
22 23 24 25 26 27 28 29 30 31 32 |
# 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) ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# 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 |