Fixed conflict, rename vSGW to vSGWC
Change-Id: I68405395edeedd305b43c0dfd9a85f46f582122d
diff --git a/xos/tosca/resources/vsgwcservice.py b/xos/tosca/resources/vsgwcservice.py
new file mode 100644
index 0000000..5eb211d
--- /dev/null
+++ b/xos/tosca/resources/vsgwcservice.py
@@ -0,0 +1,9 @@
+# from services.vsgwc.models import VSGWService
+from service import XOSService
+from services.vsgwc.models import VSGWCService
+
+class XOSVSGWCService(XOSService):
+ provides = "tosca.nodes.VSGWCService"
+ xos_model = VSGWCService
+ copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber"]
+
diff --git a/xos/tosca/resources/vsgwtenant.py b/xos/tosca/resources/vsgwctenant.py
similarity index 62%
rename from xos/tosca/resources/vsgwtenant.py
rename to xos/tosca/resources/vsgwctenant.py
index 5f6c3bb..6b1d46c 100644
--- a/xos/tosca/resources/vsgwtenant.py
+++ b/xos/tosca/resources/vsgwctenant.py
@@ -1,15 +1,15 @@
from xosresource import XOSResource
from core.models import Service, Tenant
-from services.vsgw.models import VSGWTenant
+from services.vsgwc.models import VSGWCTenant
-class XOSVSGWTenant(XOSResource):
- provides = "tosca.nodes.VSGWTenant"
- xos_model = VSGWTenant
+class XOSVSGWCTenant(XOSResource):
+ provides = "tosca.nodes.VSGWCTenant"
+ xos_model = VSGWCTenant
name_field = "service_specific_id"
copyin_props = ("tenant_message",)
def get_xos_args(self, throw_exception=True):
- args = super(XOSVSGWTenant, self).get_xos_args()
+ args = super(XOSVSGWCTenant, self).get_xos_args()
# ExampleTenant must always have a provider_service
provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=throw_exception)
@@ -20,9 +20,9 @@
def get_existing_objs(self):
args = self.get_xos_args(throw_exception=False)
- return VSGWTenant.get_tenant_objects().filter(provider_service=args["provider_service"], service_specific_id=args["service_specific_id"])
+ return VSGWCTenant.get_tenant_objects().filter(provider_service=args["provider_service"], service_specific_id=args["service_specific_id"])
return []
def can_delete(self, obj):
- return super(XOSVSGWTenant, self).can_delete(obj)
+ return super(XOSVSGWCTenant, self).can_delete(obj)
diff --git a/xos/tosca/resources/vsgwservice.py b/xos/tosca/resources/vsgwservice.py
deleted file mode 100644
index 3826425..0000000
--- a/xos/tosca/resources/vsgwservice.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# from services.vsgw.models import VSGWService
-from service import XOSService
-from services.vsgw.models import VSGWService
-
-class XOSVSGWService(XOSService):
- provides = "tosca.nodes.VSGWService"
- xos_model = VSGWService
- copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber"]
-