Implement a get VM IP function in utils to be used within test cases
[sdnvpn.git] / sdnvpn / test / functest / testcase_7.py
index 05d40fa..3bc9afb 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 #
-# Copyright (c) 2015 All rights reserved
+# Copyright (c) 2017 All rights reserved
 # This program and the accompanying materials
 # are made available under the terms of the Apache License, Version 2.0
 # which accompanies this distribution, and is available at
@@ -82,7 +82,7 @@ def main():
         network_2_id,
         sg_id,
         secgroup_name=TESTCASE_CONFIG.secgroup_name)
-    vm_2_ip = vm_2.networks.itervalues().next()[0]
+    vm_2_ip = test_utils.get_instance_ip(vm_2)
 
     u1 = test_utils.generate_ping_userdata([vm_2_ip])
     vm_1 = test_utils.create_instance(