diff options
author | John Eckersberg <jeckersb@redhat.com> | 2008-01-23 10:37:35 -0500 |
---|---|---|
committer | John Eckersberg <jeckersb@redhat.com> | 2008-01-23 10:37:35 -0500 |
commit | cf67b63b2c1a794a36cbe6d3149ff9c535fb0f95 (patch) | |
tree | d27b15ba1cd4900539d25954487bbdeaa262062a /func | |
parent | 7e40adbaba76448e54044893e7e49e8c224e86d0 (diff) | |
download | func-cf67b63b2c1a794a36cbe6d3149ff9c535fb0f95.tar.gz func-cf67b63b2c1a794a36cbe6d3149ff9c535fb0f95.tar.xz func-cf67b63b2c1a794a36cbe6d3149ff9c535fb0f95.zip |
bit more work
Diffstat (limited to 'func')
-rw-r--r-- | func/minion/modules/netapp/vol.py | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/func/minion/modules/netapp/vol.py b/func/minion/modules/netapp/vol.py index ff70ce2..4719d5a 100644 --- a/func/minion/modules/netapp/vol.py +++ b/func/minion/modules/netapp/vol.py @@ -16,8 +16,6 @@ import re from func.minion.modules import func_module from common import * -class NetappCommandError(Exception): pass - class Vol(func_module.FuncModule): # Update these if need be. @@ -29,11 +27,10 @@ class Vol(func_module.FuncModule): """ TODO: Document me ... """ - - create_re = """Creation of volume .* has completed.""" + regex = """Creation of volume .* has completed.""" output = ssh('root', filer, ' '.join(args)) - if re.search(create_re, output): + if re.search(regex, output): return True else: raise NetappCommandError, output @@ -42,7 +39,24 @@ class Vol(func_module.FuncModule): """ TODO: Document me ... """ - pass + if len(args)==1: + args = args[0].split() + + if subcmd == 'create': + regex = """Creation of clone volume .* has completed.""" + elif subcmd == 'split': + if args[1] == 'start': + regex = """Clone volume .* will be split from its parent.""" + else: + raise NetappNotImplemented + else: + raise NetappNotImplemented + + output = ssh('root', filer, ' '.join(args)) + if re.search(regex, output): + return True + else: + raise NetappCommandError, output def destroy(self, filer, *args): """ |