rax-maas / rackspace-monitoring-cli

Command line utility for Rackspace Cloud Monitoring (MaaS).
49 stars 18 forks source link

fix(check commands): Make sure to always pass an array when creating or updating an agent.plugin check. #70

Closed jirwin closed 10 years ago

jirwin commented 10 years ago

When creating and updating agent.plugin checks, you have to pass the args field as an array. #69 fixed things by allowing arrays to be specified, but it doesn't have any way of knowing that args always has to be an array, even if only a single arg is specified. This updates the commands to coerce the field to a list if it isn't one.

simonvetter commented 10 years ago

+1

mattt416 commented 10 years ago
root@infra2:~# raxmon-checks-create --type agent.plugin --label something --entity-id enYxHGFP7B --details file=something,args=this
Resource created. ID: chASoY8kR7
root@infra2:~# raxmon-checks-create --type agent.plugin --label something --entity-id enYxHGFP7B --details file=something,args=this,args=that
Resource created. ID: chs3sIZjEP
root@infra2:~#

+1