Method: Cisco::Client#set
- Defined in:
- lib/cisco_node_utils/client/client.rb
#set(data_format: :cli, context: nil, values: nil, **_kwargs) ⇒ Object
Configure the given state on the device.
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/cisco_node_utils/client/client.rb', line 171 def set(data_format: :cli, context: nil, values: nil, **_kwargs) # subclasses will generally want to call Client.munge_to_array() # on context and/or values before calling super() fail Cisco::RequestNotSupported unless self.supports?(data_format) cache_flush if cache_auto? Cisco::Logger.debug("Set state using data format '#{data_format}'") Cisco::Logger.debug(" with context:\n #{context.join("\n ")}") \ unless context.nil? || context.empty? Cisco::Logger.debug(" to value(s):\n #{values.join("\n ")}") \ unless values.nil? || values.empty? # to be implemented by subclasses end |