Fix bug 1392 package-create update with sol006 templates for VNFD and NSD
[osm/osmclient.git] / osmclient / templates / nsd.yaml.j2
index 0e0c7a3..f0ec25a 100644 (file)
@@ -1,5 +1,3 @@
-# Copyright 2019 ETSI OSM
-#
 # All Rights Reserved.
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
 #    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-catalog:
-    schema-version: "v3.0"
-    nsd:
-    -   id: {{ name }}_nsd
-        name: {{ name }}_nsd
-        short-name: {{ name }}_nsd
-        vendor: {{ vendor }}
-        description: Generated by OSM package generator
-        version: '1.0'
-        {%- if detailed is sameas true %}
-
-        # Place the logo as png in icons directory and provide the name here
-        # logo: <update, optional> Example: icons/logo.png
-        {%- endif %}
-
-        # Specify the VNFDs that are part of this NSD
-        constituent-vnfd:
-        # The member-vnf-index needs to be unique, starting from 1
-        # vnfd-id-ref is the id of the VNFD
-        # Multiple constituent VNFDs can be specified
-        -   member-vnf-index: "1"
-            vnfd-id-ref: {{ name }}_vnfd
-            {%- if detailed is sameas true %}
-            # start-by-default: True
-            {%- endif %}
-
-        # Networks for the VNFs
-        vld:
-        -   id: {{ name }}_nsd_vld0
-            name: mgmt
-            short-name: mgmt
-            type: ELAN
-            mgmt-network: true
-            {%- if detailed is sameas true %}
-            # description: <update>
-            # vim-network-name: <update> Name of network in VIM account
-            # ip-profile-ref: <update> Name of reference of IP profile object
-            # provider-network:
-            #     physical-network: <update> Name of the physical network on which provider network is built
-            #     segmentation_id: <update> ID of segregated virtual network
-            {%- endif %}
-
-            # Specify the constituent VNFs
-            # member-vnf-index-ref - entry from constituent vnf
-            # vnfd-id-ref - VNFD id
-            # vnfd-connection-point-ref - connection point name in the VNFD
-            vnfd-connection-point-ref:
-            -   member-vnf-index-ref: "1"
-                vnfd-id-ref: {{ name }}_vnfd
-                # NOTE: Validate the entry below
-                vnfd-connection-point-ref: vnf-cp0
-                {%- if detailed is sameas true %}
-                # ip-address: <update> IP address of the connection point
-                {%- endif %}
-
-            {%- for x in range(1, interfaces + 1 ) %}
-            -   member-vnf-index-ref: "1"
-                vnfd-id-ref: {{ name }}_vnfd
-                # NOTE: Validate the entry below
-                vnfd-connection-point-ref: vnf-cp{{ x }}
-                {%- if detailed is sameas true %}
-                # ip-address: <update> IP address of the connection point
-                {%- endif %}
-            {%- endfor %}
-
+nsd:
+  nsd:
+  - id: {{ name }}_nsd
+    name: {{ name }}_nsd
+    designer: {{ vendor }}
+    description: Generated by OSM package generator
+    version: '1.0'
+    vnfd-id:
+    - {{ name }}_vnfd
+    df:
+    - id: default-df
+      vnf-profile:
+      - id: "1"
+        vnfd-id: {{ name }}_vnfd
+        virtual-link-connectivity:
+        - virtual-link-profile-id: {{ name }}_nsd_vld0
+          constituent-cpd-id:
+          - constituent-base-element-id: "1"
+            constituent-cpd-id: vnf-cp0-ext
             {%- if detailed is sameas true %}
-            # List of IP Profiles.
-            # IP Profile describes the IP characteristics for the Virtual-Link
-            #ip-profiles
-            #-   name: <update>
-            #    description: <update>
-            #    ip-profile-params:
-            #    -   ip-version:
-            #        subnet-address: <update>
-            #        gateway-address: <update>
-            #        security-group: <update>
-            #        subnet-prefix-pool: <update>
-            #        dns-server:
-            #        -   address: <update>
-            #        dhcp-params:
-            #        -   enabled: <update>
-            #            start-address: <update>
-            #            count: <update>
-
-            # Information about NS configuration
-            #ns-configuration:
-            #    juju:
-            #        charm: <update>
-            #        proxy: <update>
-            #        vca-relationships:
-            #            relation:
-            #            -   requires: <update>
-            #                provides: <update>
-
-            #    # List of config primitives supported by the
-            #    # configuration agent for this NS.
-            #    config-primitive:
-            #    -   name: <update>
-            #        parameter:
-            #        -   name: <update>
-            #            data-type: <update>
-            #            mandatory: <update>
-            #            default-value: <update>
-            #            parameter-pool: <update>
-            #            read-only: <update>
-            #            hidden: <update>
-
-            #    # Initial set of configuration primitives.
-            #    initial-config-primitive:
-            #    -   seq: <update>
-            #        name: <update>
-            #        parameter:
-            #        -   name: <update>
-            #            data-type: <update>
-            #            value: <update>
-
-            #    # Terminate set of configuration primitives.
-            #    terminate-config-primitive:
-            #    -   seq: <update>
-            #        name: <update>
-            #        parameter:
-            #        -   name: <update>
-            #            data-type: <update>
-            #            value: <update>
-
-            #    # List of VCA related metric
-            #    metrics:
-            #    -   name: <update>
-
-            # Used to configure the list of public keys to be injected as part
-            # of ns instantiation
-            #key-pair:
-            #-   name: <update>
-            #    key: <update>
-
-            # List of users to be added through cloud-config
-            #user:
-            #-   name: <update>
-            #    user-info: <update>
-            #    key-pair:
-            #    -   name: <update>
-            #        key: <update>
-
-            # List of VNF Forwarding Graph Descriptors (VNFFGD)
-            #vnffgd:
-            #-   id: <update>
-            #    name: <update>
-            #    short-name: <update>
-            #    vendor: <update>
-            #    description: <update>
-            #    version: <update>
-            #    # List of Rendered Service Paths
-            #    rsp:
-            #    -   id: <update>
-            #        name: <update>
-            #        vnfd-connection-point-ref:
-            #        -   member-vnf-index-ref: <update>
-            #            order: <update>
-            #            vnfd-id-ref: <update>
-            #            vnfd-ingress-connection-point-ref: <update>
-            #            vnfd-egress-connection-point-ref: <update>
-            #    # List of classifier rules
-            #    classifier:
-            #    -   id: <update>
-            #        name: <update>
-            #        rsp-id-ref: <update>
-            #        member-vnf-index-ref: <update>
-            #        vnfd-id-ref: <update>
-            #        vnfd-connection-point-ref: <update>
-            #        match-attributes:
-            #        -   id: <update>
-            #            ip-proto: <update>
-            #            source-ip-address: <update>
-            #            destination-ip-address: <update>
-            #            source-port: <update>
-            #            destination-port: <update>
+            # ip-address: <update> IP address of the connection point
             {%- endif %}
+    virtual-link-desc:
+    - id: {{ name }}_nsd_vld0
+      mgmt-network: true
+      {%- if detailed is sameas true %}
+      #vim-network-name: <update> Name of network in VIM account
+      {%- endif %}
+    {%- if detailed is sameas true %}
+    #ns-configuration:
+      #relation:
+      #- name: relation
+      #  entities:
+      #  - id: "1"
+      #    endpoint: interface
+    {%- endif %}
\ No newline at end of file