Add backwards compatibility for dashboard template variable format#93
Conversation
|
You can avoid the code duplication by creating a function that does the parsing and passing that function into the type parameter of the add_argument calls (https://github.com/DataDog/dogapi/blob/update_templating/src/dogshell/dashboard.py#L28 and https://github.com/DataDog/dogapi/blob/update_templating/src/dogshell/dashboard.py#L37) That way, argparse will convert the command line params into the right form. Also, does the server api know how to handle both data types? The comma-separated one will be a list of lists, while the json one will be a list of dicts. |
|
Thanks @clofresh! The server API handles both data types. I'll make the change you suggested and merge. |
Add backwards compatibility for dashboard template variable format
|
👍 |
Makes template variables in dogshell backwards compatible (the API itself was already backwards compatible)