+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2018 Mirantis Inc., Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Sat, 19 Aug 2017 02:03:01 +0200
Subject: [PATCH] maas: module: Obtain fabric ID from CIDR
---
diff --git a/_modules/maas.py b/_modules/maas.py
-index d3227ca..8a2243d 100644
--- a/_modules/maas.py
+++ b/_modules/maas.py
+@@ -126,6 +126,8 @@
+
+ def process_single(name, config_data):
+ self._update = False
++ if isinstance(config_data, dict) and 'name' in config_data:
++ name = config_data['name']
+ try:
+ data = self.fill_data(name, config_data, **extra)
+ if data is None:
@@ -198,7 +198,8 @@
def fill_data(self, name, subnet, fabrics):
data = {