@@ -217,6 +217,14 @@ def _get_marker_obj(self, context, resource, limit, marker):
217
217
return getattr (self , '_get_%s' % resource )(context , marker )
218
218
return None
219
219
220
+ def _filter_non_model_columns (self , data , model ):
221
+ """Remove all the attributes from data which are not columns of
222
+ the model passed as second parameter.
223
+ """
224
+ columns = [c .name for c in model .__table__ .columns ]
225
+ return dict ((k , v ) for (k , v ) in
226
+ data .iteritems () if k in columns )
227
+
220
228
221
229
class NeutronDbPluginV2 (neutron_plugin_base_v2 .NeutronPluginBaseV2 ,
222
230
CommonDbMixin ):
@@ -255,14 +263,6 @@ def register_dict_extend_funcs(cls, resource, funcs):
255
263
cur_funcs .extend (funcs )
256
264
cls ._dict_extend_functions [resource ] = cur_funcs
257
265
258
- def _filter_non_model_columns (self , data , model ):
259
- """Remove all the attributes from data which are not columns of
260
- the model passed as second parameter.
261
- """
262
- columns = [c .name for c in model .__table__ .columns ]
263
- return dict ((k , v ) for (k , v ) in
264
- data .iteritems () if k in columns )
265
-
266
266
def _get_network (self , context , id ):
267
267
try :
268
268
network = self ._get_by_id (context , models_v2 .Network , id )
0 commit comments