1 tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
8 tosca.datatypes.network.riftio.vnf_configuration:
28 tosca.capabilities.riftio.mgmt_interface_type:
29 derived_from: tosca.capabilities.Endpoint
35 tosca.capabilities.riftio.http_endpoint_type:
36 derived_from: tosca.capabilities.Endpoint
42 tosca.capabilities.riftio.monitoring_param:
43 derived_from: tosca.capabilities.nfv.Metric
68 tosca.nodes.riftio.CP1:
69 derived_from: tosca.nodes.nfv.CP
72 description: Type of the connection point
75 description: Name of the connection point
78 description: Name of the interface on VDU
81 description: Type of the interface on VDU
83 tosca.nodes.riftio.VL1:
84 derived_from: tosca.nodes.nfv.VL.ELAN
88 tosca.nodes.riftio.VNF1:
89 derived_from: tosca.nodes.nfv.VNF
93 - in_range: [1, 65535]
99 type: tosca.datatypes.network.riftio.vnf_configuration
102 type: tosca.capabilities.riftio.http_endpoint_type
104 type: tosca.capabilities.riftio.mgmt_interface_type
106 type: tosca.capabilities.riftio.monitoring_param
108 type: tosca.capabilities.riftio.monitoring_param
111 node: tosca.nodes.riftio.VDU1
112 occurences: [1, UNBOUND]
113 relationship: tosca.relationships.nfv.VirtualLinksTo
114 type: tosca.capabilities.nfv.VirtualLinkable
115 tosca.nodes.riftio.VDU1:
116 derived_from: tosca.nodes.nfv.VDU
119 default: #cloud-config
126 type: tosca.capabilities.nfv.VirtualLinkable
128 tosca.groups.riftio.ConfigPrimitives:
129 derived_from: tosca.policies.Root
133 tosca.policies.riftio.InitialConfigPrimitive:
134 derived_from: tosca.policies.Root
144 tosca.policies.riftio.ScalingGroup:
145 derived_from: tosca.policies.Root
159 - scaling_group_descriptor:
161 post_scale_out: ping config
162 max_instance_count: 10
163 min_instance_count: 1
165 type: tosca.policies.riftio.ScalingGroup
168 - initial_config_primitive:
171 type: tosca.policies.riftio.InitialConfigPrimitive
172 user_defined_script: start_traffic.py
175 type: tosca.groups.riftio.ConfigPrimitives
182 user_defined_script: ping_config.py
186 description: Translated from YANG
189 type: tosca.nodes.riftio.VNF1
193 start_by_default: false
201 config_template: "\n#!/bin/bash\n\n# Rest API config\nping_mgmt_ip=<rw_mgmt_ip>\n\
202 ping_mgmt_port=18888\n\n# VNF specific configuration\npong_server_ip=<rw_connection_point_name\
203 \ pong_vnfd/cp0>\nping_rate=5\nserver_port=5555\n\n# Make rest API calls\
204 \ to configure VNF\ncurl -D /dev/stdout \\\n -H \"Accept: application/vnd.yang.data+xml\"\
205 \ \\\n -H \"Content-Type: application/vnd.yang.data+json\" \\\n \
206 \ -X POST \\\n -d \"{\\\"ip\\\":\\\"$pong_server_ip\\\", \\\"port\\\
207 \":$server_port}\" \\\n http://${ping_mgmt_ip}:${ping_mgmt_port}/api/v1/ping/server\n\
208 rc=$?\nif [ $rc -ne 0 ]\nthen\n echo \"Failed to set server info for\
209 \ ping!\"\n exit $rc\nfi\n\ncurl -D /dev/stdout \\\n -H \"Accept:\
210 \ application/vnd.yang.data+xml\" \\\n -H \"Content-Type: application/vnd.yang.data+json\"\
211 \ \\\n -X POST \\\n -d \"{\\\"rate\\\":$ping_rate}\" \\\n http://${ping_mgmt_ip}:${ping_mgmt_port}/api/v1/ping/rate\n\
212 rc=$?\nif [ $rc -ne 0 ]\nthen\n echo \"Failed to set ping rate!\"\n\
213 \ exit $rc\nfi\n\nexit 0\n"
218 path: api/v1/ping/stats
225 path: api/v1/ping/stats
229 vdu: ping_vnfd_iovdu_0
232 description: no of ping requests
234 http_endpoint_ref: api/v1/ping/stats
236 json_query_method: NAMEKEY
237 name: ping-request-tx-count
243 description: no of ping responses
245 http_endpoint_ref: api/v1/ping/stats
247 json_query_method: NAMEKEY
248 name: ping-response-rx-count
254 node: ping_vnfd_iovdu_0
256 type: tosca.nodes.riftio.VDU1
258 cloud_init: "#cloud-config\npassword: fedora\nchpasswd: { expire: False }\n\
259 ssh_pwauth: True\nruncmd:\n - [ systemctl, daemon-reload ]\n - [ systemctl,\
260 \ enable, pong.service ]\n - [ systemctl, start, --no-block, pong.service\
261 \ ]\n - [ ifup, eth1 ]\n"
270 pong_vnfd_iovdu_0_vm_image:
271 file: ../images/Fedora-x86_64-20-20131211.1-sda-pong.qcow2
272 image_checksum: 1234567890abcdefg
273 type: tosca.artifacts.Deployment.Image.riftio.QCOW2
276 create: pong_vnfd_iovdu_0_vm_image
278 type: tosca.nodes.riftio.CP1
283 vdu_intf_type: VIRTIO
286 node: pong_vnfd_iovdu_0
290 type: tosca.nodes.riftio.VL1
295 type: tosca.nodes.riftio.CP1
300 vdu_intf_type: VIRTIO
303 node: ping_vnfd_iovdu_0
307 type: tosca.nodes.riftio.VNF1
318 config_template: "\n#!/bin/bash\n\n# Rest API configuration\npong_mgmt_ip=<rw_mgmt_ip>\n\
319 pong_mgmt_port=18889\n# username=<rw_username>\n# password=<rw_password>\n\
320 \n# VNF specific configuration\npong_server_ip=<rw_connection_point_name\
321 \ pong_vnfd/cp0>\nserver_port=5555\n\n# Make Rest API calls to configure\
322 \ VNF\ncurl -D /dev/stdout \\\n -H \"Accept: application/vnd.yang.data+xml\"\
323 \ \\\n -H \"Content-Type: application/vnd.yang.data+json\" \\\n \
324 \ -X POST \\\n -d \"{\\\"ip\\\":\\\"$pong_server_ip\\\", \\\"port\\\
325 \":$server_port}\" \\\n http://${pong_mgmt_ip}:${pong_mgmt_port}/api/v1/pong/server\n\
326 rc=$?\nif [ $rc -ne 0 ]\nthen\n echo \"Failed to set server(own) info\
327 \ for pong!\"\n exit $rc\nfi\n\nexit 0\n"
332 path: api/v1/pong/stats
339 path: api/v1/pong/stats
343 vdu: pong_vnfd_iovdu_0
346 description: no of ping requests
348 http_endpoint_ref: api/v1/pong/stats
350 json_query_method: NAMEKEY
351 name: ping-request-rx-count
357 description: no of ping responses
359 http_endpoint_ref: api/v1/pong/stats
361 json_query_method: NAMEKEY
362 name: ping-response-tx-count
368 node: pong_vnfd_iovdu_0
370 type: tosca.nodes.riftio.VDU1
372 cloud_init: "#cloud-config\npassword: fedora\nchpasswd: { expire: False }\n\
373 ssh_pwauth: True\nruncmd:\n - [ systemctl, daemon-reload ]\n - [ systemctl,\
374 \ enable, ping.service ]\n - [ systemctl, start, --no-block, ping.service\
375 \ ]\n - [ ifup, eth1 ]\n"
384 ping_vnfd_iovdu_0_vm_image:
385 file: ../images/Fedora-x86_64-20-20131211.1-sda-ping.qcow2
386 image_checksum: 1234567890abcdefg
387 type: tosca.artifacts.Deployment.Image.riftio.QCOW2
390 create: ping_vnfd_iovdu_0_vm_image