Class: RemoteAccess
- Inherits:
-
Object
- Object
- RemoteAccess
- Defined in:
- lib/HMC/RemoteAccess.rb
Instance Attribute Summary collapse
-
#altdiskboot ⇒ Object
readonly
Returns the value of attribute altdiskboot.
-
#kerberos ⇒ Object
readonly
Returns the value of attribute kerberos.
-
#kerberos_allow_weak_crypto ⇒ Object
readonly
Returns the value of attribute kerberos_allow_weak_crypto.
-
#kerberos_clockskew ⇒ Object
readonly
Returns the value of attribute kerberos_clockskew.
-
#kerberos_default_realm ⇒ Object
readonly
Returns the value of attribute kerberos_default_realm.
-
#kerberos_keyfile_present ⇒ Object
readonly
Returns the value of attribute kerberos_keyfile_present.
-
#kerberos_realm_kdc ⇒ Object
readonly
Returns the value of attribute kerberos_realm_kdc.
-
#kerberos_ticket_lifetime ⇒ Object
readonly
Returns the value of attribute kerberos_ticket_lifetime.
-
#kpasswd_admin ⇒ Object
readonly
Returns the value of attribute kpasswd_admin.
-
#ldap ⇒ Object
readonly
Returns the value of attribute ldap.
-
#legacyhmccomm ⇒ Object
readonly
Returns the value of attribute legacyhmccomm.
-
#remotewebui ⇒ Object
readonly
Returns the value of attribute remotewebui.
-
#security ⇒ Object
readonly
Returns the value of attribute security.
-
#sol ⇒ Object
readonly
Returns the value of attribute sol.
-
#ssh ⇒ Object
readonly
Returns the value of attribute ssh.
-
#sshprotocol ⇒ Object
readonly
Returns the value of attribute sshprotocol.
-
#syslogserver ⇒ Object
readonly
Returns the value of attribute syslogserver.
-
#syslogtcpserver ⇒ Object
readonly
Returns the value of attribute syslogtcpserver.
-
#syslogtlsserver ⇒ Object
readonly
Returns the value of attribute syslogtlsserver.
-
#trace ⇒ Object
readonly
Returns the value of attribute trace.
-
#xntp ⇒ Object
readonly
Returns the value of attribute xntp.
-
#xntpserver ⇒ Object
readonly
Returns the value of attribute xntpserver.
Instance Method Summary collapse
-
#initialize(string) ⇒ RemoteAccess
constructor
A new instance of RemoteAccess.
- #parse(string) ⇒ Object
Constructor Details
#initialize(string) ⇒ RemoteAccess
Returns a new instance of RemoteAccess.
27 28 29 |
# File 'lib/HMC/RemoteAccess.rb', line 27 def initialize(string) parse(string) unless string.empty? end |
Instance Attribute Details
#altdiskboot ⇒ Object (readonly)
Returns the value of attribute altdiskboot.
11 12 13 |
# File 'lib/HMC/RemoteAccess.rb', line 11 def altdiskboot @altdiskboot end |
#kerberos ⇒ Object (readonly)
Returns the value of attribute kerberos.
13 14 15 |
# File 'lib/HMC/RemoteAccess.rb', line 13 def kerberos @kerberos end |
#kerberos_allow_weak_crypto ⇒ Object (readonly)
Returns the value of attribute kerberos_allow_weak_crypto.
21 22 23 |
# File 'lib/HMC/RemoteAccess.rb', line 21 def kerberos_allow_weak_crypto @kerberos_allow_weak_crypto end |
#kerberos_clockskew ⇒ Object (readonly)
Returns the value of attribute kerberos_clockskew.
16 17 18 |
# File 'lib/HMC/RemoteAccess.rb', line 16 def kerberos_clockskew @kerberos_clockskew end |
#kerberos_default_realm ⇒ Object (readonly)
Returns the value of attribute kerberos_default_realm.
14 15 16 |
# File 'lib/HMC/RemoteAccess.rb', line 14 def kerberos_default_realm @kerberos_default_realm end |
#kerberos_keyfile_present ⇒ Object (readonly)
Returns the value of attribute kerberos_keyfile_present.
20 21 22 |
# File 'lib/HMC/RemoteAccess.rb', line 20 def kerberos_keyfile_present @kerberos_keyfile_present end |
#kerberos_realm_kdc ⇒ Object (readonly)
Returns the value of attribute kerberos_realm_kdc.
15 16 17 |
# File 'lib/HMC/RemoteAccess.rb', line 15 def kerberos_realm_kdc @kerberos_realm_kdc end |
#kerberos_ticket_lifetime ⇒ Object (readonly)
Returns the value of attribute kerberos_ticket_lifetime.
17 18 19 |
# File 'lib/HMC/RemoteAccess.rb', line 17 def kerberos_ticket_lifetime @kerberos_ticket_lifetime end |
#kpasswd_admin ⇒ Object (readonly)
Returns the value of attribute kpasswd_admin.
18 19 20 |
# File 'lib/HMC/RemoteAccess.rb', line 18 def kpasswd_admin @kpasswd_admin end |
#ldap ⇒ Object (readonly)
Returns the value of attribute ldap.
12 13 14 |
# File 'lib/HMC/RemoteAccess.rb', line 12 def ldap @ldap end |
#legacyhmccomm ⇒ Object (readonly)
Returns the value of attribute legacyhmccomm.
22 23 24 |
# File 'lib/HMC/RemoteAccess.rb', line 22 def legacyhmccomm @legacyhmccomm end |
#remotewebui ⇒ Object (readonly)
Returns the value of attribute remotewebui.
5 6 7 |
# File 'lib/HMC/RemoteAccess.rb', line 5 def remotewebui @remotewebui end |
#security ⇒ Object (readonly)
Returns the value of attribute security.
23 24 25 |
# File 'lib/HMC/RemoteAccess.rb', line 23 def security @security end |
#sol ⇒ Object (readonly)
Returns the value of attribute sol.
24 25 26 |
# File 'lib/HMC/RemoteAccess.rb', line 24 def sol @sol end |
#ssh ⇒ Object (readonly)
Returns the value of attribute ssh.
3 4 5 |
# File 'lib/HMC/RemoteAccess.rb', line 3 def ssh @ssh end |
#sshprotocol ⇒ Object (readonly)
Returns the value of attribute sshprotocol.
4 5 6 |
# File 'lib/HMC/RemoteAccess.rb', line 4 def sshprotocol @sshprotocol end |
#syslogserver ⇒ Object (readonly)
Returns the value of attribute syslogserver.
8 9 10 |
# File 'lib/HMC/RemoteAccess.rb', line 8 def syslogserver @syslogserver end |
#syslogtcpserver ⇒ Object (readonly)
Returns the value of attribute syslogtcpserver.
9 10 11 |
# File 'lib/HMC/RemoteAccess.rb', line 9 def syslogtcpserver @syslogtcpserver end |
#syslogtlsserver ⇒ Object (readonly)
Returns the value of attribute syslogtlsserver.
10 11 12 |
# File 'lib/HMC/RemoteAccess.rb', line 10 def syslogtlsserver @syslogtlsserver end |
#trace ⇒ Object (readonly)
Returns the value of attribute trace.
19 20 21 |
# File 'lib/HMC/RemoteAccess.rb', line 19 def trace @trace end |
#xntp ⇒ Object (readonly)
Returns the value of attribute xntp.
6 7 8 |
# File 'lib/HMC/RemoteAccess.rb', line 6 def xntp @xntp end |
#xntpserver ⇒ Object (readonly)
Returns the value of attribute xntpserver.
7 8 9 |
# File 'lib/HMC/RemoteAccess.rb', line 7 def xntpserver @xntpserver end |
Instance Method Details
#parse(string) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/HMC/RemoteAccess.rb', line 31 def parse(string) regexp = %r{ssh=(enable|disable), sshprotocol=(|\d), remotewebui=(enable|disable), xntp=(enable|disable), xntpserver=(.*?), syslogserver=(.*?), syslogtcpserver=(.*?), syslogtlsserver=(.*?), altdiskboot=(enable|disable), ldap=(enable|disable), kerberos=(enable|disable), kerberos_default_realm=(.*?), kerberos_realm_kdc=(.*?), kerberos_clockskew=(.*?), kerberos_ticket_lifetime=(.*?), kpasswd_admin=(.*?), trace=(.*?), kerberos_keyfile_present=(.*?), kerberos_allow_weak_crypto=(.*?), legacyhmccomm=(enable|disable), security=(legacy), sol=(enabled|disabled) }x match = regexp.match(string) if match @ssh = match[1] @sshprotocol = match[2] @remotewebui = match[3] @xntp = match[4] @xntpserver = match[5] @syslogserver = match[6] @syslogtcpserver = match[7] @syslogtlsserver = match[8] @altdiskboot = match[9] @ldap = match[10] @kerberos = match[11] @kerberos_default_realm = match[12] @kerberos_realm_kdc = match[13] @kerberos_clockskew = match[14] @kerberos_ticket_lifetime = match[15] @kpasswd_admin = match[16] @trace = match[17] @kerberos_keyfile_present = match[18] @kerberos_allow_weak_crypto = match[19] @legacyhmccomm = match[20] @security = match[21] @sol = match[22] else puts string puts regexp puts match puts "regexp couldn't decode string #{string}" raise end end |