Feature 10980: Service Function Chaining 19/13319/7 release-v15.0-start v15.0.0
authorsritharan <priyadarshini@tataelxsi.co.in>
Fri, 28 Apr 2023 10:57:01 +0000 (10:57 +0000)
committersritharan <priyadarshini@tataelxsi.co.in>
Mon, 11 Dec 2023 07:03:43 +0000 (08:03 +0100)
Change-Id: I77f9f77cad1f35b471488a5c796088e664259421
Signed-off-by: sritharan <priyadarshini@tataelxsi.co.in>
models/augments/vnffgd.yang [new file with mode: 0644]
tests/examples/dest_vnfd.yaml [new file with mode: 0644]
tests/examples/mid_vnfd.yaml [new file with mode: 0644]
tests/examples/sfc_nsd.yaml [new file with mode: 0644]
tests/examples/src_vnfd.yaml [new file with mode: 0644]

diff --git a/models/augments/vnffgd.yang b/models/augments/vnffgd.yang
new file mode 100644 (file)
index 0000000..3000b3b
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+  # Copyright ETSI Contributors and Others.
+
+  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.
+*/
+module vnffgd {
+    yang-version 1.1;
+    namespace "urn:etsi:osm:yang:augments:vnffgd";
+    prefix "vnffgd";
+
+    import etsi-nfv-nsd {
+        prefix nsd;
+    }
+
+    import ietf-inet-types {
+        prefix inet;
+    }
+
+    grouping match {
+        list match-attributes {
+            description
+                "List of match attributes.";
+
+            key "id";
+            leaf id {
+                description
+                    "Identifier for the classifier match attribute rule.";
+                type string;
+            }
+
+            leaf ip-proto {
+                description
+                    "IP Protocol.";
+                type uint8;
+            }
+
+            leaf source-ip-address {
+                description
+                    "Source IP address.";
+                type inet:ip-address;
+            }
+
+            leaf destination-ip-address {
+                description
+                    "Destination IP address.";
+                type inet:ip-address;
+            }
+
+            leaf source-port {
+                description
+                    "Source port number.";
+                type inet:port-number;
+            }
+
+            leaf destination-port {
+                description
+                    "Destination port number.";
+                type inet:port-number;
+            }
+
+            leaf constituent-base-element-id {
+                description
+                    "Refer to the profile of source NS constituent.";
+                type leafref {
+                    path "/nsd:nsd/nsd:nsd/nsd:df/nsd:vnf-profile/nsd:id";
+                }
+            }
+
+            leaf constituent-cpd-id {
+                description
+                    "Logical source port.";
+                type string;
+            }
+            //TODO: Add more match criteria
+        } //match-attributes
+
+    }
+
+    grouping extended-position-element {
+
+        leaf-list nfp-position-element-id {
+            type leafref {
+              path "../../../nfp-position-element/id";
+            }
+            description
+              "References one or a pair of CPDs or SAPDs.";
+            reference
+              "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc
+               information element";
+          }
+    }
+
+    grouping extended-nfp-position {
+        list nfp-position-element {
+            key "id";
+            leaf id {
+                type string;
+                description
+                    "Identifier of this NfpPositionElemen information
+                    element. It uniquely identifies an
+                    NfpPositionElement.";
+                reference
+                    "GS NFV IFA014: Section 6.4.6.2 NfpPositionElement
+                    information element";
+            }
+        }
+
+    }
+
+    grouping extended-cpe {
+        leaf constituent-base-element-id {
+            type leafref {
+                path "/nsd:nsd/nsd:nsd/nsd:vnffgd/nsd:vnf-profile-id";
+            }
+        }
+
+        leaf order {
+            type uint8;
+            description
+              "A number that denotes the order of a VNF in a chain";
+        }
+
+        leaf ingress-constituent-cpd-id {
+            description
+              "A reference to a connection point name
+                  in a vnfd.";
+
+            type string;
+        }
+
+        leaf egress-constituent-cpd-id {
+            description
+              "A reference to a connection point name
+                  in a vnfd.";
+
+            type string;
+        }
+    }
+
+    augment "/nsd:nsd/nsd:nsd/nsd:vnffgd/nsd:nfpd/nsd:position-desc-id" {
+        uses match;
+    }
+
+    augment "/nsd:nsd/nsd:nsd/nsd:vnffgd" {
+        uses extended-nfp-position;
+    }
+
+    augment "/nsd:nsd/nsd:nsd/nsd:vnffgd/nsd:nfpd/nsd:position-desc-id" {
+        uses extended-position-element;
+    }
+
+    augment "/nsd:nsd/nsd:nsd/nsd:vnffgd/nsd:nfpd/nsd:position-desc-id/nsd:cp-profile-id/nsd:constituent-profile-elements"{
+        uses extended-cpe;
+    }
+}
diff --git a/tests/examples/dest_vnfd.yaml b/tests/examples/dest_vnfd.yaml
new file mode 100644 (file)
index 0000000..4ee94e9
--- /dev/null
@@ -0,0 +1,79 @@
+#  Copyright ETSI Contributors and Others
+#
+#  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.
+
+vnfd:
+    description: Destination vnf descriptor
+    df:
+    - id: default-df
+      instantiation-level:
+      - id: default-instantiation-level
+        vdu-level:
+        - number-of-instances: 1
+          vdu-id: dest_vnf-VM
+      vdu-profile:
+      - id: dest_vnf-VM
+        min-number-of-instances: 1
+    ext-cpd:
+    - id: eth0-ext
+      int-cpd:
+        cpd: eth0-int
+        vdu-id: dest_vnf-VM
+    id: dest_vnf
+    mgmt-cp: eth0-ext
+    product-name: dest_vnf
+    provider: OSM
+    sw-image-desc:
+    - id: bionic
+      image: bionic
+      name: bionic
+    - id: ubuntu20.04-aws
+      name: ubuntu20.04-aws
+      image: ubuntu/images/hvm-ssd/ubuntu-artful-17.10-amd64-server-20180509
+      vim-type: aws
+    - id: ubuntu20.04-azure
+      name: ubuntu20.04-azure
+      image: Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest
+      vim-type: azure
+    vdu:
+    - id: dest_vnf-VM
+      cloud-init-file: cloud-config
+      description: dest_vnf-VM
+      int-cpd:
+      - id: eth0-int
+        virtual-network-interface-requirement:
+        - name: eth0
+          virtual-interface:
+            bandwidth: 0
+            type: VIRTIO
+            vpci: 0000:00:0a.0
+      name: dest_vnf-VM
+      sw-image-desc: bionic
+      alternative-sw-image-desc:
+      - ubuntu20.04-aws
+      - ubuntu20.04-azure
+      virtual-compute-desc: dest_vnf-VM-compute
+      virtual-storage-desc:
+      - dest_vnf-VM-storage
+    version: '1.0'
+    software-version: 1.2
+    virtual-compute-desc:
+    - id: dest_vnf-VM-compute
+      virtual-cpu:
+        num-virtual-cpu: 1
+      virtual-memory:
+        size: 2
+    virtual-storage-desc:
+    - id: dest_vnf-VM-storage
+      size-of-storage: 10
diff --git a/tests/examples/mid_vnfd.yaml b/tests/examples/mid_vnfd.yaml
new file mode 100644 (file)
index 0000000..f1ddf8c
--- /dev/null
@@ -0,0 +1,79 @@
+#  Copyright ETSI Contributors and Others
+#
+#  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.
+
+vnfd:
+    description: SFC Middle VNF descriptor
+    df:
+    - id: default-df
+      instantiation-level:
+      - id: default-instantiation-level
+        vdu-level:
+        - number-of-instances: 1
+          vdu-id: mid_vnf-VM
+      vdu-profile:
+      - id: mid_vnf-VM
+        min-number-of-instances: 1
+    ext-cpd:
+    - id: eth0-ext
+      int-cpd:
+        cpd: eth0-int
+        vdu-id: mid_vnf-VM
+    id: mid_vnf
+    mgmt-cp: eth0-ext
+    product-name: mid_vnf
+    provider: OSM
+    sw-image-desc:
+    - id: bionic
+      image: bionic
+      name: bionic
+    - id: ubuntu20.04-aws
+      name: ubuntu20.04-aws
+      image: ubuntu/images/hvm-ssd/ubuntu-artful-17.10-amd64-server-20180509
+      vim-type: aws
+    - id: ubuntu20.04-azure
+      name: ubuntu20.04-azure
+      image: Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest
+      vim-type: azure
+    vdu:
+    - id: mid_vnf-VM
+      cloud-init-file: cloud-config
+      description: mid_vnf-VM
+      int-cpd:
+      - id: eth0-int
+        virtual-network-interface-requirement:
+        - name: eth0
+          virtual-interface:
+            bandwidth: 0
+            type: VIRTIO
+            vpci: 0000:00:0a.0
+      name: mid_vnf-VM
+      sw-image-desc: bionic
+      alternative-sw-image-desc:
+      - ubuntu20.04-aws
+      - ubuntu20.04-azure
+      virtual-compute-desc: mid_vnf-VM-compute
+      virtual-storage-desc:
+      - mid_vnf-VM-storage
+    version: '1.0'
+    software-version: 1.2
+    virtual-compute-desc:
+    - id: mid_vnf-VM-compute
+      virtual-cpu:
+        num-virtual-cpu: 1
+      virtual-memory:
+        size: 2
+    virtual-storage-desc:
+    - id: mid_vnf-VM-storage
+      size-of-storage: 10
diff --git a/tests/examples/sfc_nsd.yaml b/tests/examples/sfc_nsd.yaml
new file mode 100644 (file)
index 0000000..746d87f
--- /dev/null
@@ -0,0 +1,86 @@
+#  Copyright ETSI Contributors and Others
+#
+#  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.
+
+nsd:
+  nsd:
+  - description: sfc_nsd Network Service
+    designer: TATA ELXSI
+    df:
+    - id: default-df
+      vnf-profile:
+      - id: vnf1
+        vnfd-id: src_vnf
+        virtual-link-connectivity:
+        - constituent-cpd-id:
+          - constituent-base-element-id: vnf1
+            constituent-cpd-id: eth0-ext
+            ip-address: 20.20.20.10
+          virtual-link-profile-id: private
+      - id: vnf2
+        vnfd-id: mid_vnf
+        virtual-link-connectivity:
+        - constituent-cpd-id:
+          - constituent-base-element-id: vnf2
+            constituent-cpd-id: eth0-ext
+            ip-address: 20.20.20.20
+          virtual-link-profile-id: private
+      - id: vnf3
+        vnfd-id: dest_vnf
+        virtual-link-connectivity:
+        - constituent-cpd-id:
+          - constituent-base-element-id: vnf3
+            constituent-cpd-id: eth0-ext
+            ip-address: 20.20.20.30
+          virtual-link-profile-id: private
+    vnffgd:
+    - id: vnffg1
+      vnf-profile-id:
+      - vnf2
+      nfp-position-element:
+      - id: test
+      nfpd:
+      - id: forwardingpath1
+        position-desc-id:
+        - id: position1
+          nfp-position-element-id:
+          - test
+          match-attributes:
+          -  id: rule1_80
+             ip-proto: 6
+             source-ip-address:  20.20.20.10
+             destination-ip-address: 20.20.20.30
+             source-port: 0
+             destination-port: 80
+             constituent-base-element-id: vnf1
+             constituent-cpd-id: eth0-ext
+          cp-profile-id:
+          -  id: cpprofile2
+             constituent-profile-elements:
+             - id: cp1
+               order: 0
+               constituent-base-element-id: vnf2
+               ingress-constituent-cpd-id: eth0-ext
+               egress-constituent-cpd-id: eth0-ext
+    id: sfc_nsd
+    name: sfc_nsd
+    version: '1.0'
+    virtual-link-desc:
+    - id: private
+      mgmt-network: 'true'
+      vim-network-name: private
+    vnfd-id:
+    - src_vnf
+    - mid_vnf
+    - dest_vnf
diff --git a/tests/examples/src_vnfd.yaml b/tests/examples/src_vnfd.yaml
new file mode 100644 (file)
index 0000000..33ca97a
--- /dev/null
@@ -0,0 +1,80 @@
+#  Copyright ETSI Contributors and Others
+#
+#  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.
+
+vnfd:
+    description: Source vnf descriptor
+    df:
+    - id: default-df
+      instantiation-level:
+      - id: default-instantiation-level
+        vdu-level:
+        - number-of-instances: 1
+          vdu-id: src_vnf-VM
+      vdu-profile:
+      - id: src_vnf-VM
+        min-number-of-instances: 1
+    ext-cpd:
+    - id: eth0-ext
+      int-cpd:
+        cpd: eth0-int
+        vdu-id: src_vnf-VM
+    id: src_vnf
+    mgmt-cp: eth0-ext
+    product-name: src_vnf
+    provider: OSM
+    sw-image-desc:
+    - id: bionic
+      image: bionic
+      name: bionic
+    - id: ubuntu20.04-aws
+      name: ubuntu20.04-aws
+      image: ubuntu/images/hvm-ssd/ubuntu-artful-17.10-amd64-server-20180509
+      vim-type: aws
+    - id: ubuntu20.04-azure
+      name: ubuntu20.04-azure
+      image: Canonical:0001-com-ubuntu-server-focal:20_04-lts:latest
+      vim-type: azure
+    vdu:
+    - id: src_vnf-VM
+      cloud-init-file: cloud-config
+      description: src_vnf-VM
+      id: src_vnf-VM
+      int-cpd:
+      - id: eth0-int
+        virtual-network-interface-requirement:
+        - name: eth0
+          virtual-interface:
+            bandwidth: 0
+            type: VIRTIO
+            vpci: 0000:00:0a.0
+      name: src_vnf_vnfd-VM
+      sw-image-desc: bionic
+      alternative-sw-image-desc:
+      - ubuntu20.04-aws
+      - ubuntu20.04-azure
+      virtual-compute-desc: src_vnf-VM-compute
+      virtual-storage-desc:
+      - src_vnf-VM-storage
+    version: '1.0'
+    software-version: 1.2
+    virtual-compute-desc:
+    - id: src_vnf-VM-compute
+      virtual-cpu:
+        num-virtual-cpu: 1
+      virtual-memory:
+        size: 2
+    virtual-storage-desc:
+    - id: src_vnf-VM-storage
+      size-of-storage: 10