blob: 2c3271a8eb545ecf077b9ae474da0cef0bc50339 [file] [log] [blame]
Matteo Scandolofcf842e2017-08-08 13:05:25 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain 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,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Rizwan Haider65baf552016-09-28 16:47:28 -040017class Invoker(object):
18
19 def __init__(self, **args):
20 pass
21
22 # Method for handline pre save semantics
23 # content here would be model specific but could include handling Many-to-Many relationship
24 # creation - which must occur post save
25 #
26 # obj - Whatever obj was just saved
27 # returns - None - this is a pure invoke() call, return type is None
28 #
29 def presave(self, obj):
30 return None
31
32
33 # Method for handline post save semantics
34 # content here would be model specific but could include handling Many-to-Many relationship
35 # creation - which must occur post save
36 #
37 # obj - Whatever obj was just saved
38 # returns - None - this is a pure invoke() call, return type is None
39 #
40 def postsave(self, obj):
41 return None