Revision dde771ba

b/lib/cmdlib/__init__.py
62 62
  LUNodeEvacuate, \
63 63
  LUNodeMigrate, \
64 64
  LUNodeModifyStorage, \
65
  LUNodeQuery, \
66 65
  LUNodeQueryvols, \
67 66
  LUNodeQueryStorage, \
68 67
  LUNodeRemove, \
b/lib/cmdlib/node.py
30 30
from ganeti import netutils
31 31
from ganeti import objects
32 32
from ganeti import opcodes
33
from ganeti import query
34 33
from ganeti import rpc
35 34
from ganeti import utils
36 35
from ganeti.masterd import iallocator
37 36

  
38
from ganeti.cmdlib.base import LogicalUnit, NoHooksLU, QueryBase, \
39
  ResultWithJobs
37
from ganeti.cmdlib.base import LogicalUnit, NoHooksLU, ResultWithJobs
40 38
from ganeti.cmdlib.common import CheckParamsNotGlobal, \
41 39
  MergeAndVerifyHvState, MergeAndVerifyDiskState, \
42 40
  IsExclusiveStorageEnabledNode, CheckNodePVs, \
......
1170 1168
                 (self.op.name, self.op.node_name))
1171 1169

  
1172 1170

  
1173
class NodeQuery(QueryBase):
1174
  FIELDS = query.NODE_FIELDS
1175

  
1176
  def ExpandNames(self, lu):
1177
    raise NotImplementedError
1178

  
1179
  def DeclareLocks(self, lu, level):
1180
    pass
1181

  
1182
  def _GetQueryData(self, lu):
1183
    raise NotImplementedError
1184

  
1185

  
1186
class LUNodeQuery(NoHooksLU):
1187
  """Logical unit for querying nodes.
1188

  
1189
  """
1190
  # pylint: disable=W0142
1191
  REQ_BGL = False
1192

  
1193
  def CheckArguments(self):
1194
    raise NotImplementedError
1195

  
1196
  def ExpandNames(self):
1197
    raise NotImplementedError
1198

  
1199
  def DeclareLocks(self, level):
1200
    raise NotImplementedError
1201

  
1202
  def Exec(self, feedback_fn):
1203
    raise NotImplementedError
1204

  
1205

  
1206 1171
def _CheckOutputFields(fields, selected):
1207 1172
  """Checks whether all selected fields are valid according to fields.
1208 1173

  
b/lib/rapi/rlib2.py
392 392
  """/2/nodes resource.
393 393

  
394 394
  """
395
  GET_OPCODE = opcodes.OpNodeQuery
396 395

  
397 396
  def GET(self):
398 397
    """Returns a list of all nodes.
......
414 413
  """/2/nodes/[node_name] resource.
415 414

  
416 415
  """
417
  GET_OPCODE = opcodes.OpNodeQuery
418 416

  
419 417
  def GET(self):
420 418
    """Send information about a node.
b/src/Ganeti/OpCodes.hs
314 314
     , pNdParams
315 315
     ],
316 316
     "node_name")
317
  , ("OpNodeQuery",
318
     [t| [[JSValue]] |],
319
     OpDoc.opNodeQuery,
320
     [ pOutputFields
321
     , withDoc "Empty list to query all nodes, node names otherwise" pNames
322
     , pUseLocking
323
     ],
324
     [])
325 317
  , ("OpNodeQueryvols",
326 318
     [t| [JSValue] |],
327 319
     OpDoc.opNodeQueryvols,

Also available in: Unified diff