Fixed conflict, rename vSGW to vSGWC
Change-Id: I68405395edeedd305b43c0dfd9a85f46f582122d
diff --git a/xos/tosca/custom_types/vsgw.m4 b/xos/tosca/custom_types/vsgwc.m4
similarity index 76%
rename from xos/tosca/custom_types/vsgw.m4
rename to xos/tosca/custom_types/vsgwc.m4
index 45c35e4..144921a 100644
--- a/xos/tosca/custom_types/vsgw.m4
+++ b/xos/tosca/custom_types/vsgwc.m4
@@ -1,25 +1,25 @@
tosca_definitions_version: tosca_simple_yaml_1_0
-# compile this with "m4 vbbu.m4 > vsgw.yaml"
+# compile this with "m4 vsgwc.m4 > vsgwc.yaml"
# include macros
include(macros.m4)
node_types:
- tosca.nodes.VSGWService:
+ tosca.nodes.VSGWCService:
derived_from: tosca.nodes.Root
description: >
- VSGW Service
+ VSGWC Service
capabilities:
xos_base_service_caps
properties:
xos_base_props
xos_base_service_props
- tosca.nodes.VSGWTenant:
+ tosca.nodes.VSGWCTenant:
derived_from: tosca.nodes.Root
description: >
- VSGW Tenant
+ VSGWC Tenant
properties:
xos_base_tenant_props
tenant_message:
diff --git a/xos/tosca/custom_types/vsgw.yaml b/xos/tosca/custom_types/vsgwc.yaml
similarity index 94%
rename from xos/tosca/custom_types/vsgw.yaml
rename to xos/tosca/custom_types/vsgwc.yaml
index c4da998..bedc21f 100644
--- a/xos/tosca/custom_types/vsgw.yaml
+++ b/xos/tosca/custom_types/vsgwc.yaml
@@ -1,6 +1,6 @@
tosca_definitions_version: tosca_simple_yaml_1_0
-# compile this with "m4 vbbu.m4 > vsgw.yaml"
+# compile this with "m4 vsgwc.m4 > vsgwc.yaml"
# include macros
# Note: Tosca derived_from isn't working the way I think it should, it's not
@@ -21,10 +21,10 @@
node_types:
- tosca.nodes.VSGWService:
+ tosca.nodes.VSGWCService:
derived_from: tosca.nodes.Root
description: >
- VSGW Service
+ VSGWC Service
capabilities:
scalable:
type: tosca.capabilities.Scalable
@@ -79,10 +79,10 @@
required: false
description: Version number of Service.
- tosca.nodes.VSGWTenant:
+ tosca.nodes.VSGWCTenant:
derived_from: tosca.nodes.Root
description: >
- VSGW Tenant
+ VSGWC Tenant
properties:
kind:
type: string
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"]
-