diff options
author | John Eckersberg <jeckersb@redhat.com> | 2008-01-29 20:41:01 -0500 |
---|---|---|
committer | John Eckersberg <jeckersb@redhat.com> | 2008-01-29 20:41:01 -0500 |
commit | 620171f26e281ce6d2c92073f90f661ca4352608 (patch) | |
tree | 85f57af427379a375bb293cdcac1bacf9de9f709 /func/minion | |
parent | 70bdbfd625ae24e07ec85a190d88a496b5240545 (diff) | |
download | func-620171f26e281ce6d2c92073f90f661ca4352608.tar.gz func-620171f26e281ce6d2c92073f90f661ca4352608.tar.xz func-620171f26e281ce6d2c92073f90f661ca4352608.zip |
flesh out clone module to allow creation and splitting
Diffstat (limited to 'func/minion')
-rw-r--r-- | func/minion/modules/netapp/vol/clone.py | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/func/minion/modules/netapp/vol/clone.py b/func/minion/modules/netapp/vol/clone.py index 510c37d..ab1071d 100644 --- a/func/minion/modules/netapp/vol/clone.py +++ b/func/minion/modules/netapp/vol/clone.py @@ -1,7 +1,7 @@ ## ## NetApp Filer 'vol.clone' Module ## -## Copyright 2007, Red Hat, Inc +## Copyright 2008, Red Hat, Inc ## John Eckersberg <jeckersb@redhat.com> ## ## This software may be freely redistributed under the terms of the GNU @@ -27,12 +27,11 @@ class Clone(func_module.FuncModule): """ TODO: Document me ... """ - return True - regex = """Creation of volume .* has completed.""" - param_check(args, ['name', 'aggr', 'size']) + regex = """Creation of clone volume .* has completed.""" + param_check(args, ['name', 'parent', 'snapshot']) - cmd_opts = ['vol', 'create'] - cmd_opts.extend([args['name'], args['aggr'], args['size']]) + cmd_opts = ['vol', 'clone', 'create'] + cmd_opts.extend([args['name'], '-b', args['parent'], args['snapshot']]) output = ssh(filer, cmd_opts) return check_output(regex, output) @@ -41,5 +40,14 @@ class Clone(func_module.FuncModule): """ TODO: Document me ... """ - return True + # only worry about 'start' now, I don't terribly care to automate the rest + regex = """Clone volume .* will be split from its parent.""" + param_check(args, ['name']) + + cmd_opts = ['vol', 'clone', 'split', 'start', args['name']] + + output = ssh(filer, cmd_opts) + return check_output(regex, output) + + |