Debian Codegraph @

networking_l2gw/services/l2gateway/service_drivers/__init__.py

raw
1 # Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
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 import abc
17
18
19 class L2gwDriverBase(metaclass=abc.ABCMeta):
20
21 def __init__(self, service_plugin, validator=None):
22 self.service_plugin = service_plugin
23 self.validator = validator
24 self.name = ''
25
26 @property
27 def service_type(self):
28 pass
29
30 @abc.abstractmethod
31 def add_port_mac(self, context, port_dict):
32 pass
33
34 @abc.abstractmethod
35 def delete_port_mac(self, context, port):
36 pass
37
38 @abc.abstractmethod
39 def create_l2_gateway(self, context, l2_gateway):
40 pass
41
42 @abc.abstractmethod
43 def update_l2_gateway(self, context, l2_gateway_id, l2_gateway):
44 pass
45
46 @abc.abstractmethod
47 def delete_l2_gateway(self, context, l2_gateway_id):
48 pass
49
50 @abc.abstractmethod
51 def create_l2_gateway_connection(self, context, l2_gateway_connection):
52 pass
53
54 @abc.abstractmethod
55 def delete_l2_gateway_connection(self, context, l2_gateway_connection_id):
56 pass
57
58 @abc.abstractmethod
59 def create_l2_gateway_precommit(self, context, l2_gateway):
60 pass
61
62 @abc.abstractmethod
63 def update_l2_gateway_precommit(self, context, l2_gateway):
64 pass
65
66 @abc.abstractmethod
67 def delete_l2_gateway_precommit(self, context, l2_gateway_id):
68 pass
69
70 @abc.abstractmethod
71 def create_l2_gateway_connection_precommit(self, context,
72 l2_gateway_connection):
73 pass
74
75 @abc.abstractmethod
76 def delete_l2_gateway_connection_precommit(self, context,
77 l2_gateway_connection_id):
78 pass
79
80 @abc.abstractmethod
81 def create_l2_gateway_postcommit(self, context, l2_gateway):
82 pass
83
84 @abc.abstractmethod
85 def delete_l2_gateway_postcommit(self, context, l2_gateway_id):
86 pass
87
88 @abc.abstractmethod
89 def update_l2_gateway_postcommit(self, context, l2_gateway):
90 pass
91
92 @abc.abstractmethod
93 def create_l2_gateway_connection_postcommit(self, context,
94 l2_gateway_connection):
95 pass
96
97 @abc.abstractmethod
98 def delete_l2_gateway_connection_postcommit(self, context,
99 l2_gateway_connection_id):
100 pass
101
102
103 class L2gwDriver(L2gwDriverBase, metaclass=abc.ABCMeta):
104
105 def __init__(self, service_plugin, validator=None):
106 super().__init__(service_plugin)
107
108 @property
109 def service_type(self):
110 pass
111
112 def add_port_mac(self, context, port_dict):
113 pass
114
115 def delete_port_mac(self, context, port):
116 pass
117
118 def create_l2_gateway(self, context, l2_gateway):
119 pass
120
121 def update_l2_gateway(self, context, l2_gateway_id, l2_gateway):
122 pass
123
124 def delete_l2_gateway(self, context, l2_gateway_id):
125 pass
126
127 def create_l2_gateway_connection(self, context, l2_gateway_connection):
128 pass
129
130 def delete_l2_gateway_connection(self, context, l2_gateway_connection_id):
131 pass
132
133 def create_l2_gateway_precommit(self, context, l2_gateway):
134 pass
135
136 def update_l2_gateway_precommit(self, context, l2_gateway):
137 pass
138
139 def delete_l2_gateway_precommit(self, context, l2_gateway_id):
140 pass
141
142 def create_l2_gateway_connection_precommit(self, context,
143 l2_gateway_connection):
144 pass
145
146 def delete_l2_gateway_connection_precommit(self, context,
147 l2_gateway_connection_id):
148 pass
149
150 def create_l2_gateway_postcommit(self, context, l2_gateway):
151 pass
152
153 def delete_l2_gateway_postcommit(self, context, l2_gateway_id):
154 pass
155
156 def update_l2_gateway_postcommit(self, context, l2_gateway):
157 pass
158
159 def create_l2_gateway_connection_postcommit(self, context,
160 l2_gateway_connection):
161 pass
162
163 def delete_l2_gateway_connection_postcommit(self, context,
164 l2_gateway_connection_id):
165 pass