natemccurdy / puppet-purge_node

A Puppet Task to purge nodes
Apache License 2.0
5 stars 5 forks source link

puppet node purge Api call failing with multi certnames #12

Closed singhravinderlko closed 3 years ago

singhravinderlko commented 3 years ago

data='{"environment": "test", "scope" : { "nodes" : ["pe master node name"] }, "params" : { "agent_certnames" : ["abc","def"] }, "task": "support_tasks::st0317b_purge_node"}'

curl --insecure --header "$type_header" --header "$auth_header" --request POST "$uri" --data "$data" { "kind" : "puppetlabs.validators/validation-error", "msg" : "The agentcertnames parameter expected a value of type Pattern[/^([A-Za-z0-9.-]+,?)+$/] but got \"[\"abc\" \"def\"]\"", "details" : { "parameter" : "agentcertnames", "type" : "Pattern[/^([A-Za-z0-9.-]+,?)+$/]", "value" : [ "abc", "def" ] }

getting above pattern validation error while pattern is correct.

natemccurdy commented 3 years ago

@singhravinderlko Looks like you're using the Puppet Enterprise support tasks module (https://github.com/puppetlabs/support-tasks) which contains a fork of my module's task.

I recommend you bring this up via a Puppet Enterprise support ticket: https://support.puppet.com/hc/en-us

Not sure if they've modified my code at all, but either way I can't provide support for their module.