Revision 64981f25 lib/cmdlib/backup.py
b/lib/cmdlib/backup.py | ||
---|---|---|
29 | 29 |
from ganeti import errors |
30 | 30 |
from ganeti import locking |
31 | 31 |
from ganeti import masterd |
32 |
from ganeti import query |
|
33 | 32 |
from ganeti import utils |
34 | 33 |
|
35 |
from ganeti.cmdlib.base import QueryBase, NoHooksLU, LogicalUnit
|
|
34 |
from ganeti.cmdlib.base import NoHooksLU, LogicalUnit |
|
36 | 35 |
from ganeti.cmdlib.common import CheckNodeOnline, \ |
37 | 36 |
ExpandNodeUuidAndName |
38 | 37 |
from ganeti.cmdlib.instance_storage import StartInstanceDisks, \ |
... | ... | |
41 | 40 |
BuildInstanceHookEnvByObject, CheckNodeNotDrained, RemoveInstance |
42 | 41 |
|
43 | 42 |
|
44 |
class ExportQuery(QueryBase): |
|
45 |
FIELDS = query.EXPORT_FIELDS |
|
46 |
|
|
47 |
#: The node name is not a unique key for this query |
|
48 |
SORT_FIELD = "node" |
|
49 |
|
|
50 |
def ExpandNames(self, lu): |
|
51 |
raise NotImplementedError |
|
52 |
|
|
53 |
def DeclareLocks(self, lu, level): |
|
54 |
pass |
|
55 |
|
|
56 |
def _GetQueryData(self, lu): |
|
57 |
raise NotImplementedError |
|
58 |
|
|
59 |
|
|
60 |
class LUBackupQuery(NoHooksLU): |
|
61 |
"""Query the exports list |
|
62 |
|
|
63 |
""" |
|
64 |
REQ_BGL = False |
|
65 |
|
|
66 |
def CheckArguments(self): |
|
67 |
raise NotImplementedError |
|
68 |
|
|
69 |
def ExpandNames(self): |
|
70 |
raise NotImplementedError |
|
71 |
|
|
72 |
def DeclareLocks(self, level): |
|
73 |
raise NotImplementedError |
|
74 |
|
|
75 |
def Exec(self, feedback_fn): |
|
76 |
raise NotImplementedError |
|
77 |
|
|
78 |
|
|
79 | 43 |
class LUBackupPrepare(NoHooksLU): |
80 | 44 |
"""Prepares an instance for an export and returns useful information. |
81 | 45 |
|
Also available in: Unified diff