add fabric service; rename services
diff --git a/xos/configurations/cord-pod/cord-vtn-vsg.yaml b/xos/configurations/cord-pod/cord-vtn-vsg.yaml
index 7de536a..f521fe7 100644
--- a/xos/configurations/cord-pod/cord-vtn-vsg.yaml
+++ b/xos/configurations/cord-pod/cord-vtn-vsg.yaml
@@ -8,17 +8,17 @@
topology_template:
node_templates:
# CORD Services
- service_vtr:
+ service#vtr:
type: tosca.nodes.Service
properties:
view_url: /admin/vtr/vtrservice/$id$/
kind: vTR
- service_volt:
+ service#volt:
type: tosca.nodes.Service
requirements:
- vsg_tenant:
- node: service_vsg
+ node: service#vsg
relationship: tosca.relationships.TenantOfService
properties:
view_url: /admin/cord/voltservice/$id$/
@@ -38,11 +38,11 @@
gateway_ip: 10.168.1.1
gateway_mac: 02:42:0a:a8:00:01
- service_vsg:
+ service#vsg:
type: tosca.nodes.VSGService
requirements:
- vrouter_tenant:
- node: service_vrouter
+ node: service#vrouter
relationship: tosca.relationships.TenantOfService
properties:
view_url: /admin/cord/vsgservice/$id$/
@@ -53,7 +53,7 @@
artifacts:
pubkey: /opt/xos/synchronizers/vcpe/vcpe_public_key
- service_vrouter:
+ service#vrouter:
type: tosca.nodes.VRouterService
properties:
view_url: /admin/vrouter/vrouterservice/$id$/
@@ -65,6 +65,11 @@
node: addresses_exampleservice-public
relationship: tosca.relationships.ProvidesAddresses
+ service#fabric:
+ type: tosca.nodes.FabricService
+ properties:
+ view_url: /admin/fabric/fabricservice/$id$/
+
Private:
type: tosca.nodes.NetworkTemplate
@@ -105,7 +110,7 @@
network: noauto
requirements:
- vsg_service:
- node: service_vsg
+ node: service#vsg
relationship: tosca.relationships.MemberOfService
- site:
node: mysite
@@ -188,7 +193,7 @@
c_tag: 111
requirements:
- provider_service:
- node: service_volt
+ node: service#volt
relationship: tosca.relationships.MemberOfService
- subscriber:
node: My House
diff --git a/xos/tosca/resources/xosresource.py b/xos/tosca/resources/xosresource.py
index e70cfa9..82514c9 100644
--- a/xos/tosca/resources/xosresource.py
+++ b/xos/tosca/resources/xosresource.py
@@ -78,6 +78,11 @@
return default
def get_xos_object(self, cls, throw_exception=True, **kwargs):
+ # do the same parsing that we do for objname
+ for (k,v) in kwargs.items():
+ if (k=="name") and ("#" in v):
+ kwargs[k] = v.split("#",1)[1]
+
objs = cls.objects.filter(**kwargs)
if not objs:
if throw_exception: