root/tags/v1.0/etc/netapp-provision-demo.xml

Revision 28, 2.2 kB (checked in by daedalus, 19 months ago)

* Refactored code to permit more flexible templating of changes. You can now

define a <changetemplate/> in 95% the same way as a <change/>, and then
refer to a <changetemplate/> when defining a <change/> to allow you to
combine change templates as a change flow, using namespaces and iterators
for each one.

* Some work on manual bailout in authoritarian mode, but it isn't completely

bailing out immediately yet, due to some complexities in the deferred chains
that I haven't quite unravelled.

Line 
1<!-- A demo configuration file for configuring a changeset -->
2
3<config xmlns:xi="http://www.w3.org/2001/XInclude">
4
5<!--
6  A global change namespace, used to define commonly used items.
7  You can use this to define variables that can be substituted in
8  common places below. This provides a mechanism for templating changes.
9
10  All values are strings. If you need to convert to a python number,
11  do this in the python code, via int(), float() etc.
12 
13-->
14<!-- include change templates I want to use -->
15<xi:include href="netapp-create-volume.change-template.xml"/>
16
17<!-- define my provisioner -->
18<provisioner
19  name='netapp_provisioner'
20  type='MultiConnectingProvisioner'
21  command_timeout='30'>
22
23  <command>ssh -i /home/daedalus/.ssh/configulator -o BatchMode=yes -o ServerAliveInterval=0 root@%(device.ipaddress)s "%(command.send)s"</command>
24
25<!--
26  <command>/bin/bash -c "echo %(command.send)s >> /home/daedalus/testing_output"</command>
27-->
28
29</provisioner>
30
31<!-- define some devices I want to provision to -->
32<device name='wibble'>
33  <ipaddress>10.232.8.71</ipaddress>
34</device>
35
36<device name='localhost'>
37  <ipaddress>127.0.0.1</ipaddress>
38</device>
39
40<!-- Define iterators used by changes -->
41<iterator name="primary_volumes">
42  <dict>
43    <entry name="volname">prim_root</entry>
44    <entry name="volaggr">aggr01</entry>
45    <entry name="volsize">25m</entry>
46  </dict>
47
48  <dict>
49    <entry name="volname">prim_vol01</entry>
50    <entry name="volaggr">aggr01</entry>
51    <entry name="volsize">25m</entry>
52  </dict>
53
54</iterator>
55
56<iterator name="secondary_volumes">
57  <dict>
58    <entry name="volname">sec_root</entry>
59    <entry name="volaggr">aggr01</entry>
60    <entry name="volsize">25m</entry>
61  </dict>
62
63  <dict>
64    <entry name="volname">sec_vol01</entry>
65    <entry name="volaggr">aggr01</entry>
66    <entry name="volsize">25m</entry>
67  </dict>
68
69</iterator>
70
71<!-- Set up the change list I want to apply -->
72<change name="create_primary_volumes" template='create_netapp_volume' iterator='primary_volumes'>
73  <target>wibble</target>
74</change>
75
76<change name="create_secondary_volumes" template='create_netapp_volume' iterator='secondary_volumes'>
77  <target>wibble</target>
78  <depends on='create_primary_volumes'/>
79</change>
80
81</config>
Note: See TracBrowser for help on using the browser.