Debian Codegraph @

networking_l2gw/services/l2gateway/agent/ovsdb/ovsdb_model.py

raw symbols SCIP
1 # Copyright (c) 2016 OpenStack Foundation.
2 # All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License"); you may
5 # not use this file except in compliance with the License. You may obtain
6 # a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 # License for the specific language governing permissions and limitations
14 # under the License.
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