root/tags/v1.0/etc/netapp-create-volume.change-template.xml

Revision 29, 1.0 kB (checked in by daedalus, 19 months ago)

* Manual bailout when in authoritarian mode now works correctly.
* Fixed up some of the log level and stats reporting.
* Added 'backout' mode, that will only run the backout portion of changes. More

useful for testing, but can also be used to undo provisioning by repurposing
the same set of templates used for provisioning.

Line 
1<!--
2     This change template can be used to create volumes on a NetApp filer.
3     It expects an iterator called 'netapp_volume_iter' to be defined,
4     which can be used to create multiple volumes.
5-->
6
7<changetemplate name="create_netapp_volume" type="CommandChange">
8
9  <preimpl>
10    <command>
11      <send>vol status %(volname)s</send>
12    </command>
13
14    <condition>cmdoutput.find("No volume named '%(volname)s' exists.") >= 0</condition>
15
16  </preimpl>
17
18  <impl>
19    <command>
20      <send>vol create %(volname)s %(volaggr)s %(volsize)s</send>
21    </command>
22
23    <condition>cmdoutput.find("Creation of volume") >= 0</condition>
24    <condition>cmdoutput.find("has completed") >= 0</condition>
25
26  </impl>
27
28  <backout>
29    <command>
30      <send>vol offline %(volname)s</send>
31    </command>
32
33    <command>
34      <expect>Volume '%(volname)s' has been set temporarily offline</expect>
35      <send>vol destroy %(volname)s -f</send>
36    </command>
37
38    <condition>cmdoutput.find("Volume '%(volname)s' destroyed") >= 0</condition>
39
40  </backout>
41
42</changetemplate>
Note: See TracBrowser for help on using the browser.