Bug 262 fixed
[osm/devops.git] / src / vnfd / pong_vnf / pong_vnfd.yaml
index 6b2641d..b6bc9a1 100644 (file)
 #
 
 vnfd:vnfd-catalog:
-    vnfd:vnfd:
-    -   vnfd:connection-point:
-        -   vnfd:name: pong_vnfd/cp0
-            vnfd:type: VPORT
-        -   vnfd:name: pong_vnfd/cp1
-            vnfd:type: VPORT
-        vnfd:description: This is an example RIFT.ware VNF
-        vnfd:http-endpoint:
-        -   vnfd:path: api/v1/pong/stats
-            vnfd:polling_interval_secs: '2'
-            vnfd:port: '18889'
-        vnfd:id: 875b30d0-8b99-11e6-9664-02b76030c497
-        vnfd:logo: rift_logo.png
-        vnfd:mgmt-interface:
-            vnfd:dashboard-params:
-                vnfd:path: api/v1/pong/stats
-                vnfd:port: '18889'
-            vnfd:port: '18889'
-            vnfd:vdu-id: iovdu_0
-        vnfd:monitoring-param:
-        -   vnfd:description: no of ping requests
-            vnfd:group-tag: Group1
-            vnfd:http-endpoint-ref: api/v1/pong/stats
-            vnfd:id: '1'
-            vnfd:json-query-method: NAMEKEY
-            vnfd:name: ping-request-rx-count
-            vnfd:units: packets
-            vnfd:value-type: INT
-            vnfd:widget-type: COUNTER
-        -   vnfd:description: no of ping responses
-            vnfd:group-tag: Group1
-            vnfd:http-endpoint-ref: api/v1/pong/stats
-            vnfd:id: '2'
-            vnfd:json-query-method: NAMEKEY
-            vnfd:name: ping-response-tx-count
-            vnfd:units: packets
-            vnfd:value-type: INT
-            vnfd:widget-type: COUNTER
-        vnfd:name: pong_vnfd
-        vnfd:placement-groups:
-        -   vnfd:member-vdus:
-            -   vnfd:member-vdu-ref: iovdu_0
-            vnfd:name: Weywot
-            vnfd:requirement: Place this VM on the Kuiper belt object Weywot
-            vnfd:strategy: COLOCATION
-        vnfd:short-name: pong_vnfd
-        vnfd:vdu:
-        -   vnfd:count: '1'
-            vnfd:external-interface:
-            -   vnfd:name: eth0
-                vnfd:virtual-interface:
-                    vnfd:type: OM-MGMT
-                vnfd:vnfd-connection-point-ref: pong_vnfd/cp0
-            -   vnfd:name: eth1
-                vnfd:virtual-interface:
-                    vnfd:type: VIRTIO
-                vnfd:vnfd-connection-point-ref: pong_vnfd/cp1
-            vnfd:id: iovdu_0
-            vnfd:image: Fedora-x86_64-20-20131211.1-sda-pong.qcow2
-            vnfd:image-checksum: 977484d95575f80ef8399c9cf1d45ebd
-            vnfd:name: iovdu_0
-            vnfd:vm-flavor:
-                vnfd:memory-mb: '512'
-                vnfd:storage-gb: '4'
-                vnfd:vcpu-count: '1'
-        vnfd:vendor: RIFT.io
-        vnfd:version: '1.0'
-        vnfd:vnf-configuration:
-            vnfd:config-attributes:
-                vnfd:config-delay: '60'
-                vnfd:config-priority: '1'
-            vnfd:config-template: "\n#!/bin/bash\n\n# Rest API configuration\npong_mgmt_ip='<rw_mgmt_ip>'\n\
-                pong_mgmt_port=18889\n# username=<rw_username>\n# password=<rw_password>\n\
-                \n# VNF specific configuration\npong_server_ip='<rw_connection_point_name\
-                \ pong_vnfd/cp0>'\nserver_port=5555\n\n# Make Rest API calls to configure\
-                \ VNF\ncurl -D /dev/stdout \\\n    -H \"Accept: application/vnd.yang.data+xml\"\
-                \ \\\n    -H \"Content-Type: application/vnd.yang.data+json\" \\\n\
-                \    -X POST \\\n    -d \"{\\\"ip\\\":\\\"$pong_server_ip\\\", \\\"\
-                port\\\":$server_port}\" \\\n    http://${pong_mgmt_ip}:${pong_mgmt_port}/api/v1/pong/server\n\
-                rc=$?\nif [ $rc -ne 0 ]\nthen\n    echo \"Failed to set server(own)\
-                \ info for pong!\"\n    exit $rc\nfi\n\n\ncurl -D /dev/stdout \\\n\
-                \    -H \"Accept: application/vnd.yang.data+xml\" \\\n    -H \"Content-Type:\
-                \ application/vnd.yang.data+json\" \\\n    -X POST \\\n    -d \"{\\\
-                \"enable\\\":true}\" \\\n    http://${pong_mgmt_ip}:${pong_mgmt_port}/api/v1/pong/adminstatus/state\n\
-                rc=$?\nif [ $rc -ne 0 ]\nthen\n    echo \"Failed to enable pong service!\"\
-                \n    exit $rc\nfi\n\nexit 0\n"
-            vnfd:script:
-                vnfd:script-type: bash
+    vnfd:
+     -  id: rift_pong_vnf
+        name: pong_vnf
+        short-name: pong_vnf
+        logo: rift_logo.png
+        vendor: RIFT.io
+        version: '1.1'
+        description: This is an example RIFT.ware VNF
+        connection-point:
+        -   name: pong_vnfd/cp0
+            type: VPORT
+        -   name: pong_vnfd/cp1
+            type: VPORT
+        http-endpoint:
+        -   path: api/v1/pong/stats
+            polling_interval_secs: '2'
+            port: '18889'
+        mgmt-interface:
+            dashboard-params:
+                path: api/v1/pong/stats
+                port: '18889'
+            port: '18889'
+            vdu-id: iovdu_0
+        placement-groups:
+        -   member-vdus:
+            -   member-vdu-ref: iovdu_0
+            name: Weywot
+            requirement: Place this VM on the Kuiper belt object Weywot
+            strategy: COLOCATION
+        vdu:
+        -   cloud-init-file: pong_cloud_init.cfg
+            count: '1'
+            external-interface:
+            -   name: eth0
+                virtual-interface:
+                    type: VIRTIO
+                vnfd-connection-point-ref: pong_vnfd/cp0
+            -   name: eth1
+                virtual-interface:
+                    type: VIRTIO
+                vnfd-connection-point-ref: pong_vnfd/cp1
+            id: iovdu_0
+            image: Fedora-x86_64-20-20131211.1-sda-pong.qcow2
+            name: iovdu_0
+            vm-flavor:
+                memory-mb: '512'
+                storage-gb: '4'
+                vcpu-count: '1'
+        vnf-configuration:
+            config-attributes:
+                config-delay: 10
+            service-primitive:
+            -   name: start
+            -   name: stop
+            -   name: restart
+            -   name: config
+                parameter:
+                -   data-type: STRING
+                    default-value: <rw_mgmt_ip>
+                    name: ssh-hostname
+                -   data-type: STRING
+                    default-value: fedora
+                    name: ssh-username
+                -   data-type: STRING
+                    default-value: fedora
+                    name: ssh-password
+                -   data-type: STRING
+                    name: ssh-private-key
+                -   data-type: STRING
+                    default-value: pong
+                    name: mode
+                    read-only: 'true'
+            -   name: set-server
+                parameter:
+                -   data-type: STRING
+                    name: server-ip
+                -   data-type: INTEGER
+                    name: server-port
+            -   name: start-traffic
+            -   name: stop-traffic
+            initial-config-primitive:
+            -   name: config
+                parameter:
+                -   name: ssh-hostname
+                    value: <rw_mgmt_ip>
+                -   name: ssh-username
+                    value: fedora
+                -   name: ssh-password
+                    value: fedora
+                -   name: mode
+                    value: pong
+                seq: '1'
+            -   name: start
+                seq: '2'
+            juju:
+                charm: pingpong