Merge "Fixing DockerFile to avoid IOException"
diff --git a/cds-ui/application/Dockerfile b/cds-ui/application/Dockerfile
index 5bf65f4..35467e0 100644
--- a/cds-ui/application/Dockerfile
+++ b/cds-ui/application/Dockerfile
@@ -1,35 +1,47 @@
+# Prepare stage for multistage image build
+## START OF stage0 ##
 # Building client html and js files
-FROM alpine:3.8 as builder
+FROM alpine:3.8 AS stage0
+WORKDIR /opt/cds-ui/client/
 
 RUN apk add --no-cache npm
 
-WORKDIR /opt/cds-ui/client/
-
 COPY client/package.json /opt/cds-ui/client/
-
 RUN npm install
 
 COPY client /opt/cds-ui/client/
-
 RUN npm run build
 
+## END OF STAGE0 ##
 
+##############################################
+
+## START OF stage1 ##
 # Building and creating server
-FROM alpine:3.8
-
+FROM alpine:3.8 AS stage1
 WORKDIR /opt/cds-ui/
 
 RUN apk add --no-cache npm
 
 COPY server/package.json /opt/cds-ui/
-
 RUN npm install
 
 COPY server /opt/cds-ui/
-COPY --from=builder /opt/cds-ui/server/public /opt/cds-ui/public
-
 RUN npm run build
 
-EXPOSE 3000
+## END OF STAGE1 ##
 
+##############################################
+
+## This will create actual image
+
+FROM alpine:3.8
+WORKDIR /opt/cds-ui/
+
+RUN apk add --no-cache npm
+
+COPY --from=stage0 /opt/cds-ui /opt/cds-ui
+COPY --from=stage1 /opt/cds-ui/server/public /opt/cds-ui/public
+
+EXPOSE 3000
 CMD [ "npm", "start" ]
diff --git a/cds-ui/application/pom.xml b/cds-ui/application/pom.xml
index 1a184ee..6831c9a 100644
--- a/cds-ui/application/pom.xml
+++ b/cds-ui/application/pom.xml
@@ -75,6 +75,7 @@
                                     <name>${image.name}</name>
                                     <build>
                                         <cleanup>try</cleanup>
+                                        <noCache>true</noCache>
                                         <tags>
                                             <tag>${project.docker.latestminortag.version}</tag>
                                             <tag>${project.docker.latestfulltag.version}</tag>
diff --git a/cds-ui/server/pom.xml b/cds-ui/server/pom.xml
index c8da49b..eefcd88 100644
--- a/cds-ui/server/pom.xml
+++ b/cds-ui/server/pom.xml
@@ -144,6 +144,7 @@
                                     <name>${image.name}</name>
                                     <build>
                                         <cleanup>try</cleanup>
+                                        <noCache>true</noCache>
                                         <dockerFileDir>${basedir}</dockerFileDir>
                                         <tags>
                                             <tag>${project.docker.latestminortag.version}</tag>
diff --git a/docs/api-reference/media/cds-bp-processor-api-swagger.json b/docs/api-reference/media/cds-bp-processor-api-swagger.json
index b7ba2ea..e8ea932 100644
--- a/docs/api-reference/media/cds-bp-processor-api-swagger.json
+++ b/docs/api-reference/media/cds-bp-processor-api-swagger.json
@@ -765,6 +765,39 @@
             }

           }

         }

+      },

