Created
August 25, 2021 15:16
-
-
Save gibizer/e2e7b68df6ef69453f2bb811d2447f96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will succeed if applied as an update over https://gist.github.com/gibizer/a0c4e5dc4a59ed3217f64c04a8f207a4 | |
# if there are still free resource on the compute as neutron allows replacing a qos policy on a bound port and does | |
# the necessary allocation update in placement. | |
heat_template_version: wallaby | |
resources: | |
net0: | |
type: OS::Neutron::ProviderNet | |
properties: | |
name: net0 | |
network_type: vlan | |
physical_network: physnet0 | |
segmentation_id: 100 | |
subnet0: | |
type: OS::Neutron::Subnet | |
properties: | |
name: subnet0 | |
network: | |
get_resource: net0 | |
cidr: 10.0.4.0/24 | |
qp0: | |
type: OS::Neutron::QoSPolicy | |
properties: | |
name: qp0 | |
qp0-min-bw-rule-egress: | |
type: OS::Neutron::QoSMinimumBandwidthRule | |
properties: | |
direction: egress | |
min_kbps: 1000 | |
policy: | |
get_resource: qp0 | |
qp0-min-bw-rule-ingress: | |
type: OS::Neutron::QoSMinimumBandwidthRule | |
properties: | |
direction: ingress | |
min_kbps: 1000 | |
policy: | |
get_resource: qp0 | |
qp1: | |
type: OS::Neutron::QoSPolicy | |
properties: | |
name: qp1 | |
qp1-min-bw-rule-egress: | |
type: OS::Neutron::QoSMinimumBandwidthRule | |
properties: | |
direction: egress | |
min_kbps: 1001 | |
policy: | |
get_resource: qp1 | |
qp1-min-bw-rule-ingress: | |
type: OS::Neutron::QoSMinimumBandwidthRule | |
properties: | |
direction: ingress | |
min_kbps: 1001 | |
policy: | |
get_resource: qp1 | |
port-normal-qos: | |
type: OS::Neutron::Port | |
properties: | |
name: port-normal-qos | |
binding:vnic_type: normal | |
network: | |
get_resource: net0 | |
qos_policy: | |
get_resource: qp1 | |
vm-bw-qos: | |
type: OS::Nova::Server | |
# Note this is to avoid a bug in heat during stack delete as heat tries | |
# to delete the qos rule before it tries to delete the VM and changing | |
# a policy that is used by a bound port is not supported. | |
depends_on: [qp1-min-bw-rule-egress, qp1-min-bw-rule-ingress] | |
properties: | |
name: vm-bw-qos | |
image: cirros-0.5.2-x86_64-disk | |
flavor: cirros256 | |
networks: | |
- port: | |
get_resource: port-normal-qos | |
outputs: | |
server_uuid: | |
value: | |
get_resource: vm-bw-qos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment