@Miguel:
The behaviour you are asking for is currently present in the patch. A QoS policy belongs to a project and the "is_default" flags only affects to policies belonging to this project. That means you can have as many default QoS policies as projects you have in the deployment.
Take a look at QoSPolicy create function:
def create(self):
with db_api.autonested_transaction(self.obj_context.session): default_policy = obj_db_api.get_object(self.obj_context, self.db_model, project_id=self.project_id, is_default=True)
if default_policy and self.is_default: raise exceptions.QosDefaultPolicyFound( policy_id=default_policy.id) super(QosPolicy, self).create() self.reload_rules()
The "default_policy" is filtered by "self.project_id".
I created several QoS policies in several projects:
$ network qos policy create qos_demo_1 --default --project demo
$ network qos policy create qos_demo_2 --project demo
$ network qos policy create qos_alt_demo_1 --default --project alt_demo
$ network qos policy create qos_alt_demo_2 --project alt_demo
These commands are executed correctly. As you can see you have two default QoS policies. Then, I tried to set a second default rule in "demo" project:
$ network qos policy set qos_demo_2 --default
HttpException: Conflict, QoS policy 7ae20620-28c9-4fe7-b0f8-8015be4969ee is the default policy. ^^ is qos_demo_1
Is this the behaviour you are expecting?
BTW, taking a look at the QoS policies, only admin can create/update/delete policies and rules. IMO we need to change this.
@Yamamoto:
This implementation doesn't provide this feature. If the default QoS policy is changed, it won't affect the existing ports. When a new port is created and a default QoS policy exists, the server will asign explicitly this QoS policy to this port.
In a nutshell: there is no propagation. This feature was meant to assign a QoS policy to new ports.
Hello:
@Miguel:
The behaviour you are asking for is currently present in the patch. A QoS policy belongs to a project and the "is_default" flags only affects to policies belonging to this project. That means you can have as many default QoS policies as projects you have in the deployment.
Take a look at QoSPolicy create function: autonested_ transaction( self.obj_ context. session) :
default_ policy = obj_db_ api.get_ object( self.obj_ context,
self. db_model,
project_ id=self. project_ id,
is_default= True)
raise exceptions. QosDefaultPolic yFound(
policy_ id=default_ policy. id)
super( QosPolicy, self).create()
self. reload_ rules()
def create(self):
with db_api.
if default_policy and self.is_default:
The "default_policy" is filtered by "self.project_id".
A made some manual tests using the following patches: /review. openstack. org/#/c/ 428304/ /review. openstack. org/#/c/ 430363/ /review. openstack. org/#/c/ 432260/
- Neutron: https:/
- SDK: https:/
- OSclient: https:/
I created several QoS policies in several projects:
$ network qos policy create qos_demo_1 --default --project demo
$ network qos policy create qos_demo_2 --project demo
$ network qos policy create qos_alt_demo_1 --default --project alt_demo
$ network qos policy create qos_alt_demo_2 --project alt_demo
These commands are executed correctly. As you can see you have two default QoS policies. Then, I tried to set a second default rule in "demo" project: 28c9-4fe7- b0f8-8015be4969 ee is the default policy.
^^ is qos_demo_1
$ network qos policy set qos_demo_2 --default
HttpException: Conflict, QoS policy 7ae20620-
Is this the behaviour you are expecting?
BTW, taking a look at the QoS policies, only admin can create/ update/ delete policies and rules. IMO we need to change this.
@Yamamoto:
This implementation doesn't provide this feature. If the default QoS policy is changed, it won't affect the existing ports. When a new port is created and a default QoS policy exists, the server will asign explicitly this QoS policy to this port.
In a nutshell: there is no propagation. This feature was meant to assign a QoS policy to new ports.