Revision 2a7c3583 tools/move-instance

b/tools/move-instance
148 148
    self.src_cluster_name = src_cluster_name
149 149
    self.dest_cluster_name = dest_cluster_name
150 150

  
151
    # TODO: Implement timeouts for RAPI connections
151 152
    # TODO: Support for using system default paths for verifying SSL certificate
152
    # (already implemented in CertAuthorityVerify)
153 153
    logging.debug("Using '%s' as source CA", options.src_ca_file)
154
    src_ssl_config = rapi.client.CertAuthorityVerify(cafile=options.src_ca_file)
154
    src_curl_config = rapi.client.GenericCurlConfig(cafile=options.src_ca_file)
155 155

  
156 156
    if options.dest_ca_file:
157 157
      logging.debug("Using '%s' as destination CA", options.dest_ca_file)
158
      dest_ssl_config = \
159
        rapi.client.CertAuthorityVerify(cafile=options.dest_ca_file)
158
      dest_curl_config = \
159
        rapi.client.GenericCurlConfig(cafile=options.dest_ca_file)
160 160
    else:
161 161
      logging.debug("Using source CA for destination")
162
      dest_ssl_config = src_ssl_config
162
      dest_curl_config = src_curl_config
163 163

  
164 164
    logging.debug("Source RAPI server is %s:%s",
165 165
                  src_cluster_name, options.src_rapi_port)
......
182 182
    self.GetSourceClient = lambda: \
183 183
      rapi.client.GanetiRapiClient(src_cluster_name,
184 184
                                   port=options.src_rapi_port,
185
                                   config_ssl_verification=src_ssl_config,
185
                                   curl_config_fn=src_curl_config,
186 186
                                   username=src_username,
187 187
                                   password=src_password)
188 188

  
......
212 212
    self.GetDestClient = lambda: \
213 213
      rapi.client.GanetiRapiClient(dest_cluster_name,
214 214
                                   port=dest_rapi_port,
215
                                   config_ssl_verification=dest_ssl_config,
215
                                   curl_config_fn=dest_curl_config,
216 216
                                   username=dest_username,
217 217
                                   password=dest_password)
218 218

  
......
771 771
  return (src_cluster_name, dest_cluster_name, instance_names)
772 772

  
773 773

  
774
@rapi.client.UsesRapiClient
774 775
def main():
775 776
  """Main routine.
776 777

  

Also available in: Unified diff