1 tosca_definitions_version: tosca_simple_profile_for_nfv_1_0
2 description: This is an example RIFT.ware VNF
10 tosca.nodes.nfv.riftio.pingvnfdVNF:
11 derived_from: tosca.nodes.nfv.riftio.VNF1
14 type: tosca.nodes.nfv.VL
24 config_template: "\n#!/bin/bash\n\n# Rest API config\nping_mgmt_ip=<rw_mgmt_ip>\n\
25 ping_mgmt_port=18888\n\n# VNF specific configuration\npong_server_ip=<rw_connection_point_name\
26 \ pong_vnfd/cp0>\nping_rate=5\nserver_port=5555\n\n# Make rest API calls\
27 \ to configure VNF\ncurl -D /dev/null \\\n -H \"Accept: application/vnd.yang.data+xml\"\
28 \ \\\n -H \"Content-Type: application/vnd.yang.data+json\" \\\n \
29 \ -X POST \\\n -d \"{\\\"ip\\\":\\\"$pong_server_ip\\\", \\\"port\\\
30 \":$server_port}\" \\\n http://${ping_mgmt_ip}:${ping_mgmt_port}/api/v1/ping/server\n\
31 rc=$?\nif [ $rc -ne 0 ]\nthen\n echo \"Failed to set server info for\
32 \ ping!\"\n exit $rc\nfi\nexit 0\n"
34 initial_config_primitive:
39 user_defined_script: ping_set_rate.py
40 targets: [ping_vnfd_iovdu_0]
41 type: tosca.policies.nfv.riftio.vnf_configuration
42 substitution_mappings:
43 node_type: tosca.nodes.nfv.riftio.pingvnfdVNF
45 - virtualLink1: [ping_vnfd_cp0, virtualLink]
48 type: tosca.nodes.nfv.riftio.VDU1
50 cloud_init: "#cloud-config\npassword: fedora\nchpasswd: { expire: False }\n\
51 ssh_pwauth: True\nruncmd:\n - [ systemctl, daemon-reload ]\n - [ systemctl,\
52 \ enable, ping.service ]\n - [ systemctl, start, --no-block, ping.service\
53 \ ]\n - [ ifup, eth1 ]\n"
63 path: api/v1/ping/stats
69 description: no of ping requests
70 json_query_method: namekey
71 name: ping-request-tx-count
76 url_path: api/v1/ping/stats
79 description: no of ping responses
80 json_query_method: namekey
81 name: ping-response-rx-count
86 url_path: api/v1/ping/stats
90 cpu_affinity: dedicated
91 thread_allocation: prefer
113 ovs_acceleration: DISABLED
114 ovs_offload: DISABLED
116 ping_vnfd_iovdu_0_vm_image:
117 file: ../images/Fedora-x86_64-20-20131211.1-sda-ping.qcow2
118 image_checksum: a6ffaa77f949a9e4ebb082c6147187cf
119 type: tosca.artifacts.Deployment.Image.riftio.QCOW2
122 create: ping_vnfd_iovdu_0_vm_image
124 type: tosca.nodes.nfv.riftio.CP1
129 vdu_intf_type: VIRTIO
132 node: ping_vnfd_iovdu_0