refactor vBBU cord-3.0
Change-Id: I843cd7954862a38d05c918de101fb8635d15829c
diff --git a/xos/tosca/resources/vbbuservice.py b/xos/tosca/resources/vbbuservice.py
index 55bb167..8723a3e 100644
--- a/xos/tosca/resources/vbbuservice.py
+++ b/xos/tosca/resources/vbbuservice.py
@@ -1,11 +1,8 @@
-# from services.vbbu.models import MCORDService
-from synchronizers.new_base.modelaccessor import *
from service import XOSService
+from services.vbbu.models import VBBUService
class XOSMVBBUService(XOSService):
provides = "tosca.nodes.VBBUService"
xos_model = VBBUService
- copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key",
- "private_key_fn", "versionNumber",
- ]
+ copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber"]
diff --git a/xos/tosca/resources/vbbutenant.py b/xos/tosca/resources/vbbutenant.py
index b93c023..d8cf10d 100644
--- a/xos/tosca/resources/vbbutenant.py
+++ b/xos/tosca/resources/vbbutenant.py
@@ -1,19 +1,19 @@
-# from services.vbbu.models import *
-from synchronizers.new_base.modelaccessor import *
from xosresource import XOSResource
+from core.models import Tenant, Service
+from services.vbbu.models import VBBUTenant
class XOSVBBUTenant(XOSResource):
provides = "tosca.nodes.VBBUTenant"
xos_model = VBBUTenant
- copyin_props = ["s1u_tag", "s1mme_tag", "rru_tag", "display_message"]
+ copyin_props = ("tenant_message",)
name_field = None
def get_xos_args(self, throw_exception=True):
args = super(XOSVBBUTenant, self).get_xos_args()
- provider_name = self.get_requirement("tosca.relationships.MemberOfService", throw_exception=throw_exception)
+ provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=throw_exception)
if provider_name:
- args["provider_service"] = self.get_xos_object(MCORDService, throw_exception=throw_exception, name=provider_name)
+ args["provider_service"] = self.get_xos_object(Service, throw_exception=throw_exception, name=provider_name)
return args