Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 1 | from logging import * |
Damjan Marion | f56b77a | 2016-10-03 19:44:57 +0200 | [diff] [blame] | 2 | |
3 | |||||
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 4 | class TestHost(object): |
5 | """ Generic test host "connected" to VPP. """ | ||||
Damjan Marion | f56b77a | 2016-10-03 19:44:57 +0200 | [diff] [blame] | 6 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 7 | @property |
8 | def mac(self): | ||||
9 | """ MAC address """ | ||||
10 | return self._mac | ||||
Damjan Marion | f56b77a | 2016-10-03 19:44:57 +0200 | [diff] [blame] | 11 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 12 | @property |
13 | def ip4(self): | ||||
14 | """ IPv4 address """ | ||||
15 | return self._ip4 | ||||
Damjan Marion | f56b77a | 2016-10-03 19:44:57 +0200 | [diff] [blame] | 16 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 17 | @property |
18 | def ip6(self): | ||||
19 | """ IPv6 address """ | ||||
20 | return self._ip6 | ||||
Damjan Marion | f56b77a | 2016-10-03 19:44:57 +0200 | [diff] [blame] | 21 | |
Klement Sekera | f62ae12 | 2016-10-11 11:47:09 +0200 | [diff] [blame] | 22 | def __init__(self, mac=None, ip4=None, ip6=None): |
23 | self._mac = mac | ||||
24 | self._ip4 = ip4 | ||||
25 | self._ip6 = ip6 |