Module: PuppetX::EnterpriseModules::Oracle::DatafileProperty
- Defined in:
- lib/puppet_x/enterprisemodules/oracle/datafile_property.rb
Overview
Docs
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#after_apply ⇒ Object
rubocop:enable Lint/LiteralAsCondition.
- #autoextend_spec ⇒ Object
- #current_num_datafiles ⇒ Object
- #desired_num_datafiles ⇒ Object
- #df_array_size(df) ⇒ Object
- #file_type ⇒ Object
- #maxsize_clause ⇒ Object
- #next_clause ⇒ Object
- #ts_contents ⇒ Object
-
#ts_encryption ⇒ Object
rubocop:disable Lint/LiteralAsCondition.
- #ts_type ⇒ Object
Class Method Details
.included(parent) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/puppet_x/enterprisemodules/oracle/datafile_property.rb', line 11 def self.included(parent) parent.send(:include, ::PuppetX::EnterpriseModules::Oracle::Access) parent.send(:include, ::PuppetX::EnterpriseModules::Oracle::Information) parent.send(:include, ::EasyType) parent.extend(ClassMethods) end |
Instance Method Details
#after_apply ⇒ Object
rubocop:enable Lint/LiteralAsCondition
80 81 82 |
# File 'lib/puppet_x/enterprisemodules/oracle/datafile_property.rb', line 80 def after_apply nil end |
#autoextend_spec ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/puppet_x/enterprisemodules/oracle/datafile_property.rb', line 38 def autoextend_spec if resource[:autoextend].to_s == 'on' "autoextend #{resource[:autoextend]} #{next_clause} #{maxsize_clause}" elsif resource[:autoextend].nil? '' else "autoextend #{resource[:autoextend]}" end end |
#current_num_datafiles ⇒ Object
56 57 58 |
# File 'lib/puppet_x/enterprisemodules/oracle/datafile_property.rb', line 56 def current_num_datafiles provider.num_datafiles.to_i end |
#desired_num_datafiles ⇒ Object
52 53 54 |
# File 'lib/puppet_x/enterprisemodules/oracle/datafile_property.rb', line 52 def desired_num_datafiles resource.num_datafiles.to_i end |
#df_array_size(df) ⇒ Object
48 49 50 |
# File 'lib/puppet_x/enterprisemodules/oracle/datafile_property.rb', line 48 def df_array_size(df) df.nil? || (df.to_s == 'absent') ? 0 : df.length end |
#file_type ⇒ Object
18 19 20 |
# File 'lib/puppet_x/enterprisemodules/oracle/datafile_property.rb', line 18 def file_type resource[:contents].to_s == 'temporary' ? 'tempfile' : 'datafile' end |
#maxsize_clause ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/puppet_x/enterprisemodules/oracle/datafile_property.rb', line 30 def maxsize_clause if resource[:max_size] "maxsize #{resource[:max_size]}" else '' end end |
#next_clause ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/puppet_x/enterprisemodules/oracle/datafile_property.rb', line 22 def next_clause if resource[:next] "next #{resource[:next]}" else '' end end |
#ts_contents ⇒ Object
64 65 66 |
# File 'lib/puppet_x/enterprisemodules/oracle/datafile_property.rb', line 64 def ts_contents self['contents'].to_s == 'permanent' ? '' : self['contents'] end |
#ts_encryption ⇒ Object
rubocop:disable Lint/LiteralAsCondition
69 70 71 72 73 74 75 76 77 |
# File 'lib/puppet_x/enterprisemodules/oracle/datafile_property.rb', line 69 def ts_encryption if self['encryption'].nil? '' elsif :true 'encryption default storage (encrypt)' else "encryption using '#{encryption}' default storage (encrypt)" end end |
#ts_type ⇒ Object
60 61 62 |
# File 'lib/puppet_x/enterprisemodules/oracle/datafile_property.rb', line 60 def ts_type self['bigfile'].to_s == 'yes' ? 'bigfile' : '' end |