CORD-2753 volt service default owner

Change-Id: I2a2d00416e94aaa253073d4573d891522502962e
diff --git a/xos/synchronizer/models/attic/accessagent_model.py b/xos/synchronizer/models/attic/accessagent_model.py
deleted file mode 100644
index b80d979..0000000
--- a/xos/synchronizer/models/attic/accessagent_model.py
+++ /dev/null
@@ -1,17 +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.
-
-
-def __unicode__(self): return u'%s' % (self.name)
diff --git a/xos/synchronizer/models/attic/accessdevice_model.py b/xos/synchronizer/models/attic/accessdevice_model.py
deleted file mode 100644
index 507cd58..0000000
--- a/xos/synchronizer/models/attic/accessdevice_model.py
+++ /dev/null
@@ -1,17 +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.
-
-
-def __unicode__(self): return u'%s-%d:%d' % (self.volt_device.name,self.uplink,self.vlan)
diff --git a/xos/synchronizer/models/attic/agentportmapping_model.py b/xos/synchronizer/models/attic/agentportmapping_model.py
deleted file mode 100644
index d80baab..0000000
--- a/xos/synchronizer/models/attic/agentportmapping_model.py
+++ /dev/null
@@ -1,17 +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.
-
-
-def __unicode__(self): return u'%s-%s-%s' % (self.access_agent.name, self.port, self.mac)
diff --git a/xos/synchronizer/models/attic/header.py b/xos/synchronizer/models/attic/header.py
deleted file mode 100644
index 99ff8e5..0000000
--- a/xos/synchronizer/models/attic/header.py
+++ /dev/null
@@ -1,36 +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 django.db.models import *
-from core.models import Service, XOSBase, Slice, Instance, ServiceInstance, ServiceInstanceLink, Node, Image, User, Flavor, NetworkParameter, NetworkParameterType, Port, AddressPool, User
-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 Q
-from operator import itemgetter, attrgetter, methodcaller
-from core.models import Tag
-import traceback
-from xos.exceptions import *
-from xosconfig import Config
-
-class ConfigurationError(Exception):
-    pass
-
-VOLT_KIND = "vOLT"
-
-CORD_USE_VTN = getattr(Config(), "networking_use_vtn", False)
diff --git a/xos/synchronizer/models/attic/voltdevice_model.py b/xos/synchronizer/models/attic/voltdevice_model.py
deleted file mode 100644
index b80d979..0000000
--- a/xos/synchronizer/models/attic/voltdevice_model.py
+++ /dev/null
@@ -1,17 +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.
-
-
-def __unicode__(self): return u'%s' % (self.name)
diff --git a/xos/synchronizer/models/attic/volttenant_model.py b/xos/synchronizer/models/attic/volttenant_model.py
deleted file mode 100644
index 9824a36..0000000
--- a/xos/synchronizer/models/attic/volttenant_model.py
+++ /dev/null
@@ -1,33 +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.
-
-
-def __init__(self, *args, **kwargs):
-    volt_services = VOLTService.objects.all()
-    if volt_services:
-        self._meta.get_field("owner").default = volt_services[0].id
-    super(VOLTTenant, self).__init__(*args, **kwargs)
-    self.cached_vcpe = None
-
-def __xos_save_base(self, *args, **kwargs):
-    if not self.creator:
-        if not getattr(self, "caller", None):
-            # caller must be set when creating a vCPE since it creates a slice
-            raise XOSProgrammingError("VOLTTenant's self.caller was not set")
-        self.creator = self.caller
-        if not self.creator:
-            raise XOSProgrammingError("VOLTTenant's self.creator was not set")
-
-    return False
diff --git a/xos/synchronizer/models/volt.xproto b/xos/synchronizer/models/volt.xproto
index e1f5ddf..3751e48 100644
--- a/xos/synchronizer/models/volt.xproto
+++ b/xos/synchronizer/models/volt.xproto
@@ -8,6 +8,7 @@
 message VOLTTenant (ServiceInstance){
      option kind = "vOLT";
      option verbose_name = "vOLT Tenant";
+     option owner_class_name = "VOLTService";
 
      optional int32 s_tag = 1 [help_text = "s-tag", null = True, db_index = False, blank = True];
      optional int32 c_tag = 2 [help_text = "c-tag", null = True, db_index = False, blank = True];