change services.mcord.models to services.vbbu.models && add mcordservice.py
Change-Id: Iff1f85a37b783201a62975b06356f34403ab7e0b
diff --git a/xos/admin.py b/xos/admin.py
index 7e20f70..564a156 100644
--- a/xos/admin.py
+++ b/xos/admin.py
@@ -4,7 +4,7 @@
from core.models import User
from django import forms
from django.contrib import admin
-from services.mcord.models import MCORDService, VBBUComponent, VPGWCComponent, MCORD_KIND
+from services.vbbu.models import MCORDService, VBBUComponent, VPGWCComponent, MCORD_KIND
# The class to provide an admin interface on the web for the service.
# We do only configuration here and don't change any logic because the logic
diff --git a/xos/synchronizer/steps/sync_vbbu.py b/xos/synchronizer/steps/sync_vbbu.py
index 09b1fe8..a000230 100644
--- a/xos/synchronizer/steps/sync_vbbu.py
+++ b/xos/synchronizer/steps/sync_vbbu.py
@@ -1,7 +1,7 @@
import os
import sys
from django.db.models import Q, F
-from services.mcord.models import MCORDService, VBBUComponent
+from services.vbbu.models import MCORDService, VBBUComponent
from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
parentdir = os.path.join(os.path.dirname(__file__), "..")
diff --git a/xos/tosca/resources/mcordservice.py b/xos/tosca/resources/mcordservice.py
new file mode 100644
index 0000000..598e08b
--- /dev/null
+++ b/xos/tosca/resources/mcordservice.py
@@ -0,0 +1,19 @@
+import os
+import pdb
+import sys
+import tempfile
+sys.path.append("/opt/tosca")
+from translator.toscalib.tosca_template import ToscaTemplate
+import pdb
+
+from services.vbbu.models import MCORDService
+
+from service import XOSService
+
+class XOSMCORDService(XOSService):
+ provides = "tosca.nodes.MCORDService"
+ xos_model = MCORDService
+ copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key",
+ "private_key_fn", "versionNumber",
+ ]
+
diff --git a/xos/tosca/resources/vbbucomponent.py b/xos/tosca/resources/vbbucomponent.py
index ee60d0c..7a61677 100644
--- a/xos/tosca/resources/vbbucomponent.py
+++ b/xos/tosca/resources/vbbucomponent.py
@@ -6,7 +6,7 @@
from translator.toscalib.tosca_template import ToscaTemplate
import pdb
-from services.mcord.models import VBBUComponent, MCORDService
+from services.vbbu.models import VBBUComponent, MCORDService
from xosresource import XOSResource
diff --git a/xos/vBBU-onboard.yaml b/xos/vBBU-onboard.yaml
index 4e1e597..7ee767b 100644
--- a/xos/vBBU-onboard.yaml
+++ b/xos/vBBU-onboard.yaml
@@ -7,7 +7,7 @@
topology_template:
node_templates:
- servicecontroller#vBBU:
+ servicecontroller#vbbu:
type: tosca.nodes.ServiceController
properties:
base_url: file:///opt/xos_services/vBBU/xos/