Revision 64981f25

b/lib/cmdlib/__init__.py
92 92
  LUInstanceQuery, \
93 93
  LUInstanceQueryData
94 94
from ganeti.cmdlib.backup import \
95
  LUBackupQuery, \
96 95
  LUBackupPrepare, \
97 96
  LUBackupExport, \
98 97
  LUBackupRemove
......
110 109
  LUNetworkAdd, \
111 110
  LUNetworkRemove, \
112 111
  LUNetworkSetParams, \
113
  LUNetworkQuery, \
114 112
  LUNetworkConnect, \
115 113
  LUNetworkDisconnect
116 114
from ganeti.cmdlib.misc import \
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

  
b/lib/cmdlib/network.py
26 26
from ganeti import locking
27 27
from ganeti import network
28 28
from ganeti import objects
29
from ganeti import query
30 29
from ganeti import utils
31
from ganeti.cmdlib.base import LogicalUnit, NoHooksLU, QueryBase
30
from ganeti.cmdlib.base import LogicalUnit
32 31
from ganeti.cmdlib.common import CheckNodeGroupInstances
33 32

  
34 33

  
......
398 397
    self.cfg.Update(self.network, feedback_fn)
399 398

  
400 399

  
401
class NetworkQuery(QueryBase):
402
  FIELDS = query.NETWORK_FIELDS
403

  
404
  def ExpandNames(self, lu):
405
    raise NotImplementedError
406

  
407
  def DeclareLocks(self, lu, level):
408
    raise NotImplementedError
409

  
410
  def _GetQueryData(self, lu):
411
    raise NotImplementedError
412

  
413
  @staticmethod
414
  def _GetStats(pool):
415
    raise NotImplementedError
416

  
417

  
418
class LUNetworkQuery(NoHooksLU):
419
  """Logical unit for querying networks.
420

  
421
  """
422
  REQ_BGL = False
423

  
424
  def CheckArguments(self):
425
    raise NotImplementedError
426

  
427
  def ExpandNames(self):
428
    raise NotImplementedError
429

  
430
  def Exec(self, feedback_fn):
431
    raise NotImplementedError
432

  
433

  
434 400
def _FmtNetworkConflict(details):
435 401
  """Utility for L{_NetworkConflictCheck}.
436 402

  
b/lib/rapi/rlib2.py
655 655
  """/2/networks resource.
656 656

  
657 657
  """
658
  GET_OPCODE = opcodes.OpNetworkQuery
659 658
  POST_OPCODE = opcodes.OpNetworkAdd
660 659
  POST_RENAME = {
661 660
    "name": "network_name",
b/src/Ganeti/OpCodes.hs
745 745
     , withDoc "Which ExtStorage Provider to diagnose" pNames
746 746
     ],
747 747
     [])
748
  , ("OpBackupQuery",
749
     [t| JSObject (Either Bool [NonEmptyString]) |],
750
     OpDoc.opBackupQuery,
751
     [ pUseLocking
752
     , withDoc "Empty list to query all nodes, node names otherwise" pNodes
753
     ],
754
     [])
755 748
  , ("OpBackupPrepare",
756 749
     [t| Maybe (JSObject JSValue) |],
757 750
     OpDoc.opBackupPrepare,
......
914 907
     , pNetworkName
915 908
     ],
916 909
     "network_name")
917
  , ("OpNetworkQuery",
918
     [t| [[JSValue]] |],
919
     OpDoc.opNetworkQuery,
920
     [ pOutputFields
921
     , pUseLocking
922
     , withDoc "Empty list to query all groups, group names otherwise" pNames
923
     ],
924
     [])
925 910
  ])
926 911

  
927 912
-- | Returns the OP_ID for a given opcode value.
b/test/py/docs_unittest.py
45 45

  
46 46
RAPI_OPCODE_EXCLUDE = compat.UniqueFrozenset([
47 47
  # Not yet implemented
48
  opcodes.OpBackupQuery,
49 48
  opcodes.OpBackupRemove,
50 49
  opcodes.OpClusterConfigQuery,
51 50
  opcodes.OpClusterRepairDiskSizes,

Also available in: Unified diff