package Ġcom . github . ker ub istan . ker ub . planner . steps . network . ov s . port . remove Ċ Ċ import Ġcom . github . ker ub istan . ker ub . host Up Ċ import Ġcom . github . ker ub istan . ker ub . model . config . Host Configuration Ċ import Ġcom . github . ker ub istan . ker ub . model . config . O vs Data Port Ċ import Ġcom . github . ker ub istan . ker ub . model . config . O vs Network Configuration Ċ import Ġcom . github . ker ub istan . ker ub . model . devices . Network Adapter Type Ċ import Ġcom . github . ker ub istan . ker ub . model . devices . Network Device Ċ import Ġcom . github . ker ub istan . ker ub . planner . Operation al State Ċ import Ġcom . github . ker ub istan . ker ub . planner . steps . Abstract Factory Ver ifications Ċ import Ġcom . github . ker ub istan . ker ub . test Host Ċ import Ġcom . github . ker ub istan . ker ub . test Virtual Network Ċ import Ġcom . github . ker ub istan . ker ub . test Vm Ċ import Ġcom . github . ker ub istan . ker ub . vm Up Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġkotlin . test . assertTrue Ċ Ċ internal Ġclass ĠRemove O vs Port Factory Test Ġ: ĠAbstract Factory Ver ifications ( Remove O vs Port Factory ) Ġ{ ĊĊ ĉ @ Test Ċ ĉ fun Ġproduce () Ġ{ Ċĉ ĉ assertTrue (" port Ġis Ġused Ġby Ġa Ġvm , Ġdo Ġnot Ġremove ") Ġ{ Ċĉĉ ĉ val Ġvm Ġ= Ġtest Vm . copy ( Ċĉĉĉĉ ĉ devices Ġ= ĠlistOf ( Ċĉĉĉĉĉĉ ĉ Network Device ( adapter Type Ġ= ĠNetwork Adapter Type . virt io , Ġnetwork Id Ġ= Ġtest Virtual Network . id ) Ċĉĉĉĉ ĉ ) Ċĉĉ ĉ ) Ċĉĉ ĉ Remove O vs Port Factory . produce ( Ċĉĉĉĉ ĉ Operation al State . from Lists ( Ċĉĉĉĉĉĉ ĉ hosts Ġ= ĠlistOf ( test Host ), Ċĉĉĉĉĉĉ ĉ host Dyn s Ġ= ĠlistOf ( host Up ( test Host )), Ċĉĉĉĉĉĉ ĉ vms Ġ= ĠlistOf ( vm ), Ċĉĉĉĉĉĉ ĉ vm Dyn s Ġ= ĠlistOf ( vm Up ( vm , Ġtest Host )), Ċĉĉĉĉĉĉ ĉ host Cfg s Ġ= ĠlistOf ( Ċĉĉĉĉĉĉĉĉ ĉ Host Configuration ( Ċĉĉĉĉĉĉĉĉĉĉ ĉ id Ġ= Ġtest Host . id , Ċĉĉĉĉĉĉĉĉĉĉ ĉ network Configuration Ġ= ĠlistOf ( Ċĉĉĉĉĉĉĉĉĉĉĉĉ ĉ O vs Network Configuration ( Ċĉĉĉĉĉĉĉĉĉĉĉĉĉĉ ĉ virtual Network Id Ġ= Ġtest Virtual Network . id , Ċĉĉĉĉĉĉĉĉĉĉĉĉĉĉ ĉ ports Ġ= ĠlistOf ( Ċĉĉĉĉĉĉĉĉĉĉĉĉĉĉĉĉ ĉ O vs Data Port ( vm . id Str ) Ċĉĉĉĉĉĉĉĉĉĉĉĉĉĉ ĉ ) Ċĉĉĉĉĉĉĉĉĉĉĉĉ ĉ ) Ċĉĉĉĉĉĉĉĉĉĉ ĉ ) Ċĉĉĉĉĉĉĉĉ ĉ ) Ċĉĉĉĉĉĉ ĉ ), Ċĉĉĉĉĉĉ ĉ virtual Networks Ġ= ĠlistOf ( test Virtual Network ) Ċĉĉĉĉ ĉ ) Ċĉĉ ĉ ). isEmpty () Ċĉ ĉ } Ċĉ ĉ assertTrue (" Not Ġused Ġvirtual Ġnetwork Ġon Ġa Ġhost Ġ- Ġoffer Ġto Ġremove ") Ġ{ Ċĉĉ ĉ Remove O vs Port Factory . produce ( Ċĉĉĉĉ ĉ Operation al State . from Lists ( Ċĉĉĉĉĉĉ ĉ hosts Ġ= ĠlistOf ( test Host ), Ċĉĉĉĉĉĉ ĉ host Dyn s Ġ= ĠlistOf ( host Up ( test Host )), Ċĉĉĉĉĉĉ ĉ host Cfg s Ġ= ĠlistOf ( Ċĉĉĉĉĉĉĉĉ ĉ Host Configuration ( Ċĉĉĉĉĉĉĉĉĉĉ ĉ id Ġ= Ġtest Host . id , Ċĉĉĉĉĉĉĉĉĉĉ ĉ network Configuration Ġ= ĠlistOf ( Ċĉĉĉĉĉĉĉĉĉĉĉĉ ĉ O vs Network Configuration ( Ċĉĉĉĉĉĉĉĉĉĉĉĉĉĉ ĉ virtual Network Id Ġ= Ġtest Virtual Network . id , Ċĉĉĉĉĉĉĉĉĉĉĉĉĉĉ ĉ ports Ġ= ĠlistOf ( Ċĉĉĉĉĉĉĉĉĉĉĉĉĉĉĉĉ ĉ O vs Data Port (" test - port ") Ċĉĉĉĉĉĉĉĉĉĉĉĉĉĉ ĉ ) Ċĉĉĉĉĉĉĉĉĉĉĉĉ ĉ ) Ċĉĉĉĉĉĉĉĉĉĉ ĉ ) Ċĉĉĉĉĉĉĉĉ ĉ ) Ċĉĉĉĉĉĉ ĉ ), Ċĉĉĉĉĉĉ ĉ virtual Networks Ġ= ĠlistOf ( test Virtual Network ) Ċĉĉĉĉ ĉ ) Ċĉĉ ĉ ) Ġ== ĠlistOf ( Ċĉĉĉĉ ĉ Remove O vs Port ( Ċĉĉĉĉĉĉ ĉ host Ġ= Ġtest Host , Ċĉĉĉĉĉĉ ĉ port Name Ġ= Ġ" test - port ", Ċĉĉĉĉĉĉ ĉ virtual Network Ġ= Ġtest Virtual Network Ċĉĉĉĉ ĉ ) Ċĉĉ ĉ ) Ċĉ ĉ } Ċ ĉ } Ċ Ċ }