Add custom layout partitioning
* In case of 'non-clean' partitioning, we may stuck in 400 error from MAAS
The RC of such issue, that we trying to apply totally custom schema, to
any auto-predefined(or not cleaned previosly)
* Add new layout: custom - which means, drop everything befere start part.
* Misc: remove broken and unused func `create_partition_filesystem`
Closes-Bug: PROD-20317 (PROD:20317)
Change-Id: I574c669616b9318b8ecafaf9c8ad4162c01b44e1
diff --git a/_states/maasng.py b/_states/maasng.py
index cbe8b5d..3d23311 100644
--- a/_states/maasng.py
+++ b/_states/maasng.py
@@ -64,6 +64,9 @@
ret["changes"] = __salt__['maasng.update_disk_layout'](
hostname, layout_type, root_size, root_device, volume_group, volume_name, volume_size)
+ elif layout_type == "custom":
+ ret["changes"] = __salt__['maasng.update_disk_layout'](hostname, layout_type)
+
else:
ret["comment"] = "Not supported layout provided. Choose flat or lvm"
ret['result'] = False