Is it possible for a subordinate charm to read the open ports of its principal?

I’ve encountered a question on Ask Ubuntu that I’m stuck answering. Is it possible for a subordinate charm to read the opened ports of its principal charm? I expect that the answer is “via relation data”, but that doesn’t feel very generic to me as it requires every charm to re-implement the logic.

Perhaps a wider question is whether this could be added to the juju-info relation?

2 Likes

I believe only if the subordinate and the principal have a relationship and they share the information.

2 Likes