@@ -361,6 +361,7 @@ void Swap_with::load(const YAML::Node &node)
361
361
//
362
362
363
363
Migrate::Migrate () :
364
+ retry_counter (" retry_counter" ),
364
365
migration_type (" migration-type" ),
365
366
rdma_migration (" rdma-migration" ),
366
367
pscom_hook_procs (" pscom-hook-procs" ),
@@ -374,6 +375,7 @@ Migrate::Migrate(std::string vm_name, std::string dest_hostname, std::string mig
374
375
Task::Task (concurrent_execution, time_measurement),
375
376
vm_name (std::move(vm_name)),
376
377
dest_hostname (std::move(dest_hostname)),
378
+ retry_counter (" retry_counter" ),
377
379
migration_type (" migration-type" , std::move(migration_type)),
378
380
rdma_migration (" rdma-migration" , rdma_migration),
379
381
pscom_hook_procs (" pscom-hook-procs" , std::to_string(pscom_hook_procs)),
@@ -387,6 +389,7 @@ Migrate::Migrate(std::string vm_name, std::string dest_hostname, std::string mig
387
389
Task::Task (concurrent_execution, time_measurement),
388
390
vm_name (std::move(vm_name)),
389
391
dest_hostname (std::move(dest_hostname)),
392
+ retry_counter (" retry_counter" ),
390
393
migration_type (" migration-type" , std::move(migration_type)),
391
394
rdma_migration (" rdma-migration" , rdma_migration),
392
395
pscom_hook_procs (" pscom-hook-procs" , std::move(pscom_hook_procs)),
@@ -402,6 +405,7 @@ YAML::Node Migrate::emit() const
402
405
node[" vm-name" ] = vm_name;
403
406
node[" destination" ] = dest_hostname;
404
407
YAML::Node params = node[" parameter" ];
408
+ merge_node (params, retry_counter.emit ());
405
409
merge_node (params, migration_type.emit ());
406
410
merge_node (params, rdma_migration.emit ());
407
411
merge_node (params, pscom_hook_procs.emit ());
@@ -419,6 +423,7 @@ void Migrate::load(const YAML::Node &node)
419
423
fast::load (vm_name, node[" vm-name" ]);
420
424
fast::load (dest_hostname, node[" destination" ]);
421
425
if (node[" parameter" ]) {
426
+ retry_counter.load (node[" parameter" ]);
422
427
migration_type.load (node[" parameter" ]);
423
428
rdma_migration.load (node[" parameter" ]);
424
429
pscom_hook_procs.load (node[" parameter" ]);
@@ -428,6 +433,65 @@ void Migrate::load(const YAML::Node &node)
428
433
}
429
434
}
430
435
436
+ //
437
+ // Evacuate implementation
438
+ //
439
+
440
+ Evacuate::Evacuate () :
441
+ mode (" mode" ),
442
+ overbooking (" overbooking" ),
443
+ retry_counter (" retry_counter" ),
444
+ migration_type (" migration-type" ),
445
+ rdma_migration (" rdma-migration" ),
446
+ pscom_hook_procs (" pscom-hook-procs" ),
447
+ transport (" transport" )
448
+ {
449
+ }
450
+
451
+ Evacuate::Evacuate (std::vector<std::string> destinations, std::string mode, bool overbooking, std::string migration_type, bool rdma_migration, bool concurrent_execution, std::string pscom_hook_procs, bool time_measurement) :
452
+ Task::Task (concurrent_execution, time_measurement),
453
+ destinations (std::move(destinations)),
454
+ mode (" mode" , std::move(mode)),
455
+ overbooking (" overbooking" , overbooking),
456
+ retry_counter (" retry_counter" ),
457
+ migration_type (" migration-type" , std::move(migration_type)),
458
+ rdma_migration (" rdma-migration" , rdma_migration),
459
+ pscom_hook_procs (" pscom-hook-procs" , std::move(pscom_hook_procs)),
460
+ transport (" transport" )
461
+ {
462
+ }
463
+
464
+ YAML::Node Evacuate::emit () const
465
+ {
466
+ YAML::Node node = Task::emit ();
467
+ node[" destinations" ] = destinations;
468
+ YAML::Node params = node[" parameter" ];
469
+ merge_node (params, mode.emit ());
470
+ merge_node (params, overbooking.emit ());
471
+ merge_node (params, retry_counter.emit ());
472
+ merge_node (params, migration_type.emit ());
473
+ merge_node (params, rdma_migration.emit ());
474
+ merge_node (params, pscom_hook_procs.emit ());
475
+ merge_node (params, transport.emit ());
476
+ return node;
477
+ }
478
+
479
+ void Evacuate::load (const YAML::Node &node)
480
+ {
481
+ Task::load (node);
482
+ fast::load (destinations, node[" destinations" ]);
483
+ if (node[" parameter" ]) {
484
+ mode.load (node[" parameter" ]);
485
+ overbooking.load (node[" parameter" ]);
486
+ retry_counter.load (node[" parameter" ]);
487
+ migration_type.load (node[" parameter" ]);
488
+ rdma_migration.load (node[" parameter" ]);
489
+ pscom_hook_procs.load (node[" parameter" ]);
490
+ transport.load (node[" parameter" ]);
491
+ }
492
+ }
493
+
494
+
431
495
//
432
496
// Repin implementation
433
497
//
0 commit comments