842bafdb7f
Change-Id: Idaa6782eed8b0e26a9dd55fbf87ae78f650fc22d
17 lines
684 B
YAML
17 lines
684 B
YAML
---
|
|
name: PauseBadFlavors
|
|
description: "Pause any server using a flavor that is not permitted"
|
|
rules:
|
|
-
|
|
comment: "User should customize this. Permitted flavors."
|
|
rule: permitted_flavor('m1.tiny')
|
|
-
|
|
comment: "User should customize this. Permitted flavors."
|
|
rule: permitted_flavor('m1.large')
|
|
-
|
|
rule: >
|
|
server_with_bad_flavor(id) :- nova:servers(id=id,flavor_id=flavor_id),
|
|
nova:flavors(id=flavor_id, name=flavor), not permitted_flavor(flavor)
|
|
-
|
|
comment: "Remediation: Pause any VM that shows up in the server_with_bad_flavor table"
|
|
rule: "execute[nova:servers.pause(id)] :- server_with_bad_flavor(id), nova:servers(id,status='ACTIVE')" |