diff options
author | John Eckersberg <jeckersb@redhat.com> | 2008-01-27 17:46:14 -0500 |
---|---|---|
committer | John Eckersberg <jeckersb@redhat.com> | 2008-01-27 17:46:14 -0500 |
commit | 795ceeca5b8f62a0e9d370f083f317ebda1f7d57 (patch) | |
tree | 443154f05c37da429f6f004526f5a8c48bebfe77 /func/minion/modules | |
parent | 16fa763ad4af4dff50ec50339614ac8a592e8590 (diff) | |
download | func-795ceeca5b8f62a0e9d370f083f317ebda1f7d57.tar.gz func-795ceeca5b8f62a0e9d370f083f317ebda1f7d57.tar.xz func-795ceeca5b8f62a0e9d370f083f317ebda1f7d57.zip |
Load classes under __init__ objects to break this down some more
Diffstat (limited to 'func/minion/modules')
-rw-r--r-- | func/minion/modules/netapp/vol/__init__.py (renamed from func/minion/modules/netapp/vol.py) | 8 | ||||
-rw-r--r-- | func/minion/modules/netapp/vol/clone.py | 45 |
2 files changed, 46 insertions, 7 deletions
diff --git a/func/minion/modules/netapp/vol.py b/func/minion/modules/netapp/vol/__init__.py index d0bb3d9..b1ee2fe 100644 --- a/func/minion/modules/netapp/vol.py +++ b/func/minion/modules/netapp/vol/__init__.py @@ -14,7 +14,7 @@ import re from func.minion.modules import func_module -from common import * +from func.minion.modules.netapp.common import * class Vol(func_module.FuncModule): @@ -36,12 +36,6 @@ class Vol(func_module.FuncModule): output = ssh('root', filer, cmd_opts) return check_output(regex, output) - def clone(self, filer, args): - """ - TODO: Document me ... - """ - pass - def destroy(self, filer, args): """ TODO: Document me ... diff --git a/func/minion/modules/netapp/vol/clone.py b/func/minion/modules/netapp/vol/clone.py new file mode 100644 index 0000000..82b6723 --- /dev/null +++ b/func/minion/modules/netapp/vol/clone.py @@ -0,0 +1,45 @@ +## +## NetApp Filer 'vol.clone' Module +## +## Copyright 2007, Red Hat, Inc +## John Eckersberg <jeckersb@redhat.com> +## +## This software may be freely redistributed under the terms of the GNU +## general public license. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +## + +import re +from func.minion.modules import func_module +from func.minion.modules.netapp.common import * + +class Clone(func_module.FuncModule): + + # Update these if need be. + version = "0.0.1" + api_version = "0.0.1" + description = "Interface to the 'vol' command" + + def create(self, filer, args): + """ + TODO: Document me ... + """ + return True + regex = """Creation of volume .* has completed.""" + param_check(args, ['name', 'aggr', 'size']) + + cmd_opts = ['vol', 'create'] + cmd_opts.extend([args['name'], args['aggr'], args['size']]) + + output = ssh('root', filer, cmd_opts) + return check_output(regex, output) + + def split(self, filer, args): + """ + TODO: Document me ... + """ + return True + |