Revision 9ac99fda scripts/gnt-backup
b/scripts/gnt-backup | ||
---|---|---|
105 | 105 |
return 0 |
106 | 106 |
|
107 | 107 |
|
108 |
def RemoveExport(opts, args): |
|
109 |
"""Remove an export from the cluster. |
|
110 |
|
|
111 |
Args: |
|
112 |
opts - class with options as members |
|
113 |
args - list with a single element, the exported instance to remove |
|
114 |
Opts used: |
|
115 |
|
|
116 |
Returns: |
|
117 |
1 in case of error, 0 otherwise |
|
118 |
|
|
119 |
""" |
|
120 |
instance = args[0] |
|
121 |
op = opcodes.OpRemoveExport(instance_name=args[0]) |
|
122 |
|
|
123 |
SubmitOpCode(op) |
|
124 |
return 0 |
|
125 |
|
|
126 |
|
|
108 | 127 |
# this is defined separately due to readability only |
109 | 128 |
import_opts = [ |
110 | 129 |
DEBUG_OPT, |
... | ... | |
162 | 181 |
"Exports an instance to an image"), |
163 | 182 |
'import': (ImportInstance, ARGS_ONE, import_opts, "[opts...] <name>", |
164 | 183 |
"Imports an instance from an exported image"), |
184 |
'remove': (RemoveExport, ARGS_ONE, |
|
185 |
[DEBUG_OPT], |
|
186 |
"<name>", |
|
187 |
"Remove exports of named instance from the filesystem."), |
|
165 | 188 |
} |
166 | 189 |
|
167 | 190 |
if __name__ == '__main__': |
Also available in: Unified diff