Skip to content

Instantly share code, notes, and snippets.

@gibizer
Created August 25, 2021 15:13
Show Gist options
  • Save gibizer/a0c4e5dc4a59ed3217f64c04a8f207a4 to your computer and use it in GitHub Desktop.
Save gibizer/a0c4e5dc4a59ed3217f64c04a8f207a4 to your computer and use it in GitHub Desktop.
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
port-normal-qos:
type: OS::Neutron::Port
properties:
name: port-normal-qos
binding:vnic_type: normal
network:
get_resource: net0
qos_policy:
get_resource: qp0
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: [qp0-min-bw-rule-egress, qp0-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