Misc s/func/certmaster/ replacements
[certmaster.git] / certmaster / minion / modules / netapp / snap.py
1 ##
2 ## NetApp Filer 'snap' Module
3 ##
4 ## Copyright 2008, Red Hat, Inc
5 ## John Eckersberg <jeckersb@redhat.com>
6 ##
7 ## This software may be freely redistributed under the terms of the GNU
8 ## general public license.
9 ##
10 ## You should have received a copy of the GNU General Public License
11 ## along with this program; if not, write to the Free Software
12 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
13 ##
14
15 import re
16 from func.minion.modules import func_module
17 from func.minion.modules.netapp.common import *
18
19 class Snap(func_module.FuncModule):
20
21 # Update these if need be.
22 version = "0.0.1"
23 api_version = "0.0.1"
24 description = "Interface to the 'snap' command"
25
26 def create(self, filer, vol, snap):
27 """
28 TODO: Document me ...
29 """
30 regex = """creating snapshot..."""
31 cmd_opts = ['snap', 'create', vol, snap]
32 output = ssh(filer, cmd_opts)
33 return check_output(regex, output)
34
35 def delete(self, filer, vol, snap):
36 """
37 TODO: Document me ...
38 """
39 regex = """deleting snapshot..."""
40 cmd_opts = ['snap', 'delete', vol, snap]
41 output = ssh(filer, cmd_opts)
42 return check_output(regex, output)
43
44 def list(self, filer, vol):
45 """
46 TODO: Document me ...
47 """
48 return True
49