Uploaded image for project: 'neutron'
  1. neutron
  2. NEUTRON-199

class NeutronID should be abstract and cannot be used as for List<NeutronID> properties

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Medium Medium
    • Neon
    • None
    • northbound-api
    • None

      While upgrading the version of Jersey used in Neutron in NEUTRON-197 during the big Neon-MRI bump, and having to change how it uses Moxy for working with JSON, I have stumbled upon something in the Neutron code (as it is right now) which seems to have been modelled wrong originally:

      Classes NeutronLoadBalancerHealthMonitor, NeutronLoadBalancerListener and NeutronLoadBalancerPool use List<NeutronID> ... and NeutronID is the base class of for (almost all) Neutron object clases. (Via NeutronObject which everything else extends; except NeutronL2gatewayDevice, which seems a bit weird?).

      Now this would mean that e.g. a NeutronLoadBalancerHealthMonitor's loadBalancerHealthMonitorPools field, in JSON, could contain not only e.g. "listeners" : [ { "id": "39de4d56-d663-46e5-85a1-5b9d5fa17829" } ] (a NeutronID) but really any other full Neutron object. I highly doubt that was the intention, as that surely would not make any sense?

      What whoever wrote that load balancer code in Neutron probably meant was that these fields should contain (a list of) String UUIDs referring to other Neutron objects - but only that, and not full other objects.

            Unassigned Unassigned
            vorburger Michael Vorburger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: