Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #485: remove score parameter from cs_order #487

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/puppet/provider/cs_order/crm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def self.instances
ensure: :present,
first: first,
second: second,
score: items['score'],
symmetrical: symmetrical,
provider: name
}
Expand All @@ -71,7 +70,6 @@ def create
ensure: :present,
first: @resource[:first],
second: @resource[:second],
score: @resource[:score],
symmetrical: @resource[:symmetrical],
kind: @resource[:kind],
cib: @resource[:cib]
Expand All @@ -93,7 +91,7 @@ def flush
return if @property_hash.empty?

updated = 'order '
updated << "#{@property_hash[:name]} #{@property_hash[:score]}: "
updated << "#{@property_hash[:name]} "
updated << "#{@property_hash[:first]} #{@property_hash[:second]} symmetrical=#{@property_hash[:symmetrical]}"
updated << " kind=#{@property_hash[:kind]}" if feature? :kindness
debug("Loading update: #{updated}")
Expand Down
8 changes: 0 additions & 8 deletions lib/puppet/provider/cs_order/pcs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ def self.instances
else
items['then']
end
score = if items['score']
items['score']
else
'INFINITY'
end
kind = if items['kind']
items['kind']
else
Expand All @@ -70,7 +65,6 @@ def self.instances
ensure: :present,
first: first,
second: second,
score: score,
kind: kind,
symmetrical: symmetrical,
provider: name,
Expand All @@ -90,7 +84,6 @@ def create
ensure: :present,
first: @resource[:first],
second: @resource[:second],
score: @resource[:score],
kind: @resource[:kind],
symmetrical: @resource[:symmetrical],
new: true
Expand Down Expand Up @@ -126,7 +119,6 @@ def flush
items = @property_hash[:second].split(':')
cmd << items[1]
cmd << items[0]
cmd << @property_hash[:score]
cmd << "kind=#{@property_hash[:kind]}"
cmd << "id=#{@property_hash[:name]}"
cmd << "symmetrical=#{@property_hash[:symmetrical]}"
Expand Down
10 changes: 0 additions & 10 deletions lib/puppet/type/cs_order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@
also be added to your manifest."
end

newproperty(:score) do
desc "The priority of the this ordered grouping. Primitives can be a part
of multiple order groups and so there is a way to control which
primitives get priority when forcing the order of state changes on
other primitives. This value can be an integer but is often defined
as the string INFINITY."

defaultto 'INFINITY'
end

newproperty(:kind, required_features: :kindness) do
desc "How to enforce the constraint.

Expand Down