Merge "Do not create and destroy Sahara templates if exists"

This commit is contained in:
Jenkins 2015-06-08 08:38:33 +00:00 committed by Gerrit Code Review
commit 7f969e3a6c
2 changed files with 2 additions and 4 deletions

View File

@ -179,8 +179,7 @@ Puppet::Type.type(:sahara_cluster_template).provide(:ruby) do
node_group['count'] = node_group['count'].to_i if node_group['count']
end
if present?
destroy if @property_hash[:id]
connection.create_cluster_template options
connection.create_cluster_template options unless @property_hash[:id]
end
end

View File

@ -209,8 +209,7 @@ Puppet::Type.type(:sahara_node_group_template).provide(:ruby) do
debug 'Call: flush'
options = @property_hash.reject { |k, v| [:id, :ensure].include? k }
if present?
destroy if @property_hash[:id]
connection.create_node_group_template options
connection.create_node_group_template options unless @property_hash[:id]
end
end