Skip to content

Commit

Permalink
issue voxpupuli#485: remove score parameter from cs_order
Browse files Browse the repository at this point in the history
  • Loading branch information
rstuart-indue committed May 31, 2020
1 parent a062493 commit c602758
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
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

0 comments on commit c602758

Please sign in to comment.