X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fvnfd%2Fpong_vnf%2Fpong_vnfd.yaml;h=fb7c53c89d7379269b83ff1903a646688ba8df9d;hb=98842180600f3ce00eef4ddf4614a013f5feffc4;hp=9f9a8ff9a7c23488762ca61cd07bc64096c98455;hpb=9b9904dc99740fd51e98678a9e1eb6208b985dc1;p=osm%2Fdevops.git diff --git a/src/vnfd/pong_vnf/pong_vnfd.yaml b/src/vnfd/pong_vnf/pong_vnfd.yaml index 9f9a8ff9..fb7c53c8 100644 --- a/src/vnfd/pong_vnf/pong_vnfd.yaml +++ b/src/vnfd/pong_vnf/pong_vnfd.yaml @@ -16,58 +16,42 @@ # vnfd:vnfd-catalog: - vnfd: - - connection-point: + vnfd: + - id: rift_pong_vnf + name: pong_vnf + short-name: pong_vnf + logo: rift_logo.png + vendor: RIFT.io + version: '1.0' + description: This is an example RIFT.ware VNF + connection-point: - name: pong_vnfd/cp0 type: VPORT - name: pong_vnfd/cp1 type: VPORT - description: This is an example RIFT.ware VNF http-endpoint: - path: api/v1/pong/stats polling_interval_secs: '2' port: '18889' - id: 875b30d0-8b99-11e6-9664-02b76030c497 - logo: rift_logo.png mgmt-interface: dashboard-params: path: api/v1/pong/stats port: '18889' port: '18889' vdu-id: iovdu_0 - monitoring-param: - - description: no of ping requests - group-tag: Group1 - http-endpoint-ref: api/v1/pong/stats - id: '1' - json-query-method: NAMEKEY - name: ping-request-rx-count - units: packets - value-type: INT - widget-type: COUNTER - - description: no of ping responses - group-tag: Group1 - http-endpoint-ref: api/v1/pong/stats - id: '2' - json-query-method: NAMEKEY - name: ping-response-tx-count - units: packets - value-type: INT - widget-type: COUNTER - name: pong_vnfd placement-groups: - member-vdus: - member-vdu-ref: iovdu_0 name: Weywot requirement: Place this VM on the Kuiper belt object Weywot strategy: COLOCATION - short-name: pong_vnfd vdu: - - count: '1' + - cloud-init-file: pong_cloud_init.cfg + count: '1' external-interface: - name: eth0 virtual-interface: - type: OM-MGMT + type: VIRTIO vnfd-connection-point-ref: pong_vnfd/cp0 - name: eth1 virtual-interface: @@ -81,26 +65,51 @@ vnfd:vnfd-catalog: memory-mb: '512' storage-gb: '4' vcpu-count: '1' - vendor: RIFT.io - version: '1.0' vnf-configuration: config-attributes: - config-delay: '60' - config-priority: '1' - config-template: "\n#!/bin/bash\n\n# Rest API configuration\npong_mgmt_ip=''\n\ - pong_mgmt_port=18889\n# username=\n# password=\n\ - \n# VNF specific configuration\npong_server_ip=''\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" - script: - script-type: bash + config-delay: 10 + service-primitive: + - name: start + - name: stop + - name: restart + - name: config + parameter: + - data-type: STRING + default-value: + 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: + - name: ssh-username + value: fedora + - name: ssh-password + value: fedora + - name: mode + value: pong + seq: '1' + - name: start + seq: '2' + juju: + charm: pingpong