Method: Rbeapi::Api::Managementdefaults#set_secret_hash
- Defined in:
- lib/rbeapi/api/managementdefaults.rb
#set_secret_hash(opts = {}) ⇒ Boolean
set_secret_hash configures the management defaults secret hash value in the current nodes running configuration. If the default keyword is provided, the configuration is defaulted using the default keyword.
Commands
management defaults
secret hash <value>
no secret hash
default secret hash
109 110 111 112 113 114 115 116 |
# File 'lib/rbeapi/api/managementdefaults.rb', line 109 def set_secret_hash(opts = {}) unless ['md5', 'sha512', nil].include?(opts[:value]) raise ArgumentError, 'secret hash must be md5 or sha512' end cmd = command_builder("secret hash #{opts[:value]}") cmds = ['management defaults', cmd] configure(cmds) end |