Create a single public network that all services (other than vSG) can connect to
Change-Id: Iae168b9f1676b7921175c3b38b7608b1fb6cf418
diff --git a/cord-pod/Makefile b/cord-pod/Makefile
index a4f03ac..39cc565 100644
--- a/cord-pod/Makefile
+++ b/cord-pod/Makefile
@@ -75,6 +75,7 @@
cord: $(CONFIG_DIR)/images/vsg-1.1.img
$(RUN_TOSCA) $(COMMON_DIR)/tosca/mgmt-net.yaml
$(RUN_TOSCA) cord-services.yaml
+ $(RUN_TOSCA) public-net.yaml
$(RUN_TOSCA) $(COMMON_DIR)/tosca/cord-volt-devices.yaml
cord-subscriber:
diff --git a/cord-pod/cord-services.yaml b/cord-pod/cord-services.yaml
index 6980868..324bd2a 100644
--- a/cord-pod/cord-services.yaml
+++ b/cord-pod/cord-services.yaml
@@ -37,7 +37,7 @@
gateway_ip: 10.6.1.129
gateway_mac: 02:42:0a:06:01:01
- addresses_exampleservice-public:
+ addresses_public:
type: tosca.nodes.AddressPool
properties:
addresses: 10.6.1.192/26
@@ -69,8 +69,8 @@
- addresses_vsg:
node: addresses_vsg
relationship: tosca.relationships.ProvidesAddresses
- - addresses_service1:
- node: addresses_exampleservice-public
+ - addresses_public:
+ node: addresses_public
relationship: tosca.relationships.ProvidesAddresses
diff --git a/cord-pod/pod-exampleservice.yaml b/cord-pod/pod-exampleservice.yaml
index 77e4c4a..4102127 100644
--- a/cord-pod/pod-exampleservice.yaml
+++ b/cord-pod/pod-exampleservice.yaml
@@ -22,6 +22,13 @@
no-delete: true
no-update: true
+ public:
+ type: tosca.nodes.network.Network.XOS
+ properties:
+ no-create: true
+ no-delete: true
+ no-update: true
+
service#vrouter:
type: tosca.nodes.Service
properties:
@@ -29,31 +36,6 @@
no-delete: true
no-update: true
- template#private_wan:
- type: tosca.nodes.NetworkTemplate
- properties:
- visibility: private
- translation: none
- vtn_kind: public
-
- exampleservice-public:
- type: tosca.nodes.network.Network
- properties:
- ip_version: 4
- requirements:
- - network_template:
- node: template#private_wan
- relationship: tosca.relationships.UsesNetworkTemplate
- - owner:
- node: mysite_exampleservice
- relationship: tosca.relationships.MemberOfSlice
- - connection:
- node: mysite_exampleservice
- relationship: tosca.relationships.ConnectsToSlice
- - vrouter_tenant:
- node: service#vrouter
- relationship: tosca.relationships.TenantOfService
-
mysite:
type: tosca.nodes.Site
@@ -72,6 +54,9 @@
- management:
node: management
relationship: tosca.relationships.ConnectsToNetwork
+ - public:
+ node: public
+ relationship: tosca.relationships.ConnectsToNetwork
- exmapleserver:
node: service#exampleservice
relationship: tosca.relationships.MemberOfService
diff --git a/cord-pod/public-net.yaml b/cord-pod/public-net.yaml
new file mode 100644
index 0000000..c241fc0
--- /dev/null
+++ b/cord-pod/public-net.yaml
@@ -0,0 +1,46 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Set up public network for CORD POD
+imports:
+ - custom_types/xos.yaml
+
+topology_template:
+ node_templates:
+
+ service#vrouter:
+ type: tosca.nodes.VRouterService
+
+ public_template:
+ type: tosca.nodes.NetworkTemplate
+ properties:
+ visibility: private
+ translation: none
+ vtn_kind: PUBLIC
+
+ public:
+ type: tosca.nodes.network.Network
+ properties:
+ ip_version: 4
+ requirements:
+ - network_template:
+ node: public_template
+ relationship: tosca.relationships.UsesNetworkTemplate
+ - owner:
+ node: mysite_public
+ relationship: tosca.relationships.MemberOfSlice
+ - vrouter_tenant:
+ node: service#vrouter
+ relationship: tosca.relationships.TenantOfService
+
+ mysite:
+ type: tosca.nodes.Site
+
+ mysite_public:
+ description: This slice exists solely to own the public network
+ type: tosca.nodes.Slice
+ properties:
+ network: noauto
+ requirements:
+ - site:
+ node: mysite
+ relationship: tosca.relationships.MemberOfSite