update to order interfaces
authorMike Marchetti <mmarchetti@sandvine.com>
Mon, 8 May 2017 15:05:49 +0000 (11:05 -0400)
committerMike Marchetti <mmarchetti@sandvine.com>
Mon, 8 May 2017 15:05:49 +0000 (11:05 -0400)
- order interfaces so mgmt is first interface
- utilize cloud-init for initial interface configuration

Signed-off-by: Mike Marchetti <mmarchetti@sandvine.com>
src/nsd/sandvine_pts_ns/pts_nsd.yaml
src/vnfd/sandvine_pts_vnf/cloud_init/cloud_init.cfg [new file with mode: 0644]
src/vnfd/sandvine_pts_vnf/pts_vnfd.yaml

index 9aa00a3..c913222 100644 (file)
@@ -28,25 +28,25 @@ nsd:nsd-catalog:
             nsd:vnfd-id-ref: id_pts_vnf
         nsd:vld:
         -   nsd:id: mgmt-connection-id
-            nsd:name: mgmt connection
+            nsd:name: control
             nsd:vnfd-connection-point-ref:
             -   nsd:member-vnf-index-ref: '1'
                 nsd:vnfd-connection-point-ref: mgmt0
                 nsd:vnfd-id-ref: id_pts_vnf
         -   nsd:id: sub-connection-id
-            nsd:name: subscriber connection
+            nsd:name: subscriber
             nsd:vnfd-connection-point-ref:
             -   nsd:member-vnf-index-ref: '1'
                 nsd:vnfd-connection-point-ref: subscriber-cp
                 nsd:vnfd-id-ref: id_pts_vnf
         -   nsd:id: int-connection-id
-            nsd:name: internet connection
+            nsd:name: internet
             nsd:vnfd-connection-point-ref:
             -   nsd:member-vnf-index-ref: '1'
                 nsd:vnfd-connection-point-ref: internet-cp
                 nsd:vnfd-id-ref: id_pts_vnf
         -   nsd:id: service-connection-id 
-            nsd:name: service connection
+            nsd:name: service
             nsd:vnfd-connection-point-ref:
             -   nsd:member-vnf-index-ref: '1'
                 nsd:vnfd-connection-point-ref: service-cp
diff --git a/src/vnfd/sandvine_pts_vnf/cloud_init/cloud_init.cfg b/src/vnfd/sandvine_pts_vnf/cloud_init/cloud_init.cfg
new file mode 100644 (file)
index 0000000..fd756af
--- /dev/null
@@ -0,0 +1,22 @@
+#cloud-config
+
+write_files: 
+- path: /tmp/policy.conf
+  content: |
+    if true then count and count demographic
+
+- path: /tmp/cli_config.txt
+  content: | 
+    # written from osm cloud-init
+    SetPort fastpath 1-3 2
+    SetPort fastpath 1-4 3
+    SetPortRoleFunction 1-3 subscriber
+    SetPortRoleFunction 1-4 internet 
+    SetPortBridgeGroup 1-3 1
+    SetPortBridgeGroup 1-4 1
+    SetPortEnable 1-3
+    SetPortEnable 1-4
+
+runcmd:
+    - cat /tmp/cli_config.txt >> /usr/local/sandvine/etc/rc.conf
+    - cp /tmp/policy.conf /usr/local/sandvine/etc/policy.conf
index d22b71c..5807ac7 100644 (file)
@@ -30,33 +30,33 @@ vnfd:vnfd-catalog:
         vnfd:logo: sandvine_logo.png
         vnfd:mgmt-interface:
           vnfd:vdu-id: iovdu_0
-        vnfd:name: Policy Traffic Switch
+        vnfd:name: sandvine_pts
         vnfd:service-function-chain: UNAWARE
         vnfd:short-name: pts
         vnfd:vdu:
         -   vnfd:external-interface:
-            -   vnfd:name: mgmt0
+            -   vnfd:name: a-mgmt0
                 vnfd:virtual-interface:
                     vnfd:type: OM-MGMT
                 vnfd:vnfd-connection-point-ref: mgmt0
-            -   vnfd:name: subscriber-cp
+            -   vnfd:name: b-subscriber-cp
                 vnfd:virtual-interface:
                     vnfd:type: VIRTIO
                 vnfd:vnfd-connection-point-ref: subscriber-cp
-            -   vnfd:name: internet-cp
+            -   vnfd:name: c-internet-cp
                 vnfd:virtual-interface:
                     vnfd:type: VIRTIO
                 vnfd:vnfd-connection-point-ref: internet-cp
-            -   vnfd:name: service-cp
+            -   vnfd:name: d-service-cp
                 vnfd:virtual-interface:
                     vnfd:type: VIRTIO
                 vnfd:vnfd-connection-point-ref: service-cp
             vnfd:id: iovdu_0
             vnfd:guest-epa:
                 vnfd:cpu-pinning-policy: ANY
-            vnfd:image: PTS_7.40.00-0309_x86_64_el7
-            vnfd:image-checksum: 70d8007f31f5f93f79bcc78b03b5cf28
+            vnfd:image: PTS_7.40.02
             vnfd:name: vdu-1
+            vnfd:cloud-init-file: cloud_init.cfg
             vnfd:vm-flavor:
                 vnfd:memory-mb: '5120'
                 vnfd:storage-gb: '5'