Class: Puppet::Util::NetworkDevice::Cisco_ios::Model::Archive
- Inherits:
-
Base
- Object
- Base
- Puppet::Util::NetworkDevice::Cisco_ios::Model::Archive
- Defined in:
- lib/puppet/util/network_device/cisco_ios/model/archive.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #after_update ⇒ Object
- #before_update ⇒ Object
-
#initialize(transport, facts, options) ⇒ Archive
constructor
A new instance of Archive.
- #mod_const_base ⇒ Object
- #mod_path_base ⇒ Object
- #param_class ⇒ Object
- #register_modules ⇒ Object
Constructor Details
#initialize(transport, facts, options) ⇒ Archive
Returns a new instance of Archive.
9 10 11 12 13 14 15 16 17 |
# File 'lib/puppet/util/network_device/cisco_ios/model/archive.rb', line 9 def initialize(transport, facts, ) super(transport, facts) # Initialize some defaults @params ||= {} @name = [:name] if .key? :name # Register all needed Modules based on the availiable Facts register_modules end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/puppet/util/network_device/cisco_ios/model/archive.rb', line 7 def name @name end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
7 8 9 |
# File 'lib/puppet/util/network_device/cisco_ios/model/archive.rb', line 7 def params @params end |
Instance Method Details
#after_update ⇒ Object
40 41 42 43 |
# File 'lib/puppet/util/network_device/cisco_ios/model/archive.rb', line 40 def after_update transport.command("exit") super end |
#before_update ⇒ Object
35 36 37 38 |
# File 'lib/puppet/util/network_device/cisco_ios/model/archive.rb', line 35 def before_update super transport.command("archive", :prompt => /\(config-archive\)#\s?\z/n) end |
#mod_const_base ⇒ Object
23 24 25 |
# File 'lib/puppet/util/network_device/cisco_ios/model/archive.rb', line 23 def mod_const_base return Puppet::Util::NetworkDevice::Cisco_ios::Model::Archive end |
#mod_path_base ⇒ Object
19 20 21 |
# File 'lib/puppet/util/network_device/cisco_ios/model/archive.rb', line 19 def mod_path_base return 'puppet/util/network_device/cisco_ios/model/archive' end |
#param_class ⇒ Object
27 28 29 |
# File 'lib/puppet/util/network_device/cisco_ios/model/archive.rb', line 27 def param_class return Puppet::Util::NetworkDevice::Cisco_ios::Model::ScopedValue end |
#register_modules ⇒ Object
31 32 33 |
# File 'lib/puppet/util/network_device/cisco_ios/model/archive.rb', line 31 def register_modules register_new_module(:base) end |