SOL006 patch for POL
[osm/POL.git] / osm_policy_module / tests / unit / utils / examples / cirros_vdu_scaling_vnfd.yaml
diff --git a/osm_policy_module/tests/unit/utils/examples/cirros_vdu_scaling_vnfd.yaml b/osm_policy_module/tests/unit/utils/examples/cirros_vdu_scaling_vnfd.yaml
new file mode 100644 (file)
index 0000000..f924d3e
--- /dev/null
@@ -0,0 +1,109 @@
+# -*- coding: utf-8 -*-
+# pylint: disable=no-member
+
+# Copyright 2020 Whitestack, LLC
+# *************************************************************
+
+# This file is part of OSM Monitoring module
+# All Rights Reserved to Whitestack, LLC
+
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+
+#         http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+# For those usages not covered by the Apache License, Version 2.0 please
+# contact: agarcia@whitestack.com
+##
+
+vnfd:
+  id: cirros_vdu_scaling_vnf
+  product-name: cirros_vdu_scaling_vnf
+  description: Simple VNF example with a cirros and a scaling group descriptor
+  provider: OSM
+  version: '1.0'
+  mgmt-cp: eth0-ext
+
+  ext-cpd:
+  - id: eth0-ext
+    int-cpd:
+      cpd: eth0-int
+      vdu-id: cirros_vnfd-VM
+
+  df:
+  - id: default-df
+    instantiation-level:
+    - id: default-instantiation-level
+      vdu-level:
+      - number-of-instances: 1
+        vdu-id: cirros_vnfd-VM
+    scaling-aspect:
+    - id: scale_cirros_vnfd-VM
+      name: scale_cirros_vnfd-VM
+      aspect-delta-details:
+        deltas:
+        - id: scale_cirros_vnfd-VM-delta
+          vdu-delta:
+          - id: cirros_vnfd-VM
+            number-of-instances: 1
+      max-scale-level: 10
+      scaling-policy:
+      - name: auto_cpu_util_above_threshold
+        cooldown-time: 60
+        scaling-criteria:
+        - name: group1_cpu_util_above_threshold
+          scale-in-relational-operation: LT
+          scale-in-threshold: 20
+          scale-out-relational-operation: GT
+          scale-out-threshold: 80
+          vnf-monitoring-param-ref: cirros_vnf_cpu_util
+        scaling-type: automatic
+        threshold-time: 10
+    vdu-profile:
+    - id: cirros_vnfd-VM
+      max-number-of-instances: 10
+      min-number-of-instances: 1
+
+  vdu:
+  - id: cirros_vnfd-VM
+    name: cirros_vnfd-VM
+    description: cirros_vnfd-VM
+    int-cpd:
+    - id: eth0-int
+      virtual-network-interface-requirement:
+      - name: eth0
+        virtual-interface:
+          bandwidth: '0'
+          type: VIRTIO
+          vpci: 0000:00:0a.0
+    monitoring-parameter:
+    - id: cirros_vnf_cpu_util
+      name: cirros_vnf_cpu_util
+      performance-metric: cpu_utilization
+    sw-image-desc: cirros034
+    virtual-compute-desc: cirros_vnfd-VM-compute
+    virtual-storage-desc:
+    - cirros_vnfd-VM-storage
+
+  sw-image-desc:
+  - id: cirros034
+    name: cirros034
+    image: cirros034
+
+  virtual-compute-desc:
+  - id: cirros_vnfd-VM-compute
+    virtual-cpu:
+      num-virtual-cpu: 1
+    virtual-memory:
+      size: 0.25
+
+  virtual-storage-desc:
+  - id: cirros_vnfd-VM-storage
+    size-of-storage: 2