refactor vMME cord-3.0
Change-Id: I234b0ecf869de31fa7dbe76a2e3db4e2fc0b4e6b
diff --git a/xos/tosca/custom_types/vmme.m4 b/xos/tosca/custom_types/vmme.m4
index d3eb7d4..cf35121 100644
--- a/xos/tosca/custom_types/vmme.m4
+++ b/xos/tosca/custom_types/vmme.m4
@@ -15,9 +15,6 @@
properties:
xos_base_props
xos_base_service_props
- service_message:
- type: string
- required: false
tosca.nodes.MMETenant:
derived_from: tosca.nodes.Root
diff --git a/xos/tosca/custom_types/vmme.yaml b/xos/tosca/custom_types/vmme.yaml
index 337dffb..8c04163 100644
--- a/xos/tosca/custom_types/vmme.yaml
+++ b/xos/tosca/custom_types/vmme.yaml
@@ -78,9 +78,6 @@
type: string
required: false
description: Version number of Service.
- service_message:
- type: string
- required: false
tosca.nodes.MMETenant:
derived_from: tosca.nodes.Root
diff --git a/xos/tosca/resources/vmmeservice.py b/xos/tosca/resources/vmmeservice.py
index e6280da..3001eac 100644
--- a/xos/tosca/resources/vmmeservice.py
+++ b/xos/tosca/resources/vmmeservice.py
@@ -1,7 +1,7 @@
-from services.vmme.models import VMMEService
from service import XOSService
+from services.vmme.models import VMMEService
class XOSVMMEService(XOSService):
provides = "tosca.nodes.VMMEService"
xos_model = VMMEService
- copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber"]
\ No newline at end of file
+ copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber"]
diff --git a/xos/tosca/resources/vmmetenant.py b/xos/tosca/resources/vmmetenant.py
index 2a6e6d4..2ae223c 100644
--- a/xos/tosca/resources/vmmetenant.py
+++ b/xos/tosca/resources/vmmetenant.py
@@ -1,18 +1,19 @@
-from services.vmme.models import VMMETenant, VMMEService
from xosresource import XOSResource
+from core.models import Tenant, Service
+from services.vmme.models import VMMETenant
class XOSVMMETenant(XOSResource):
provides = "tosca.nodes.VMMETenant"
xos_model = VMMETenant
- copyin_props = ["tenant_message", "image_name"]
- name_field = None
+ name_field = None
+ copyin_props = ("tenant_message",)
def get_xos_args(self, throw_exception=True):
args = super(XOSVMMETenant, 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(VMMEService, throw_exception=throw_exception, name=provider_name)
+ args["provider_service"] = self.get_xos_object(Service, throw_exception=throw_exception, name=provider_name)
return args