+      "delete" : {

+        "tags" : [ "Resource configuration" ],

+        "summary" : "Delete a resource configuration snapshot identified by resourceId, resourceType, status.",

+        "description" : "Delete a resource configuration snapshot, identified by its resourceId and resourceType, and optionally its status, either RUNNING or CANDIDATE.",

+        "operationId" : "ResourceConfigSnapshotController_deleteWithResourceIdAndResourceType_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.configs.api",

+        "parameters" : [ {

+          "name" : "resourceType",

+          "in" : "path",

+          "description" : "Resource Type associated with the resolution.",

+          "required" : true,

+          "type" : "string"

+        }, {

+          "name" : "resourceId",

+          "in" : "path",

+          "description" : "Resource Id associated with the resolution.",

+          "required" : true,

+          "type" : "string"

+        }, {

+          "name" : "status",

+          "in" : "path",

+          "description" : "Status of the snapshot being deleted.",

+          "required" : true,

+          "type" : "string"

+        } ],

+        "responses" : {

+          "200" : {

+            "description" : "successful operation",

+            "schema" : {

+              "type" : "object"

+            }

+          }

+        }

       }

     },

     "/api/v1/dictionary" : {

@@ -1579,6 +1612,9 @@
     "JsonNode" : {

       "type" : "object",

       "properties" : {

+        "floatingPointNumber" : {

+          "type" : "boolean"

+        },

         "valueNode" : {

           "type" : "boolean"

         },

@@ -1588,60 +1624,57 @@
         "missingNode" : {

           "type" : "boolean"

         },

-        "array" : {

+        "pojo" : {

+          "type" : "boolean"

+        },

+        "integralNumber" : {

+          "type" : "boolean"

+        },

+        "textual" : {

+          "type" : "boolean"

+        },

+        "binary" : {

           "type" : "boolean"

         },

         "object" : {

           "type" : "boolean"

         },

+        "array" : {

+          "type" : "boolean"

+        },

+        "null" : {

+          "type" : "boolean"

+        },

+        "short" : {

+          "type" : "boolean"

+        },

         "nodeType" : {

           "type" : "string",

           "enum" : [ "ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING" ]

         },

-        "pojo" : {

+        "float" : {

           "type" : "boolean"

         },

         "number" : {

           "type" : "boolean"

         },

-        "integralNumber" : {

-          "type" : "boolean"

-        },

-        "floatingPointNumber" : {

-          "type" : "boolean"

-        },

-        "short" : {

+        "boolean" : {

           "type" : "boolean"

         },

         "int" : {

           "type" : "boolean"

         },

-        "long" : {

-          "type" : "boolean"

-        },

-        "float" : {

-          "type" : "boolean"

-        },

         "double" : {

           "type" : "boolean"

         },

+        "long" : {

+          "type" : "boolean"

+        },

         "bigDecimal" : {

           "type" : "boolean"

         },

         "bigInteger" : {

           "type" : "boolean"

-        },

-        "textual" : {

-          "type" : "boolean"

-        },

-        "boolean" : {

-          "type" : "boolean"

-        },

-        "null" : {

-          "type" : "boolean"

-        },

-        "binary" : {

-          "type" : "boolean"

         }

       }

     },

@@ -1798,14 +1831,14 @@
     "Page" : {

       "type" : "object",

       "properties" : {

-        "totalPages" : {

-          "type" : "integer",

-          "format" : "int32"

-        },

         "totalElements" : {

           "type" : "integer",

           "format" : "int64"

         },

+        "totalPages" : {

+          "type" : "integer",

+          "format" : "int32"

+        },

         "number" : {

           "type" : "integer",

           "format" : "int32"

@@ -1814,10 +1847,6 @@
           "type" : "integer",

           "format" : "int32"

         },

-        "numberOfElements" : {

-          "type" : "integer",

-          "format" : "int32"

-        },

         "content" : {

           "type" : "array",

           "items" : {

@@ -1827,15 +1856,19 @@
         "sort" : {

           "$ref" : "#/definitions/Sort"

         },

-        "first" : {

-          "type" : "boolean"

+        "numberOfElements" : {

+          "type" : "integer",

+          "format" : "int32"

         },

-        "last" : {

+        "first" : {

           "type" : "boolean"

         },

         "pageable" : {

           "$ref" : "#/definitions/Pageable"

         },

+        "last" : {

+          "type" : "boolean"

+        },

         "empty" : {

           "type" : "boolean"

         }

@@ -1844,14 +1877,14 @@
     "PageBlueprintModelSearch" : {

       "type" : "object",

       "properties" : {

-        "totalPages" : {

-          "type" : "integer",

-          "format" : "int32"

-        },

         "totalElements" : {

           "type" : "integer",

           "format" : "int64"

         },

+        "totalPages" : {

+          "type" : "integer",

+          "format" : "int32"

+        },

         "number" : {

           "type" : "integer",

           "format" : "int32"

@@ -1860,10 +1893,6 @@
           "type" : "integer",

           "format" : "int32"

         },

-        "numberOfElements" : {

-          "type" : "integer",

-          "format" : "int32"

-        },

         "content" : {

           "type" : "array",

           "items" : {

@@ -1873,15 +1902,19 @@
         "sort" : {

           "$ref" : "#/definitions/Sort"

         },

-        "first" : {

-          "type" : "boolean"

+        "numberOfElements" : {

+          "type" : "integer",

+          "format" : "int32"

         },

-        "last" : {

+        "first" : {

           "type" : "boolean"

         },

         "pageable" : {

           "$ref" : "#/definitions/Pageable"

         },

+        "last" : {

+          "type" : "boolean"

+        },

         "empty" : {

           "type" : "boolean"

         }

@@ -1893,13 +1926,13 @@
         "paged" : {

           "type" : "boolean"

         },

-        "unpaged" : {

-          "type" : "boolean"

-        },

         "pageNumber" : {

           "type" : "integer",

           "format" : "int32"

         },

+        "unpaged" : {

+          "type" : "boolean"

+        },

         "pageSize" : {

           "type" : "integer",

           "format" : "int32"

@@ -2173,10 +2206,10 @@
     "Sort" : {

       "type" : "object",

       "properties" : {

-        "sorted" : {

+        "unsorted" : {

           "type" : "boolean"

         },

-        "unsorted" : {

+        "sorted" : {

           "type" : "boolean"

         },

         "empty" : {

diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml
index db3bb94..701d813 100755
--- a/ms/blueprintsprocessor/application/pom.xml
+++ b/ms/blueprintsprocessor/application/pom.xml
@@ -406,6 +406,7 @@
                                     <name>${image.name}</name>
                                     <build>
                                         <cleanup>try</cleanup>
+                                        <noCache>true</noCache>
                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
                                         <tags>
                                             <tag>${project.docker.latestminortag.version}</tag>
diff --git a/ms/blueprintsprocessor/application/src/main/docker/Dockerfile b/ms/blueprintsprocessor/application/src/main/docker/Dockerfile
index 876bc35..d4b403e 100755
--- a/ms/blueprintsprocessor/application/src/main/docker/Dockerfile
+++ b/ms/blueprintsprocessor/application/src/main/docker/Dockerfile
@@ -1,8 +1,11 @@
-FROM onap/ccsdk-alpine-j11-image:1.1.0
-
+# Prepare stage for multistage image build
+## START OF STAGE0 ##
+FROM onap/ccsdk-alpine-j11-image:1.1.2 AS stage0
 USER root
+
 # add entrypoint
-COPY startService.sh /opt/app/onap/blueprints-processor/startService.sh
+COPY *.sh /opt/app/onap/blueprints-processor/
+
 # add application
 COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
 
@@ -10,12 +13,20 @@
  && cp -rf /tmp/@project.build.finalName@/opt / \
  && rm -rf /source.tar.gz \
  && rm -rf /tmp/@project.build.finalName@ \
- && touch /velocity.log \
- && chown onap:onap /velocity.log \
- && chmod 755 /velocity.log \
  && mkdir -p /opt/app/onap/blueprints/deploy \
- && chown onap:onap /opt -R \
- && chmod 755 /opt/app/onap/blueprints-processor/startService.sh
+ && touch /velocity.log \
+ && chown -R onap:onap /opt /velocity.log \
+ && chmod -R 755 /opt /velocity.log
+
+## END OF STAGE0 ##
+
+
+## This will create actual image
+FROM onap/ccsdk-alpine-j11-image:1.1.2
+USER root
+
+COPY --from=stage0 /opt /opt
+COPY --from=stage0 /velocity.log /velocity.log
 
 USER onap
 ENTRYPOINT [ "/opt/app/onap/blueprints-processor/startService.sh" ]
diff --git a/ms/command-executor/pom.xml b/ms/command-executor/pom.xml
index fbdd386..82998aa 100755
--- a/ms/command-executor/pom.xml
+++ b/ms/command-executor/pom.xml
@@ -118,6 +118,7 @@
                                     <name>${image.name}</name>
                                     <build>
                                         <cleanup>try</cleanup>
+                                        <noCache>true</noCache>
                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
                                         <tags>
                                             <tag>${project.docker.latestminortag.version}</tag>
diff --git a/ms/command-executor/src/main/docker/Dockerfile b/ms/command-executor/src/main/docker/Dockerfile
index dcb8afb..3ac758f 100644
--- a/ms/command-executor/src/main/docker/Dockerfile
+++ b/ms/command-executor/src/main/docker/Dockerfile
@@ -1,26 +1,24 @@
 FROM python:3.7-slim
-
 USER root
-RUN mkdir -p /opt/app/onap/logs/ && touch /opt/app/onap/logs/application.log
 
 # add entrypoint
-COPY start.sh /opt/app/onap/command-executor/start.sh
+COPY *.sh /opt/app/onap/command-executor/
+
 # add application
 COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
 
 RUN tar -xzf /source.tar.gz -C /tmp \
- && cp -rf /tmp/@project.build.finalName@/opt / \
- && rm -rf /source.tar.gz \
- && rm -rf /tmp/@project.build.finalName@ \
- && mkdir -p /opt/app/onap/blueprints/deploy \
- && chmod 755 /opt/app/onap/command-executor/start.sh
-
-VOLUME /opt/app/onap/blueprints/deploy/
+    && cp -rf /tmp/@project.build.finalName@/opt / \
+    && rm -rf /source.tar.gz \
+    && rm -rf /tmp/@project.build.finalName@ \
+    && groupadd -r -g 1000 onap && useradd -r -u 1000 -g onap onap \
+    && mkdir -p /opt/app/onap/blueprints/deploy /opt/app/onap/logs \
+    && touch /opt/app/onap/logs/application.log \
+    && chown -R onap:onap /opt \
+    && chmod -R 755 /opt
 
 RUN python -m pip install --no-cache-dir --upgrade pip setuptools
 RUN pip install --no-cache-dir grpcio==1.20.0 grpcio-tools==1.20.0 virtualenv==16.7.9
 
-RUN groupadd -r -g 1000 onap && useradd -r -u 1000 -g onap onap
-RUN chown onap:onap /opt -R
 USER onap
 ENTRYPOINT /opt/app/onap/command-executor/start.sh
diff --git a/ms/py-executor/docker/Dockerfile b/ms/py-executor/docker/Dockerfile
index 26f84af..74e6f5f 100644
--- a/ms/py-executor/docker/Dockerfile
+++ b/ms/py-executor/docker/Dockerfile
@@ -1,26 +1,24 @@
 FROM python:3.7-slim
-
 USER root
-RUN mkdir -p /opt/app/onap/logs/ && touch /opt/app/onap/logs/application.log
 
 # add entrypoint
-COPY start.sh /opt/app/onap/py-executor/start.sh
+COPY *.sh /opt/app/onap/py-executor/
+
 # add application
 COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
 
 RUN tar -xzf /source.tar.gz -C /tmp \
- && cp -rf /tmp/@project.build.finalName@/opt / \
- && rm -rf /source.tar.gz \
- && rm -rf /tmp/@project.build.finalName@ \
- && mkdir -p /opt/app/onap/blueprints/deploy \
- && chmod 755 /opt/app/onap/py-executor/start.sh
-
-VOLUME /opt/app/onap/blueprints/deploy/
+    && cp -rf /tmp/@project.build.finalName@/opt / \
+    && rm -rf /source.tar.gz \
+    && rm -rf /tmp/@project.build.finalName@ \
+    && groupadd -r -g 1000 onap && useradd -r -u 1000 -g onap onap \
+    && mkdir -p /opt/app/onap/blueprints/deploy /opt/app/onap/logs \
+    && touch /opt/app/onap/logs/application.log \
+    && chown -R onap:onap /opt \
+    && chmod -R 755 /opt
 
 RUN python -m pip install --no-cache-dir --upgrade pip setuptools
 RUN pip install --no-cache-dir -r /opt/app/onap/python/requirements/docker.txt
 
-RUN groupadd -r -g 1000 onap && useradd -r -u 1000 -g onap onap
-RUN chown onap:onap /opt -R
 USER onap
 ENTRYPOINT /opt/app/onap/py-executor/start.sh
diff --git a/ms/py-executor/pom.xml b/ms/py-executor/pom.xml
index 6efb57d..a39767b 100644
--- a/ms/py-executor/pom.xml
+++ b/ms/py-executor/pom.xml
@@ -26,7 +26,7 @@
 
     <artifactId>py-executor</artifactId>
 
-    <name>MS Python Script Executor</name>
+    <name>MS Python Executor</name>
     <description>Micro-service providing python environment with gRPC binding for python script execution</description>
 
     <properties>
@@ -117,6 +117,7 @@
                                     <name>${image.name}</name>
                                     <build>
                                         <cleanup>try</cleanup>
+                                        <noCache>true</noCache>
                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
                                         <tags>
                                             <tag>${project.docker.latestminortag.version}</tag>
diff --git a/ms/sdclistener/distribution/pom.xml b/ms/sdclistener/distribution/pom.xml
index dd0396a..1f3c6b6 100755
--- a/ms/sdclistener/distribution/pom.xml
+++ b/ms/sdclistener/distribution/pom.xml
@@ -144,6 +144,7 @@
                                     <name>${image.name}</name>
                                     <build>
                                         <cleanup>try</cleanup>
+                                        <noCache>true</noCache>
                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
                                         <tags>
                                             <tag>${project.docker.latestminortag.version}</tag>
diff --git a/ms/sdclistener/distribution/src/main/docker/Dockerfile b/ms/sdclistener/distribution/src/main/docker/Dockerfile
index b9c6109..3b5dc4f 100755
--- a/ms/sdclistener/distribution/src/main/docker/Dockerfile
+++ b/ms/sdclistener/distribution/src/main/docker/Dockerfile
@@ -1,8 +1,12 @@
-FROM onap/ccsdk-alpine-j11-image:1.1.0
+# Prepare stage for multistage image build
+## START OF STAGE0 ##
+FROM onap/ccsdk-alpine-j11-image:1.1.2 AS stage0
 
 USER root
+
 # add entrypoint
-COPY startService.sh /opt/app/onap/sdc-listener/startService.sh
+COPY *.sh /opt/app/onap/sdc-listener/
+
 # add application
 COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
 
@@ -11,8 +15,17 @@
  && rm -rf /source.tar.gz \
  && rm -rf /tmp/@project.build.finalName@ \
  && mkdir -p /opt/app/onap/cds-sdc-listener \
- && chown onap:onap /opt -R \
- && chmod 755 /opt/app/onap/sdc-listener/startService.sh
+ && chown -R onap:onap /opt \
+ && chmod -R 755 /opt
+
+## END OF STAGE0 ##
+
+
+## This will create actual image
+FROM onap/ccsdk-alpine-j11-image:1.1.2
+USER root
+
+COPY --from=stage0 /opt /opt
 
 USER onap
 ENTRYPOINT /opt/app/onap/sdc-listener/startService.sh