The implementation here is meant to wrap a library of JSON policy documents. Policies should be added to directories corresponding to where they will be defined (portfolio, application, environment). Functionality for parsing portfolio policy definitions is included. When the policies need to be defined on a management group, the AzureCloudProvider can iterate the appropriate tier of the policy manager and add those definitions.
9 lines
287 B
Python
9 lines
287 B
Python
from atst.domain.csp.policy import AzurePolicyManager, AzurePolicy
|
|
|
|
|
|
def test_portfolio_definitions():
|
|
manager = AzurePolicyManager("policies")
|
|
assert len(manager.portfolio_definitions) > 0
|
|
policy = manager.portfolio_definitions[0]
|
|
assert isinstance(policy, AzurePolicy)
|