@@ -363,7 +363,7 @@ def start(self, force_stop_failed=True, transaction=None):
363363 raise VMError ('VM did not come online in time' )
364364
365365 host_up = wait_until (
366- str (self .dataset_obj ['intern_ip ' ]),
366+ str (self .dataset_obj ['ipv6 ' ]),
367367 waitmsg = 'Waiting for SSH to respond' ,
368368 )
369369 if not host_up and force_stop_failed :
@@ -408,7 +408,7 @@ def aws_start(self):
408408 raise VMError (e )
409409
410410 host_up = wait_until (
411- str (self .dataset_obj ['intern_ip ' ]),
411+ str (self .dataset_obj ['ipv6 ' ]),
412412 waitmsg = 'Waiting for SSH to respond' ,
413413 )
414414
@@ -431,7 +431,7 @@ def aws_restart(self):
431431 raise VMError (e )
432432
433433 host_up = wait_until (
434- str (self .dataset_obj ['intern_ip ' ]),
434+ str (self .dataset_obj ['ipv6 ' ]),
435435 waitmsg = 'Waiting for SSH to respond' ,
436436 timeout = 180
437437 )
@@ -647,7 +647,8 @@ def disk_free(self):
647647 def info (self ):
648648 result = {
649649 'hypervisor' : self .hypervisor .fqdn ,
650- 'intern_ip' : self .dataset_obj ['intern_ip' ],
650+ 'ipv4' : self .dataset_obj ['ipv4' ],
651+ 'ipv6' : self .dataset_obj ['ipv6' ],
651652 'num_cpu' : self .dataset_obj ['num_cpu' ],
652653 'memory' : self .dataset_obj ['memory' ],
653654 'disk_size_gib' : self .dataset_obj ['disk_size_gib' ],
@@ -807,8 +808,8 @@ def aws_build(self,
807808 self .dataset_obj ['aws_placement' ]
808809 )
809810 },
810- PrivateIpAddress = str (self .dataset_obj ['intern_ip ' ]),
811- Ipv6Addresses = [{'Ipv6Address' :str (self .dataset_obj ['primary_ip6 ' ])}],
811+ PrivateIpAddress = str (self .dataset_obj ['ipv4 ' ]),
812+ Ipv6Addresses = [{'Ipv6Address' :str (self .dataset_obj ['ipv6 ' ])}],
812813 UserData = '' if postboot is None else postboot ,
813814 TagSpecifications = [
814815 {
@@ -1045,16 +1046,19 @@ def copy_postboot_script(self, script):
10451046 self .put ('/buildvm-postboot' , script , '0755' )
10461047
10471048 def restore_address (self ):
1048- self .dataset_obj ['intern_ip' ] = self .old_address
1049+ self .dataset_obj ['ipv4' ] = self .old_address_ipv4
1050+ self .dataset_obj ['ipv6' ] = self .old_address_ipv6
10491051 self .dataset_obj .commit ()
10501052 self .route_network = self .old_network
10511053
1052- def change_address (self , new_address , new_network , transaction = None ):
1054+ def change_address (self , new_address_ipv4 , new_address_ipv6 , new_network , transaction = None ):
10531055 # All queries to Serveradmin are kept in commands.py.
10541056 # That's why this metod receives both new address and new network.
1055- self .old_address = self .dataset_obj ['intern_ip' ]
1057+ self .old_address_ipv4 = self .dataset_obj ['ipv4' ]
1058+ self .old_address_ipv6 = self .dataset_obj ['ipv6' ]
10561059 self .old_network = self .route_network
1057- self .dataset_obj ['intern_ip' ] = new_address
1060+ self .dataset_obj ['ipv4' ] = new_address_ipv4
1061+ self .dataset_obj ['ipv6' ] = new_address_ipv6
10581062 self .dataset_obj .commit ()
10591063 self .route_network = new_network
10601064
0 commit comments