FixRegression: fix configuring constraints
* Configuring subnets should be possible without explicitly configuring
fabrics.
* Configuring devices should be possible without explicitly configuring
subnets
* Port from: https://gerrit.opnfv.org/gerrit/#/c/47679/
Change-Id: Ib5504d090cc98791224934aa384d7b2ebcf043d5
diff --git a/maas/region.sls b/maas/region.sls
index 90d6657..554f9ba 100644
--- a/maas/region.sls
+++ b/maas/region.sls
@@ -159,7 +159,9 @@
- name: maas.process_subnets
- require:
- module: maas_config
+ {%- if region.get('fabrics', False) %}
- module: maas_fabrics
+ {%- endif %}
{%- endif %}
{%- if region.get('devices', False) %}
@@ -168,7 +170,9 @@
- name: maas.process_devices
- require:
- module: maas_config
+ {%- if region.get('subnets', False) %}
- module: maas_subnets
+ {%- endif %}
{%- endif %}
{%- if region.get('dhcp_snippets', False) %}