CORD-2753 VTR default owner class name
Change-Id: I5b678f85339fe897e934af8fff7180287e0006b8
diff --git a/xos/synchronizer/models/attic/header.py b/xos/synchronizer/models/attic/header.py
deleted file mode 100644
index 1320bf7..0000000
--- a/xos/synchronizer/models/attic/header.py
+++ /dev/null
@@ -1,34 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-from django.db import models
-from core.models import Service, XOSBase, Slice, Instance, ServiceInstance, TenantWithContainer, Node, Image, User, Flavor, NetworkParameter, NetworkParameterType, Port, AddressPool
-from core.models.xosbase import StrippedCharField
-import os
-from django.db import models, transaction
-from django.forms.models import model_to_dict
-from django.db.models import *
-from operator import itemgetter, attrgetter, methodcaller
-import traceback
-from xos.exceptions import *
-from django.contrib.contenttypes.models import ContentType
-from django.contrib.contenttypes.fields import GenericForeignKey
-
-class ConfigurationError(Exception):
- # FIXME log the error
- pass
-
-VTR_KIND = "vTR"
diff --git a/xos/synchronizer/models/attic/vtrtenant_model.py b/xos/synchronizer/models/attic/vtrtenant_model.py
deleted file mode 100644
index b64fc49..0000000
--- a/xos/synchronizer/models/attic/vtrtenant_model.py
+++ /dev/null
@@ -1,27 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-sync_attributes = ( 'test', 'argument', "scope" )
-
-def __init__(self, *args, **kwargs):
- vtr_services = VTRService.objects.all()
- if vtr_services:
- self._meta.get_field("owner").default = vtr_services[0].id
- super(VTRTenant, self).__init__(*args, **kwargs)
-
-def delete(self, *args, **kwargs):
- super(VTRTenant, self).delete(*args, **kwargs)
-
diff --git a/xos/synchronizer/models/vtr.xproto b/xos/synchronizer/models/vtr.xproto
index 8628e0f..9dfe7df 100644
--- a/xos/synchronizer/models/vtr.xproto
+++ b/xos/synchronizer/models/vtr.xproto
@@ -4,6 +4,7 @@
message VTRTenant (ServiceInstance){
option verbose_name="Virtual Truck Roll Tenant";
+ option owner_class_name="VTRService";
required string test = 1 [choices = "(('ping', 'Ping'), ('traceroute', 'Trace Route'), ('tcpdump', 'Tcp Dump'), ('memory', 'Memory'), ('bandwidth', 'Bandwidth'))", max_length = 30, content_type = "stripped", blank = False, help_text = "type of test", null = False, db_index = False];
required string scope = 2 [choices = "(('container', 'Container'), ('vm', 'VM'))", max_length = 30, content_type = "stripped", blank = False, help_text = "scope of test", null = False, db_index = False];