Refactor fabric|subnet|vlan|ranges
* return human-readable error in multiply plases
by default - just return 400
* fix passing 'primary_rack' into update_vlan command
maas_name != rack_controller name
And even more:
type primary_rack system_id != system name!
But,disabling thise - since not work in '2.3.3-6498-ge4db91d'
* fix vlan
VID != VLAN. Even if this logic partially broken in maas
* Fabrics:
fix ordering, since in case of creating subnet with VLAN
- create fabric
- create subnet with ranges and vid
- update fabric to provide DHCP
* ipranges: remove unneeded 'multiple' behaviour
Closes-Bug: PROD-21123 (PROD:21123)
Change-Id: I24c946882cdaf6d92e38d0ce79576a830fe1978f
diff --git a/README.rst b/README.rst
index 5a7429e..c8556ab 100644
--- a/README.rst
+++ b/README.rst
@@ -46,18 +46,37 @@
user: mirantis
token: "89EgtWkX45ddjMYpuL:SqVjxFG87Dr6kVf4Wp:5WLfbUgmm9XQtJxm3V2LUUy7bpCmqmnk"
fabrics:
- test-fabric1:
+ fabric1:
+ name: 'tf2'
description: "Test fabric"
- test-fabric2:
+ fabric2:
+ name: 'tf2'
description: "Test fabric2"
+ deploy_network:
+ name: 'deploy_network'
+ description: Fabric for deploy_network
+ vlans:
+ 0:
+ name: 'vlan 0'
+ description: Deploy VLAN
+ dhcp: true
+ primary_rack: "${linux:network:hostname}"
+
subnets:
subnet1:
- fabric: test-fabric1
+ fabric: ${maas:region:fabrics:deploy_network:name}
cidr: 2.2.3.0/24
gateway_ip: 2.2.3.2
- iprange: # reserved range for DHCP\auto mapping
- start: 2.2.3.20
- end: 2.2.3.250
+ vlan: 150
+ ipranges:
+ 1:
+ end: "2.2.3.40"
+ start: "2.2.3.20"
+ type: dynamic
+ 2:
+ end: "2.2.3.250"
+ start: "2.2.3.45"
+ type: static
dhcp_snippets:
test-snippet:
value: option bootfile-name "tftp://192.168.0.10/snippet";
@@ -169,38 +188,6 @@
sshprefs:
- 'ssh-rsa ASD.........dfsadf blah@blah'
-Multiple ip ranges for one particular subnet.
-
-.. code-block:: yaml
-
- maas:
- region:
- subnets:
- Subnet1:
- cidr: 10.10.0.0/16
- fabric: fabric-5
- gateway_ip: 10.10.0.1
- iprange:
- start: 10.10.191.241
- end: 10.10.255.244
- type: reserved
- Subnet2:
- cidr: 130.10.0.0/16
- fabric: fabric-6
- gateway_ip: 130.10.0.1
- multiple: True
- iprange:
- range1:
- start: 130.10.0.10
- end: 130.10.0.15
- type: dynamic
- comment: 'Coment 1'
- range2:
- start: 130.10.0.16
- end: 130.10.0.20
- type: reserved
- comment: 'Comment 2'
-
Update Vlan