congress/library
Eric K 24268428e0 Load JSON/YAML string to structure for datasource action execution
Action execution allows using policy to trigger data source client
methods. But some of these methods require a python structure as input,
which cannot be constructed by the congress policy language.

With this patch, the policy language can construct JSON/YAML strings,
which get loaded as python structure before passing to the data source
client methods.

Because there is no automated way to know which arguments to which
methods are non-scalar structures, the functionality requires a
data source driver to specify that information in
self.method_structured_args.

The patch also other related changes:
- specifies the desired structured arguments for the
neutronv2 drivers
- omits the neutron client update_* made redundant by the special
update_resource_attr action.
- updates a policy library to make use of the feature

Depends-On: I34d1a392d4539ede01666002cfa301c21f9cd4bd

Change-Id: I33860ffdcda3e0bc67e488ff2b35bba57241cf02
2018-07-22 17:17:07 +00:00
..
disallowed_flavors Split disallowed flavor policy into monitor and remediation 2017-07-25 19:13:50 +00:00
disallowed_images Fix rule in permitted image library policy 2017-10-31 19:00:48 +00:00
security_groups Fix lib policies SecurityGroups and UnsafeTraffic 2017-07-31 18:31:52 -07:00
volume_encryption Fix syntax and reference in lib policy volume encryption 2017-07-30 21:25:06 -07:00
cross_project_network.yaml Fix CrossProjectNetwork lib policy 2017-07-31 18:28:17 -07:00
network_gateway.yaml Fix network gateway lib policy syntax 2017-07-30 21:16:38 -07:00
README.rst Trivial: Update pypi url to new url 2018-04-21 02:58:59 +08:00
tag_based_network_security_zone.yaml Load JSON/YAML string to structure for datasource action execution 2018-07-22 17:17:07 +00:00

Policy Library

Congress bundles a library of useful policies to help users get started.

For example, the library/volume_encryption/servers_unencrypted_volume.yaml identifies and warns on servers with unencrypted volumes attached.

../../../library/volume_encryption/servers_unencrypted_volume.yaml

The latest collection library policies can be found here: https://github.com/openstack/congress/tree/master/library

To import a library policy YAML file into Congress, use the following CLI command (python-congressclient version 1.8.0 or higher https://pypi.org/project/python-congressclient/).

$ openstack congress policy create-from-file <path-to-policy-yaml>