def test_nova_to_osvif_ips(self): ips = [ model.FixedIP(address="192.168.122.24", floating_ips=[ model.IP(address="192.168.122.100", type="floating"), model.IP(address="192.168.122.101", type="floating"), model.IP(address="192.168.122.102", type="floating"), ], version=4), model.FixedIP(address="2001::beef", version=6), ] actual = os_vif_util._nova_to_osvif_ips(ips) expect = osv_objects.fixed_ip.FixedIPList(objects=[ osv_objects.fixed_ip.FixedIP(address="192.168.122.24", floating_ips=[ "192.168.122.100", "192.168.122.101", "192.168.122.102", ]), osv_objects.fixed_ip.FixedIP(address="2001::beef", floating_ips=[]), ], ) self.assertObjEqual(expect, actual)
def test_nova_to_osvif_ips(self): ips = [ model.FixedIP( address="192.168.122.24", floating_ips=[ model.IP(address="192.168.122.100", type="floating"), model.IP(address="192.168.122.101", type="floating"), model.IP(address="192.168.122.102", type="floating"), ], version=4), model.FixedIP( address="2001::beef", version=6), ] actual = os_vif_util._nova_to_osvif_ips(ips) expect = osv_objects.fixed_ip.FixedIPList( objects=[ osv_objects.fixed_ip.FixedIP( address="192.168.122.24", floating_ips=[ "192.168.122.100", "192.168.122.101", "192.168.122.102", ]), osv_objects.fixed_ip.FixedIP( address="2001::beef", floating_ips=[]), ], ) self.assertObjEqual(expect, actual)