Revision b8c160c1

b/lib/masterd/instance.py
530 530
    """
531 531
    return self._lu.rpc.call_import_start(self.node_name, self._opts,
532 532
                                          self._instance, self._component,
533
                                          self._dest, self._dest_args)
533
                                          (self._dest, self._dest_args))
534 534

  
535 535
  def CheckListening(self):
536 536
    """Checks whether the daemon is listening.
......
616 616
    return self._lu.rpc.call_export_start(self.node_name, self._opts,
617 617
                                          self._dest_host, self._dest_port,
618 618
                                          self._instance, self._component,
619
                                          self._source, self._source_args)
619
                                          (self._source, self._source_args))
620 620

  
621 621
  def CheckListening(self):
622 622
    """Checks whether the daemon is listening.
b/lib/rpc.py
565 565
    return result
566 566

  
567 567
  @staticmethod
568
  def _EncodeImportExportIO(ieio, ieioargs):
568
  def _EncodeImportExportIO((ieio, ieioargs)):
569 569
    """Encodes import/export I/O information.
570 570

  
571 571
    """
572 572
    if ieio == constants.IEIO_RAW_DISK:
573 573
      assert len(ieioargs) == 1
574
      return (ieioargs[0].ToDict(), )
574
      return (ieio, (ieioargs[0].ToDict(), ))
575 575

  
576 576
    if ieio == constants.IEIO_SCRIPT:
577 577
      assert len(ieioargs) == 2
578
      return (ieioargs[0].ToDict(), ieioargs[1])
578
      return (ieio, (ieioargs[0].ToDict(), ieioargs[1]))
579 579

  
580
    return ieioargs
580
    return (ieio, ieioargs)
581 581

  
582 582
  @staticmethod
583 583
  def _PrepareFileUpload(filename):
b/lib/rpc_defs.py
165 165
    ("opts", OBJECT_TO_DICT, None),
166 166
    ("instance", INST_TO_DICT, None),
167 167
    ("component", None, None),
168
    ("dest", None, None),
169
    ("dest_args", "self._EncodeImportExportIO(dest, %s)", None),
168
    ("dest", "self._EncodeImportExportIO(%s)", "Import destination"),
170 169
    ], None, "Starts an import daemon"),
171 170
  ("export_start", SINGLE, TMO_NORMAL, [
172 171
    ("opts", OBJECT_TO_DICT, None),
......
174 173
    ("port", None, None),
175 174
    ("instance", INST_TO_DICT, None),
176 175
    ("component", None, None),
177
    ("source", None, None),
178
    ("source_args", "self._EncodeImportExportIO(source, %s)", None),
176
    ("source", "self._EncodeImportExportIO(%s)", "Export source"),
179 177
    ], None, "Starts an export daemon"),
180 178
  ("impexp_status", SINGLE, TMO_FAST, [
181 179
    ("names", None, "Import/export names"),
b/lib/server/noded.py
951 951
    """Starts an import daemon.
952 952

  
953 953
    """
954
    (opts_s, instance, component, dest, dest_args) = params
954
    (opts_s, instance, component, (dest, dest_args)) = params
955 955

  
956 956
    opts = objects.ImportExportOptions.FromDict(opts_s)
957 957

  
......
967 967
    """Starts an export daemon.
968 968

  
969 969
    """
970
    (opts_s, host, port, instance, component, source, source_args) = params
970
    (opts_s, host, port, instance, component, (source, source_args)) = params
971 971

  
972 972
    opts = objects.ImportExportOptions.FromDict(opts_s)
973 973

  

Also available in: Unified diff