blob: ca93c6bad6b9823158f44357d6a16baa5f6a5bc6 [file] [log] [blame]
Matteo Scandoloa86e0a12017-08-08 13:05:27 -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
Sapan Bhatia084c0982017-04-21 14:47:40 +020017sync_attributes = ( 'test', 'argument', "scope" )
18
19def __init__(self, *args, **kwargs):
Scott Baker379404c2017-05-24 17:13:45 -070020 vtr_services = VTRService.objects.all()
Sapan Bhatia084c0982017-04-21 14:47:40 +020021 if vtr_services:
Scott Bakerc7958a92017-07-18 11:07:00 -070022 self._meta.get_field("owner").default = vtr_services[0].id
Sapan Bhatia084c0982017-04-21 14:47:40 +020023 super(VTRTenant, self).__init__(*args, **kwargs)
24
25def save(self, *args, **kwargs):
26 super(VTRTenant, self).save(*args, **kwargs)
27
28def delete(self, *args, **kwargs):
29 super(VTRTenant, self).delete(*args, **kwargs)
30