remove file and delete service_message in synchronizer.
Change-Id: I58349df77e1ff4fb973e341f508cbad7f3eff0f9
diff --git a/xos/tosca/resources/vsgwtenant.py b/xos/tosca/resources/vsgwtenant.py
index 29ea5f6..ecf6051 100644
--- a/xos/tosca/resources/vsgwtenant.py
+++ b/xos/tosca/resources/vsgwtenant.py
@@ -1,17 +1,8 @@
-import importlib
-import os
-import pdb
-import sys
-import tempfile
-sys.path.append("/opt/tosca")
-from translator.toscalib.tosca_template import ToscaTemplate
-from core.models import Tenant, Service
-from services.vsgwservice.models import *
-
+from services.vsgw.models import *
from xosresource import XOSResource
class XOSVSGWTenant(XOSResource):
- provides = "tosca.nodes.ExampleTenant"
+ provides = "tosca.nodes.VSGWTenant"
xos_model = VSGWTenant
name_field = "service_specific_id"
copyin_props = ("tenant_message",)
@@ -20,9 +11,9 @@
args = super(XOSVSGWTenant, self).get_xos_args()
# ExampleTenant must always have a provider_service
- provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=True)
+ provider_name = self.get_requirement("tosca.relationships.MemberOfService", throw_exception=throw_exception)
if provider_name:
- args["provider_service"] = self.get_xos_object(Service, throw_exception=True, name=provider_name)
+ args["provider_service"] = self.get_xos_object(VSGWService, throw_exception=throw_exception, name=provider_name)
return args