REF: qos: rule list in policy is too difficult to use

Bug #1614728 reported by Isaku Yamahata
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Won't Fix
Undecided
Unassigned

Bug Description

The format of qos policy should be something like
{"policy": {"rules": {"bandwidth_limit": {...}, "dscp_marking": {...}}}}

https://review.openstack.org/#/c/207043/
The patch changed the format of qos policy to something like this
{"rules": [{"type": "bandwitdh_limit", ...}, {"type": "dscp_marking", ...}, ]}
with the rationale that there should be zero-or-one rule per each rule-type.

But the format has the following issues
- there is no guarantee that there is at most one rule per rule-type
  In order to verify that, the list has to be scanned.
- When agent(or backend) programs switch for specific rule-type,
  it has to scan the list to find a rule of a give rule-type
- the format is unfriendly to parser or external tools.(In my case java jaxb)
  The actual variable type of rule needs to be determined by reading ahead
  "type". Then the rule needs to be parsed again.

So the following format is better
{"rules": {"bandwidth_limit": {...}, "dscp_marking": {...}}}
- it is guaranteed that there is zero-or-one rule per rule-type
- it's easy to find a rule of a given rule-type
- parser easily determine variable-type.

Tags: api qos rfe
tags: added: qos
summary: - qos: rule list in policy is too difficult to use
+ REF: qos: rule list in policy is too difficult to use
tags: added: api rfe
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Note that the patch you refer to was in feature/qos branch. There was no point in time when the previous format was exposed to users. So you propose an API change, not fixing a regression or smth.

Revision history for this message
Miguel Angel Ajo (mangelajo) wrote :

Exactly, we can't handle API changes now without introducing backward incompatibilities, may be the day we have microversioning, I'll be of course open to making this better.

Revision history for this message
Miguel Angel Ajo (mangelajo) wrote :

I'm moving this to Won't fix for now, let's re-evaluate when we have
microversioning of API.

Changed in neutron:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.