How to Tag Unit Entity With a `-` in the Name

I am getting an error when trying to pass a unit tag to the Juju API:

"unit-lizardfs-gui/0" is not a valid unit tag 

I’m assuming this is because of the dashes in the unit name. Is there a way to escape the dashes in the unit name or something of the sort?

@hatch

Ah, found it in the pylibjuju source code:

https://github.com/juju/python-libjuju/blob/701cb94d1f7e261d98322856e699a851ac97e116/juju/tag.py#L47

It’s actually the / that it doesn’t like. Replace the / with a -.