lib/fog/oraclecloud/models/database/instance.rb in fog-oraclecloud-0.1.4 vs lib/fog/oraclecloud/models/database/instance.rb in fog-oraclecloud-0.1.5
- old
+ new
@@ -103,24 +103,28 @@
def failover_database=(value)
if value == true
value = 'yes'
elsif value == false || value.nil?
value = 'no'
+ end
+ if %w(yes no).include? value then
+ attributes[:failover_database]=value
else
- raise ArgumentError, "Invalid failover database value (#{value})"
+ raise ArgumentError, "Invalid failover database value"
end
- attributes[:failover_database] = value
end
def is_rac=(value)
if value == true
value = 'yes'
elsif value == false || value.nil?
value = 'no'
+ end
+ if %w(yes no).include? value then
+ attributes[:is_rac]=value
else
- raise ArgumentError, "Invalid is_rac value (#{value})"
+ raise ArgumentError, "Invalid is_rac value"
end
- attributes[:is_rac]=value
end
def ncharset=(value)
if value.nil? then
attributes[:ncharset] = 'AL16UTF16'