Bug 515 fixed
[osm/devops.git] / descriptor-packages / tools / generate_descriptor_pkg.sh
index 336cd8f..bff8785 100755 (executable)
@@ -43,7 +43,7 @@ VNFD_FOLDERS=(images scripts icons charms cloud_init)
 # Supported folders for NSD
 # OSM document specifies (ns|vnf)-config folder, while Rel 4.3
 # is using (ns|vnf)_config.
-NSD_FOLDERS=(scripts icons ns_config vnf_config)
+NSD_FOLDERS=(scripts charms icons ns_config vnf_config)
 
 # Other files allowed in the descriptor base directory
 ALLOWED_FILES=(README)
@@ -256,7 +256,6 @@ EOF
         eth=$(($i))
         cat >>$desc_file <<EOF
         -   name: vnf-cp${eth}
-            type: ${CP_TYPE}
 EOF
     done
 
@@ -791,6 +790,13 @@ if [ $CREATE == false ]; then
     fi
 
     cd $BASE_DIR
+    # Mrityunjay Yadav: Validate descriptor
+    python /usr/share/osm-devops/descriptor-packages/tools/validate_descriptor.py $DEST_DIR/$PKG/$descriptor
+    if [ $? -ne 0 ]; then
+        rc=$?
+        echo "ERROR: validating descriptor for $PKG ($rc)" >&2
+        exit $rc
+    fi
     if [ $DRY_RUN == false ]; then
         if [ $VERBOSE == true ]; then
             tar zcvf "$DEST_DIR/$PKG.tar.gz" "${PKG}" ${RM}