exoscale / cs

A simple, yet powerful CloudStack API client for python and the command-line.
BSD 3-Clause "New" or "Revised" License
88 stars 36 forks source link

How to use createTags? #99

Closed synergiator closed 5 years ago

synergiator commented 5 years ago

The API method createTags() requires a parameter "tags" as map of tags (key/value pairs) to be passed.

However for the following call I get an error as listed below.

tagsresult = self.cs.createTags(resourceids=mynetwork_id, resourcetype="Network", 
tags={"foo":"bar"})

530 - Value for the key null is either null or empty

Do I have to use some another notation to pass the tags?

greut commented 5 years ago

It's harder than that, try tags=[{"key": "foo", "value": "bar"}]

synergiator commented 5 years ago

awesome, thank you!