summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-08-11 22:48:54 +0300
committermakkalot <makkalot@gmail.com>2008-08-11 22:48:54 +0300
commite2ebfde1d6d58828bf4aaadd0735c99a3aa6eb49 (patch)
tree70c43ee5cd50503cba767cac131bd79acc34bec6
parentc4499d441d342fd900760522c8d14ce2e6edd694 (diff)
downloadfunc-e2ebfde1d6d58828bf4aaadd0735c99a3aa6eb49.tar.gz
func-e2ebfde1d6d58828bf4aaadd0735c99a3aa6eb49.tar.xz
func-e2ebfde1d6d58828bf4aaadd0735c99a3aa6eb49.zip
export the netapp module
-rw-r--r--func/minion/modules/netapp/common.py2
-rw-r--r--func/minion/modules/netapp/snap.py47
-rw-r--r--func/minion/modules/netapp/vol/__init__.py79
3 files changed, 127 insertions, 1 deletions
diff --git a/func/minion/modules/netapp/common.py b/func/minion/modules/netapp/common.py
index 979c95c..9f664b0 100644
--- a/func/minion/modules/netapp/common.py
+++ b/func/minion/modules/netapp/common.py
@@ -13,7 +13,7 @@
##
import re
-import sub_process
+from func.minion import sub_process
SSH = '/usr/bin/ssh'
SSH_USER = 'root'
diff --git a/func/minion/modules/netapp/snap.py b/func/minion/modules/netapp/snap.py
index 8f3f209..ee113f7 100644
--- a/func/minion/modules/netapp/snap.py
+++ b/func/minion/modules/netapp/snap.py
@@ -47,3 +47,50 @@ class Snap(func_module.FuncModule):
"""
return True
+ def register_method_args(self):
+ """
+ Implementing the method argument getter part
+ """
+ vol = {
+ 'type':'string',
+ 'optional':False,
+ 'description':"The name of the volume"
+ }
+ snap = {
+ 'type':'string',
+ 'optional':False,
+ 'description':"The name of the snapshot"
+ }
+
+ filer = {
+ 'type':'string',
+ 'optional':False,
+ 'description':"Resolvable name of the target filer"
+ }
+
+ return {
+ 'create':{
+ 'args':{
+ 'filer':filer,
+ 'vol':vol,
+ 'snap':snap
+ },
+ 'description':"Returns True if snapshot is created successfully"
+ },
+ 'delete':{
+ 'args':{
+ 'filer':filer,
+ 'vol':vol,
+ 'snap':snap
+ },
+ 'description':"Returns True if snapshot is delete successfully"
+ },
+ 'list':{
+ 'args':{
+ 'filer':filer,
+ 'vol':vol,
+ },
+ 'description':""
+ }
+ }
+
diff --git a/func/minion/modules/netapp/vol/__init__.py b/func/minion/modules/netapp/vol/__init__.py
index 14ce0ac..5cd4898 100644
--- a/func/minion/modules/netapp/vol/__init__.py
+++ b/func/minion/modules/netapp/vol/__init__.py
@@ -126,3 +126,82 @@ class Vol(func_module.FuncModule):
TODO: Document me ...
"""
pass
+
+ def register_method_args(self):
+ """
+ Implementing the method argument getter
+ """
+ vol = {
+ 'type':'string',
+ 'optional':False,
+ 'description':"The name of the volume"
+ }
+
+ filer = {
+ 'type':'string',
+ 'optional':False,
+ 'description':"Resolvable name of the target filer"
+ }
+
+ return {
+
+ 'create':{
+ 'args':{
+ 'filer':filer,
+ 'vol':vol,
+ 'aggr':{
+ 'type':'string',
+ 'optional':False,
+ 'description':'Aggregate in which to create the new volume (e.g. aggr0)'
+ },
+ 'size':{
+ 'type':'string',
+ 'optional':False,
+ 'description':'Size of the new volume (e.g. 500g)'
+ }
+ },
+ 'description':"Returns True if volume is created successfully"
+
+ },
+ 'destroy':{
+ 'args':{
+ 'filer':filer,
+ 'vol':vol
+ },
+ 'description':"Returns True if volume is successfully destroyed"
+
+ },
+ 'offline':{
+ 'args':{
+ 'filer':filer,
+ 'vol':vol
+ },
+ 'description':"Returns True if volume is successfully offlined"
+ },
+ 'online':{
+ 'args':{
+ 'filer':filer,
+ 'vol':vol
+ },
+ 'description':"Returns True if volume is successfully onlined"
+ },
+ 'status':{
+ 'args':{
+ 'filer':filer,
+ 'vol':vol
+ },
+ 'description':"If vol is not given, returns a list of dictionaries containing the status information of each volume in the system If vol is given, return just the dictionary for the given volume "
+ },
+ 'size':{
+ 'args':{
+ 'filer':filer,
+ 'vol':vol,
+ 'delta':{
+ 'type':'string',
+ 'optional':True,
+ 'description':'Optional change in size (e.g. +200g or -50g)'
+ }
+ },
+ 'description':"If delta is not given, return the size of the given volume (e.g. '500g') If delta is given, return True if volume is successfully resized "
+ }
+ }