2 ## NetApp Filer 'snap' Module
4 ## Copyright 2008, Red Hat, Inc
5 ## John Eckersberg <jeckersb@redhat.com>
7 ## This software may be freely redistributed under the terms of the GNU
8 ## general public license.
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.
16 from func
.minion
.modules
import func_module
17 from func
.minion
.modules
.netapp
.common
import *
19 class Snap(func_module
.FuncModule
):
21 # Update these if need be.
24 description
= "Interface to the 'snap' command"
26 def create(self
, filer
, vol
, snap
):
30 regex
= """creating snapshot..."""
31 cmd_opts
= ['snap', 'create', vol
, snap
]
32 output
= ssh(filer
, cmd_opts
)
33 return check_output(regex
, output
)
35 def delete(self
, filer
, vol
, snap
):
39 regex
= """deleting snapshot..."""
40 cmd_opts
= ['snap', 'delete', vol
, snap
]
41 output
= ssh(filer
, cmd_opts
)
42 return check_output(regex
, output
)
44 def list(self
, filer
, vol
):