Skip to content

Commit

Permalink
Fix descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Jan 23, 2021
1 parent 2b89a3d commit ccf5d53
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 24 deletions.
12 changes: 3 additions & 9 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4846,25 +4846,19 @@ Generate targets from Sensu Go

Data type: `Optional[String[1]]`


Namespace to pull entities from

##### `subscription`

Data type: `Optional[String[1]]`


Find entities with this subscription

##### `interface_list`

Data type: `Optional[Array]`



##### `uri_ipaddress`

Data type: `Optional[Boolean]`


Interfaces to search if more than one present

### `silenced`

Expand Down
10 changes: 1 addition & 9 deletions lib/puppet/type/sensu_agent_entity_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,7 @@
extend PuppetX::Sensu::Type
add_autorequires()

ensurable do
newvalue(:present) do
@resource.provider.create
end
newvalue(:absent) do
@resource.provider.destroy
end
defaultto(:present)
end
ensurable

newparam(:name, :namevar => true) do
desc <<-EOS
Expand Down
6 changes: 3 additions & 3 deletions tasks/resolve_reference.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"input_method": "stdin",
"parameters": {
"namespace": {
"description": "Namespace to pull entities from",
"type": "Optional[String[1]]"
},
"subscription": {
"description": "Find entities with this subscription",
"type": "Optional[String[1]]"
},
"interface_list": {
"description": "Interfaces to search if more than one present",
"type": "Optional[Array]"
},
"uri_ipaddress": {
"type": "Optional[Boolean]"
}
}
}
5 changes: 2 additions & 3 deletions tasks/resolve_reference.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def self.sensuctl_entities(namespace)
entities
end

def self.entities_to_targets(entities, interface_list, uri_ipaddress)
def self.entities_to_targets(entities, interface_list)
targets = []
entities.each do |e|
target = {}
Expand Down Expand Up @@ -65,15 +65,14 @@ def self.resolve_reference(params)
namespace = params['namespace']
subscription = params['subscription']
interface_list = params['interface_list']
uri_ipaddress = params['uri_ipaddress']

entities = sensuctl_entities(namespace)

if subscription
entities.select! { |e| e['subscriptions'].include?(subscription) }
end

targets = entities_to_targets(entities, interface_list, uri_ipaddress)
targets = entities_to_targets(entities, interface_list)
targets
end

Expand Down

0 comments on commit ccf5d53

Please sign in to comment.