There seem to be horrible hacks going on downstream with accessing information about shards, in the most imaginative ways.
There are three parts to this problem, which downstream have no way of doing satisfactorily:
- access CDS MXBean information (once they have gotten the MXBean) in a structured and type-safe way
- query the local PlatformMBeanServer for available MXBeans, so ending up hard-coding shard name strings and similar
- getting the above information using wiring infra – statically injected, or OSGi-driven – not going through JMX when we have better means available
Address each of them in turns, starting with the first one, which will define the baseline cds-mgmt-api, with cds-mgmt* being its artifact namespace and org.opendaylight.controller.cluster.mgmt being its JPMS namespace.