| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
class OvsdbObject: |
| 18 |
def __init__(self, uuid): |
| 19 |
self.uuid = uuid |
| 20 |
|
| 21 |
|
| 22 |
class LogicalSwitch(OvsdbObject): |
| 23 |
def __init__(self, uuid, name, description, tunnel_key): |
| 24 |
super().__init__(uuid) |
| 25 |
self.name = name |
| 26 |
self.description = description |
| 27 |
self.tunnel_key = tunnel_key |
| 28 |
|
| 29 |
|
| 30 |
class PhysicalLocatorSet(OvsdbObject): |
| 31 |
def __init__(self, uuid, locator_uuid_list): |
| 32 |
super().__init__(uuid) |
| 33 |
self.locator_uuid_list = locator_uuid_list |
| 34 |
|
| 35 |
|
| 36 |
class PhysicalLocator(OvsdbObject): |
| 37 |
def __init__(self, uuid, |
| 38 |
dst_ip, tunnel_key=None, |
| 39 |
encapsulation_type='vxlan_over_ipv4'): |
| 40 |
super().__init__(uuid) |
| 41 |
self.dst_ip = dst_ip |
| 42 |
self.encapsulation_type = encapsulation_type |
| 43 |
self.tunnel_key = tunnel_key |
| 44 |
|
| 45 |
|
| 46 |
class UcastMacs(OvsdbObject): |
| 47 |
def __init__(self, uuid, mac, ipaddr, logical_switch_uuid, locator_uuid): |
| 48 |
super().__init__(uuid) |
| 49 |
self.mac = mac |
| 50 |
self.ipaddr = ipaddr |
| 51 |
self.logical_switch_uuid = logical_switch_uuid |
| 52 |
self.locator_uuid = locator_uuid |
| 53 |
|
| 54 |
|
| 55 |
class McastMacs(OvsdbObject): |
| 56 |
def __init__(self, uuid, mac, dst_ip, logical_switch_uuid, |
| 57 |
locator_set__uuid): |
| 58 |
super().__init__(uuid) |
| 59 |
self.mac = mac |
| 60 |
self.dst_ip = dst_ip |
| 61 |
self.logical_switch_uuid = logical_switch_uuid |
| 62 |
self.locator_set__uuid = locator_set__uuid |
| 63 |
|
| 64 |
|
| 65 |
class PhysicalPort(OvsdbObject): |
| 66 |
def __init__(self, uuid, name, description, vlan_bindings_dict): |
| 67 |
super().__init__(uuid) |
| 68 |
self.name = name |
| 69 |
self.description = description |
| 70 |
self.vlan_bindings_dict = vlan_bindings_dict |