Merge "Trim trailing slash from REPOSITORY_BASE before add-apt-repository"
diff --git a/descriptor-packages/.gitignore b/descriptor-packages/.gitignore
new file mode 100644
index 0000000..0766a22
--- /dev/null
+++ b/descriptor-packages/.gitignore
@@ -0,0 +1,2 @@
+nsd/*/build
+vnfd/*/build
diff --git a/descriptor-packages/Makefile b/descriptor-packages/Makefile
index 793f30c..61710bf 100644
--- a/descriptor-packages/Makefile
+++ b/descriptor-packages/Makefile
@@ -1,5 +1,5 @@
 #
-#   Copyright 2016 RIFT.IO Inc
+#   Copyright 2017 Sandvine
 #
 #   Licensed under the Apache License, Version 2.0 (the "License");
 #   you may not use this file except in compliance with the License.
@@ -13,137 +13,7 @@
 #   See the License for the specific language governing permissions and
 #   limitations under the License.
 #
-# Author(s): Austin Cormier
-# Creation Date: 2016/05/23
-#
-BUILD_DIR = build
 
-NSDS := \
-    gw_corpa_ns \
-    ims_allin1_corpa \
-    mwc16_gen_ns \
-    mwc16_pe_ns \
-    VyOS_ns \
-    cirros_ns \
-    cirros_2vnf_ns \
-    ubuntu_xenial_ns \
-    ping_pong_ns \
-    knt_flownac_ns \
-    knt_flownac-us_ns \
-    sandvine_pts_ns \
-    sonussbc_ns \
-    ref1_ns \
-    ref2_ns \
-    ubuntu_cirros_multidisk_ns
+SUBDIRS = vnfd nsd
 
-NSD_SRC_DIR := src/nsd
-NSD_BUILD_DIR := $(BUILD_DIR)/nsd
-
-NSD_SRC_DIRS := $(addprefix $(NSD_SRC_DIR)/, $(NSDS))
-NSD_BUILD_DIRS := $(addprefix $(NSD_BUILD_DIR)/, $(NSDS))
-NSD_PKGS := $(addsuffix .tar.gz, $(NSDS))
-NSD_BUILD_PKGS := $(addprefix $(NSD_BUILD_DIR)_pkgs/, $(NSD_PKGS))
-
-VNFDS := \
-    6wind_vnf \
-    gw_corpa_pe1_vnf \
-    gw_corpa_pe2_vnf \
-    ims_allin1_2p_vnf \
-    tidgen_mwc16_vnf \
-    VyOS_vnf \
-    cirros_vnf \
-    ubuntu_xenial_vnf \
-    ping_vnf \
-    pong_vnf \
-    knt_fnc_vnf \
-    knt_fne_vnf \
-    knt_fnu_vnf \
-    knt_fnd_vnf \
-    sandvine_pts_vnf \
-    sonus_sbc_vnf \
-    sonus_test_vnf \
-    ref11_vnf \
-    ref21_vnf \
-    ref12_vnf \
-    ref22_vnf \
-    ubuntu_cirros_multidisk_vnf
-
-VNFD_SRC_DIR := src/vnfd
-VNFD_BUILD_DIR := $(BUILD_DIR)/vnfd
-
-VNFD_SRC_DIRS := $(addprefix $(VNFD_SRC_DIR)/, $(VNFDS))
-VNFD_BUILD_DIRS := $(addprefix $(VNFD_BUILD_DIR)/, $(VNFDS))
-VNFD_PKGS := $(addsuffix .tar.gz, $(VNFDS))
-VNFD_BUILD_PKGS := $(addprefix $(VNFD_BUILD_DIR)_pkgs/, $(VNFD_PKGS))
-
-IMS_GITHUB="https://github.com/Metaswitch/clearwater-juju.git"
-CHARM_REPO="https://osm.etsi.org/gerrit/osm/juju-charms.git"
-
-all: $(VNFD_BUILD_PKGS) ${NSD_BUILD_PKGS}
-	echo $@
-
-clean:
-	-@ $(RM) -rf $(BUILD_DIR)
-
-$(VNFD_BUILD_DIR)/%: $(VNFD_SRC_DIR)/%
-	mkdir -p $(VNFD_BUILD_DIR)
-	cp -rf $< $(VNFD_BUILD_DIR)
-
-	src/gen_vnfd_pkg.sh $< $@
-
-$(BUILD_DIR)/clearwater-juju:
-	mkdir -p $(BUILD_DIR)
-	-cd $(BUILD_DIR) && (test -e clearwater-juju || git clone $(IMS_GITHUB))
-
-$(BUILD_DIR)/juju-charms:
-	mkdir -p $(BUILD_DIR)
-	-cd $(BUILD_DIR) && (test -e juju-charms || git clone $(CHARM_REPO))
-	-cd $(BUILD_DIR)/juju-charms && make
-
-$(NSD_BUILD_DIR)/%: $(NSD_SRC_DIR)/%
-	mkdir -p $(NSD_BUILD_DIR)
-	cp -rf $< $(NSD_BUILD_DIR)
-
-	src/gen_nsd_pkg.sh $< $@
-
-$(BUILD_DIR)/nsd_pkgs/%.tar.gz: $(NSD_BUILD_DIR)/%
-	src/generate_descriptor_pkg.sh -d $(BUILD_DIR)/nsd_pkgs $<
-
-$(VNFD_BUILD_DIR)/ims_allin1_2p_vnf/charms/clearwater-aio-proxy: $(VNFD_BUILD_DIR)/ims_allin1_2p_vnf $(BUILD_DIR)/clearwater-juju
-	# Copy the IMS Charm into the IMS vnf package directory before packaging
-	cp -rf $(BUILD_DIR)/clearwater-juju/charms/trusty/clearwater-aio-proxy $(VNFD_BUILD_DIR)/ims_allin1_2p_vnf/charms
-
-$(VNFD_BUILD_DIR)/6wind_vnf/charms/vpe-router: $(VNFD_BUILD_DIR)/6wind_vnf $(BUILD_DIR)/juju-charms
-	# Copy the PE Charm into the PE vnf package directory before packaging
-	cp -rf $(BUILD_DIR)/juju-charms/builds/vpe-router $(VNFD_BUILD_DIR)/6wind_vnf/charms
-
-$(VNFD_BUILD_DIR)/VyOS_vnf/charms/vyos-proxy: $(VNFD_BUILD_DIR)/VyOS_vnf $(BUILD_DIR)/juju-charms
-	# Copy the PE Charm into the PE vnf package directory before packaging
-	cp -rf $(BUILD_DIR)/juju-charms/builds/vyos-proxy $(VNFD_BUILD_DIR)/VyOS_vnf/charms
-
-$(VNFD_BUILD_DIR)/ping_vnf/charms/pingpong: $(VNFD_BUILD_DIR)/ping_vnf $(BUILD_DIR)/juju-charms
-	# Copy the pingpong Charm into the ping vnf package directory before packaging
-	cp -rf $(BUILD_DIR)/juju-charms/builds/pingpong $(VNFD_BUILD_DIR)/ping_vnf/charms
-
-$(VNFD_BUILD_DIR)/pong_vnf/charms/pingpong: $(VNFD_BUILD_DIR)/pong_vnf $(BUILD_DIR)/juju-charms
-	# Copy the pingpong Charm into the pong vnf package directory before packaging
-	cp -rf $(BUILD_DIR)/juju-charms/builds/pingpong $(VNFD_BUILD_DIR)/pong_vnf/charms
-
-$(VNFD_BUILD_DIR)/knt_fnc_vnf/charms/flownac: $(VNFD_BUILD_DIR)/knt_fnc_vnf $(BUILD_DIR)/juju-charms
-	# Copy the FlowNAC Charm into the FNC vnf package directory before packaging
-	cp -rf $(BUILD_DIR)/juju-charms/builds/flownac $(VNFD_BUILD_DIR)/knt_fnc_vnf/charms
-
-$(VNFD_BUILD_DIR)/knt_fne_vnf/charms/flownac: $(VNFD_BUILD_DIR)/knt_fne_vnf $(BUILD_DIR)/juju-charms
-	# Copy the FlowNAC Charm into the FNE vnf package directory before packaging
-	cp -rf $(BUILD_DIR)/juju-charms/builds/flownac $(VNFD_BUILD_DIR)/knt_fne_vnf/charms
-
-$(VNFD_BUILD_DIR)/knt_fnd_vnf/charms/flownac: $(VNFD_BUILD_DIR)/knt_fnd_vnf $(BUILD_DIR)/juju-charms
-	# Copy the FlowNAC Charm into the FND vnf package directory before packaging
-	cp -rf $(BUILD_DIR)/juju-charms/builds/flownac $(VNFD_BUILD_DIR)/knt_fnd_vnf/charms
-
-$(VNFD_BUILD_DIR)/knt_fnu_vnf/charms/flownac: $(VNFD_BUILD_DIR)/knt_fnu_vnf $(BUILD_DIR)/juju-charms
-	# Copy the FlowNAC Charm into the FNU vnf package directory before packaging
-	cp -rf $(BUILD_DIR)/juju-charms/builds/flownac $(VNFD_BUILD_DIR)/knt_fnu_vnf/charms
-
-$(BUILD_DIR)/vnfd_pkgs/%.tar.gz: $(VNFD_BUILD_DIR)/% $(VNFD_BUILD_DIR)/ims_allin1_2p_vnf/charms/clearwater-aio-proxy $(VNFD_BUILD_DIR)/6wind_vnf/charms/vpe-router $(VNFD_BUILD_DIR)/VyOS_vnf/charms/vyos-proxy $(VNFD_BUILD_DIR)/ping_vnf/charms/pingpong $(VNFD_BUILD_DIR)/pong_vnf/charms/pingpong $(VNFD_BUILD_DIR)/knt_fnc_vnf/charms/flownac $(VNFD_BUILD_DIR)/knt_fne_vnf/charms/flownac $(VNFD_BUILD_DIR)/knt_fnd_vnf/charms/flownac $(VNFD_BUILD_DIR)/knt_fnu_vnf/charms/flownac
-	src/generate_descriptor_pkg.sh -d $(BUILD_DIR)/vnfd_pkgs $<
+include mk/dirs.mk
diff --git a/descriptor-packages/README b/descriptor-packages/README
index 9d3482d..0d99d66 100644
--- a/descriptor-packages/README
+++ b/descriptor-packages/README
@@ -28,6 +28,7 @@
 On Fedora, install using: pip install charm-tools
 On Ubuntu, install using: apt install charm-tools
 For other platforms, check https://jujucharms.com/docs/2.0/tools-charm-tools
+You need also docker
 
 Due to license issues, for the IMS VNFD package, the IMS charm is fetched
 extracted from the respective git repository prior to packaging.  Because of
diff --git a/descriptor-packages/mk/dirs.mk b/descriptor-packages/mk/dirs.mk
new file mode 100644
index 0000000..85a05e5
--- /dev/null
+++ b/descriptor-packages/mk/dirs.mk
@@ -0,0 +1,29 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+SUBDIRS_CLEAN = $(addsuffix .clean, $(SUBDIRS))
+
+.PHONY: $(SUBDIRS) $(SUBDIRS_CLEAN) clean
+
+all: $(SUBDIRS)
+
+clean: $(SUBDIRS_CLEAN)
+
+$(SUBDIRS_CLEAN): %.clean:
+	@$(MAKE) --no-print-directory -C $* clean
+
+$(SUBDIRS):
+	@$(MAKE) --no-print-directory -C $@
diff --git a/descriptor-packages/mk/pkg.mk b/descriptor-packages/mk/pkg.mk
new file mode 100644
index 0000000..9c623c4
--- /dev/null
+++ b/descriptor-packages/mk/pkg.mk
@@ -0,0 +1,76 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+
+TOPDIR=$(shell readlink -f .|sed -e 's/\/descriptor-packages\/.*//')
+
+BUILD_DIR := build
+TOOLS_DIR := $(TOPDIR)/descriptor-packages/tools
+PKG_BASE_NAME := $(shell basename $(shell pwd))
+PKG_NAME      := $(addsuffix .tar.gz, $(PKG_BASE_NAME))
+
+CHARM_DIR        := $(TOPDIR)/juju-charms
+CHARM_SRC_DIR    := $(CHARM_DIR)/layers
+CHARM_DOCKER_TAG := charm-tools
+CHARM_BUILD_DIR  := $(CHARM_DIR)/builds
+DOCKER_BUILD     ?=
+
+Q=@
+
+GEN_VNFD_PKG := $(TOOLS_DIR)/gen_vnfd_pkg.sh
+GEN_NSD_PKG  := $(TOOLS_DIR)/gen_nsd_pkg.sh
+GEN_PKG      := $(TOOLS_DIR)/generate_descriptor_pkg.sh
+BUILD_VNFD   := $(shell readlink -f .|sed -e 's/\/.*descriptor-packages//' | grep vnfd)
+
+DEP_FILES = $(wildcard src/*)
+
+ifdef BUILD_VNFD
+$(BUILD_DIR)/$(PKG_BASE_NAME): src
+	$(Q)mkdir -p $@
+	$(Q)cp -rf $</. $@
+	$(Q)$(GEN_VNFD_PKG) $< $@
+else
+$(BUILD_DIR)/$(PKG_BASE_NAME): src
+	$(Q)mkdir -p $@
+	$(Q)cp -rf $</. $@
+	$(Q)$(GEN_NSD_PKG) $< $@
+endif
+
+ifdef VNFD_CHARM
+$(BUILD_DIR)/$(PKG_NAME): $(DEP_FILES) $(CHARM_BUILD_DIR)/$(VNFD_CHARM)
+	$(Q)echo "building $(PKG_BASE_NAME) with charm $(VNFD_CHARM)"
+	$(Q)$(MAKE) --no-print-directory $(BUILD_DIR)/$(PKG_BASE_NAME)
+	$(Q)cp -rf $(CHARM_BUILD_DIR)/$(VNFD_CHARM) $(BUILD_DIR)/$(PKG_BASE_NAME)/charms
+	$(Q)$(GEN_PKG) --no-remove-files -d $(BUILD_DIR) $(BUILD_DIR)/$(PKG_BASE_NAME)
+else
+$(BUILD_DIR)/$(PKG_NAME): $(DEP_FILES)
+	$(Q)echo "building $(PKG_BASE_NAME) $(BUILD_DIR)"
+	$(Q)$(MAKE) --no-print-directory $(BUILD_DIR)/$(PKG_BASE_NAME)
+	$(Q)$(GEN_PKG) --no-remove-files -d $(BUILD_DIR) $(BUILD_DIR)/$(PKG_BASE_NAME)
+endif
+
+ifdef DOCKER_BUILD
+$(CHARM_BUILD_DIR)/%: $(CHARM_SRC_DIR)/%
+	$(Q)docker build -q -t $(CHARM_DOCKER_TAG) $(CHARM_DIR)/.
+	$(CHARM_DIR) $(CHARM_DOCKER_TAG) charm-build -o $(CHARM_DIR) $<
+else
+$(CHARM_BUILD_DIR)/%: $(CHARM_SRC_DIR)/%
+	$(Q)charm-build -o $(CHARM_DIR) $<
+endif
+ 
+clean:
+	$(Q)rm -rf $(BUILD_DIR)
+	$(Q)rm -rf $(CHARM_BUILD_DIR)
+
+.DEFAULT_GOAL := all
diff --git a/descriptor-packages/nsd/Makefile b/descriptor-packages/nsd/Makefile
new file mode 100644
index 0000000..fdd2045
--- /dev/null
+++ b/descriptor-packages/nsd/Makefile
@@ -0,0 +1,18 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+SUBDIRS = $(wildcard */)
+TOPDIR ?= ../
+include $(TOPDIR)/mk/dirs.mk
diff --git a/descriptor-packages/nsd/VyOS_ns/Makefile b/descriptor-packages/nsd/VyOS_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/VyOS_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/nsd/VyOS_ns/VyOS_nsd.yaml b/descriptor-packages/nsd/VyOS_ns/src/VyOS_nsd.yaml
similarity index 97%
rename from descriptor-packages/src/nsd/VyOS_ns/VyOS_nsd.yaml
rename to descriptor-packages/nsd/VyOS_ns/src/VyOS_nsd.yaml
index 4b833fe..f263e40 100644
--- a/descriptor-packages/src/nsd/VyOS_ns/VyOS_nsd.yaml
+++ b/descriptor-packages/nsd/VyOS_ns/src/VyOS_nsd.yaml
@@ -23,6 +23,7 @@
         -   id: management
             name: management
             short-name: management
+            mgmt-network: 'true'
             type: ELAN
             vim-network-name: net-mgmtOS
             provider-network:
diff --git a/descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png b/descriptor-packages/nsd/VyOS_ns/src/icons/osm_2x.png
similarity index 100%
rename from descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png
rename to descriptor-packages/nsd/VyOS_ns/src/icons/osm_2x.png
Binary files differ
diff --git a/descriptor-packages/nsd/cirros_2vnf_ns/Makefile b/descriptor-packages/nsd/cirros_2vnf_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/cirros_2vnf_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/nsd/cirros_2vnf_ns/cirros_2vnf_nsd.yaml b/descriptor-packages/nsd/cirros_2vnf_ns/src/cirros_2vnf_nsd.yaml
similarity index 80%
rename from descriptor-packages/src/nsd/cirros_2vnf_ns/cirros_2vnf_nsd.yaml
rename to descriptor-packages/nsd/cirros_2vnf_ns/src/cirros_2vnf_nsd.yaml
index ed9433f..298b834 100644
--- a/descriptor-packages/src/nsd/cirros_2vnf_ns/cirros_2vnf_nsd.yaml
+++ b/descriptor-packages/nsd/cirros_2vnf_ns/src/cirros_2vnf_nsd.yaml
@@ -27,6 +27,7 @@
                 name: cirros_2vnf_nsd_vld1
                 short-name: cirros_2vnf_nsd_vld1
                 type: ELAN
+                mgmt-network: 'true'
                 # vim-network-name: <update>
                 # provider-network:
                 #     overlay-type: VLAN
@@ -36,9 +37,9 @@
                 # member-vnf-index-ref - entry from constituent vnf
                 # vnfd-id-ref - VNFD id
                 # vnfd-connection-point-ref - connection point name in the VNFD
-                -   nsd:member-vnf-index-ref: 1
-                    nsd:vnfd-id-ref: cirros_vnfd
-                    nsd:vnfd-connection-point-ref: eth0
-                -   nsd:member-vnf-index-ref: 2
-                    nsd:vnfd-id-ref: cirros_vnfd
-                    nsd:vnfd-connection-point-ref: eth0
+                -   member-vnf-index-ref: 1
+                    vnfd-id-ref: cirros_vnfd
+                    vnfd-connection-point-ref: eth0
+                -   member-vnf-index-ref: 2
+                    vnfd-id-ref: cirros_vnfd
+                    vnfd-connection-point-ref: eth0
diff --git a/descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png b/descriptor-packages/nsd/cirros_2vnf_ns/src/icons/osm_2x.png
similarity index 100%
copy from descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png
copy to descriptor-packages/nsd/cirros_2vnf_ns/src/icons/osm_2x.png
Binary files differ
diff --git a/descriptor-packages/nsd/cirros_noportsecurity_2vnf_ns/Makefile b/descriptor-packages/nsd/cirros_noportsecurity_2vnf_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/cirros_noportsecurity_2vnf_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/nsd/cirros_noportsecurity_2vnf_ns/src/README b/descriptor-packages/nsd/cirros_noportsecurity_2vnf_ns/src/README
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/descriptor-packages/nsd/cirros_noportsecurity_2vnf_ns/src/README
diff --git a/descriptor-packages/src/nsd/cirros_2vnf_ns/cirros_2vnf_nsd.yaml b/descriptor-packages/nsd/cirros_noportsecurity_2vnf_ns/src/cirros_noportsecurity_2vnf_nsd.yaml
similarity index 77%
copy from descriptor-packages/src/nsd/cirros_2vnf_ns/cirros_2vnf_nsd.yaml
copy to descriptor-packages/nsd/cirros_noportsecurity_2vnf_ns/src/cirros_noportsecurity_2vnf_nsd.yaml
index ed9433f..57ec12b 100644
--- a/descriptor-packages/src/nsd/cirros_2vnf_ns/cirros_2vnf_nsd.yaml
+++ b/descriptor-packages/nsd/cirros_noportsecurity_2vnf_ns/src/cirros_noportsecurity_2vnf_nsd.yaml
@@ -1,8 +1,8 @@
 nsd:nsd-catalog:
     nsd:
-    -   id: cirros_2vnf_nsd
-        name: cirros_2vnf_ns
-        short-name: cirros_2vnf_ns
+    -   id: cirros_noportsecurity_2vnf_nsd
+        name: cirros_noportsecurity_2vnf_ns
+        short-name: cirros_noportsecurity_2vnf_ns
         description: Generated by OSM pacakage generator
         vendor: OSM
         version: '1.0'
@@ -16,9 +16,9 @@
             # vnfd-id-ref is the id of the VNFD
             # Multiple constituent VNFDs can be specified
         -   member-vnf-index: 1
-            vnfd-id-ref: cirros_vnfd
+            vnfd-id-ref: cirros_noportsecurity_vnfd
         -   member-vnf-index: 2
-            vnfd-id-ref: cirros_vnfd
+            vnfd-id-ref: cirros_noportsecurity_vnfd
 
 
         vld:
@@ -27,6 +27,7 @@
                 name: cirros_2vnf_nsd_vld1
                 short-name: cirros_2vnf_nsd_vld1
                 type: ELAN
+                mgmt-network: 'true'
                 # vim-network-name: <update>
                 # provider-network:
                 #     overlay-type: VLAN
@@ -37,8 +38,8 @@
                 # vnfd-id-ref - VNFD id
                 # vnfd-connection-point-ref - connection point name in the VNFD
                 -   nsd:member-vnf-index-ref: 1
-                    nsd:vnfd-id-ref: cirros_vnfd
+                    nsd:vnfd-id-ref: cirros_noportsecurity_vnfd
                     nsd:vnfd-connection-point-ref: eth0
                 -   nsd:member-vnf-index-ref: 2
-                    nsd:vnfd-id-ref: cirros_vnfd
+                    nsd:vnfd-id-ref: cirros_noportsecurity_vnfd
                     nsd:vnfd-connection-point-ref: eth0
diff --git a/descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png b/descriptor-packages/nsd/cirros_noportsecurity_2vnf_ns/src/icons/osm_2x.png
similarity index 100%
copy from descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png
copy to descriptor-packages/nsd/cirros_noportsecurity_2vnf_ns/src/icons/osm_2x.png
Binary files differ
diff --git a/descriptor-packages/nsd/cirros_ns/Makefile b/descriptor-packages/nsd/cirros_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/cirros_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/nsd/cirros_ns/cirros_nsd.yaml b/descriptor-packages/nsd/cirros_ns/src/cirros_nsd.yaml
similarity index 90%
rename from descriptor-packages/src/nsd/cirros_ns/cirros_nsd.yaml
rename to descriptor-packages/nsd/cirros_ns/src/cirros_nsd.yaml
index 9ec4e27..d9d7476 100644
--- a/descriptor-packages/src/nsd/cirros_ns/cirros_nsd.yaml
+++ b/descriptor-packages/nsd/cirros_ns/src/cirros_nsd.yaml
@@ -34,6 +34,7 @@
             -   id: cirros_nsd_vld1
                 name: cirros_nsd_vld1
                 type: ELAN
+                mgmt-network: 'true'
                 # vim-network-name: <update>
                 # provider-network:
                 #     overlay-type: VLAN
@@ -43,7 +44,7 @@
                 # member-vnf-index-ref - entry from constituent vnf
                 # vnfd-id-ref - VNFD id
                 # vnfd-connection-point-ref - connection point name in the VNFD
-                -   nsd:member-vnf-index-ref: 1
-                    nsd:vnfd-id-ref: cirros_vnfd
+                -   member-vnf-index-ref: 1
+                    vnfd-id-ref: cirros_vnfd
                     # NOTE: Validate the entry below
-                    nsd:vnfd-connection-point-ref: eth0
+                    vnfd-connection-point-ref: eth0
diff --git a/descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png b/descriptor-packages/nsd/cirros_ns/src/icons/osm_2x.png
similarity index 100%
copy from descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png
copy to descriptor-packages/nsd/cirros_ns/src/icons/osm_2x.png
Binary files differ
diff --git a/descriptor-packages/nsd/cirros_set_vim_network_ns/Makefile b/descriptor-packages/nsd/cirros_set_vim_network_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/cirros_set_vim_network_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/nsd/cirros_ns/cirros_nsd.yaml b/descriptor-packages/nsd/cirros_set_vim_network_ns/src/cirros_set_vim_network_nsd.yaml
old mode 100644
new mode 100755
similarity index 89%
copy from descriptor-packages/src/nsd/cirros_ns/cirros_nsd.yaml
copy to descriptor-packages/nsd/cirros_set_vim_network_ns/src/cirros_set_vim_network_nsd.yaml
index 9ec4e27..e346830
--- a/descriptor-packages/src/nsd/cirros_ns/cirros_nsd.yaml
+++ b/descriptor-packages/nsd/cirros_set_vim_network_ns/src/cirros_set_vim_network_nsd.yaml
@@ -1,8 +1,8 @@
 nsd:nsd-catalog:
     nsd:
-    -   id: cirros_nsd
-        name: cirros_ns
-        short-name: cirros_ns
+    -   id: cirros_set_vim_network_ns
+        name: cirros_set_vim_network_ns
+        short-name: cirros_set_vim_network_ns
         description: Generated by OSM pacakage generator
         vendor: OSM
         version: '1.0'
@@ -34,10 +34,12 @@
             -   id: cirros_nsd_vld1
                 name: cirros_nsd_vld1
                 type: ELAN
+                mgmt-network: 'true'
                 # vim-network-name: <update>
                 # provider-network:
                 #     overlay-type: VLAN
                 #     segmentation_id: <update>
+                vim-network-name: mgmt
                 vnfd-connection-point-ref:
                 # Specify the constituent VNFs
                 # member-vnf-index-ref - entry from constituent vnf
diff --git a/descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png b/descriptor-packages/nsd/cirros_set_vim_network_ns/src/icons/osm_2x.png
old mode 100644
new mode 100755
similarity index 100%
copy from descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png
copy to descriptor-packages/nsd/cirros_set_vim_network_ns/src/icons/osm_2x.png
Binary files differ
diff --git a/descriptor-packages/nsd/dns_aws_ns/Makefile b/descriptor-packages/nsd/dns_aws_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/dns_aws_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/nsd/dns_aws_ns/src/dns_aws_nsd.yaml b/descriptor-packages/nsd/dns_aws_ns/src/dns_aws_nsd.yaml
new file mode 100755
index 0000000..d42568c
--- /dev/null
+++ b/descriptor-packages/nsd/dns_aws_ns/src/dns_aws_nsd.yaml
@@ -0,0 +1,19 @@
+nsd:nsd-catalog:
+    nsd:nsd:
+    -   nsd:constituent-vnfd:
+        -   nsd:member-vnf-index: '1'
+            nsd:start-by-default: 'true'
+            nsd:vnfd-id-ref: dns_forwarder
+        nsd:id: dns_forwarder_ns
+        nsd:logo: dns.jpg
+        nsd:name: dns_forwarder_ns
+        nsd:vld:
+        -   nsd:id: management
+            nsd:mgmt-network: 'true'
+            nsd:name: management
+            nsd:vim-network-name: subnet-8a91b2c0
+            nsd:vnfd-connection-point-ref:
+            -   nsd:member-vnf-index-ref: '1'
+                nsd:vnfd-connection-point-ref: eth0
+                nsd:vnfd-id-ref: dns_forwarder
+        rw-nsd:meta: '{"containerPositionMap":{"1":{"top":210.5,"left":248,"right":498,"bottom":265.5,"width":250,"height":55},"ada27681-7f3e-4768-8be8-41973f849066":{"top":30,"left":135,"right":385,"bottom":85,"width":250,"height":55},"vld-1":{"top":60,"left":495,"right":745,"bottom":98,"width":250,"height":38},"management":{"top":90,"left":480,"right":730,"bottom":128,"width":250,"height":38}}}'
diff --git a/descriptor-packages/nsd/dns_aws_ns/src/icons/dns.jpg b/descriptor-packages/nsd/dns_aws_ns/src/icons/dns.jpg
new file mode 100644
index 0000000..6cec5e1
--- /dev/null
+++ b/descriptor-packages/nsd/dns_aws_ns/src/icons/dns.jpg
Binary files differ
diff --git a/descriptor-packages/nsd/ims_allin1_corpa/Makefile b/descriptor-packages/nsd/ims_allin1_corpa/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/ims_allin1_corpa/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/nsd/ims_allin1_corpa/IMS-corpA__nsd.yaml b/descriptor-packages/nsd/ims_allin1_corpa/src/IMS-corpA__nsd.yaml
similarity index 98%
rename from descriptor-packages/src/nsd/ims_allin1_corpa/IMS-corpA__nsd.yaml
rename to descriptor-packages/nsd/ims_allin1_corpa/src/IMS-corpA__nsd.yaml
index cc613b3..01103f4 100644
--- a/descriptor-packages/src/nsd/ims_allin1_corpa/IMS-corpA__nsd.yaml
+++ b/descriptor-packages/nsd/ims_allin1_corpa/src/IMS-corpA__nsd.yaml
@@ -23,6 +23,7 @@
                 vnfd-connection-point-ref: eth0
                 vnfd-id-ref: IMS-ALLIN1_2p
         -   id: management
+            mgmt-network: 'true'
             name: management
             short-name: management
             type: ELAN
diff --git a/descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png b/descriptor-packages/nsd/ims_allin1_corpa/src/icons/osm_2x.png
similarity index 100%
copy from descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png
copy to descriptor-packages/nsd/ims_allin1_corpa/src/icons/osm_2x.png
Binary files differ
diff --git a/descriptor-packages/src/nsd/ims_allin1_corpa/vnf_config/IMS-ALLIN1_2p__1.yaml b/descriptor-packages/nsd/ims_allin1_corpa/src/vnf_config/IMS-ALLIN1_2p__1.yaml
similarity index 100%
rename from descriptor-packages/src/nsd/ims_allin1_corpa/vnf_config/IMS-ALLIN1_2p__1.yaml
rename to descriptor-packages/nsd/ims_allin1_corpa/src/vnf_config/IMS-ALLIN1_2p__1.yaml
diff --git a/descriptor-packages/nsd/ping_pong_ns/Makefile b/descriptor-packages/nsd/ping_pong_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/ping_pong_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/nsd/ping_pong_ns/icons/rift_logo.png b/descriptor-packages/nsd/ping_pong_ns/src/icons/rift_logo.png
similarity index 100%
rename from descriptor-packages/src/nsd/ping_pong_ns/icons/rift_logo.png
rename to descriptor-packages/nsd/ping_pong_ns/src/icons/rift_logo.png
Binary files differ
diff --git a/descriptor-packages/nsd/ping_pong_ns/src/ping_pong_nsd.yaml b/descriptor-packages/nsd/ping_pong_ns/src/ping_pong_nsd.yaml
new file mode 100644
index 0000000..ec13b26
--- /dev/null
+++ b/descriptor-packages/nsd/ping_pong_ns/src/ping_pong_nsd.yaml
@@ -0,0 +1,103 @@
+#
+#   Copyright 2016 RIFT.io Inc
+#
+#   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-catalog:
+    nsd:
+     -  id: rift_ping_pong_ns
+        logo: rift_logo.png
+        name: ping_pong_ns
+        short-name: ping_pong_ns
+        vendor: RIFT.io
+        version: '1.1'
+        description: RIFT.io sample ping pong network service
+        constituent-vnfd:
+        -   member-vnf-index: '1'
+            vnfd-id-ref: rift_ping_vnf
+        -   member-vnf-index: '2'
+            vnfd-id-ref: rift_pong_vnf
+        initial-service-primitive:
+        -   name: start traffic
+            parameter:
+            -   name: port
+                value: 5555
+            -   name: ssh-username
+                value: fedora
+            -   name: ssh-password
+                value: fedora
+            seq: '1'
+            user-defined-script: start_traffic.py
+        input-parameter-xpath:
+        -   xpath: /nsd:nsd-catalog/nsd:nsd/nsd:vendor
+        ip-profiles:
+        -   description: Inter VNF Link
+            ip-profile-params:
+                gateway-address: 31.31.31.210
+                ip-version: ipv4
+                subnet-address: 31.31.31.0/24
+                dhcp-params:
+                  count: 200
+                  start-address: 31.31.31.2
+            name: InterVNFLink
+        placement-groups:
+        -   member-vnfd:
+            -   member-vnf-index-ref: '1'
+                vnfd-id-ref: rift_ping_vnf
+            -   member-vnf-index-ref: '2'
+                vnfd-id-ref: rift_pong_vnf
+            name: Orcus
+            requirement: Place this VM on the Kuiper belt object Orcus
+            strategy: COLOCATION
+        -   member-vnfd:
+            -   member-vnf-index-ref: '1'
+                vnfd-id-ref: rift_ping_vnf
+            -   member-vnf-index-ref: '2'
+                vnfd-id-ref: rift_pong_vnf
+            name: Quaoar
+            requirement: Place this VM on the Kuiper belt object Quaoar
+            strategy: COLOCATION
+        vld:
+        -   id: mgmt_vl
+            description: Management VL
+            name: mgmt_vl
+            short-name: mgmt_vl
+            vim-network-name: mgmt
+            type: ELAN
+            vendor: RIFT.io
+            version: '1.0'
+            mgmt-network: 'true'
+            vnfd-connection-point-ref:
+            -   member-vnf-index-ref: '1'
+                vnfd-connection-point-ref: ping_vnfd/cp0
+                vnfd-id-ref: rift_ping_vnf
+            -   member-vnf-index-ref: '2'
+                vnfd-connection-point-ref: pong_vnfd/cp0
+                vnfd-id-ref: rift_pong_vnf
+        -   id: ping_pong_vl1
+            description: Data VL
+            ip-profile-ref: InterVNFLink
+            name: data_vl
+            short-name: data_vl
+            type: ELAN
+            vendor: RIFT.io
+            version: '1.0'
+            vnfd-connection-point-ref:
+            -   member-vnf-index-ref: '1'
+                vnfd-connection-point-ref: ping_vnfd/cp1
+                vnfd-id-ref: rift_ping_vnf
+            -   member-vnf-index-ref: '2'
+                vnfd-connection-point-ref: pong_vnfd/cp1
+                vnfd-id-ref: rift_pong_vnf
diff --git a/descriptor-packages/src/nsd/ping_pong_ns/scripts/start_traffic.py b/descriptor-packages/nsd/ping_pong_ns/src/scripts/start_traffic.py
similarity index 100%
rename from descriptor-packages/src/nsd/ping_pong_ns/scripts/start_traffic.py
rename to descriptor-packages/nsd/ping_pong_ns/src/scripts/start_traffic.py
diff --git a/descriptor-packages/nsd/ref1_ns/Makefile b/descriptor-packages/nsd/ref1_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/ref1_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/nsd/ref1_ns/ref1_nsd.yaml b/descriptor-packages/nsd/ref1_ns/src/ref1_nsd.yaml
similarity index 97%
rename from descriptor-packages/src/nsd/ref1_ns/ref1_nsd.yaml
rename to descriptor-packages/nsd/ref1_ns/src/ref1_nsd.yaml
index 465537c..161fc58 100644
--- a/descriptor-packages/src/nsd/ref1_ns/ref1_nsd.yaml
+++ b/descriptor-packages/nsd/ref1_ns/src/ref1_nsd.yaml
@@ -12,6 +12,7 @@
         vendor: ETSI
         vld:
         -   description: Mgmt VL
+            mgmt-network: 'true'
             id: 54c04
             name: VL1
             short-name: VL1
diff --git a/descriptor-packages/nsd/ref2_ns/Makefile b/descriptor-packages/nsd/ref2_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/ref2_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/nsd/ref2_ns/ref2_nsd.yaml b/descriptor-packages/nsd/ref2_ns/src/ref2_nsd.yaml
similarity index 97%
rename from descriptor-packages/src/nsd/ref2_ns/ref2_nsd.yaml
rename to descriptor-packages/nsd/ref2_ns/src/ref2_nsd.yaml
index 281fdee..974e2af 100644
--- a/descriptor-packages/src/nsd/ref2_ns/ref2_nsd.yaml
+++ b/descriptor-packages/nsd/ref2_ns/src/ref2_nsd.yaml
@@ -11,6 +11,7 @@
         vendor: ETSI
         vld:
         -   id: '97465'
+            mgmt-network: 'true'
             name: VL1
             vnfd-connection-point-ref:
             -   member-vnf-index-ref: '1'
diff --git a/descriptor-packages/nsd/ubuntu_cirros_multidisk_ns/Makefile b/descriptor-packages/nsd/ubuntu_cirros_multidisk_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/ubuntu_cirros_multidisk_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png b/descriptor-packages/nsd/ubuntu_cirros_multidisk_ns/src/icons/osm_2x.png
similarity index 100%
copy from descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png
copy to descriptor-packages/nsd/ubuntu_cirros_multidisk_ns/src/icons/osm_2x.png
Binary files differ
diff --git a/descriptor-packages/src/nsd/ubuntu_cirros_multidisk_ns/ubuntu_cirros_multidisk_nsd.yaml b/descriptor-packages/nsd/ubuntu_cirros_multidisk_ns/src/ubuntu_cirros_multidisk_nsd.yaml
similarity index 96%
rename from descriptor-packages/src/nsd/ubuntu_cirros_multidisk_ns/ubuntu_cirros_multidisk_nsd.yaml
rename to descriptor-packages/nsd/ubuntu_cirros_multidisk_ns/src/ubuntu_cirros_multidisk_nsd.yaml
index cbbe6a2..5f1a8d5 100644
--- a/descriptor-packages/src/nsd/ubuntu_cirros_multidisk_ns/ubuntu_cirros_multidisk_nsd.yaml
+++ b/descriptor-packages/nsd/ubuntu_cirros_multidisk_ns/src/ubuntu_cirros_multidisk_nsd.yaml
@@ -24,6 +24,7 @@
                 name: management
                 short-name: management
                 type: ELAN
+                mgmt-network: 'true'
                 vnfd-connection-point-ref:
                 # Specify the constituent VNFs
                 -   member-vnf-index-ref: 1
diff --git a/descriptor-packages/nsd/ubuntu_cloudinit_ns/Makefile b/descriptor-packages/nsd/ubuntu_cloudinit_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/ubuntu_cloudinit_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/nsd/ubuntu_cloudinit_ns/src/ubuntu_cloudinit_nsd.yaml b/descriptor-packages/nsd/ubuntu_cloudinit_ns/src/ubuntu_cloudinit_nsd.yaml
new file mode 100755
index 0000000..e768c77
--- /dev/null
+++ b/descriptor-packages/nsd/ubuntu_cloudinit_ns/src/ubuntu_cloudinit_nsd.yaml
@@ -0,0 +1,19 @@
+nsd:nsd-catalog:
+    nsd:nsd:
+    -   nsd:constituent-vnfd:
+        -   nsd:member-vnf-index: '1'
+            nsd:start-by-default: 'true'
+            nsd:vnfd-id-ref: ubuntu_1iface_cloudinit_newfile_vnfd
+        nsd:id: ubuntu_cloudinit
+        nsd:name: ubuntu_cloudinit
+        nsd:short-name: ubuntu_cloudinit
+        nsd:vld:
+        -   nsd:id: mgmt
+            nsd:mgmt-network: 'false'
+            nsd:name: mgmt
+            nsd:short-name: mgmt
+            mgmt-network: 'true'
+            nsd:vnfd-connection-point-ref:
+            -   nsd:member-vnf-index-ref: '1'
+                nsd:vnfd-connection-point-ref: eth0
+                nsd:vnfd-id-ref: ubuntu_1iface_cloudinit_newfile_vnfd
diff --git a/descriptor-packages/nsd/ubuntu_epa_virtio_ns/Makefile b/descriptor-packages/nsd/ubuntu_epa_virtio_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/ubuntu_epa_virtio_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/nsd/ubuntu_epa_virtio_ns/src/icons/tef.png b/descriptor-packages/nsd/ubuntu_epa_virtio_ns/src/icons/tef.png
new file mode 100644
index 0000000..fcaaf88
--- /dev/null
+++ b/descriptor-packages/nsd/ubuntu_epa_virtio_ns/src/icons/tef.png
Binary files differ
diff --git a/descriptor-packages/nsd/ubuntu_epa_virtio_ns/src/ubuntu_epa_virtio_nsd.yaml b/descriptor-packages/nsd/ubuntu_epa_virtio_ns/src/ubuntu_epa_virtio_nsd.yaml
new file mode 100755
index 0000000..82e55b9
--- /dev/null
+++ b/descriptor-packages/nsd/ubuntu_epa_virtio_ns/src/ubuntu_epa_virtio_nsd.yaml
@@ -0,0 +1,25 @@
+nsd:nsd-catalog:
+    nsd:
+    -   id: ubuntu_epa_virtio_ns
+        name: ubuntu_epa_virtio_ns
+        short-name: ubuntu_epa_virtio_ns
+        description: One VNF based on Ubuntu 16.04 with EPA and virtio connected to mgmt
+        vendor: OSM
+        version: '1.0'
+        logo: tef.png
+
+        constituent-vnfd:
+        -   member-vnf-index: 1
+            vnfd-id-ref: ubuntu_epa_virtio_vnf
+
+        vld:
+        -   id: mgmt
+            name: mgmt
+            short-name: mgmt
+            type: ELAN
+            mgmt-network: 'true'
+            vnfd-connection-point-ref:
+            -   member-vnf-index-ref: 1
+                vnfd-id-ref: ubuntu_epa_virtio_vnf
+                vnfd-connection-point-ref: eth0
+
diff --git a/descriptor-packages/nsd/ubuntu_xenial_ns/Makefile b/descriptor-packages/nsd/ubuntu_xenial_ns/Makefile
new file mode 100644
index 0000000..c5f5f69
--- /dev/null
+++ b/descriptor-packages/nsd/ubuntu_xenial_ns/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png b/descriptor-packages/nsd/ubuntu_xenial_ns/src/icons/osm_2x.png
similarity index 100%
copy from descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png
copy to descriptor-packages/nsd/ubuntu_xenial_ns/src/icons/osm_2x.png
Binary files differ
diff --git a/descriptor-packages/src/nsd/ubuntu_xenial_ns/ubuntu_xenial_nsd.yaml b/descriptor-packages/nsd/ubuntu_xenial_ns/src/ubuntu_xenial_nsd.yaml
similarity index 88%
rename from descriptor-packages/src/nsd/ubuntu_xenial_ns/ubuntu_xenial_nsd.yaml
rename to descriptor-packages/nsd/ubuntu_xenial_ns/src/ubuntu_xenial_nsd.yaml
index 7f91d43..6a46694 100644
--- a/descriptor-packages/src/nsd/ubuntu_xenial_ns/ubuntu_xenial_nsd.yaml
+++ b/descriptor-packages/nsd/ubuntu_xenial_ns/src/ubuntu_xenial_nsd.yaml
@@ -21,6 +21,7 @@
         vld:
         # Networks for the VNFs
             -   id: ubuntu_xenial_nsd_vld1
+                mgmt-network: 'true'
                 name: management
                 short-name: management
                 type: ELAN
@@ -34,7 +35,7 @@
                 # member-vnf-index-ref - entry from constituent vnf
                 # vnfd-id-ref - VNFD id
                 # vnfd-connection-point-ref - connection point name in the VNFD
-                -   nsd:member-vnf-index-ref: 1
-                    nsd:vnfd-id-ref: ubuntu_xenial_vnfd
+                -   member-vnf-index-ref: 1
+                    vnfd-id-ref: ubuntu_xenial_vnfd
                     # NOTE: Validate the entry below
-                    nsd:vnfd-connection-point-ref: eth0
+                    vnfd-connection-point-ref: eth0
diff --git a/descriptor-packages/src/nsd/cirros_2vnf_ns/icons/osm_2x.png b/descriptor-packages/src/nsd/cirros_2vnf_ns/icons/osm_2x.png
deleted file mode 100644
index 62012d2..0000000
--- a/descriptor-packages/src/nsd/cirros_2vnf_ns/icons/osm_2x.png
+++ /dev/null
Binary files differ
diff --git a/descriptor-packages/src/nsd/cirros_ns/icons/osm_2x.png b/descriptor-packages/src/nsd/cirros_ns/icons/osm_2x.png
deleted file mode 100644
index 62012d2..0000000
--- a/descriptor-packages/src/nsd/cirros_ns/icons/osm_2x.png
+++ /dev/null
Binary files differ
diff --git a/descriptor-packages/src/nsd/ims_allin1_corpa/icons/osm_2x.png b/descriptor-packages/src/nsd/ims_allin1_corpa/icons/osm_2x.png
deleted file mode 100644
index 62012d2..0000000
--- a/descriptor-packages/src/nsd/ims_allin1_corpa/icons/osm_2x.png
+++ /dev/null
Binary files differ
diff --git a/descriptor-packages/src/nsd/ping_pong_ns/ping_pong_nsd.yaml b/descriptor-packages/src/nsd/ping_pong_ns/ping_pong_nsd.yaml
deleted file mode 100644
index 268504c..0000000
--- a/descriptor-packages/src/nsd/ping_pong_ns/ping_pong_nsd.yaml
+++ /dev/null
@@ -1,102 +0,0 @@
-#
-#   Copyright 2016 RIFT.io Inc
-#
-#   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-catalog:
-    nsd:nsd:
-     -  nsd:id: rift_ping_pong_ns
-        nsd:logo: rift_logo.png
-        nsd:name: ping_pong_ns
-        nsd:short-name: ping_pong_ns
-        nsd:vendor: RIFT.io
-        nsd:version: '1.1'
-        nsd:description: RIFT.io sample ping pong network service
-        nsd:constituent-vnfd:
-        -   nsd:member-vnf-index: '1'
-            nsd:vnfd-id-ref: rift_ping_vnf
-        -   nsd:member-vnf-index: '2'
-            nsd:vnfd-id-ref: rift_pong_vnf
-        nsd:initial-config-primitive:
-        -   nsd:name: start traffic
-            nsd:parameter:
-            -   nsd:name: port
-                nsd:value: 5555
-            -   nsd:name: ssh-username
-                nsd:value: fedora
-            -   nsd:name: ssh-password
-                nsd:value: fedora
-            nsd:seq: '1'
-            nsd:user-defined-script: start_traffic.py
-        nsd:input-parameter-xpath:
-        -   nsd:xpath: /nsd:nsd-catalog/nsd:nsd/nsd:vendor
-        nsd:ip-profiles:
-        -   nsd:description: Inter VNF Link
-            nsd:ip-profile-params:
-                nsd:gateway-address: 31.31.31.210
-                nsd:ip-version: ipv4
-                nsd:subnet-address: 31.31.31.0/24
-                nsd:dhcp-params:
-                  nsd:count: 200
-                  nsd:start-address: 31.31.31.2
-            nsd:name: InterVNFLink
-        nsd:placement-groups:
-        -   nsd:member-vnfd:
-            -   nsd:member-vnf-index-ref: '1'
-                nsd:vnfd-id-ref: rift_ping_vnf
-            -   nsd:member-vnf-index-ref: '2'
-                nsd:vnfd-id-ref: rift_pong_vnf
-            nsd:name: Orcus
-            nsd:requirement: Place this VM on the Kuiper belt object Orcus
-            nsd:strategy: COLOCATION
-        -   nsd:member-vnfd:
-            -   nsd:member-vnf-index-ref: '1'
-                nsd:vnfd-id-ref: rift_ping_vnf
-            -   nsd:member-vnf-index-ref: '2'
-                nsd:vnfd-id-ref: rift_pong_vnf
-            nsd:name: Quaoar
-            nsd:requirement: Place this VM on the Kuiper belt object Quaoar
-            nsd:strategy: COLOCATION
-        nsd:vld:
-        -   nsd:id: mgmt_vl
-            nsd:description: Management VL
-            nsd:name: mgmt_vl
-            nsd:short-name: mgmt_vl
-            nsd:type: ELAN
-            nsd:vendor: RIFT.io
-            nsd:version: '1.0'
-            nsd:mgmt-network: 'true'
-            nsd:vnfd-connection-point-ref:
-            -   nsd:member-vnf-index-ref: '1'
-                nsd:vnfd-connection-point-ref: ping_vnfd/cp0
-                nsd:vnfd-id-ref: rift_ping_vnf
-            -   nsd:member-vnf-index-ref: '2'
-                nsd:vnfd-connection-point-ref: pong_vnfd/cp0
-                nsd:vnfd-id-ref: rift_pong_vnf
-        -   nsd:id: ping_pong_vl1
-            nsd:description: Data VL
-            nsd:ip-profile-ref: InterVNFLink
-            nsd:name: data_vl
-            nsd:short-name: data_vl
-            nsd:type: ELAN
-            nsd:vendor: RIFT.io
-            nsd:version: '1.0'
-            nsd:vnfd-connection-point-ref:
-            -   nsd:member-vnf-index-ref: '1'
-                nsd:vnfd-connection-point-ref: ping_vnfd/cp1
-                nsd:vnfd-id-ref: rift_ping_vnf
-            -   nsd:member-vnf-index-ref: '2'
-                nsd:vnfd-connection-point-ref: pong_vnfd/cp1
-                nsd:vnfd-id-ref: rift_pong_vnf
diff --git a/descriptor-packages/src/nsd/ubuntu_cirros_multidisk_ns/icons/osm_2x.png b/descriptor-packages/src/nsd/ubuntu_cirros_multidisk_ns/icons/osm_2x.png
deleted file mode 100644
index 62012d2..0000000
--- a/descriptor-packages/src/nsd/ubuntu_cirros_multidisk_ns/icons/osm_2x.png
+++ /dev/null
Binary files differ
diff --git a/descriptor-packages/src/nsd/ubuntu_xenial_ns/icons/osm_2x.png b/descriptor-packages/src/nsd/ubuntu_xenial_ns/icons/osm_2x.png
deleted file mode 100644
index 62012d2..0000000
--- a/descriptor-packages/src/nsd/ubuntu_xenial_ns/icons/osm_2x.png
+++ /dev/null
Binary files differ
diff --git a/descriptor-packages/src/vnfd/VyOS_vnf/icons/osm_2x.png b/descriptor-packages/src/vnfd/VyOS_vnf/icons/osm_2x.png
deleted file mode 100644
index 62012d2..0000000
--- a/descriptor-packages/src/vnfd/VyOS_vnf/icons/osm_2x.png
+++ /dev/null
Binary files differ
diff --git a/descriptor-packages/src/vnfd/pong_vnf/icons/rift_logo.png b/descriptor-packages/src/vnfd/pong_vnf/icons/rift_logo.png
deleted file mode 100644
index 09b47c7..0000000
--- a/descriptor-packages/src/vnfd/pong_vnf/icons/rift_logo.png
+++ /dev/null
Binary files differ
diff --git a/descriptor-packages/src/gen_nsd_pkg.sh b/descriptor-packages/tools/gen_nsd_pkg.sh
similarity index 95%
rename from descriptor-packages/src/gen_nsd_pkg.sh
rename to descriptor-packages/tools/gen_nsd_pkg.sh
index 07761d2..4ac1ec4 100755
--- a/descriptor-packages/src/gen_nsd_pkg.sh
+++ b/descriptor-packages/tools/gen_nsd_pkg.sh
@@ -42,7 +42,7 @@
     exit 1
 fi
 
-echo "Generating package in directory: ${pkg_dest_dir}"
+#echo "Generating package in directory: ${pkg_dest_dir}"
 
 # Create any missing directories/files so each package has
 # a complete hierachy
@@ -50,7 +50,7 @@
 nsd_files=( README )
 
 nsd_dir="${pkg_src_dir}"
-echo $(pwd)
+#echo $(pwd)
 
 mkdir -p "${pkg_dest_dir}"
 cp -rf ${nsd_dir}/* "${pkg_dest_dir}"
diff --git a/descriptor-packages/src/gen_vnfd_pkg.sh b/descriptor-packages/tools/gen_vnfd_pkg.sh
similarity index 95%
rename from descriptor-packages/src/gen_vnfd_pkg.sh
rename to descriptor-packages/tools/gen_vnfd_pkg.sh
index 81a655c..185a6b4 100755
--- a/descriptor-packages/src/gen_vnfd_pkg.sh
+++ b/descriptor-packages/tools/gen_vnfd_pkg.sh
@@ -42,7 +42,7 @@
     exit 1
 fi
 
-echo "Generating package in directory: ${pkg_dest_dir}"
+#echo "Generating package in directory: ${pkg_dest_dir}"
 
 # Create any missing directories/files so each package has
 # a complete hierachy
@@ -50,7 +50,7 @@
 vnfd_files=( README )
 
 vnfd_dir="${pkg_src_dir}"
-echo $(pwd)
+#echo $(pwd)
 
 mkdir -p "${pkg_dest_dir}"
 cp -rf ${vnfd_dir}/* "${pkg_dest_dir}"
diff --git a/descriptor-packages/src/generate_descriptor_pkg.sh b/descriptor-packages/tools/generate_descriptor_pkg.sh
similarity index 97%
rename from descriptor-packages/src/generate_descriptor_pkg.sh
rename to descriptor-packages/tools/generate_descriptor_pkg.sh
index a09fb6a..5cf2510 100755
--- a/descriptor-packages/src/generate_descriptor_pkg.sh
+++ b/descriptor-packages/tools/generate_descriptor_pkg.sh
@@ -220,7 +220,7 @@
 
     # Add external interfaces
     cat >>$desc_file <<EOF
-            external-interface:
+            interface:
             # Specify the external interfaces
             # There can be multiple interfaces defined
 EOF
@@ -228,11 +228,12 @@
     # Add mgmt interface
     cat >>$desc_file <<EOF
             -   name: eth0
+                type: EXTERNAL
                 virtual-interface:
                     type: VIRTIO
                     bandwidth: '0'
                     vpci: '0000:00:0a.0'
-                vnfd-connection-point-ref: eth0
+                external-connection-point-ref: eth0
 EOF
 
     # Add external interfaces
@@ -241,11 +242,12 @@
         pci=$(get_pci $eth)
         cat >>$desc_file <<EOF
             -   name: eth${eth}
+                type: EXTERNAL
                 virtual-interface:
                     type: ${INTF_TYPE}
                     bandwidth: '0'
                     vpci: '0000:00:${pci}.0'
-                vnfd-connection-point-ref: eth${eth}
+                external-connection-point-ref: eth${eth}
 EOF
     done
 
@@ -554,7 +556,7 @@
     exit 1
 fi
 
-echo "$OPTS"
+#echo "$OPTS"
 eval set -- "$OPTS >/dev/null 2>&1"
 
 while true; do
@@ -795,7 +797,12 @@
 
     cd $BASE_DIR
     if [ $DRY_RUN == false ]; then
-        tar zcvf "$DEST_DIR/$PKG.tar.gz" "${PKG}" ${RM}
+        if [ $VERBOSE == true ]; then
+            tar zcvf "$DEST_DIR/$PKG.tar.gz" "${PKG}" ${RM}
+        else
+            #tar zcvf ${name}.tar.gz ${name} >/dev/null 2>&1
+            tar zcvf "$DEST_DIR/$PKG.tar.gz" "${PKG}" ${RM} > /dev/null 2>&1
+        fi
         if [ $? -ne 0 ]; then
             rc=$?
             echo "ERROR: creating archive for $PKG ($rc)" >&2
diff --git a/descriptor-packages/vnfd/Makefile b/descriptor-packages/vnfd/Makefile
new file mode 100644
index 0000000..fdd2045
--- /dev/null
+++ b/descriptor-packages/vnfd/Makefile
@@ -0,0 +1,18 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+SUBDIRS = $(wildcard */)
+TOPDIR ?= ../
+include $(TOPDIR)/mk/dirs.mk
diff --git a/descriptor-packages/vnfd/VyOS_vnf/Makefile b/descriptor-packages/vnfd/VyOS_vnf/Makefile
new file mode 100644
index 0000000..a08d588
--- /dev/null
+++ b/descriptor-packages/vnfd/VyOS_vnf/Makefile
@@ -0,0 +1,21 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/vnfd/VyOS_vnf/VyOS__vnfd.yaml b/descriptor-packages/vnfd/VyOS_vnf/src/VyOS__vnfd.yaml
similarity index 85%
rename from descriptor-packages/src/vnfd/VyOS_vnf/VyOS__vnfd.yaml
rename to descriptor-packages/vnfd/VyOS_vnf/src/VyOS__vnfd.yaml
index 0ac926f..b115d91 100644
--- a/descriptor-packages/src/vnfd/VyOS_vnf/VyOS__vnfd.yaml
+++ b/descriptor-packages/vnfd/VyOS_vnf/src/VyOS__vnfd.yaml
@@ -6,11 +6,8 @@
         description: VyOS Router
         logo: osm_2x.png
         mgmt-interface:
-            vdu-id: VyOS-VM
+            cp: eth0
         vnf-configuration:
-            config-attributes:
-                config-delay: '0'
-                config-priority: '1'
             service-primitive:
             -   name: config
                 parameter:
@@ -62,37 +59,42 @@
                 storage-gb: '40'
                 vcpu-count: '1'
             mgmt-vpci: 0000:00:0a.0
-            external-interface:
+            interface:
             -   name: eth0
+                type: EXTERNAL
                 virtual-interface:
                     bandwidth: '0'
-                    type: OM-MGMT
+                    type: VIRTIO
                     vpci: 0000:00:0a.0
-                vnfd-connection-point-ref: eth0
+                external-connection-point-ref: eth0
             -   name: eth1
+                type: EXTERNAL
                 virtual-interface:
                     bandwidth: '0'
                     type: VIRTIO
                     vpci: 0000:00:0b.0
-                vnfd-connection-point-ref: eth1
+                external-connection-point-ref: eth1
             -   name: eth2
+                type: EXTERNAL
                 virtual-interface:
                     bandwidth: '0'
                     type: VIRTIO
                     vpci: 0000:00:0c.0
-                vnfd-connection-point-ref: eth2
+                external-connection-point-ref: eth2
             -   name: eth3
+                type: EXTERNAL
                 virtual-interface:
                     bandwidth: '0'
                     type: VIRTIO
                     vpci: 0000:00:0d.0
-                vnfd-connection-point-ref: eth3
+                external-connection-point-ref: eth3
             -   name: eth4
+                type: EXTERNAL
                 virtual-interface:
                     bandwidth: '0'
                     type: VIRTIO
                     vpci: 0000:00:0e.0
-                vnfd-connection-point-ref: eth4
+                external-connection-point-ref: eth4
             guest-epa:
                 cpu-pinning-policy: DEDICATED
                 cpu-thread-pinning-policy: PREFER
diff --git a/descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png b/descriptor-packages/vnfd/VyOS_vnf/src/icons/osm_2x.png
similarity index 100%
copy from descriptor-packages/src/nsd/VyOS_ns/icons/osm_2x.png
copy to descriptor-packages/vnfd/VyOS_vnf/src/icons/osm_2x.png
Binary files differ
diff --git a/descriptor-packages/vnfd/cirros_noportsecurity_vnf/Makefile b/descriptor-packages/vnfd/cirros_noportsecurity_vnf/Makefile
new file mode 100644
index 0000000..ad4b68c
--- /dev/null
+++ b/descriptor-packages/vnfd/cirros_noportsecurity_vnf/Makefile
@@ -0,0 +1,19 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/vnfd/cirros_noportsecurity_vnf/src/README b/descriptor-packages/vnfd/cirros_noportsecurity_vnf/src/README
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/descriptor-packages/vnfd/cirros_noportsecurity_vnf/src/README
diff --git a/descriptor-packages/src/vnfd/cirros_vnf/cirros_vnfd.yaml b/descriptor-packages/vnfd/cirros_noportsecurity_vnf/src/cirros_noportsecurity_vnfd.yaml
old mode 100644
new mode 100755
similarity index 77%
copy from descriptor-packages/src/vnfd/cirros_vnf/cirros_vnfd.yaml
copy to descriptor-packages/vnfd/cirros_noportsecurity_vnf/src/cirros_noportsecurity_vnfd.yaml
index e643b38..d34414e
--- a/descriptor-packages/src/vnfd/cirros_vnf/cirros_vnfd.yaml
+++ b/descriptor-packages/vnfd/cirros_noportsecurity_vnf/src/cirros_noportsecurity_vnfd.yaml
@@ -1,8 +1,8 @@
 vnfd:vnfd-catalog:
     vnfd:
-    -   id: cirros_vnfd
-        name: cirros_vnf
-        short-name: cirros_vnf
+    -   id: cirros_noportsecurity_vnfd
+        name: cirros_noportsecurity_vnf
+        short-name: cirros_noportsecurity_vnf
         description: Simple VNF example with a cirros 
         vendor: OSM
         version: '1.0'
@@ -12,7 +12,7 @@
 
         # Management interface
         mgmt-interface:
-            vdu-id: cirros_vnfd-VM
+            cp: eth0
 
         # Atleast one VDU need to be specified
         vdu:
@@ -32,16 +32,18 @@
             image: 'CirrOS 0.3.4 64-bit'
             #checksum: 
 
-            external-interface:
+            interface:
             # Specify the external interfaces
             # There can be multiple interfaces defined
             -   name: eth0
+                type: EXTERNAL
                 virtual-interface:
-                    type: OM-MGMT
+                    type: VIRTIO
                     bandwidth: '0'
                     vpci: 0000:00:0a.0
-                vnfd-connection-point-ref: eth0
+                external-connection-point-ref: eth0
 
         connection-point:
             -   name: eth0
                 type: VPORT
+                port-security-enabled: "false"
diff --git a/descriptor-packages/src/vnfd/cirros_vnf/icons/cirros-64.png b/descriptor-packages/vnfd/cirros_noportsecurity_vnf/src/icons/cirros-64.png
old mode 100644
new mode 100755
similarity index 100%
copy from descriptor-packages/src/vnfd/cirros_vnf/icons/cirros-64.png
copy to descriptor-packages/vnfd/cirros_noportsecurity_vnf/src/icons/cirros-64.png
Binary files differ
diff --git a/descriptor-packages/vnfd/cirros_vnf/Makefile b/descriptor-packages/vnfd/cirros_vnf/Makefile
new file mode 100644
index 0000000..ad4b68c
--- /dev/null
+++ b/descriptor-packages/vnfd/cirros_vnf/Makefile
@@ -0,0 +1,19 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/vnfd/cirros_vnf/cirros_vnfd.yaml b/descriptor-packages/vnfd/cirros_vnf/src/cirros_vnfd.yaml
similarity index 84%
rename from descriptor-packages/src/vnfd/cirros_vnf/cirros_vnfd.yaml
rename to descriptor-packages/vnfd/cirros_vnf/src/cirros_vnfd.yaml
index e643b38..ee30fb3 100644
--- a/descriptor-packages/src/vnfd/cirros_vnf/cirros_vnfd.yaml
+++ b/descriptor-packages/vnfd/cirros_vnf/src/cirros_vnfd.yaml
@@ -12,7 +12,7 @@
 
         # Management interface
         mgmt-interface:
-            vdu-id: cirros_vnfd-VM
+            cp: eth0
 
         # Atleast one VDU need to be specified
         vdu:
@@ -29,18 +29,19 @@
                 storage-gb: 2
 
             # Image/checksum or image including the full path
-            image: 'CirrOS 0.3.4 64-bit'
+            image: 'cirros-0.3.5-x86_64-disk.img'
             #checksum: 
 
-            external-interface:
+            interface:
             # Specify the external interfaces
             # There can be multiple interfaces defined
             -   name: eth0
+                type: EXTERNAL
                 virtual-interface:
-                    type: OM-MGMT
+                    type: VIRTIO
                     bandwidth: '0'
                     vpci: 0000:00:0a.0
-                vnfd-connection-point-ref: eth0
+                external-connection-point-ref: eth0
 
         connection-point:
             -   name: eth0
diff --git a/descriptor-packages/src/vnfd/cirros_vnf/icons/cirros-64.png b/descriptor-packages/vnfd/cirros_vnf/src/icons/cirros-64.png
similarity index 100%
rename from descriptor-packages/src/vnfd/cirros_vnf/icons/cirros-64.png
rename to descriptor-packages/vnfd/cirros_vnf/src/icons/cirros-64.png
Binary files differ
diff --git a/descriptor-packages/vnfd/dns_aws_vnfd/Makefile b/descriptor-packages/vnfd/dns_aws_vnfd/Makefile
new file mode 100644
index 0000000..ad4b68c
--- /dev/null
+++ b/descriptor-packages/vnfd/dns_aws_vnfd/Makefile
@@ -0,0 +1,19 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/vnfd/dns_aws_vnfd/src/cloud_init/cloud_init.cfg b/descriptor-packages/vnfd/dns_aws_vnfd/src/cloud_init/cloud_init.cfg
new file mode 100644
index 0000000..00c41b7
--- /dev/null
+++ b/descriptor-packages/vnfd/dns_aws_vnfd/src/cloud_init/cloud_init.cfg
@@ -0,0 +1,23 @@
+#cloud-config
+
+password: c0mpl3xp4ssw0rd
+chpasswd: { expire: False }
+ssh_pwauth: True
+
+write_files:
+-   content: |
+        # My new helloworld file
+        sudo apt update
+        sudo apt install dnsmasq -y
+        sudo bash -c 'cat << EOF > /etc/dnsmasq.conf
+        strict-order
+        interface=eth0
+        no-dhcp-interface=eth0
+        EOF'
+    owner: root:root
+    permissions: '0774'
+    path: /tmp/configure_dns
+
+runcmd:
+ - /tmp/configure_dns
+
diff --git a/descriptor-packages/vnfd/dns_aws_vnfd/src/dns_aws_vnfd.yaml b/descriptor-packages/vnfd/dns_aws_vnfd/src/dns_aws_vnfd.yaml
new file mode 100755
index 0000000..8a5f40f
--- /dev/null
+++ b/descriptor-packages/vnfd/dns_aws_vnfd/src/dns_aws_vnfd.yaml
@@ -0,0 +1,39 @@
+vnfd:vnfd-catalog:
+    vnfd:vnfd:
+    -   rw-vnfd:meta: '{"containerPositionMap":{"dns_forwarder":{"top":30,"left":260,"right":510,"bottom":85,"width":250,"height":55},"dns_forwarder/dns_forwarder-VM":{"top":130,"left":260,"right":510,"bottom":185,"width":250,"height":55}}}'
+        vnfd:connection-point:
+        -   vnfd:name: eth0
+            vnfd:type: VPORT
+        vnfd:description: Simple VNF example with a DNS forwarder
+        vnfd:id: dns_forwarder
+        vnfd:logo: dns.jpg
+        vnfd:mgmt-interface:
+            vnfd:cp: eth0
+        vnfd:name: dns_forwarder
+        vnfd:service-function-chain: UNAWARE
+        vnfd:short-name: dns_forwarder
+        vnfd:vdu:
+        -   vnfd:count: '1'
+            vnfd:description: dns_forwarder-VM
+            vnfd:interface:
+            -   vnfd:name: eth0
+                vnfd:type: EXTERNAL
+                vnfd:virtual-interface:
+                    vnfd:bandwidth: '0'
+                    vnfd:type: VIRTIO
+                    vnfd:vpci: 0000:00:0a.0
+                vnfd:external-connection-point-ref: eth0
+            vnfd:guest-epa:
+                vnfd:cpu-pinning-policy: ANY
+            vnfd:id: dns_forwarder-VM
+            vnfd:image: ubuntu/images/hvm-ssd/ubuntu-zesty-17.04-amd64-server-20170619.1
+            vnfd:cloud-init-file: cloud_init.cfg
+            vnfd:name: dns_forwarder-VM
+            vnfd:supplemental-boot-data:
+                vnfd:boot-data-drive: 'false'
+            vnfd:vm-flavor:
+                vnfd:memory-mb: '1024'
+                vnfd:storage-gb: '1'
+                vnfd:vcpu-count: '1'
+        vnfd:vendor: OSM
+        vnfd:version: '1.0'
diff --git a/descriptor-packages/vnfd/dns_aws_vnfd/src/icons/dns.jpg b/descriptor-packages/vnfd/dns_aws_vnfd/src/icons/dns.jpg
new file mode 100644
index 0000000..6cec5e1
--- /dev/null
+++ b/descriptor-packages/vnfd/dns_aws_vnfd/src/icons/dns.jpg
Binary files differ
diff --git a/descriptor-packages/vnfd/ims_allin1_2p_vnf/Makefile b/descriptor-packages/vnfd/ims_allin1_2p_vnf/Makefile
new file mode 100644
index 0000000..52d95b5
--- /dev/null
+++ b/descriptor-packages/vnfd/ims_allin1_2p_vnf/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+DESCRIPTORS_TOPDIR ?= ../..
+
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/vnfd/ims_allin1_2p_vnf/IMS-ALLIN1__vnfd.yaml b/descriptor-packages/vnfd/ims_allin1_2p_vnf/src/IMS-ALLIN1__vnfd.yaml
similarity index 89%
rename from descriptor-packages/src/vnfd/ims_allin1_2p_vnf/IMS-ALLIN1__vnfd.yaml
rename to descriptor-packages/vnfd/ims_allin1_2p_vnf/src/IMS-ALLIN1__vnfd.yaml
index b73e110..2b859ae 100644
--- a/descriptor-packages/src/vnfd/ims_allin1_2p_vnf/IMS-ALLIN1__vnfd.yaml
+++ b/descriptor-packages/vnfd/ims_allin1_2p_vnf/src/IMS-ALLIN1__vnfd.yaml
@@ -6,11 +6,8 @@
         description: IMS-ALLIN1_2p
         logo: metaswitch_2x.png
         mgmt-interface:
-            vdu-id: IMS-ALLIN1_2p-VM
+            cp: eth1
         vnf-configuration:
-            config-attributes:
-                config-delay: '0'
-                config-priority: '1'
             service-primitive:
             -   name: config
                 parameter:
@@ -58,19 +55,21 @@
                 storage-gb: '10'
                 vcpu-count: '2'
             mgmt-vpci: 0000:00:0a.0
-            external-interface:
+            interface:
             -   name: eth0
+                type: EXTERNAL
                 virtual-interface:
                     bandwidth: '0'
                     type: VIRTIO
                     vpci: 0000:00:0a.0
-                vnfd-connection-point-ref: eth0
+                external-connection-point-ref: eth0
             -   name: eth1
+                type: EXTERNAL
                 virtual-interface:
                     bandwidth: '0'
-                    type: OM-MGMT
+                    type: VIRTIO
                     vpci: 0000:00:0b.0
-                vnfd-connection-point-ref: eth1
+                external-connection-point-ref: eth1
             guest-epa:
                 cpu-pinning-policy: DEDICATED
                 cpu-thread-pinning-policy: PREFER
diff --git a/descriptor-packages/src/vnfd/ims_allin1_2p_vnf/icons/metaswitch_2x.png b/descriptor-packages/vnfd/ims_allin1_2p_vnf/src/icons/metaswitch_2x.png
similarity index 100%
rename from descriptor-packages/src/vnfd/ims_allin1_2p_vnf/icons/metaswitch_2x.png
rename to descriptor-packages/vnfd/ims_allin1_2p_vnf/src/icons/metaswitch_2x.png
Binary files differ
diff --git a/descriptor-packages/vnfd/ping_vnf/Makefile b/descriptor-packages/vnfd/ping_vnf/Makefile
new file mode 100644
index 0000000..8c50a0a
--- /dev/null
+++ b/descriptor-packages/vnfd/ping_vnf/Makefile
@@ -0,0 +1,21 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+DESCRIPTORS_TOPDIR ?= ../..
+
+VNFD_CHARM = pingpong
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/vnfd/ping_vnf/cloud_init/ping_cloud_init.cfg b/descriptor-packages/vnfd/ping_vnf/src/cloud_init/ping_cloud_init.cfg
similarity index 100%
rename from descriptor-packages/src/vnfd/ping_vnf/cloud_init/ping_cloud_init.cfg
rename to descriptor-packages/vnfd/ping_vnf/src/cloud_init/ping_cloud_init.cfg
diff --git a/descriptor-packages/src/vnfd/ping_vnf/icons/rift_logo.png b/descriptor-packages/vnfd/ping_vnf/src/icons/rift_logo.png
similarity index 100%
rename from descriptor-packages/src/vnfd/ping_vnf/icons/rift_logo.png
rename to descriptor-packages/vnfd/ping_vnf/src/icons/rift_logo.png
Binary files differ
diff --git a/descriptor-packages/src/vnfd/ping_vnf/ping_vnfd.yaml b/descriptor-packages/vnfd/ping_vnf/src/ping_vnfd.yaml
similarity index 85%
rename from descriptor-packages/src/vnfd/ping_vnf/ping_vnfd.yaml
rename to descriptor-packages/vnfd/ping_vnf/src/ping_vnfd.yaml
index 60f00cf..bfea210 100644
--- a/descriptor-packages/src/vnfd/ping_vnf/ping_vnfd.yaml
+++ b/descriptor-packages/vnfd/ping_vnf/src/ping_vnfd.yaml
@@ -16,7 +16,7 @@
 #
 
 vnfd:vnfd-catalog:
-    vnfd:vnfd:
+    vnfd:
      -  id: rift_ping_vnf
         name: ping_vnf
         short-name: ping_vnf
@@ -31,32 +31,35 @@
             type: VPORT
         http-endpoint:
         -   path: api/v1/ping/stats
-            polling_interval_secs: '2'
             port: '18888'
         mgmt-interface:
             dashboard-params:
                 path: api/v1/ping/stats
                 port: '18888'
             port: '18888'
-            vdu-id: iovdu_0
-        placement-groups:
-        -   member-vdus:
-            -   member-vdu-ref: iovdu_0
-            name: Eris
-            requirement: Place this VM on the Kuiper belt object Eris
-            strategy: COLOCATION
+            cp: ping_vnfd/cp0
+        # placement-groups:
+        # -   member-vdus:
+        #     -   member-vdu-ref: iovdu_0
+        #     name: Eris
+        #     requirement: Place this VM on the Kuiper belt object Eris
+        #     strategy: COLOCATION
         vdu:
         -   cloud-init-file: ping_cloud_init.cfg
             count: '1'
-            external-interface:
+            interface:
             -   name: eth0
+                position: 0
+                type: EXTERNAL
                 virtual-interface:
                     type: VIRTIO
-                vnfd-connection-point-ref: ping_vnfd/cp0
+                external-connection-point-ref: ping_vnfd/cp0
             -   name: eth1
+                position: 1
+                type: EXTERNAL
                 virtual-interface:
                     type: VIRTIO
-                vnfd-connection-point-ref: ping_vnfd/cp1
+                external-connection-point-ref: ping_vnfd/cp1
             id: iovdu_0
             image: Fedora-x86_64-20-20131211.1-sda-ping.qcow2
             name: iovdu_0
@@ -65,9 +68,7 @@
                 storage-gb: '4'
                 vcpu-count: '1'
         vnf-configuration:
-            config-attributes:
-                config-delay: 10
-            service-primitive:
+            config-primitive:
             -   name: start
             -   name: stop
             -   name: restart
diff --git a/descriptor-packages/vnfd/pong_vnf/Makefile b/descriptor-packages/vnfd/pong_vnf/Makefile
new file mode 100644
index 0000000..8c50a0a
--- /dev/null
+++ b/descriptor-packages/vnfd/pong_vnf/Makefile
@@ -0,0 +1,21 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+DESCRIPTORS_TOPDIR ?= ../..
+
+VNFD_CHARM = pingpong
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/vnfd/pong_vnf/cloud_init/pong_cloud_init.cfg b/descriptor-packages/vnfd/pong_vnf/src/cloud_init/pong_cloud_init.cfg
similarity index 100%
rename from descriptor-packages/src/vnfd/pong_vnf/cloud_init/pong_cloud_init.cfg
rename to descriptor-packages/vnfd/pong_vnf/src/cloud_init/pong_cloud_init.cfg
diff --git a/descriptor-packages/src/vnfd/ping_vnf/icons/rift_logo.png b/descriptor-packages/vnfd/pong_vnf/src/icons/rift_logo.png
similarity index 100%
copy from descriptor-packages/src/vnfd/ping_vnf/icons/rift_logo.png
copy to descriptor-packages/vnfd/pong_vnf/src/icons/rift_logo.png
Binary files differ
diff --git a/descriptor-packages/src/vnfd/pong_vnf/pong_vnfd.yaml b/descriptor-packages/vnfd/pong_vnf/src/pong_vnfd.yaml
similarity index 85%
rename from descriptor-packages/src/vnfd/pong_vnf/pong_vnfd.yaml
rename to descriptor-packages/vnfd/pong_vnf/src/pong_vnfd.yaml
index b6bc9a1..536198b 100644
--- a/descriptor-packages/src/vnfd/pong_vnf/pong_vnfd.yaml
+++ b/descriptor-packages/vnfd/pong_vnf/src/pong_vnfd.yaml
@@ -31,32 +31,35 @@
             type: VPORT
         http-endpoint:
         -   path: api/v1/pong/stats
-            polling_interval_secs: '2'
             port: '18889'
         mgmt-interface:
             dashboard-params:
                 path: api/v1/pong/stats
                 port: '18889'
             port: '18889'
-            vdu-id: iovdu_0
-        placement-groups:
-        -   member-vdus:
-            -   member-vdu-ref: iovdu_0
-            name: Weywot
-            requirement: Place this VM on the Kuiper belt object Weywot
-            strategy: COLOCATION
+            cp: pong_vnfd/cp0
+        # placement-groups:
+        # -   member-vdus:
+        #     -   member-vdu-ref: iovdu_0
+        #     name: Weywot
+        #     requirement: Place this VM on the Kuiper belt object Weywot
+        #     strategy: COLOCATION
         vdu:
         -   cloud-init-file: pong_cloud_init.cfg
             count: '1'
-            external-interface:
+            interface:
             -   name: eth0
+                position: 0
+                type: EXTERNAL
                 virtual-interface:
                     type: VIRTIO
-                vnfd-connection-point-ref: pong_vnfd/cp0
+                external-connection-point-ref: pong_vnfd/cp0
             -   name: eth1
+                position: 1
+                type: EXTERNAL
                 virtual-interface:
                     type: VIRTIO
-                vnfd-connection-point-ref: pong_vnfd/cp1
+                external-connection-point-ref: pong_vnfd/cp1
             id: iovdu_0
             image: Fedora-x86_64-20-20131211.1-sda-pong.qcow2
             name: iovdu_0
@@ -65,9 +68,7 @@
                 storage-gb: '4'
                 vcpu-count: '1'
         vnf-configuration:
-            config-attributes:
-                config-delay: 10
-            service-primitive:
+            config-primitive:
             -   name: start
             -   name: stop
             -   name: restart
diff --git a/descriptor-packages/vnfd/ref11_vnf/Makefile b/descriptor-packages/vnfd/ref11_vnf/Makefile
new file mode 100644
index 0000000..52d95b5
--- /dev/null
+++ b/descriptor-packages/vnfd/ref11_vnf/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+DESCRIPTORS_TOPDIR ?= ../..
+
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/vnfd/ref11_vnf/ref11_vnfd.yaml b/descriptor-packages/vnfd/ref11_vnf/src/ref11_vnfd.yaml
similarity index 77%
rename from descriptor-packages/src/vnfd/ref11_vnf/ref11_vnfd.yaml
rename to descriptor-packages/vnfd/ref11_vnf/src/ref11_vnfd.yaml
index f308282..3d8f7ce 100644
--- a/descriptor-packages/src/vnfd/ref11_vnf/ref11_vnfd.yaml
+++ b/descriptor-packages/vnfd/ref11_vnf/src/ref11_vnfd.yaml
@@ -9,6 +9,8 @@
         id: Ref_Vnf_11
         name: Ref_VNF_11
         short-name: Ref_VNF_11
+        mgmt-interface:
+            cp: mgmt0
         internal-vld:
         -   description: Internal VL
             id: VL12
@@ -20,16 +22,17 @@
             -   id-ref: 'iface11'
             -   id-ref: 'iface21'
         vdu:
-        -   external-interface:
+        -   interface:
             -   name: iface10
-                virtual-interface:
-                    type: OM-MGMT
-                vnfd-connection-point-ref: mgmt0
-            internal-interface:
-            -   name: iface11
+                type: EXTERNAL
                 virtual-interface:
                     type: VIRTIO
-                vdu-internal-connection-point-ref: iface11
+                external-connection-point-ref: mgmt0
+            -   name: iface11
+                type: INTERNAL
+                virtual-interface:
+                    type: VIRTIO
+                internal-connection-point-ref: iface11
             internal-connection-point:
             -   name: iface11
                 id: iface11
@@ -41,16 +44,17 @@
                 memory-mb: '2048'
                 storage-gb: '8'
                 vcpu-count: '2'
-        -   external-interface:
+        -   interface:
             -   name: iface22
+                type: EXTERNAL
                 virtual-interface:
                     type: VIRTIO
-                vnfd-connection-point-ref: west
-            internal-interface:
+                external-connection-point-ref: west
             -   name: iface21
+                type: INTERNAL
                 virtual-interface:
                     type: VIRTIO
-                vdu-internal-connection-point-ref: iface21
+                internal-connection-point-ref: iface21
             internal-connection-point:
             -   name: iface21
                 id: iface21
diff --git a/descriptor-packages/vnfd/ref12_vnf/Makefile b/descriptor-packages/vnfd/ref12_vnf/Makefile
new file mode 100644
index 0000000..52d95b5
--- /dev/null
+++ b/descriptor-packages/vnfd/ref12_vnf/Makefile
@@ -0,0 +1,20 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+DESCRIPTORS_TOPDIR ?= ../..
+
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/vnfd/ref12_vnf/ref12_vnfd.yaml b/descriptor-packages/vnfd/ref12_vnf/src/ref12_vnfd.yaml
similarity index 77%
rename from descriptor-packages/src/vnfd/ref12_vnf/ref12_vnfd.yaml
rename to descriptor-packages/vnfd/ref12_vnf/src/ref12_vnfd.yaml
index 2901c4a..bdb2386 100644
--- a/descriptor-packages/src/vnfd/ref12_vnf/ref12_vnfd.yaml
+++ b/descriptor-packages/vnfd/ref12_vnf/src/ref12_vnfd.yaml
@@ -11,6 +11,8 @@
         id: Ref_Vnf_12
         name: Ref_Vnf_12
         short-name: Ref_Vnf_12
+        mgmt-interface:
+            cp: mgmt0
         internal-vld:
         -   description: Internal VL
             id: VL34
@@ -23,11 +25,17 @@
             -   id-ref: 'iface41'
         vdu:
         -   description: Middlepoint
-            external-interface:
+            interface:
             -   name: iface30
+                type: EXTERNAL
                 virtual-interface:
-                    type: OM-MGMT
-                vnfd-connection-point-ref: mgmt0
+                    type: VIRTIO
+                external-connection-point-ref: mgmt0
+            -   name: iface31
+                type: INTERNAL
+                internal-connection-point-ref: iface31
+                virtual-interface:
+                    type: VIRTIO
             guest-epa:
                 cpu-pinning-policy: DEDICATED
                 mempage-size: "LARGE"
@@ -37,25 +45,27 @@
             -   id: iface31
                 name: iface31
                 type: VPORT
-            internal-interface:
-            -   name: iface31
-                vdu-internal-connection-point-ref: iface31
-                virtual-interface:
-                    type: VIRTIO
             name: Ref_VM3
             vm-flavor:
                 memory-mb: '2048'
                 storage-gb: '8'
                 vcpu-count: '2'
-        -   external-interface:
+        -   interface:
             -   name: iface42
+                type: EXTERNAL
                 virtual-interface:
                     type: PCI-PASSTHROUGH
-                vnfd-connection-point-ref: west
+                external-connection-point-ref: west
             -   name: iface43
+                type: EXTERNAL
                 virtual-interface:
                     type: SR-IOV
-                vnfd-connection-point-ref: east
+                external-connection-point-ref: east
+            -   name: iface41
+                type: INTERNAL
+                internal-connection-point-ref: iface41
+                virtual-interface:
+                    type: VIRTIO
             guest-epa:
                 cpu-pinning-policy: DEDICATED
             id: e526e
@@ -64,10 +74,5 @@
                 name: iface41
                 type: VPORT
             name: Ref_VM4
-            internal-interface:
-            -   name: iface41
-                vdu-internal-connection-point-ref: iface41
-                virtual-interface:
-                    type: VIRTIO
         vendor: ETSI
         version: '1.0'
diff --git a/descriptor-packages/vnfd/ref21_vnf/Makefile b/descriptor-packages/vnfd/ref21_vnf/Makefile
new file mode 100644
index 0000000..a08d588
--- /dev/null
+++ b/descriptor-packages/vnfd/ref21_vnf/Makefile
@@ -0,0 +1,21 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/vnfd/ref21_vnf/ref21_vnfd.yaml b/descriptor-packages/vnfd/ref21_vnf/src/ref21_vnfd.yaml
similarity index 72%
rename from descriptor-packages/src/vnfd/ref21_vnf/ref21_vnfd.yaml
rename to descriptor-packages/vnfd/ref21_vnf/src/ref21_vnfd.yaml
index 390ab9d..9284b8e 100644
--- a/descriptor-packages/src/vnfd/ref21_vnf/ref21_vnfd.yaml
+++ b/descriptor-packages/vnfd/ref21_vnf/src/ref21_vnfd.yaml
@@ -9,16 +9,20 @@
         id: Ref_Vnf_21
         name: Ref_Vnf_21
         short-name: Ref_Vnf_21
+        mgmt-interface:
+            cp: mgmt
         vdu:
-        -   external-interface:
+        -   interface:
             -   name: iface50
-                virtual-interface:
-                    type: OM-MGMT
-                vnfd-connection-point-ref: mgmt
-            -   name: iface51
+                type: EXTERNAL
                 virtual-interface:
                     type: VIRTIO
-                vnfd-connection-point-ref: data
+                external-connection-point-ref: mgmt
+            -   name: iface51
+                type: EXTERNAL
+                virtual-interface:
+                    type: VIRTIO
+                external-connection-point-ref: data
             id: ref_vm21
             image: ref_vm21.qcow2
             name: Ref_VM_5
diff --git a/descriptor-packages/vnfd/ref22_vnf/Makefile b/descriptor-packages/vnfd/ref22_vnf/Makefile
new file mode 100644
index 0000000..a08d588
--- /dev/null
+++ b/descriptor-packages/vnfd/ref22_vnf/Makefile
@@ -0,0 +1,21 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/vnfd/ref22_vnf/ref22_vnfd.yaml b/descriptor-packages/vnfd/ref22_vnf/src/ref22_vnfd.yaml
similarity index 73%
rename from descriptor-packages/src/vnfd/ref22_vnf/ref22_vnfd.yaml
rename to descriptor-packages/vnfd/ref22_vnf/src/ref22_vnfd.yaml
index 7dddc6f..5a1a46d 100644
--- a/descriptor-packages/src/vnfd/ref22_vnf/ref22_vnfd.yaml
+++ b/descriptor-packages/vnfd/ref22_vnf/src/ref22_vnfd.yaml
@@ -11,20 +11,25 @@
         id: Ref_Vnf_22
         name: Ref_VNF_22
         short-name: Ref_VNF_22
+        mgmt-interface:
+            cp: mgmt
         vdu:
-        -   external-interface:
+        -   interface:
             -   name: iface60
+                type: EXTERNAL
                 virtual-interface:
-                    type: OM-MGMT
-                vnfd-connection-point-ref: mgmt
+                    type: VIRTIO
+                external-connection-point-ref: mgmt
             -   name: iface61
+                type: EXTERNAL
                 virtual-interface:
                     type: PCI-PASSTHROUGH
-                vnfd-connection-point-ref: west
+                external-connection-point-ref: west
             -   name: iface62
+                type: EXTERNAL
                 virtual-interface:
                     type: SR-IOV
-                vnfd-connection-point-ref: east
+                external-connection-point-ref: east
             id: abd6831e-f811-4580-9aad-1de9c6424180
             image: ref_vm22.qcow2
             name: Ref_VM6
diff --git a/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/Makefile b/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/Makefile
new file mode 100644
index 0000000..ad4b68c
--- /dev/null
+++ b/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/Makefile
@@ -0,0 +1,19 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/cloud_init/cloud_init.cfg b/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/cloud_init/cloud_init.cfg
new file mode 100644
index 0000000..ddc6f93
--- /dev/null
+++ b/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/cloud_init/cloud_init.cfg
@@ -0,0 +1,14 @@
+#cloud-config
+
+# Add public key to the default user's authorized_keys file
+ssh_authorized_keys:
+-   ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXYVPzII6lwC/hb1PHsgJcf11mYKI1pEeHzcjQ8X8P7YwOj2ihikhy6IRtm38HzP7udMWjQolPUbIzNBmldt8fy6EFkZEpf7R3QziDbqw3FH6wIbQnLpCZWa9OCGRyPyPdBY//K0Ya5b/IBfG4t+KoIVwkJuSG+oYRGhCYhnAwRZ/IUwxhtbNVsS26wN+jGsaUKIWCEBbS5ccFeb9k3eovIFkELNDJVWVJsh2tyGrUd+HQ1+xQGtBUcnipJV75lwL2Z2rprnMIIuVc+A1tTNWArHccLSyfxf2kANy5jGCkwNAH1ETp3r8A5BgoFYd7NSLxK3ob3XycXvYvt/XMrUDP test4
+
+write_files:
+-   content: |
+        # My new helloworld file
+
+    owner: root:root
+    permissions: '0644'
+    path: /root/helloworld.txt
+
diff --git a/descriptor-packages/src/vnfd/ubuntu_xenial_vnf/icons/ubuntu-logo14.png b/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/icons/ubuntu-logo14.png
similarity index 100%
copy from descriptor-packages/src/vnfd/ubuntu_xenial_vnf/icons/ubuntu-logo14.png
copy to descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/icons/ubuntu-logo14.png
Binary files differ
diff --git a/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/keys/test4.pem b/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/keys/test4.pem
new file mode 100644
index 0000000..e31971f
--- /dev/null
+++ b/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/keys/test4.pem
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA12FT8yCOpcAv4W9Tx7ICXH9dZmCiNaRHh83I0PF/D+2MDo9o
+oYpIcuiEbZt/B8z+7nTFo0KJT1GyMzQZpXbfH8uhBZGRKX+0d0M4g26sNxR+sCG0
+Jy6QmVmvTghkcj8j3QWP/ytGGuW/yAXxuLfiqCFcJCbkhvqGERoQmIZwMEWfyFMM
+YbWzVbEtusDfoxrGlCiFghAW0uXHBXm/ZN3qLyBZBCzQyVVlSbIdrchq1Hfh0Nfs
+UBrQVHJ4qSVe+ZcC9mdq6a5zCCLlXPgNbUzVgKx3HC0sn8X9pADcuYxgpMDQB9RE
+6d6/AOQYKBWHezUi8St6G918nF72L7f1zK1AzwIDAQABAoIBAG7mNYS9odWk1MKe
+QSRU+zRHfH8niL5YHWDGy/0SLBu2c+RXYUe0XUOViAKsC0en/SgpRk6fBvapmTkW
+PZJeV9sWTY4Bex5EHFdAbIv4Y4Jk8iqc4BdAucHMVSC334iYDE5U++Umkg1teUd0
+EBfNz05FBx2yTP9XZcrOgfcXWhLwBNmd99+gV6cQB6NF0ZFVm6TLuA7gH3joyipi
+Kfhod7uonFRVXSg6vipXs3+oH6BkpgYxQ5EC9U21q7YS4/H5nyBJDQymf88Lvm0l
+IkZasKC8RKkHJupROyUUrORW0n6ZV5P3jPCtsav/n6QIQStqCniR1SluONHlI/Sm
+qy71VpECgYEA7APuEsSSR/AQtxMp057+jqx6VE+UjIyrtkLBFzHl6GxU4SRz9fIS
+LxvI8fTv3AMpJTIQcf78l8CNBs0lpxOxOhuoFQcwqZsMb/Hg5wdS6r0t6ggKMMhO
+ig0xITzGEW5cVMQ2t3mE1sHP92NT8BTx0eD8nG9b4hxDFujrNOoTMicCgYEA6Z4X
+sIm5LcFRPe/mNhasLxYuh+d5sat20Om2YtNXDA349qQ9e4mC33mKLR1/EVA5dDud
+yvjwOvwvefLEuC/1W8d8AxUaYUMQHtoPB4qG//D/cIGhm3YtvUuaJoXEP0kd47mq
+Pr6Nu/W5b7jO/rCIBOZN6T+h2dxClCLApZ9vrRkCgYEA2+VperkFZdspZ7mGHfKk
+UEApFcazrCQglIcrqrXF9MCCcOZq2Hr7MEMd/TluBbo4Kryzj9K4e5dejjizXTC+
+zloYR8dUMqIQe3iMSBSNz8IFNmjZPcxTSNKztLkP/guqIRxTsqyY9RLM9jzoZubM
+y/RoyEQFAu28IGtRQhLZYb8CgYBF6e8TARRvEgSbMZlGpKBg8xV3zJlJx5OmT9sq
+Vi8dx2yze1F/EBcfhAMLH2Gwr76R/2lonfle3avjpfijWo7mKZv+XClp5CUF5qJK
+0nU2UUxQwiq4GLT1ipOWZb/mZJ5SUXUWk/Zcwtv9CGTCKdh7BuVYIZfxWA6AwKnA
+pydHuQKBgQCMKBFNH0W5bXp+40xmm5CYuvR2hNrDlgjL0g4X4RBYEBcg6yCCq1fo
+gv0OBqNe1L72LWhI6oI2qlKPveN1fdh0jsAvPpQpce/16Y0f7xsl5N3upp+yHHNk
+xruDOG7npSCyHKfcQjDtaHOPKYiQ/3CuXp7OJOvjbNZFf0GJZA9XQA==
+-----END RSA PRIVATE KEY-----
diff --git a/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/keys/test4.pub b/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/keys/test4.pub
new file mode 100644
index 0000000..d144710
--- /dev/null
+++ b/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/keys/test4.pub
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXYVPzII6lwC/hb1PHsgJcf11mYKI1pEeHzcjQ8X8P7YwOj2ihikhy6IRtm38HzP7udMWjQolPUbIzNBmldt8fy6EFkZEpf7R3QziDbqw3FH6wIbQnLpCZWa9OCGRyPyPdBY//K0Ya5b/IBfG4t+KoIVwkJuSG+oYRGhCYhnAwRZ/IUwxhtbNVsS26wN+jGsaUKIWCEBbS5ccFeb9k3eovIFkELNDJVWVJsh2tyGrUd+HQ1+xQGtBUcnipJV75lwL2Z2rprnMIIuVc+A1tTNWArHccLSyfxf2kANy5jGCkwNAH1ETp3r8A5BgoFYd7NSLxK3ob3XycXvYvt/XMrUDP test4
diff --git a/descriptor-packages/src/vnfd/ubuntu_xenial_vnf/ubuntu_xenial_vnfd.yaml b/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/ubuntu_1iface_cloudinit_newfile_vnfd.yaml
similarity index 61%
copy from descriptor-packages/src/vnfd/ubuntu_xenial_vnf/ubuntu_xenial_vnfd.yaml
copy to descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/ubuntu_1iface_cloudinit_newfile_vnfd.yaml
index ee6a3ac..3e6bcdd 100644
--- a/descriptor-packages/src/vnfd/ubuntu_xenial_vnf/ubuntu_xenial_vnfd.yaml
+++ b/descriptor-packages/vnfd/ubuntu_1iface_cloudinit_new_vnf/src/ubuntu_1iface_cloudinit_newfile_vnfd.yaml
@@ -1,8 +1,8 @@
 vnfd:vnfd-catalog:
     vnfd:
-    -   id: ubuntu_xenial_vnfd
-        name: ubuntu_xenial_vnf
-        short-name: ubuntu_xenial_vnf
+    -   id: ubuntu_1iface_cloudinit_newfile_vnfd
+        name: ubuntu_1iface_cloudinit_newfile_vnf
+        short-name: ubuntu_1iface_cloudinit_newfile_vnf
         description: Generated by OSM pacakage generator
         vendor: OSM
         version: '1.0'
@@ -12,36 +12,37 @@
 
         # Management interface
         mgmt-interface:
-            vdu-id: ubuntu_xenial_vnfd-VM
+            cp: eth0
 
         # Atleast one VDU need to be specified
         vdu:
-        -   id: ubuntu_xenial_vnfd-VM
-            name: ubuntu_xenial_vnfd-VM
-            description: ubuntu_xenial_vnfd-VM
+        -   id: ubuntu_1iface_cloudinit_newfile_vnfd-VM
+            name: ubuntu_1iface_cloudinit_newfile_vnfd-VM
+            description: ubuntu_1iface_cloudinit_newfile_vnfd-VM
             count: 1
 
             # Flavour of the VM to be instantiated for the VDU
             vm-flavor:
-                vcpu-count: 2
-                memory-mb: 4096
+                vcpu-count: 1
+                memory-mb: 1024
                 storage-gb: 10
 
             # Image including the full path
-            image: '/mnt/powervault/virtualization/vnfs/demos/ubuntu/ubuntu-16.04.img'
+            image: 'ubuntu1604'
 
             # User-data injection
             cloud-init-file: cloud_init.cfg
 
-            external-interface:
+            interface:
             # Specify the external interfaces
             # There can be multiple interfaces defined
             -   name: eth0
+                type: EXTERNAL
                 virtual-interface:
-                    type: OM-MGMT
+                    type: VIRTIO
                     bandwidth: '0'
                     vpci: 0000:00:0a.0
-                vnfd-connection-point-ref: eth0
+                external-connection-point-ref: eth0
 
         connection-point:
             -   name: eth0
diff --git a/descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/Makefile b/descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/Makefile
new file mode 100644
index 0000000..a08d588
--- /dev/null
+++ b/descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/Makefile
@@ -0,0 +1,21 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/vnfd/ubuntu_cirros_multidisk_vnf/cloud_init/cloud_init.cfg b/descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/src/cloud_init/cloud_init.cfg
similarity index 100%
rename from descriptor-packages/src/vnfd/ubuntu_cirros_multidisk_vnf/cloud_init/cloud_init.cfg
rename to descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/src/cloud_init/cloud_init.cfg
diff --git a/descriptor-packages/src/vnfd/ubuntu_cirros_multidisk_vnf/ubuntu_cirros_multidisk_vnfd.yaml b/descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/src/ubuntu_cirros_multidisk_vnfd.yaml
similarity index 90%
rename from descriptor-packages/src/vnfd/ubuntu_cirros_multidisk_vnf/ubuntu_cirros_multidisk_vnfd.yaml
rename to descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/src/ubuntu_cirros_multidisk_vnfd.yaml
index da037b1..3cd208c 100644
--- a/descriptor-packages/src/vnfd/ubuntu_cirros_multidisk_vnf/ubuntu_cirros_multidisk_vnfd.yaml
+++ b/descriptor-packages/vnfd/ubuntu_cirros_multidisk_vnf/src/ubuntu_cirros_multidisk_vnfd.yaml
@@ -9,7 +9,7 @@
 
         # Management interface
         mgmt-interface:
-            vdu-id: ubuntu_cirros_multidisk_vnfd-VM
+            cp: eth0
 
         # Atleast one VDU need to be specified
         vdu:
@@ -27,13 +27,14 @@
             # User-data injection
             cloud-init-file: cloud_init.cfg
 
-            external-interface:
+            interface:
             # Specify the external interfaces
             # There can be multiple interfaces defined
             -   name: eth0
+                type: EXTERNAL
                 virtual-interface:
-                    type: OM-MGMT
-                vnfd-connection-point-ref: eth0
+                    type: VIRTIO
+                external-connection-point-ref: eth0
             # Specify the volume
             # There can be multiple interfaces defined
             volumes:
diff --git a/descriptor-packages/vnfd/ubuntu_epa_virtio_vnf/Makefile b/descriptor-packages/vnfd/ubuntu_epa_virtio_vnf/Makefile
new file mode 100644
index 0000000..ad4b68c
--- /dev/null
+++ b/descriptor-packages/vnfd/ubuntu_epa_virtio_vnf/Makefile
@@ -0,0 +1,19 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+DESCRIPTORS_TOPDIR ?= ../..
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/vnfd/ubuntu_xenial_vnf/icons/ubuntu-logo14.png b/descriptor-packages/vnfd/ubuntu_epa_virtio_vnf/src/icons/ubuntu-logo14.png
similarity index 100%
copy from descriptor-packages/src/vnfd/ubuntu_xenial_vnf/icons/ubuntu-logo14.png
copy to descriptor-packages/vnfd/ubuntu_epa_virtio_vnf/src/icons/ubuntu-logo14.png
Binary files differ
diff --git a/descriptor-packages/vnfd/ubuntu_epa_virtio_vnf/src/ubuntu_epa_virtio_vnfd.yaml b/descriptor-packages/vnfd/ubuntu_epa_virtio_vnf/src/ubuntu_epa_virtio_vnfd.yaml
new file mode 100644
index 0000000..11f3122
--- /dev/null
+++ b/descriptor-packages/vnfd/ubuntu_epa_virtio_vnf/src/ubuntu_epa_virtio_vnfd.yaml
@@ -0,0 +1,69 @@
+vnfd:vnfd-catalog:
+    vnfd:
+    -   id: ubuntu_epa_virtio_vnf
+        name: ubuntu_epa_virtio_vnf
+        short-name: ubuntu_epa_virtio
+        description: VNF based on Ubuntu 16.04 LTS with EPA, 1 virtio interface and user osm
+        vendor: OSM
+        version: '1.0'
+
+        # Place the logo as png in icons directory and provide the name here
+        logo: ubuntu-logo14.png
+
+        # Management interface
+        mgmt-interface:
+            cp: eth0
+
+        # Atleast one VDU need to be specified
+        vdu:
+        -   id: ubuntu_epa_virtio_vnf-VM
+            name: ubuntu_epa_virtio_vnf-VM
+            description: ubuntu_epa_virtio_vnf-VM
+            count: 1
+
+            # Flavour of the VM to be instantiated for the VDU
+            vm-flavor:
+                memory-mb: 2048
+                storage-gb: 10
+
+            # Image including the full path
+            image: 'ubuntu1604'
+
+            interface:
+            # Specify the external interfaces
+            # There can be multiple interfaces defined
+            -   name: eth0
+                type: EXTERNAL
+                virtual-interface:
+                    type: VIRTIO
+                    bandwidth: '0'
+                    vpci: 0000:00:0a.0
+                external-connection-point-ref: eth0
+            host-epa:
+                om-cpu-model-string: "Intel(R) Xeon(R) CPU E5-4620 0 @ 2.20GHz"
+                om-cpu-feature:
+                -   feature: "64b"
+                -   feature: "iommu"
+                -   feature: "lps"
+                -   feature: "tlbps"
+                -   feature: "hwsv"
+                -   feature: "dioc"
+                -   feature: "ht"
+            guest-epa:
+                numa-node-policy:
+                    node:
+                    -   id: 0
+                        paired-threads:
+                            num-paired-threads: 1
+                    mem-policy: "STRICT"
+                    node-cnt: 1
+                mempage-size: "LARGE"
+                cpu-pinning-policy: "DEDICATED"
+                cpu-thread-pinning-policy: "PREFER"
+            hypervisor-epa:
+                version: "10002|12001|2.6.32-358.el6.x86_64"
+                type: "REQUIRE_KVM"
+
+        connection-point:
+            -   name: eth0
+                type: VPORT
diff --git a/descriptor-packages/vnfd/ubuntu_xenial_vnf/Makefile b/descriptor-packages/vnfd/ubuntu_xenial_vnf/Makefile
new file mode 100644
index 0000000..a08d588
--- /dev/null
+++ b/descriptor-packages/vnfd/ubuntu_xenial_vnf/Makefile
@@ -0,0 +1,21 @@
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+
+DESCRIPTORS_TOPDIR ?= ../..
+
+include $(DESCRIPTORS_TOPDIR)/mk/pkg.mk
+
+all: $(BUILD_DIR)/$(PKG_NAME)
diff --git a/descriptor-packages/src/vnfd/ubuntu_xenial_vnf/cloud_init/cloud_init.cfg b/descriptor-packages/vnfd/ubuntu_xenial_vnf/src/cloud_init/cloud_init.cfg
similarity index 100%
rename from descriptor-packages/src/vnfd/ubuntu_xenial_vnf/cloud_init/cloud_init.cfg
rename to descriptor-packages/vnfd/ubuntu_xenial_vnf/src/cloud_init/cloud_init.cfg
diff --git a/descriptor-packages/src/vnfd/ubuntu_xenial_vnf/icons/ubuntu-logo14.png b/descriptor-packages/vnfd/ubuntu_xenial_vnf/src/icons/ubuntu-logo14.png
similarity index 100%
rename from descriptor-packages/src/vnfd/ubuntu_xenial_vnf/icons/ubuntu-logo14.png
rename to descriptor-packages/vnfd/ubuntu_xenial_vnf/src/icons/ubuntu-logo14.png
Binary files differ
diff --git a/descriptor-packages/src/vnfd/ubuntu_xenial_vnf/ubuntu_xenial_vnfd.yaml b/descriptor-packages/vnfd/ubuntu_xenial_vnf/src/ubuntu_xenial_vnfd.yaml
similarity index 88%
rename from descriptor-packages/src/vnfd/ubuntu_xenial_vnf/ubuntu_xenial_vnfd.yaml
rename to descriptor-packages/vnfd/ubuntu_xenial_vnf/src/ubuntu_xenial_vnfd.yaml
index ee6a3ac..f917054 100644
--- a/descriptor-packages/src/vnfd/ubuntu_xenial_vnf/ubuntu_xenial_vnfd.yaml
+++ b/descriptor-packages/vnfd/ubuntu_xenial_vnf/src/ubuntu_xenial_vnfd.yaml
@@ -12,7 +12,7 @@
 
         # Management interface
         mgmt-interface:
-            vdu-id: ubuntu_xenial_vnfd-VM
+            cp: eth0
 
         # Atleast one VDU need to be specified
         vdu:
@@ -33,15 +33,16 @@
             # User-data injection
             cloud-init-file: cloud_init.cfg
 
-            external-interface:
+            interface:
             # Specify the external interfaces
             # There can be multiple interfaces defined
             -   name: eth0
+                type: EXTERNAL
                 virtual-interface:
-                    type: OM-MGMT
+                    type: VIRTIO
                     bandwidth: '0'
                     vpci: 0000:00:0a.0
-                vnfd-connection-point-ref: eth0
+                external-connection-point-ref: eth0
 
         connection-point:
             -   name: eth0
diff --git a/installers/export_ips b/installers/export_ips
index d651b28..a41e1ef 100644
--- a/installers/export_ips
+++ b/installers/export_ips
@@ -22,4 +22,4 @@
 export VCA_CONTAINER_IP=`lxc list VCA -c 4|grep eth0 |awk '{print $2}'`
 export SO_CONTAINER_IP=`lxc list SO-ub -c 4|grep eth0 |awk '{print $2}'`
 export RO_CONTAINER_IP=`lxc list RO -c 4|grep eth0 |awk '{print $2}'`
-
+#export MON_CONTAINER_IP=`lxc list MON -c 4|grep eth0|awk '{print $2}'`
diff --git a/installers/install_osm.sh b/installers/install_osm.sh
index f39eb41..1bb4257 100755
--- a/installers/install_osm.sh
+++ b/installers/install_osm.sh
@@ -61,6 +61,11 @@
     sudo $OSM_DEVOPS/installers/nat_osm
 }
 
+function FATAL(){
+    echo "FATAL error: Cannot install OSM due to \"$1\""
+    exit 1
+}
+
 #Update RO, SO and UI:
 function update(){
     echo -e "\nUpdating components"
@@ -133,30 +138,28 @@
     echo
 }
 
-function so_is_up(){
+function so_is_up() {
     SO_IP=$1
     time=0
     step=5
     timelength=300
     while [ $time -le $timelength ]
     do
-        curl -k https://$SO_IP:8008/api/operational/vcs/info \
-              --header 'accept: application/vnd.yang.data+json' \
-              --header 'authorization: Basic YWRtaW46YWRtaW4=' \
-              --header 'cache-control: no-cache' \
-              --header 'content-type: application/vnd.yang.data+json' &> /dev/null
-        RET=$?
-        if [ "$RET" == 0 ]; then
-            break
+        if [[ `curl -k -X GET   https://$SO_IP:8008/api/operational/vcs/info \
+                -H 'accept: application/vnd.yang.data+json' \
+                -H 'authorization: Basic YWRtaW46YWRtaW4=' \
+                -H 'cache-control: no-cache' 2> /dev/null | jq  '.[].components.component_info[] | select(.component_name=="RW.Restconf")' 2>/dev/null | grep "RUNNING" | wc -l` -eq 1 ]]
+        then
+            echo "RW.Restconf running....SO is up"
+            return 0
         fi
+
         sleep $step
         echo -n "."
         time=$((time+step))
     done
-    if [ "$RET" != 0 ]; then
-        FATAL "OSM Failed to startup"
-    fi
-    echo
+
+    FATAL "OSM Failed to startup"
 }
 
 #Configure VCA, SO and RO with the initial configuration:
@@ -188,6 +191,14 @@
     echo -e "       Configuring SO"
     sudo route add -host $JUJU_CONTROLLER_IP gw $VCA_CONTAINER_IP
     sudo sed -i "$ i route add -host $JUJU_CONTROLLER_IP gw $VCA_CONTAINER_IP" /etc/rc.local
+
+    # make journaling persistent
+    lxc exec SO-ub -- mkdir -p /var/log/journal
+    lxc exec SO-ub -- systemd-tmpfiles --create --prefix /var/log/journal
+    lxc exec SO-ub -- systemctl restart systemd-journald
+
+    echo RIFT_EXTERNAL_ADDRESS=$DEFAULT_IP | lxc exec SO-ub -- tee -a /usr/rift/etc/default/launchpad
+
     lxc exec SO-ub -- systemctl restart launchpad
 
     so_is_up $SO_CONTAINER_IP
@@ -209,14 +220,50 @@
       --data '{"account": [ { "name": "osmjuju", "account-type": "juju", "juju": { "ip-address": "'$JUJU_CONTROLLER_IP'", "port": "17070", "user": "admin", "secret": "'$JUJU_PASSWD'" }  }  ]}')
     [[ $result =~ .*success.* ]] || FATAL "Failed config-agent configuration: $result"
 
+    #R1/R2 config line
+    #result=$(curl -k --request PUT \
+    #  --url https://$SO_CONTAINER_IP:8008/api/config/resource-orchestrator \
+    #  --header 'accept: application/vnd.yang.data+json' \
+    #  --header 'authorization: Basic YWRtaW46YWRtaW4=' \
+    #  --header 'cache-control: no-cache' \
+    #  --header 'content-type: application/vnd.yang.data+json' \
+    #  --data '{ "openmano": { "host": "'$RO_CONTAINER_IP'", "port": "9090", "tenant-id": "'$RO_TENANT_ID'" }, "name": "osmopenmano", "account-type": "openmano" }')
+
     result=$(curl -k --request PUT \
-      --url https://$SO_CONTAINER_IP:8008/api/config/resource-orchestrator \
+      --url https://$SO_CONTAINER_IP:8008/api/config/project/default/ro-account/account \
       --header 'accept: application/vnd.yang.data+json' \
       --header 'authorization: Basic YWRtaW46YWRtaW4=' \
-      --header 'cache-control: no-cache' \
+      --header 'cache-control: no-cache'   \
       --header 'content-type: application/vnd.yang.data+json' \
-      --data '{ "openmano": { "host": "'$RO_CONTAINER_IP'", "port": "9090", "tenant-id": "'$RO_TENANT_ID'" }, "name": "osmopenmano", "account-type": "openmano" }')
+      --data '{"rw-ro-account:account": [ { "openmano": { "host": "'$RO_CONTAINER_IP'", "port": "9090", "tenant-id": "'$RO_TENANT_ID'"}, "name": "osmopenmano", "ro-account-type": "openmano" }]}')
     [[ $result =~ .*success.* ]] || FATAL "Failed resource-orchestrator configuration: $result"
+
+    result=$(curl -k --request PATCH \
+      --url https://$SO_CONTAINER_IP:8008/v2/api/config/openidc-provider-config/rw-ui-client/redirect-uri \
+      --header 'accept: application/vnd.yang.data+json' \
+      --header 'authorization: Basic YWRtaW46YWRtaW4=' \
+      --header 'cache-control: no-cache'   \
+      --header 'content-type: application/vnd.yang.data+json' \
+      --data '{"redirect-uri": "https://'$DEFAULT_IP':8443/callback" }')
+    [[ $result =~ .*success.* ]] || FATAL "Failed redirect-uri configuration: $result"
+
+    result=$(curl -k --request PATCH \
+      --url https://$SO_CONTAINER_IP:8008/v2/api/config/openidc-provider-config/rw-ui-client/post-logout-redirect-uri \
+      --header 'accept: application/vnd.yang.data+json' \
+      --header 'authorization: Basic YWRtaW46YWRtaW4=' \
+      --header 'cache-control: no-cache'   \
+      --header 'content-type: application/vnd.yang.data+json' \
+      --data '{"post-logout-redirect-uri": "https://'$DEFAULT_IP':8443/?api_server=https://'$DEFAULT_IP'" }')
+    [[ $result =~ .*success.* ]] || FATAL "Failed post-logout-redirect-uri configuration: $result"
+
+    lxc exec SO-ub -- tee /etc/network/interfaces.d/60-rift.cfg <<EOF
+auto lo:1
+iface lo:1 inet static 
+        address  $DEFAULT_IP
+        netmask 255.255.255.255
+EOF
+    lxc exec SO-ub ifup lo:1
+
 }
 
 function install_lxd() {
@@ -253,6 +300,7 @@
 COMMIT_ID=""
 ASSUME_YES=""
 INSTALL_FROM_SOURCE=""
+RELEASE="-R ReleaseTHREE"
 
 while getopts ":hy-:b:r:k:u:R:" o; do
     case "${o}" in
@@ -318,8 +366,8 @@
 # if develop, we force master
 [ -z "$COMMIT_ID" ] && [ -n "$DEVELOP" ] && COMMIT_ID="master"
 
-# if master, force install from source
-[ -n "$COMMIT_ID" ] && [ "$COMMIT_ID" == "master" ] && INSTALL_FROM_SOURCE="y"
+# forcing source from master removed. Now only install from source when explicit
+# [ -n "$COMMIT_ID" ] && [ "$COMMIT_ID" == "master" ] && INSTALL_FROM_SOURCE="y"
 
 if [ -n "$TEST_INSTALLER" ]; then
     echo -e "\nUsing local devops repo for OSM installation"
@@ -330,8 +378,15 @@
     trap 'rm -rf "$TEMPDIR"' EXIT
 fi
 
-echo -e "Checking required packages: git"
-dpkg -l git &>/dev/null || ! echo -e "     git not installed.\nInstalling git requires root privileges" || sudo apt-get install -y git
+need_packages="git jq"
+for package in $need_packages; do
+    echo -e "Checking required packages: $package"
+    dpkg -l $package &>/dev/null \
+        || ! echo -e "     $package not installed.\nInstalling $package requires root privileges" \
+        || sudo apt-get install -y $package \
+        || FATAL "failed to install $package"
+done
+
 if [ -z "$TEST_INSTALLER" ]; then
     echo -e "\nCloning devops repo temporarily"
     git clone https://osm.etsi.org/gerrit/osm/devops.git $TEMPDIR
@@ -339,7 +394,7 @@
 fi
 
 echo -e "\nGuessing the current stable release"
-LATEST_STABLE_DEVOPS=`git -C $TEMPDIR tag -l v[0-9].* | tail -n1`
+LATEST_STABLE_DEVOPS=`git -C $TEMPDIR tag -l v[0-9].* | sort -V | tail -n1`
 [ -z "$COMMIT_ID" ] && [ -z "$LATEST_STABLE_DEVOPS" ] && echo "Could not find the current latest stable release" && exit 0
 echo "Latest tag in devops repo: $LATEST_STABLE_DEVOPS"
 [ -z "$COMMIT_ID" ] && [ -n "$LATEST_STABLE_DEVOPS" ] && COMMIT_ID="tags/$LATEST_STABLE_DEVOPS"
@@ -367,8 +422,10 @@
 lxd --version &>/dev/null || FATAL "lxd not present, exiting."
 [ -n "$LXD" ] && echo -e "\nConfiguring lxd" && install_lxd
 
-wget -q -O- https://osm-download.etsi.org/ftp/osm-2.0-two/README.txt &> /dev/null
+wget -q -O- https://osm-download.etsi.org/ftp/osm-3.0-three/README.txt &> /dev/null
 
+# use local devops for containers
+export OSM_USE_LOCAL_DEVOPS=true
 if [ -z "$INSTALL_FROM_SOURCE" ]; then
     echo -e "\nCreating the containers and installing from binaries ..."
     $OSM_DEVOPS/jenkins/host/install RO $REPOSITORY $RELEASE $REPOSITORY_KEY $REPOSITORY_BASE || FATAL "RO install failed"
@@ -389,5 +446,5 @@
 #Configure components
 configure
 
-wget -q -O- https://osm-download.etsi.org/ftp/osm-2.0-two/README2.txt &> /dev/null
+wget -q -O- https://osm-download.etsi.org/ftp/osm-3.0-three/README2.txt &> /dev/null
 echo -e "\nDONE"
diff --git a/installers/nat_osm b/installers/nat_osm
index 0ff4f61..466855d 100755
--- a/installers/nat_osm
+++ b/installers/nat_osm
@@ -106,9 +106,9 @@
     print "#Autogenerated by nat_osm"
     print "-A PREROUTING -d "RO_IP" -p tcp -m tcp --dport 9090 -j DNAT --to-destination "openmano_ip
     print "-A PREROUTING -d "UI_IP" -p tcp -m tcp --dport 8000 -j DNAT --to-destination "rift_ip
-    print "-A PREROUTING -d "UI_IP" -p tcp -m tcp --dport 4567 -j DNAT --to-destination "rift_ip
     print "-A PREROUTING -d "UI_IP" -p tcp -m tcp --dport 8443 -j DNAT --to-destination "rift_ip
     print "-A PREROUTING -d "UI_IP" -p tcp -m tcp --dport 8008 -j DNAT --to-destination "rift_ip
+    print "-A PREROUTING -d "UI_IP" -p tcp -m tcp --dport 8009 -j DNAT --to-destination "rift_ip
     print "-A PREROUTING -d "UI_IP" -p tcp -m tcp --dport 80 -j DNAT --to-destination "rift_ip
     #print "-A PREROUTING -d "VCA_IP" -p tcp -m tcp --dport 443 -j DNAT --to-destination "juju_ip
     #print "-A PREROUTING -d "VCA_IP" -p tcp -m tcp --dport 17070 -j DNAT --to-destination "juju_ip
@@ -124,9 +124,9 @@
         print "#Autogenerated by nat_osm"
         print "-A PREROUTING -d "RO_IP" -p tcp -m tcp --dport 9090 -j DNAT --to-destination "openmano_ip
         print "-A PREROUTING -d "UI_IP" -p tcp -m tcp --dport 8000 -j DNAT --to-destination "rift_ip
-        print "-A PREROUTING -d "UI_IP" -p tcp -m tcp --dport 4567 -j DNAT --to-destination "rift_ip
         print "-A PREROUTING -d "UI_IP" -p tcp -m tcp --dport 8443 -j DNAT --to-destination "rift_ip
         print "-A PREROUTING -d "UI_IP" -p tcp -m tcp --dport 8008 -j DNAT --to-destination "rift_ip
+        print "-A PREROUTING -d "UI_IP" -p tcp -m tcp --dport 8009 -j DNAT --to-destination "rift_ip
         print "-A PREROUTING -d "UI_IP" -p tcp -m tcp --dport 80 -j DNAT --to-destination "rift_ip
         #print "-A PREROUTING -d "VCA_IP" -p tcp -m tcp --dport 443 -j DNAT --to-destination "juju_ip
         #print "-A PREROUTING -d "VCA_IP" -p tcp -m tcp --dport 17070 -j DNAT --to-destination "juju_ip
diff --git a/jenkins/MON/SETTINGS b/jenkins/MON/SETTINGS
new file mode 100644
index 0000000..d1e190e
--- /dev/null
+++ b/jenkins/MON/SETTINGS
@@ -0,0 +1,34 @@
+# Copyright 2017 Intel Research and Development Ireland Limited
+# *************************************************************
+
+# This file is part of OSM Monitoring module
+# All Rights Reserved to Intel Corporation
+
+# 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: prithiv.mohan@intel.com or adrian.hoban@intel.com
+
+#__author__ = "Prithiv Mohan"
+#__date__   = "25/Sep/2017"
+
+# This variable holds the name of the container image needed to build or run this product
+export OSM_BASE_IMAGE=ubuntu:16.04
+
+# This variable holds the name of the container to be used to build a package
+# if this container already exists, the build process can skip the container build
+export OSM_BUILD_CONTAINER=MON
+
+# This variable holds the name of the container to be used to run a package
+# if this container already exists, the run processes can skip the container build
+export OSM_RUNTIME_CONTAINER=MON
diff --git a/jenkins/MON/install b/jenkins/MON/install
new file mode 100755
index 0000000..40fae53
--- /dev/null
+++ b/jenkins/MON/install
@@ -0,0 +1,46 @@
+# Copyright 2017 Intel Research and Development Ireland Limited
+# *************************************************************
+
+# This file is part of OSM Monitoring module
+# All Rights Reserved to Intel Corporation
+
+# 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: prithiv.mohan@intel.com or adrian.hoban@intel.com
+
+#__author__ = "Prithiv Mohan"
+#__date__   = "25/Sep/2017"
+
+HERE=$(realpath $(dirname $0))
+OSM_JENKINS=$(dirname $HERE)
+. $OSM_JENKINS/common/all_funcs
+
+# SET YOUR MDG repository name here
+export OSM_MDG=MON
+OSM_load_config
+
+. $OSM_JENKINS/common/install_common
+
+# Installation starts here
+
+#Release TWO
+
+apt-get update
+
+DEBIAN_FRONTEND=noninteractive apt-get install --yes python-all python-pip && pip install --upgrade pip
+DEBIAN_FRONTEND=noninteractive apt-get --yes install default-jre
+DEBIAN_FRONTEND=noninteractive python kafkad
+RC=$?
+INFO "done, RC=$RC"
+exit $RC
diff --git a/jenkins/MON/start_build b/jenkins/MON/start_build
new file mode 100755
index 0000000..c73a40c
--- /dev/null
+++ b/jenkins/MON/start_build
@@ -0,0 +1,46 @@
+# Copyright 2017 Intel Research and Development Ireland Limited
+# *************************************************************
+
+# This file is part of OSM Monitoring module
+# All Rights Reserved to Intel Corporation
+
+# 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: prithiv.mohan@intel.com or adrian.hoban@intel.com
+
+#__author__ = "Prithiv Mohan"
+#__date__   = "25/Sep/2017"
+
+HERE=$(realpath $(dirname $0)
+OSM_JENKINS=$(dirname $HERE)
+. $OSM_JENKINS/common/all_funcs
+
+# SET YOU MDG repository name here
+export OSM_MDG=RO
+OSM_load_config
+OSM_git_checkout "$@"
+python -m py_compile kafkad
+python kafkad
+INFO "Starting Kafka"
+service kafka start
+
+#Start VMWare install script
+INFO "Installing vROPs Web Service"
+. plugins/vRealiseOps/vROPs_Webservice/install.sh
+INFO "Startinv vrops Web Service"
+python plugins/vRealiseOps/vROPs_Webservice/vrops_webservice
+
+RC=$?
+INFO "done, RC=$RC"
+exit $RC
diff --git a/jenkins/SO/install b/jenkins/SO/install
index d881a42..7000c8e 100755
--- a/jenkins/SO/install
+++ b/jenkins/SO/install
@@ -35,8 +35,8 @@
 
 ###############################################################################
 # Set up repo and version
-PLATFORM_REPOSITORY=OSM
-PLATFORM_VERSION=4.4.2.1.61839
+PLATFORM_REPOSITORY=OSM3
+PLATFORM_VERSION=5.2.0.2.72254
 
 while getopts ":P:V:h" o; do
     case "${o}" in
@@ -79,8 +79,10 @@
 # Main block
 
 # enable the right repos
+echo "### INSTALLING RIFT platform ${PLATFORM_VERSION} from repository ${PLATFORM_REPOSITORY}"
+
 curl http://repos.riftio.com/public/xenial-riftware-public-key | apt-key add -
-curl -o /etc/apt/sources.list.d/RIFT.list http://buildtracker.riftio.com/repo_file/ub16/${PLATFORM_REPOSITORY}/
+curl -o /etc/apt/sources.list.d/rift.list http://buildtracker.riftio.com/repo_file/ub16/${PLATFORM_REPOSITORY}/
 
 # Make the Rift repo a higher priority to work around version conflicts.
 cat <<EOF > /etc/apt/preferences.d/rift
@@ -89,45 +91,53 @@
 Pin-Priority: 600
 EOF
 
+
+
+#######################
+# temp fix
+# this is normally done by mkcontainer, but the last line is missing
+# we can take this out when we update the RIFT platform
+
+cat <<EOF >>/etc/systemd/user.conf
+DefaultLimitNOFILE=65536
+DefaultLimitMSGQUEUE=8192000
+DefaultLimitNPROC=65536
+DefaultTasksMax=65536
+EOF
+cat <<EOF >>/etc/systemd/system.conf
+DefaultLimitNOFILE=65536
+DefaultLimitMSGQUEUE=8192000
+DefaultLimitNPROC=65536
+DefaultTasksMax=65536
+EOF
+systemctl daemon-reload
+
+##################################
+
+
 apt-get update
 
 # and install the tools
-apt remove -y rw.toolchain-rwbase tcpdump
+apt remove -y tcpdump
 apt-get install -y --allow-downgrades rw.tools-container-tools=${PLATFORM_VERSION} rw.tools-scripts=${PLATFORM_VERSION} python
-/usr/rift/container_tools/mkcontainer --modes ext --modes platform --rw-version ${PLATFORM_VERSION}
-pip3 install lxml==3.4.0
-
-chmod 777 /usr/rift /usr/rift/usr/share
+/usr/rift/container_tools/mkcontainer --modes MANO-base,rw-platform --rw-version ${PLATFORM_VERSION}
 
 # now disable the RIFT OSM repo so that we'll get MANO from
 # the OSM repos
-rm -f /etc/apt/sources.list.d/RIFT.list
+rm -f /etc/apt/sources.list.d/rift.list
 
 apt-get update
 
 apt-get install -y \
-	     rw.core.mano-rwcal_yang_ylib-1.0 \
-	     rw.core.mano-rwconfig_agent_yang_ylib-1.0 \
-	     rw.core.mano-rwlaunchpad_yang_ylib-1.0 \
-	     rw.core.mano-mano_yang_ylib-1.0 \
-	     rw.core.mano-common-1.0 \
-	     rw.core.mano-rwsdn_yang_ylib-1.0 \
-	     rw.core.mano-rwsdnal_yang_ylib-1.0 \
-	     rw.core.mano-mano-types_yang_ylib-1.0 \
-	     rw.core.mano-rwcal-cloudsim-1.0 \
-	     rw.core.mano-rwcal-1.0 \
-	     rw.core.mano-rw_conman_yang_ylib-1.0 \
-	     rw.core.mano-rwcalproxytasklet-1.0 \
-	     rw.core.mano-rwlaunchpad-1.0 \
-	     rw.core.mano-rwcal-openmano-vimconnector-1.0 \
-	     rw.core.mano-lpmocklet_yang_ylib-1.0 \
-	     rw.core.mano-rwmon-1.0 \
-	     rw.core.mano-rwcloud_yang_ylib-1.0 \
-	     rw.core.mano-rwcal-openstack-1.0 \
-	     rw.core.mano-rw.core.mano_foss \
-	     rw.core.mano-rwmon_yang_ylib-1.0 \
-	     rw.core.mano-rwcm-1.0 \
-	     rw.core.mano-rwcal-mock-1.0 \
-	     rw.core.mano-rwcal-cloudsimproxy-1.0 \
-	     rw.core.mano-models-1.0 \
-	     rw.core.mano-rwcal-aws-1.0
+    rw.core.mano-mano \
+    rw.core.mano-rwcal-plugin-aws \
+    rw.core.mano-rwcal-plugin-cloudsim \
+    rw.core.mano-rwcal-plugin-cloudsimproxy \
+    rw.core.mano-rwcal-plugin-openmano-vimconnector \
+    rw.core.mano-rwcal-plugin-openstack \
+    rw.core.mano-rwcal-plugin-mock
+
+# Install libjuju
+apt-get install -y python3-pip python3-setuptools
+
+pip3 install juju
diff --git a/jenkins/UI/install b/jenkins/UI/install
index 4ba7123..33f651f 100755
--- a/jenkins/UI/install
+++ b/jenkins/UI/install
@@ -27,11 +27,83 @@
 OSM_JENKINS=$(dirname $HERE)
 . $OSM_JENKINS/common/install_common
 
-rm -f /etc/apt/sources.list.d/RIFT.list 
+
+
+# Defensive bash programming flags
+set -o errexit    # Exit on any error
+trap 'echo ERROR: Command failed: \"$BASH_COMMAND\"' ERR
+set -o nounset    # Expanding an unset variable is an error.  Variables must be
+                  # set before they can be used.
+
+###############################################################################
+# Set up repo and version
+PLATFORM_REPOSITORY=OSM3
+PLATFORM_VERSION=5.2.0.2.72254
+
+while getopts ":P:V:h" o; do
+    case "${o}" in
+        P)
+            PLATFORM_REPOSITORY=${OPTARG}
+            ;;
+        V)
+            PLATFORM_VERSION=${OPTARG}
+            ;;
+        h)
+            usage
+            exit 0
+            ;;
+        *)
+            usage
+            exit 1
+            ;;
+    esac
+done
+
+function usage() {
+    echo
+    echo "NAME:"
+    echo "  $0"
+    echo
+    echo "SYNOPSIS:"
+    echo "  $0 -h|--help"
+    echo "  $0 -P <PLATFORM_REPOSITORY> -V <PLATFORM_VERSION>"
+    echo
+    echo "DESCRIPTION:"
+    echo "  Prepare current system to run SO and UI."
+    echo
+    echo "  PLATFORM_REPOSITORY (optional): name of the RIFT.ware repository."
+    echo "  PLATFORM_VERSION (optional): version of the platform packages to be installed."
+    echo
+}
+
+
+###############################################################################
+# Main block
+
+# enable the right repos
+curl http://repos.riftio.com/public/xenial-riftware-public-key | apt-key add -
+curl -o /etc/apt/sources.list.d/rift.list http://buildtracker.riftio.com/repo_file/ub16/${PLATFORM_REPOSITORY}/
+
+# Make the Rift repo a higher priority to work around version conflicts.
+cat <<EOF > /etc/apt/preferences.d/rift
+Package: *
+Pin: origin repos.riftio.com
+Pin-Priority: 600
+EOF
+
 apt-get update
 
-apt-get install -y rw.ui-skyquake
+# and install the tools
+apt-get install -y --allow-downgrades rw.tools-container-tools=${PLATFORM_VERSION} rw.tools-scripts=${PLATFORM_VERSION} python
+/usr/rift/container_tools/mkcontainer --modes UI-base --rw-version ${PLATFORM_VERSION}
 
+
+# now disable the RIFT OSM repo so that we'll get UI from
+# the OSM repos
+rm -f /etc/apt/sources.list.d/rift.list
+
+apt-get update
+apt-get install -y rw.ui-skyquake
 echo "Creating Service ...."
 /usr/rift/bin/create_launchpad_service
 
diff --git a/jenkins/UI/start_build b/jenkins/UI/start_build
index 50b2e06..a103aa8 100755
--- a/jenkins/UI/start_build
+++ b/jenkins/UI/start_build
@@ -27,13 +27,15 @@
 OSM_load_config
 OSM_git_checkout "$@"
 
+trap 'WARNING "INTERRUPT"; exit 1' INT
 
 INFO "starting build"
 make clean || FATAL "Make clean failed"
-make -j16 || FATAL "Make failed"
-sudo make install || FATAL "Make install Failed"
+./BUILD.sh
 
-INFO "build done"
-exit 0
+RC=$?
+
+INFO "done, RC=$RC"
+exit $RC
 
 
diff --git a/jenkins/VCA/start_build b/jenkins/VCA/start_build
index d6ccfd8..6cc5e30 100755
--- a/jenkins/VCA/start_build
+++ b/jenkins/VCA/start_build
@@ -60,11 +60,15 @@
 DEFAULT_MTU=$( ip addr show $DEFAULT_INTERFACE | perl -ne 'if (/mtu\s(\d+)/) {print $1;}')
 
 INFO "Setting lxdbr0 MTU to $DEFAULT_MTU"
+
+# This sets the MTU of lxdbr0 on the host machine without the need to recycle
+# the interface or reboot the machine.
 ifconfig lxdbr0 mtu $DEFAULT_MTU
 
-# Make the MTU change persistent between reboots
-sed -i '/ifconfig lxdbr0 mtu/d' /etc/rc.local
-sed -i "$ i ifconfig lxdbr0 mtu $DEFAULT_MTU" /etc/rc.local
+# Setting the MTU in the default profile will be applied to every lxc container.
+# Existing containers will need to be restarted for the new MTU to take effect.
+# This will also persist the MTU change for the host's lxdbr0
+lxc profile device set default eth0 mtu $DEFAULT_MTU
 
 INFO "Pre-caching Ubuntu:16.04 image (this may take several minutes)..."
 
diff --git a/jenkins/VCA/update-lxd-image.sh b/jenkins/VCA/update-lxd-image.sh
index 07ba90b..ae692f6 100755
--- a/jenkins/VCA/update-lxd-image.sh
+++ b/jenkins/VCA/update-lxd-image.sh
@@ -10,7 +10,7 @@
 set -eux
 
 # The basic charm layer also installs all the things. 47 packages.
-LAYER_BASIC="gcc build-essential python3-pip python3-setuptools python3-yaml"
+LAYER_BASIC="gcc build-essential python3-pip python3-setuptools libyaml-dev python3-yaml python3-dev"
 
 # the basic layer also installs virtualenv, but the name changed in xenial.
 TRUSTY_PACKAGES="python-virtualenv"
@@ -38,6 +38,7 @@
     lxc exec $container -- apt-get update -y
     lxc exec $container -- apt-get upgrade -y
     lxc exec $container -- apt-get install -y $PACKAGES $2
+    lxc exec $container -- pip3 install --upgrade pip
     lxc exec $container -- pip3 install --upgrade $PYPI
     lxc stop $container
 
diff --git a/jenkins/ci-pipelines/ci_helper.groovy b/jenkins/ci-pipelines/ci_helper.groovy
index c047a12..9708b1c 100644
--- a/jenkins/ci-pipelines/ci_helper.groovy
+++ b/jenkins/ci-pipelines/ci_helper.groovy
@@ -20,19 +20,23 @@
 
     println("retrieve archive for ${mdg}/${branch}/${build_name}/${build_number}/${pattern}")
 
+    // if the build name does not contain merge, then this is a patchset/staging job
+    if (!build_name.contains('merge')) {
+        branch += '-staging'
+    }
     def repo_prefix = 'osm-'
     def downloadSpec = """{
      "files": [
         {
           "target": "./",
-          "pattern": "${repo_prefix}${mdg}/${branch}/${pattern}",
+          "pattern": "${repo_prefix}${mdg}/${branch}/${build_number}/${pattern}",
           "build": "${build_name}/${build_number}"
         }
      ]
     }"""
 
     server.download(downloadSpec)
-    // workaround.  flatten and repo the specific build num from the directory
+    // workaround.  flatten repo to remove specific build num from the directory
     sh "cp -R ${branch}/${build_num}/* ."
     sh "rm -rf ${branch}/${build_num}"
 }
@@ -45,6 +49,10 @@
     return sh(returnStdout: true, script: "lxc exec ${container_name} -- ${cmd}").trim()
 }
 
+def lxc_file_push(container_name,file,destination) {
+    return sh(returnStdout: true, script: "lxc file push ${file} ${container_name}/${destination}").trim()
+}
+
 // start a http server
 // return the http server URL
 def start_http_server(repo_dir,server_name) {
@@ -57,12 +65,22 @@
     sh "lxc file pull ${container_name}/${file} ${destination}"
 }
 
-def systest_run(container_name, test) {
+def systest_run(container_name, test, source_rc = null) {
     // need to get the SO IP inside the running container
     so_ip = lxc_run(container_name,"lxc list SO-ub -c 4|grep eth0 |awk '{print \$2}'")
+    ro_ip = lxc_run(container_name,"lxc list RO -c 4|grep eth0 |awk '{print \$2}'")
     //container_ip = get_ip_from_container(container_name)
-    // 
-    lxc_run(container_name, "make -C devops/systest OSM_HOSTNAME=${so_ip} ${test}")
+ 
+    if ( source_rc ) {
+        pre_source = "/tmp/" + source_rc.substring(source_rc.lastIndexOf('/')+1)
+ 
+        lxc_file_push(container_name,source_rc,pre_source)
+        lxc_run(container_name, "sh -c '. ${pre_source}; make -C devops/systest OSM_HOSTNAME=${so_ip} OSM_RO_HOSTNAME=${ro_ip} ${test}'")
+    }
+    else
+    {
+        lxc_run(container_name, "make -C devops/systest OSM_HOSTNAME=${so_ip} OSM_RO_HOSTNAME=${ro_ip} ${test}")
+    }
     lxc_get_file(container_name, "/root/devops/systest/reports/pytest-${test}.xml",'.')
 }
 
@@ -73,8 +91,14 @@
 def archive(artifactory_server,mdg,branch,status) {
     server = Artifactory.server artifactory_server
 
-    def properties = "branch=${branch};status=${status}"
+    def properties = ""
+    //def properties = "branch=${branch};status=${status}"
     def repo_prefix = 'osm-'
+
+    // if the build name does not contain merge, then this is a patchset/staging job
+    if ( !JOB_NAME.contains('merge') ) {
+        branch += '-staging'
+    }
     def uploadSpec = """{
      "files": [
         {
@@ -94,6 +118,12 @@
           "target": "${repo_prefix}${mdg}/${branch}/${BUILD_NUMBER}/",
           "props": "${properties}",
           "flat": false
+        },
+        {
+          "pattern": "changelog/*",
+          "target": "${repo_prefix}${mdg}/${branch}/${BUILD_NUMBER}/",
+          "props": "${properties}",
+          "flat": false
         }]
     }"""
 
diff --git a/jenkins/ci-pipelines/ci_stage_1.groovy b/jenkins/ci-pipelines/ci_stage_1.groovy
index 12ebf16..117265a 100644
--- a/jenkins/ci-pipelines/ci_stage_1.groovy
+++ b/jenkins/ci-pipelines/ci_stage_1.groovy
@@ -36,6 +36,24 @@
     }
 
     stage('downstream') {
+        // initially use stage_name as the event_type
+        def stage_name = GERRIT_EVENT_TYPE
+
+        switch(GERRIT_EVENT_TYPE) {
+            case "change-merged":
+               stage_name = "stage_2-merge"
+               break
+
+            case "patchset-created":
+               stage_name = "stage_2"
+               break
+        }
+        do_stage_4 = false
+        if (params.DO_STAGE_4)
+        {
+            do_stage_4 = params.DO_STAGE_4
+        }
+
         // pipeline running from gerrit trigger.
         // kickoff the downstream multibranch pipeline
         def downstream_params = [
@@ -45,20 +63,26 @@
             string(name: 'GERRIT_PATCHSET_REVISION', value: GERRIT_PATCHSET_REVISION),
             string(name: 'PROJECT_URL_PREFIX', value: params.PROJECT_URL_PREFIX),
             booleanParam(name: 'TEST_INSTALL', value: params.TEST_INSTALL),
+            booleanParam(name: 'DO_STAGE_4', value: do_stage_4),
         ]
-
-        stage_name = "stage_2"
+     
         if ( params.STAGE )
         {
             // go directly to stage 3 (osm system)
             stage_name = "stage_3"
             mdg = "osm"
+            if ( ! params.TEST_INSTALL )
+            {
+                println("disabling stage_3 invocation")
+                return
+            }
         }
-        println("TEST_INSTALL = ${params.TEST_INSTALL}")
         // callout to stage_2.  This is a multi-branch pipeline.
-        upstream_job_name = "${mdg}-${stage_name}/${GERRIT_BRANCH}"
+        downstream_job_name = "${mdg}-${stage_name}/${GERRIT_BRANCH}"
 
-        stage_2_result = build job: "${upstream_job_name}", parameters: downstream_params, propagate: true
+        println("TEST_INSTALL = ${params.TEST_INSTALL}, downstream job: ${downstream_job_name}")
+
+        stage_2_result = build job: "${downstream_job_name}", parameters: downstream_params, propagate: true
         if (stage_2_result.getResult() != 'SUCCESS') {
             project = stage_2_result.getProjectName()
             build = stage_2_result.getNumber()
diff --git a/jenkins/ci-pipelines/ci_stage_2.groovy b/jenkins/ci-pipelines/ci_stage_2.groovy
index 5a5643d..52e2f1d 100644
--- a/jenkins/ci-pipelines/ci_stage_2.groovy
+++ b/jenkins/ci-pipelines/ci_stage_2.groovy
@@ -26,8 +26,8 @@
     }
 }
 
-def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,build_system,artifactory_server) {
-    println("build_system = ${build_system}")
+def ci_pipeline(mdg,url_prefix,project,branch,refspec,revision,do_stage_3,artifactory_server,docker_args="",do_stage_4=false) {
+    println("do_stage_3= ${do_stage_3}")
     ci_helper = load "devops/jenkins/ci-pipelines/ci_helper.groovy"
 
     stage('Prepare') {
@@ -52,7 +52,7 @@
         sh "docker build -t ${container_name} ."
     }
 
-    withDockerContainer("${container_name}") {
+    withDockerContainer(image: "${container_name}", args: docker_args) {
         stage('Test') {
             sh 'devops-stages/stage-test.sh'
         }
@@ -62,21 +62,28 @@
     }
 
     stage('Archive') {
+        sh "mkdir -p changelog"
+        sh "devops/tools/generatechangelog-pipeline.sh > changelog/changelog-${mdg}.html"
         sh(returnStdout:true,  script: 'devops-stages/stage-archive.sh').trim()
         ci_helper.archive(artifactory_server,mdg,branch,'untested')
     }
 
-    if ( build_system ) {
+    if ( do_stage_3 ) {
 
         stage('Build System') {
             def downstream_params_stage_3 = [
                 string(name: 'GERRIT_BRANCH', value: "${branch}"),
                 string(name: 'UPSTREAM_JOB_NAME', value: "${JOB_NAME}" ),
                 string(name: 'UPSTREAM_JOB_NUMBER', value: "${BUILD_NUMBER}" ),
+                booleanParam(name: 'DO_STAGE_4', value: do_stage_4 )
             ]
+            stage_3_job = "osm-stage_3"
+            if ( JOB_NAME.contains('merge') ) {
+                stage_3_job += '-merge'
+            }
 
-            // callout to stage_3.  This is the system build
-            result = build job: "osm-stage_3/${branch}", parameters: downstream_params_stage_3, propagate: true
+            // callout to stage_3. This is the system build
+            result = build job: "${stage_3_job}/${branch}", parameters: downstream_params_stage_3, propagate: true
             if (result.getResult() != 'SUCCESS') {
                 project = result.getProjectName()
                 build = result.getNumber()
diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy
index 00c3f30..f9ca479 100644
--- a/jenkins/ci-pipelines/ci_stage_3.groovy
+++ b/jenkins/ci-pipelines/ci_stage_3.groovy
@@ -30,8 +30,10 @@
         string(defaultValue: '', description: '', name: 'UPSTREAM_JOB_NUMBER'),
         string(defaultValue: 'dpkg1', description: '', name: 'GPG_KEY_NAME'),
         string(defaultValue: 'artifactory-osm', description: '', name: 'ARTIFACTORY_SERVER'),
+        string(defaultValue: 'osm-stage_4', description: '', name: 'DOWNSTREAM_STAGE_NAME'),
         booleanParam(defaultValue: false, description: '', name: 'SAVE_CONTAINER_ON_FAIL'),
         booleanParam(defaultValue: false, description: '', name: 'SAVE_CONTAINER_ON_PASS'),
+        booleanParam(defaultValue: false, description: '', name: 'DO_STAGE_4'),
     ])
 ])
 
@@ -40,8 +42,6 @@
     sh 'env'
 
     tag_or_branch = params.GERRIT_BRANCH.replaceAll(/\./,"")
-    container_name_prefix = "osm-${tag_or_branch}" 
-    container_name = "${container_name_prefix}-${BUILD_NUMBER}"
 
     stage("Checkout") {
         checkout scm
@@ -49,78 +49,98 @@
 
     ci_helper = load "jenkins/ci-pipelines/ci_helper.groovy"
 
+    def upstream_main_job = params.UPSTREAM_SUFFIX
+    def save_artifacts = false
+
+    // upstream jobs always use merged artifacts
+    upstream_main_job += '-merge'
+    container_name_prefix = "osm-${tag_or_branch}"
+    container_name = "${container_name_prefix}"
+    if ( JOB_NAME.contains('merge') ) {
+        save_artifacts = true
+        println("merge job, saving artifacts")
+        container_name += "-merge"
+    }
+    container_name += "-${BUILD_NUMBER}"
+
     // Copy the artifacts from the upstream jobs
     stage("Copy Artifacts") {
         // cleanup any previous repo
         sh 'rm -rf repo'
-        if ( params.UPSTREAM_SUFFIX ) {
+        dir("repo") {
+            // grab all stable upstream builds based on the
 
-            dir("repo") {
-                // grab all stable upstream builds based on the
-                // given target UPSTREAM_SUFFIX
+            dir("${RELEASE}") {
+                def list = ["SO", "UI", "RO", "openvim", "osmclient", "IM"]
+                for (component in list) {
+                    step ([$class: 'CopyArtifact',
+                           projectName: "${component}${upstream_main_job}/${GERRIT_BRANCH}"])
 
-                dir("${RELEASE}") {
-                    def list = ["SO", "UI", "RO", "openvim", "osmclient", "IM"]
-                    for (component in list) {
-                        step ([$class: 'CopyArtifact',
-                               projectName: "${component}${params.UPSTREAM_SUFFIX}/${GERRIT_BRANCH}"])
+                    // grab the build name/number
+                    //options = get_env_from_build('build.env')
+                    build_num = ci_helper.get_env_value('build.env','BUILD_NUMBER')
 
-                        // grab the build name/number
-                        //options = get_env_from_build('build.env')
-                        build_num = ci_helper.get_env_value('build.env','BUILD_NUMBER')
-                        //build_num = sh(returnStdout:true,  script: "cat build.env | awk -F= '/BUILD_NUMBER/{print \$2}'").trim()
-                        ci_helper.get_archive(params.ARTIFACTORY_SERVER,component,GERRIT_BRANCH, "${component}-stage_2 :: ${GERRIT_BRANCH}", build_num)
+                    // grab the archives from the stage_2 builds (ie. this will be the artifacts stored based on a merge)
+                    ci_helper.get_archive(params.ARTIFACTORY_SERVER,component,GERRIT_BRANCH, "${component}${upstream_main_job} :: ${GERRIT_BRANCH}", build_num)
 
-                        // cleanup any prevously defined dists
-                        sh "rm -rf dists"
-                    }
-
-                    // check if an upstream artifact based on specific build number has been requested
-                    // This is the case of a merge build and the upstream merge build is not yet complete (it is not deemed
-                    // a successful build yet). The upstream job is calling this downstream job (with the its build artifiact)
-                    if ( params.UPSTREAM_JOB_NAME ) {
-                        step ([$class: 'CopyArtifact',
-                               projectName: "${params.UPSTREAM_JOB_NAME}",
-                               selector: [$class: 'SpecificBuildSelector', buildNumber: "${params.UPSTREAM_JOB_NUMBER}"]
-                              ])
-
-                        //options = get_env_from_build('build.env')
-                        // grab the build name/number
-                        //build_num = sh(returnStdout:true,  script: "cat build.env | awk -F= '/BUILD_NUMBER/{print \$2}'").trim()
-                        build_num = ci_helper.get_env_value('build.env','BUILD_NUMBER')
-                        component = ci_helper.get_mdg_from_project(ci_helper.get_env_value('build.env','GERRIT_PROJECT'))
-
-                        ci_helper.get_archive(params.ARTIFACTORY_SERVER,component,GERRIT_BRANCH, "${component}-stage_2 :: ${GERRIT_BRANCH}", build_num)
-
-                        sh "rm -rf dists"
-                    }
-                    
-                    // sign all the components
-                    for (component in list) {
-                        sh "dpkg-sig --sign builder -k ${GPG_KEY_NAME} pool/${component}/*"
-                    }
-
-                    // now create the distro
-                    for (component in list) {
-                        sh "mkdir -p dists/${params.REPO_DISTRO}/${component}/binary-amd64/"
-                        sh "apt-ftparchive packages pool/${component} > dists/${params.REPO_DISTRO}/${component}/binary-amd64/Packages"
-                        sh "gzip -9fk dists/${params.REPO_DISTRO}/${component}/binary-amd64/Packages"
-                    }
-
-                    // create and sign the release file
-                    sh "apt-ftparchive release dists/${params.REPO_DISTRO} > dists/${params.REPO_DISTRO}/Release"
-                    sh "gpg --yes -abs -u ${GPG_KEY_NAME} -o dists/${params.REPO_DISTRO}/Release.gpg dists/${params.REPO_DISTRO}/Release"
-
-                    // copy the public key into the release folder
-                    // this pulls the key from the home dir of the current user (jenkins)
-                    sh "cp ~/${REPO_KEY_NAME} ."
+                    // cleanup any prevously defined dists
+                    sh "rm -rf dists"
                 }
-                // start an apache server to serve up the images
-                http_server_name = "${container_name}-apache"
 
-                pwd = sh(returnStdout:true,  script: 'pwd').trim()
-                repo_base_url = ci_helper.start_http_server(pwd,http_server_name)
+                // check if an upstream artifact based on specific build number has been requested
+                // This is the case of a merge build and the upstream merge build is not yet complete (it is not deemed
+                // a successful build yet). The upstream job is calling this downstream job (with the its build artifiact)
+                if ( params.UPSTREAM_JOB_NAME ) {
+                    step ([$class: 'CopyArtifact',
+                           projectName: "${params.UPSTREAM_JOB_NAME}",
+                           selector: [$class: 'SpecificBuildSelector', buildNumber: "${params.UPSTREAM_JOB_NUMBER}"]
+                          ])
+
+                    //options = get_env_from_build('build.env')
+                    // grab the build name/number
+                    //build_num = sh(returnStdout:true,  script: "cat build.env | awk -F= '/BUILD_NUMBER/{print \$2}'").trim()
+                    build_num = ci_helper.get_env_value('build.env','BUILD_NUMBER')
+                    component = ci_helper.get_mdg_from_project(ci_helper.get_env_value('build.env','GERRIT_PROJECT'))
+
+                    // the upstream job name contains suffix with the project. Need this stripped off
+                    def project_without_branch = params.UPSTREAM_JOB_NAME.split('/')[0]
+
+                    ci_helper.get_archive(params.ARTIFACTORY_SERVER,component,GERRIT_BRANCH, "${project_without_branch} :: ${GERRIT_BRANCH}", build_num)
+
+                    sh "rm -rf dists"
+                }
+                
+                // sign all the components
+                for (component in list) {
+                    sh "dpkg-sig --sign builder -k ${GPG_KEY_NAME} pool/${component}/*"
+                }
+
+                // now create the distro
+                for (component in list) {
+                    sh "mkdir -p dists/${params.REPO_DISTRO}/${component}/binary-amd64/"
+                    sh "apt-ftparchive packages pool/${component} > dists/${params.REPO_DISTRO}/${component}/binary-amd64/Packages"
+                    sh "gzip -9fk dists/${params.REPO_DISTRO}/${component}/binary-amd64/Packages"
+                }
+
+                // create and sign the release file
+                sh "apt-ftparchive release dists/${params.REPO_DISTRO} > dists/${params.REPO_DISTRO}/Release"
+                sh "gpg --yes -abs -u ${GPG_KEY_NAME} -o dists/${params.REPO_DISTRO}/Release.gpg dists/${params.REPO_DISTRO}/Release"
+
+                // copy the public key into the release folder
+                // this pulls the key from the home dir of the current user (jenkins)
+                sh "cp ~/${REPO_KEY_NAME} ."
+
+                // merge the change logs
+                sh """
+                   rm -f changelog/changelog-osm.html
+                   [ ! -d changelog ] || for mdgchange in \$(ls changelog); do cat changelog/\$mdgchange >> changelog/changelog-osm.html; done
+                   """
             }
+            // start an apache server to serve up the images
+            http_server_name = "${container_name}-apache"
+
+            pwd = sh(returnStdout:true,  script: 'pwd').trim()
+            repo_base_url = ci_helper.start_http_server(pwd,http_server_name)
         }
     }
 
@@ -169,22 +189,37 @@
                """
         }
 
-        stage("Test") {
+        stage("Smoke") {
             ci_helper.systest_run(container_name, 'smoke')
             junit '*.xml'
         }
 
-        stage("Archive") {
-            sh "echo ${container_name} > build_version.txt"
-            archiveArtifacts artifacts: "build_version.txt", fingerprint: true
+        if ( params.DO_STAGE_4 ) {
+            stage("stage_4") {
+                def downstream_params = [
+                    string(name: 'CONTAINER_NAME', value: container_name),
+                ]
+                stage_4_result = build job: "${params.DOWNSTREAM_STAGE_NAME}/${GERRIT_BRANCH}", parameters: downstream_params, propagate: false 
+               
+                currentBuild.result = stage_4_result.result
+            }
+        }
 
-            // Archive the tested repo
-            dir("repo/${RELEASE}") {
-                ci_helper.archive(params.ARTIFACTORY_SERVER,RELEASE,GERRIT_BRANCH,'tested')
+        // save the artifacts of this build if this is a merge job
+        if ( save_artifacts ) {
+            stage("Archive") {
+                sh "echo ${container_name} > build_version.txt"
+                archiveArtifacts artifacts: "build_version.txt", fingerprint: true
+
+                // Archive the tested repo
+                dir("repo/${RELEASE}") {
+                    ci_helper.archive(params.ARTIFACTORY_SERVER,RELEASE,GERRIT_BRANCH,'tested')
+                }
             }
         }
     }
     catch(caughtError) {
+        println("Caught error!")
         error = caughtError
         currentBuild.result = 'FAILURE'
     }
diff --git a/jenkins/ci-pipelines/ci_stage_4.groovy b/jenkins/ci-pipelines/ci_stage_4.groovy
index 928fdd8..5e390e3 100644
--- a/jenkins/ci-pipelines/ci_stage_4.groovy
+++ b/jenkins/ci-pipelines/ci_stage_4.groovy
@@ -17,9 +17,10 @@
 
 properties([
     parameters([
+        string(defaultValue: '', description: '', name: 'CONTAINER_NAME' ),
         string(defaultValue: 'osm-stage_3', description: '', name: 'UPSTREAM_PROJECT'),
-        string(defaultValue: 'release', description: '', name: 'RELEASE'),
         string(defaultValue: 'pipeline', description: '', name: 'NODE'),
+        string(defaultValue: '/home/jenkins/hive/openstack-telefonica.rc', description: '', name: 'HIVE_VIM_1'),
     ])
 ])
 
@@ -31,25 +32,26 @@
 
     ci_helper = load "jenkins/ci-pipelines/ci_helper.groovy"
 
-    stage("get artifacts") {
-        // grab the upstream artifact name
+    if ( params.CONTAINER_NAME ) {
+        container_name = params.CONTAINER_NAME
+    }
+    else if ( params.UPSTREAM_PROJECT ) {
         step ([$class: 'CopyArtifact',
               projectName: "${params.UPSTREAM_PROJECT}/${BRANCH_NAME}"])
+        container_name = sh(returnStdout: true, script: 'cat build_version.txt').trim()
     }
-
-    container_name = sh(returnStdout: true, script: 'cat build_version.txt').trim()
-
-    stage("Test") {
-        ci_helper.systest_run(container_name, 'smoke')
-        junit '*.xml'
+    else {
+        println("no OSM container found")
+        currentBuild.result = 'FAILURE'
+        return
     }
+    println("OSM container = ${container_name}")
 
-/*  os_credentials = "OS_AUTH_URL=${params.OS_AUTH_URL} OS_USERNAME=${params.OS_USERNAME} OS_PASSWORD=${params.OS_PASSWORD} OS_PROJECT_NAME=${params.OS_PROJECT_NAME}"
-        stage("cirros-test") {
-            sh """
-               make -C systest OSM_HOSTNAME=${osm_ip} ${os_credentials} cirros
-               """
-            junit 'systest/reports/pytest-cirros.xml'
+    if ( params.HIVE_VIM_1 ) {
+        stage( "${params.HIVE_VIM_1}" ) {
+            ci_helper.systest_run(container_name, 'cirros', params.HIVE_VIM_1)
+            ci_helper.systest_run(container_name, 'ns_scale', params.HIVE_VIM_1)
+            junit '*.xml'
         }
-*/
+    }
 }
diff --git a/jenkins/common/install_common b/jenkins/common/install_common
index c9a80ca..bae5b9a 100755
--- a/jenkins/common/install_common
+++ b/jenkins/common/install_common
@@ -16,12 +16,12 @@
 #
 #
 
-RELEASE="ReleaseTWO"
+RELEASE="ReleaseTHREE"
 REPOSITORY_KEY="OSM%20ETSI%20Release%20Key.gpg"
 REPOSITORY="stable"
 REPOSITORY_BASE="http://osm-download.etsi.org/repository/osm/debian"
 
-while getopts ":r:k:u:R:" o; do
+while getopts ":r:k:u:R:b:-:" o; do
     case "${o}" in
         r)
             REPOSITORY=${OPTARG}
@@ -35,13 +35,16 @@
         u)
             REPOSITORY_BASE=${OPTARG}
             ;;
-        *)
-            exit 1
+        b)
+            ## ignore branch option
+            ;;
+        -)
             ;;
     esac
 done
 
 key_location=$REPOSITORY_BASE/$RELEASE/$REPOSITORY_KEY
+echo $key_location
 
 curl $key_location | apt-key add -
 
diff --git a/jenkins/system/start_build b/jenkins/system/start_build
index e1b91ac..03fe930 100755
--- a/jenkins/system/start_build
+++ b/jenkins/system/start_build
@@ -53,7 +53,7 @@
 systemctl enable lxd-bridge
 systemctl start lxd-bridge
 
-apt-get install -y python-pip python python-pycurl charm-tools python-pytest
+apt-get install -y python-pip python python-pycurl charm-tools python-pytest python-openstackclient
 
 apt-get install -y python-osmclient
 
diff --git a/juju-charms/.gitignore b/juju-charms/.gitignore
new file mode 100644
index 0000000..9f751ef
--- /dev/null
+++ b/juju-charms/.gitignore
@@ -0,0 +1,2 @@
+deps/
+builds/
diff --git a/juju-charms/Dockerfile b/juju-charms/Dockerfile
new file mode 100644
index 0000000..36248e2
--- /dev/null
+++ b/juju-charms/Dockerfile
@@ -0,0 +1,4 @@
+FROM ubuntu:16.04
+
+RUN  apt-get update && apt install -y charm-tools
+
diff --git a/juju-charms/Makefile b/juju-charms/Makefile
index a579390..d6aa754 100644
--- a/juju-charms/Makefile
+++ b/juju-charms/Makefile
@@ -17,17 +17,26 @@
 
 BUILD_DIR = .
 
-CHARMS:= vpe-router vyos-proxy pingpong flownac sandvine-pts-proxy
+CHARMS:= pingpong vyos-proxy netutils
 CHARM_SRC_DIR := layers
 CHARM_BUILD_DIR := $(BUILD_DIR)/builds
 
 CHARM_SRC_DIRS := $(addprefix $(CHARM_SRC_DIR)/, $(CHARMS))
 CHARM_BUILD_DIRS := $(addprefix $(CHARM_BUILD_DIR)/, $(CHARMS))
+CHARM_DOCKER_TAG := charm-tools
+DOCKER_BUILD     ?=
 
 all: $(CHARM_BUILD_DIRS)
 
 clean:
 	-@ $(RM) -rf $(CHARM_BUILD_DIR)
 
+
+ifdef DOCKER_BUILD
+$(CHARM_BUILD_DIR)/%: $(CHARM_SRC_DIR)/%
+	docker build -t $(CHARM_DOCKER_TAG) .
+	docker run -u $$(id -u):$$(id -g) -v$$(pwd):$$(pwd) -w$$(pwd) $(CHARM_DOCKER_TAG) charm-build -o $(BUILD_DIR) $<
+else
 $(CHARM_BUILD_DIR)/%: $(CHARM_SRC_DIR)/%
 	charm-build -o $(BUILD_DIR) $<
+endif
diff --git a/juju-charms/layers/pingpong/reactive/pingpong.py b/juju-charms/layers/pingpong/reactive/pingpong.py
old mode 100644
new mode 100755
index b5a5db9..ae18076
--- a/juju-charms/layers/pingpong/reactive/pingpong.py
+++ b/juju-charms/layers/pingpong/reactive/pingpong.py
@@ -10,20 +10,42 @@
     remove_state as remove_flag,
     set_state as set_flag,
     when,
+    when_not,
 )
 import charms.sshproxy
-from subprocess import (
-    Popen,
-    CalledProcessError,
-    PIPE,
-)
+# from subprocess import (
+#     Popen,
+#     CalledProcessError,
+#     PIPE,
+# )
 
 
 cfg = config()
 
 
-@when('config.changed')
+@when_not('pingpong.configured')
+def not_configured():
+    """Check the current configuration.
+
+    Check the current values in config to see if we have enough
+    information to continue.
+    """
+    config_changed()
+
+
+@when('config.changed', 'sshproxy.configured')
 def config_changed():
+    """Verify the configuration.
+
+    Verify that the charm has been configured
+    """
+    status_set('maintenance', 'Verifying configuration data...')
+    (validated, output) = charms.sshproxy.verify_ssh_credentials()
+    if not validated:
+        status_set('blocked', 'Unable to verify SSH credentials: {}'.format(
+            output
+        ))
+        return
     if all(k in cfg for k in ['mode']):
         if cfg['mode'] in ['ping', 'pong']:
             set_flag('pingpong.configured')
@@ -32,6 +54,13 @@
     status_set('blocked', 'Waiting for configuration')
 
 
+@when('config.changed')
+@when_not('sshproxy.configured')
+def invalid_credentials():
+    status_set('blocked', 'Waiting for SSH credentials.')
+    pass
+
+
 def is_ping():
     if cfg['mode'] == 'ping':
         return True
@@ -63,16 +92,16 @@
         remove_flag('actions.start')
         return
 
+    # Attempt to raise the non-mgmt interface, but ignore failures if
+    # the interface is already up.
     try:
-        cmd =  "sudo timeout 30 /sbin/ifup eth1"
+        cmd = "sudo timeout 30 /sbin/ifup eth1"
         result, err = charms.sshproxy._run(cmd)
     except Exception as e:
-        action_fail('command failed: {}, errors: {}'.format(e, e.output))
-        remove_flag('actions.start')
-        return
+        pass
 
     try:
-        cmd =  "sudo timeout 30 /usr/bin/systemctl start {}". \
+        cmd = "sudo timeout 30 /usr/bin/systemctl start {}". \
               format(cfg['mode'])
         result, err = charms.sshproxy._run(cmd)
     except Exception as e:
diff --git a/systest/.gitignore b/systest/.gitignore
index 97f7edd..1fae3e1 100644
--- a/systest/.gitignore
+++ b/systest/.gitignore
@@ -3,3 +3,4 @@
 .cache
 descriptor-packages/
 *.xml
+images/*
diff --git a/systest/Makefile b/systest/Makefile
index 7f5a542..929896f 100644
--- a/systest/Makefile
+++ b/systest/Makefile
@@ -23,10 +23,14 @@
 #    export OS_PASSWORD=admin
 #    export OS_PROJECT_NAME=admin
 OSM_HOSTNAME ?=
+OSM_RO_HOSTNAME ?=
 OS_AUTH_URL ?=
 OS_USERNAME ?=
 OS_PASSWORD_NAME ?=
 OS_PROJECT_NAME ?=
+VIM_CONFIG ?=
+
+TOPDIR=$(shell readlink -f .|sed -e 's/systest.*//')
 
 ifdef OS_AUTH_URL
     OPTION_OS_AUTH_URL=--os-url $(OS_AUTH_URL)
@@ -47,14 +51,22 @@
 ifdef TEST_NSD_DESCRIPTORS
     OPTION_TEST_NSD_DESCRIPTORS=--osm-nsd-descriptor-packages $(TEST_NSD_DESCRIPTORS)
 endif
+ifdef OSM_RO_HOSTNAME
+    OPTION_RO_HOSTNAME=--osm_ro_host $(OSM_RO_HOSTNAME)
+else
+    OPTION_RO_HOSTNAME=--osm_ro_host $(OSM_HOSTNAME)
+endif
 
-DESCRIPTOR_REPO_NAME = descriptor-packages
-DESCRIPTOR_REPO_DIR ?= $(shell pwd)/descriptor-packages
-DESCRIPTOR_BUILD_DIR := $(DESCRIPTOR_REPO_DIR)/build
-OPTION_DESCRIPTOR_BUILD_DIR=--osm-descriptor-packages $(DESCRIPTOR_BUILD_DIR)
+ifdef VIM_CONFIG
+    OPTION_VIM_CONFIG=--vim-config "$(VIM_CONFIG)"
+else
+endif
 
-TEST_OSM_NS_NAME_PREFIX=pytest-$(shell date +%D-%T)-
-OPTION_TEST_OSM_NS_NAME_PREFIX=--osm-ns-name-prefix $(TEST_OSM_NS_NAME_PREFIX)
+DESCRIPTOR_DIR ?= $(TOPDIR)/descriptor-packages
+
+#TODO: Need to re-add this once charm application name length issue is resolved
+#TEST_OSM_NS_NAME_PREFIX=pytest-$(shell date +%D-%T)-
+#OPTION_TEST_OSM_NS_NAME_PREFIX=--osm-ns-name-prefix $(TEST_OSM_NS_NAME_PREFIX)
 
 JUNITXML_DIR = reports
 
@@ -63,9 +75,6 @@
 PYTEST_OPTIONS=
 Q=@
 
-DESCRIPTOR_REPO ?= https://osm.etsi.org/gerrit/osm/$(DESCRIPTOR_REPO_NAME)
-
-
 TEST_VNFD_DESCRIPTORS ?= None
 TEST_NSD_DESCRIPTORS  ?= None
 
@@ -87,19 +96,17 @@
 
 .PHONY: check_openstack_env check_OSM_HOSTNAME
 
-descriptors:
-	test -e $(DESCRIPTOR_REPO_NAME) || git clone $(DESCRIPTOR_REPO)
-	$(MAKE) -C $(DESCRIPTOR_REPO_NAME)
-
 report_dir:
 	@mkdir -p reports
 
 _run_test: report_dir
-	$(Q)py.test \
+	-$(Q)py.test \
         --osmhost $(OSM_HOSTNAME) \
+        $(OPTION_RO_HOSTNAME) \
         $(OPTION_OS_AUTH_URL) \
         $(OPTION_OS_USERNAME) \
         $(OPTION_OS_PASSWORD) \
+        $(OPTION_VIM_CONFIG) \
         $(OPTION_OS_PROJECT_NAME) \
         $(OPTION_TEST_VNFD_DESCRIPTORS) \
         $(OPTION_TEST_NSD_DESCRIPTORS) \
@@ -108,34 +115,88 @@
         --junitxml $(JUNITXML_DIR)/$(JUNITXML) \
         $(PYTEST_OPTIONS)
 
-cirros: check_OSM_HOSTNAME check_openstack_env
+$(DESCRIPTOR_DIR)/vnfd/cirros_vnf/build/%.tar.gz:
+	$(MAKE) -C $(DESCRIPTOR_DIR)/vnfd/cirros_vnf
+
+$(DESCRIPTOR_DIR)/nsd/cirros_ns/build/%.tar.gz:
+	$(MAKE) -C $(DESCRIPTOR_DIR)/nsd/cirros_ns
+
+images/cache/cirros-0.3.5-x86_64-disk.img:
+	$(Q)mkdir -p images/cache
+	$(Q)wget http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img -O $@
+
+images/cache/Fedora-x86_64-20-20131211.1-sda-ping.qcow2:
+	$(Q)mkdir -p images/cache
+	$(Q)wget ftp://osm-download.etsi.org/examples/ping_pong_ns/images/Fedora-x86_64-20-20131211.1-sda-ping.qcow2 -O $@
+
+images/cache/Fedora-x86_64-20-20131211.1-sda-pong.qcow2:
+	$(Q)mkdir -p images/cache
+	$(Q)wget ftp://osm-download.etsi.org/examples/ping_pong_ns/images/Fedora-x86_64-20-20131211.1-sda-pong.qcow2 -O $@
+
+# images are prefixed with 'osm/' to separate osm uploaded images from VIM installed images
+OSM_IMAGE_PREFIX ?=
+
+ifdef OS_AUTH_URL
+images/%.qcow2 images/%.img:
+	$(Q)openstack image show $(OSM_IMAGE_PREFIX)$(shell basename $@) || \
+          sh -c "make images/cache/$(shell basename $@) && openstack image create --file images/cache/$(shell basename $@) $(OSM_IMAGE_PREFIX)$(shell basename $@)"
+else
+images/%.img:
+	echo "No method selected to upload image to VIM"
+endif
+
+cirros: check_OSM_HOSTNAME check_openstack_env \
+        $(DESCRIPTOR_DIR)/vnfd/cirros_vnf/build/cirros_vnf.tar.gz \
+        $(DESCRIPTOR_DIR)/nsd/cirros_ns/build/cirros_ns.tar.gz \
+        images/cirros-0.3.5-x86_64-disk.img
 	$(Q)$(MAKE) \
-        TEST_VNFD_DESCRIPTORS=$(DESCRIPTOR_BUILD_DIR)/vnfd_pkgs/cirros_vnf.tar.gz \
-        TEST_NSD_DESCRIPTORS=$(DESCRIPTOR_BUILD_DIR)/nsd_pkgs/cirros_ns.tar.gz \
+        TEST_VNFD_DESCRIPTORS=$(DESCRIPTOR_DIR)/vnfd/cirros_vnf/build/cirros_vnf.tar.gz \
+        TEST_NSD_DESCRIPTORS=$(DESCRIPTOR_DIR)/nsd/cirros_ns/build/cirros_ns.tar.gz \
         JUNITXML=pytest-$@.xml \
         PYTEST_OPTIONS="$(PYTEST_OPTIONS) -m vnf" _run_test
 
-ns_scale: check_OSM_HOSTNAME check_openstack_env
+ns_scale: check_OSM_HOSTNAME check_openstack_env \
+        $(DESCRIPTOR_DIR)/vnfd/cirros_vnf/build/cirros_vnf.tar.gz \
+        $(DESCRIPTOR_DIR)/nsd/cirros_ns/build/cirros_ns.tar.gz \
+        images/cirros-0.3.5-x86_64-disk.img
 	$(Q)$(MAKE) \
-        TEST_VNFD_DESCRIPTORS=$(DESCRIPTOR_BUILD_DIR)/vnfd_pkgs/cirros_vnf.tar.gz \
-        TEST_NSD_DESCRIPTORS=$(DESCRIPTOR_BUILD_DIR)/nsd_pkgs/cirros_ns.tar.gz \
+        TEST_VNFD_DESCRIPTORS=$(DESCRIPTOR_DIR)/vnfd/cirros_vnf/build/cirros_vnf.tar.gz \
+        TEST_NSD_DESCRIPTORS=$(DESCRIPTOR_DIR)/nsd/cirros_ns/build/cirros_ns.tar.gz \
         JUNITXML=pytest-$@.xml \
         PYTEST_OPTIONS="$(PYTEST_OPTIONS) -m ns_scale" _run_test
 
-smoke: check_OSM_HOSTNAME
+smoke: check_OSM_HOSTNAME \
+        $(DESCRIPTOR_DIR)/vnfd/cirros_vnf/build/cirros_vnf.tar.gz \
+        $(DESCRIPTOR_DIR)/nsd/cirros_ns/build/cirros_ns.tar.gz
 	$(Q)$(MAKE) \
         JUNITXML=pytest-$@.xml \
-        PYTEST_OPTIONS="$(PYTEST_OPTIONS) -m smoke" _run_test
+        PYTEST_OPTIONS="$(PYTEST_OPTIONS) -m smoke" _run_test \
+        TEST_VNFD_DESCRIPTORS=$(DESCRIPTOR_DIR)/vnfd/cirros_vnf/build/cirros_vnf.tar.gz \
+        TEST_NSD_DESCRIPTORS=$(DESCRIPTOR_DIR)/nsd/cirros_ns/build/cirros_ns.tar.gz
 
 vim: check_OSM_HOSTNAME check_openstack_env
 	$(Q)$(MAKE) \
         JUNITXML=pytest-$@.xml \
         PYTEST_OPTIONS="$(PYTEST_OPTIONS) -m vim" _run_test
 
-ping_pong: check_OSM_HOSTNAME check_openstack_env
+$(DESCRIPTOR_DIR)/vnfd/ping_vnf/build/%.tar.gz:
+	$(MAKE) -C $(DESCRIPTOR_DIR)/vnfd/ping_vnf
+
+$(DESCRIPTOR_DIR)/vnfd/pong_vnf/build/%.tar.gz:
+	$(MAKE) -C $(DESCRIPTOR_DIR)/vnfd/pong_vnf
+
+$(DESCRIPTOR_DIR)/nsd/ping_pong_ns/build/%.tar.gz:
+	$(MAKE) -C $(DESCRIPTOR_DIR)/nsd/ping_pong_ns
+
+ping_pong: check_OSM_HOSTNAME check_openstack_env \
+    $(DESCRIPTOR_DIR)/vnfd/ping_vnf/build/ping_vnf.tar.gz \
+    $(DESCRIPTOR_DIR)/vnfd/pong_vnf/build/pong_vnf.tar.gz \
+    $(DESCRIPTOR_DIR)/nsd/ping_pong_ns/build/ping_pong_ns.tar.gz \
+    images/Fedora-x86_64-20-20131211.1-sda-ping.qcow2 \
+    images/Fedora-x86_64-20-20131211.1-sda-pong.qcow2
 	$(Q)$(MAKE) \
-        TEST_VNFD_DESCRIPTORS="$(DESCRIPTOR_BUILD_DIR)/vnfd_pkgs/ping_vnf.tar.gz,$(DESCRIPTOR_BUILD_DIR)/vnfd_pkgs/pong_vnf.tar.gz" \
-        TEST_NSD_DESCRIPTORS="$(DESCRIPTOR_BUILD_DIR)/nsd_pkgs/ping_pong_ns.tar.gz" \
+        TEST_VNFD_DESCRIPTORS="$(DESCRIPTOR_DIR)/vnfd/ping_vnf/build/ping_vnf.tar.gz,$(DESCRIPTOR_DIR)/vnfd/pong_vnf/build/pong_vnf.tar.gz" \
+        TEST_NSD_DESCRIPTORS=$(DESCRIPTOR_DIR)/nsd/ping_pong_ns/build/ping_pong_ns.tar.gz \
         JUNITXML=pytest-$@.xml \
         PYTEST_OPTIONS="$(PYTEST_OPTIONS) -m vnf" _run_test
 
diff --git a/systest/lib/openstack/fixtures.py b/systest/lib/openstack/fixtures.py
index e6953b7..5b654a9 100644
--- a/systest/lib/openstack/fixtures.py
+++ b/systest/lib/openstack/fixtures.py
@@ -23,6 +23,7 @@
     parser.addoption("--os-username", default="", help="openstack username")
     parser.addoption("--os-password", default="", help="openstack password")
     parser.addoption("--os-project-name", default="", help="openstack project name")
+    parser.addoption("--vim-config", default="", help="vim/openstack specific configuration")
 
 @pytest.fixture
 def openstack(request):
@@ -34,5 +35,6 @@
     access['vim-tenant-name'] = request.config.getoption("--os-project-name")
     access['vim-type'] = 'openstack'
     access['description'] = 'pytest system test'
+    access['config'] = request.config.getoption("--vim-config")
 
     return openstack.Openstack(access)
diff --git a/systest/lib/osm/fixtures.py b/systest/lib/osm/fixtures.py
index edfc076..2c66ac5 100644
--- a/systest/lib/osm/fixtures.py
+++ b/systest/lib/osm/fixtures.py
@@ -20,6 +20,7 @@
 
 def osm_add_options(parser):
     parser.addoption("--osmhost", default="", help="osm hostname")
+    parser.addoption("--osm_ro_host", default="", help="osm ro_host")
     parser.addoption("--osm-descriptor-packages", default="", help="location of descriptor packages")
     parser.addoption("--osm-vnfd-descriptor-packages", default="", help="vnfd packages to test")
     parser.addoption("--osm-nsd-descriptor-packages", default="", help="nsd package to test")
@@ -40,11 +41,13 @@
 def osm(request):
     from lib.osm import osm
     osmhost=request.config.getoption("--osmhost")
+    osm_ro_host=request.config.getoption("--osm_ro_host")
     descriptors_dir=request.config.getoption("--osm-descriptor-packages")
     vnfd_descriptors_list=request.config.getoption("--osm-vnfd-descriptor-packages").split(',')
     nsd_descriptors_list=request.config.getoption("--osm-nsd-descriptor-packages").split(',')
     ns_name_prefix=request.config.getoption("--osm-ns-name-prefix")
     return osm.Osm(osmhost,
+                   ro_host=osm_ro_host,
                    descriptors_dir=descriptors_dir,
                    vnfd_descriptors_list=vnfd_descriptors_list,
                    nsd_descriptors_list=nsd_descriptors_list,
diff --git a/systest/lib/osm/osm.py b/systest/lib/osm/osm.py
index 8798be8..f67cf57 100644
--- a/systest/lib/osm/osm.py
+++ b/systest/lib/osm/osm.py
@@ -18,8 +18,8 @@
 from osmclient.client import client
 
 class Osm():
-    def __init__(self,osmhost,descriptors_dir=None,vnfd_descriptors_list=None,nsd_descriptors_list=None,ns_name_prefix=None):
-        self._OsmApi=client.Client(host=osmhost)
+    def __init__(self,osmhost,ro_host=None,descriptors_dir=None,vnfd_descriptors_list=None,nsd_descriptors_list=None,ns_name_prefix=None):
+        self._OsmApi=client.Client(host=osmhost,ro_host=ro_host)
         self._descriptors_dir = descriptors_dir
         self.vnfd_descriptors_list = vnfd_descriptors_list
         self.nsd_descriptors_list  = nsd_descriptors_list 
diff --git a/systest/testcases/smoke/test_smoke.py b/systest/testcases/smoke/test_smoke.py
index e915e23..650cf05 100644
--- a/systest/testcases/smoke/test_smoke.py
+++ b/systest/testcases/smoke/test_smoke.py
@@ -33,3 +33,28 @@
 
     def test_empty_ns_catalog(self,osm):
         assert not osm.get_api().nsd.list()
+
+    def vnf_upload_packages(self, osm, descriptor_file_list ):
+        for file in descriptor_file_list:
+            assert not osm.get_api().package.upload(file)
+            assert not osm.get_api().package.wait_for_upload(file)
+            desc = osm.get_api().package.get_key_val_from_pkg(file)
+            assert desc
+
+    def delete_all_packages(self, osm):
+        for nsd in osm.get_api().nsd.list(): 
+            assert not osm.get_api().nsd.delete(nsd['name'])
+
+        for vnfd in osm.get_api().vnfd.list(): 
+            assert not osm.get_api().vnfd.delete(vnfd['name'])
+            
+    def test_upload_vnf_package(self, osm):
+        vnfd_file_list = osm.vnfd_descriptors_list
+        nsd_file_list = osm.nsd_descriptors_list
+        # upload vnfd's
+        self.vnf_upload_packages(osm, vnfd_file_list )
+        # upload nsd's
+        self.vnf_upload_packages(osm, nsd_file_list )
+
+        # now delete all packages
+        self.delete_all_packages(osm)
diff --git a/systest/testcases/vim/test_vim.py b/systest/testcases/vim/test_vim.py
index d622753..2769fd0 100644
--- a/systest/testcases/vim/test_vim.py
+++ b/systest/testcases/vim/test_vim.py
@@ -30,37 +30,77 @@
     def cleanup_test_add_vim_account(self,osm,request):
         def teardown():
             try:
-                osm.get_api().vim.delete('pytest')
+                for vim in osm.get_api().vim.list(False):
+                    osm.get_api().vim.delete(vim['name'])
             except:
                 pass
         request.addfinalizer(teardown)
  
     @pytest.mark.openstack
+    @pytest.mark.smoke
     def test_add_vim_account(self,osm,openstack,cleanup_test_add_vim_account):
-        os_access=openstack.get_access()
-        assert not osm.get_api().vim.create('pytest',os_access)
+        os_access = {}
+        vim_name = 'helloworld-os'
+        os_access['vim-url'] = 'https://169.254.169.245/'
+        os_access['vim-username'] = 'pytest2'
+        os_access['vim-password'] = 'fred'
+        os_access['vim-tenant-name'] = 'pytest3'
+        os_access['vim-type'] = 'openstack'
+        os_access['description'] = 'a test vim'
+        assert not osm.get_api().vim.create(vim_name,os_access)
 
-        resp=osm.get_api().vim.get('pytest')
-        assert resp['name'] == 'pytest'
+        resp=osm.get_api().vim.get(vim_name)
+        assert resp['name'] == vim_name
         assert resp['type'] == 'openstack'
         assert resp['vim_url'] == os_access['vim-url']
         assert resp['vim_url_admin'] == os_access['vim-url']
         assert resp['vim_tenants'][0]['user'] == os_access['vim-username']
         assert resp['vim_tenants'][0]['vim_tenant_name'] == os_access['vim-tenant-name']
-
-        assert not osm.get_api().vim.delete('pytest')
+        assert not osm.get_api().vim.delete(vim_name)
 
     @pytest.mark.vmware
+    @pytest.mark.smoke
     def test_add_vim_account_vmware(self,osm,vmware,cleanup_test_add_vim_account):
-        os_access=vmware.get_access()
-        assert not osm.get_api().vim.create('pytest',os_access)
+        os_access = {}
+        vim_name = 'helloworld-vmware'
+        os_access['vim-url'] = 'https://169.254.169.245/'
+        os_access['vim-username'] = 'pytest2'
+        os_access['vim-password'] = 'fred'
+        os_access['vim-tenant-name'] = 'pytest3'
+        os_access['vim-type'] = 'vmware'
+        os_access['description'] = 'a test vim'
+        assert not osm.get_api().vim.create(vim_name,os_access)
 
-        resp=osm.get_api().vim.get('pytest')
-        assert resp['name'] == 'pytest'
+        resp=osm.get_api().vim.get(vim_name)
+        assert resp['name'] == vim_name
         assert resp['type'] == 'vmware'
         assert resp['vim_url'] == os_access['vim-url']
         assert resp['vim_url_admin'] == os_access['vim-url']
         assert resp['vim_tenants'][0]['user'] == os_access['vim-username']
         assert resp['vim_tenants'][0]['vim_tenant_name'] == os_access['vim-tenant-name']
 
-        assert not osm.get_api().vim.delete('pytest')
+        assert not osm.get_api().vim.delete(vim_name)
+
+    @pytest.mark.smoke
+    def test_add_multiple_accounts(self,osm,cleanup_test_add_vim_account):
+        os_access = {}
+        vims = [ {'name': 'testvim1', 'vim-type': 'openstack'}, {'name': 'testvim2','vim-type': 'vmware'} ]
+        os_access['vim-url'] = 'https://169.254.169.245/'
+        os_access['vim-username'] = 'pytest2'
+        os_access['vim-password'] = 'fred'
+        os_access['vim-tenant-name'] = 'pytest3'
+        os_access['description'] = 'a test vim'
+
+        for vim in vims:
+            os_access['vim-type'] = vim['vim-type']
+            assert not osm.get_api().vim.create(vim['name'],os_access)
+            resp=osm.get_api().vim.get(vim['name'])
+            assert resp['name'] == vim['name'] 
+            assert resp['type'] == vim['vim-type']
+            assert resp['vim_url'] == os_access['vim-url']
+            assert resp['vim_url_admin'] == os_access['vim-url']
+            assert resp['vim_tenants'][0]['user'] == os_access['vim-username']
+            assert resp['vim_tenants'][0]['vim_tenant_name'] == os_access['vim-tenant-name']
+
+        for vim in osm.get_api().vim.list(False):
+            osm.get_api().vim.delete(vim['name'])
diff --git a/systest/testcases/vnfs/test_vnfs.py b/systest/testcases/vnfs/test_vnfs.py
index efbfb10..d987e93 100644
--- a/systest/testcases/vnfs/test_vnfs.py
+++ b/systest/testcases/vnfs/test_vnfs.py
@@ -86,7 +86,7 @@
 
             assert not osm.get_api().ns.create(nsd_desc['name'],ns_name,vim.vim_name)
 
-            assert utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='init')
+            assert utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='vnf-init-phase')
 
             # make sure ns is running
             assert utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='running',wait_time=120)
@@ -103,6 +103,8 @@
                     # wait for ns to be in running-state
                     assert utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='running',wait_time=120)
 
+            time.sleep(10)
+
             assert not osm.get_api().ns.delete(ns_name)
 
             assert not osm.get_api().nsd.delete(nsd_desc['name'])
diff --git a/tools/.gitignore b/tools/.gitignore
new file mode 100644
index 0000000..d250963
--- /dev/null
+++ b/tools/.gitignore
@@ -0,0 +1 @@
+repos/*
diff --git a/tools/cleanupBuilds.py b/tools/cleanupBuilds.py
new file mode 100755
index 0000000..2c44ae2
--- /dev/null
+++ b/tools/cleanupBuilds.py
@@ -0,0 +1,81 @@
+#!/usr/bin/env python
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+#
+import requests
+import json
+import pprint
+import argparse
+
+from dateutil import parser
+from dateutil.tz import tzutc
+from datetime import datetime
+import time
+
+arg_parser=argparse.ArgumentParser(description="Tool to retrieve the latest build from the artifactory server")
+arg_parser.add_argument('branch')
+arg_parser.add_argument('--project',default='osm-stage_3')
+arg_parser.add_argument('--url',default='http://osm1.etsi.org:8081/')
+arg_parser.add_argument('--keep',default=5)
+arg_parser.add_argument('--password',default='')
+args = arg_parser.parse_args()
+
+url = args.url + 'artifactory/api/build/' + args.project + " :: " + args.branch
+
+resp = requests.get(url)
+jsonData = json.loads(resp.content)
+if 'buildsNumbers' not in jsonData:
+    print("Cannot find any valid builds")
+    exit(1)
+
+# first entry is the latest build
+buildlist = sorted(jsonData['buildsNumbers'], key=lambda x: int(x['uri'][1:]),reverse=True)
+print("total builds is {}".format(len(buildlist)))
+pprint.pprint(buildlist)
+
+if len(buildlist) < args.keep:
+    print("nothing to cleanup")
+    exit(0)
+
+def convert_to_ms(datetime):
+    #get the millisecond from the date/time
+    ms=datetime.split('.')[1].split('+')[0]
+    parser_out=parser.parse(datetime)
+    timeval=parser_out
+    tuple=int(time.mktime(timeval.timetuple()))
+    return (tuple*1000+int(ms)-(time.timezone*1000))
+
+def buildPost(dateInMS,buildNumber):
+    build = {}
+    data = {}
+    build['buildName'] = args.project + " :: " + args.branch
+    build['buildNumber'] = buildNumber
+    build['date'] = str(dateInMS)
+
+    data['buildsCoordinates'] = list()
+    data['buildsCoordinates'].append(build)
+    return data
+    
+delete_url = args.url + 'artifactory/ui/builds/buildsDelete'
+headers = {'Content-Type': 'application/json'}
+
+for entry in buildlist[int(args.keep):]:
+   ms = convert_to_ms(entry['started'])
+   buildNumber = entry['uri'].split('/')[1]
+   print("deleting build {} ms {}".format(args.project + " :: " + args.branch + '/' + buildNumber,ms))
+   postData = buildPost(ms,entry['uri'].split('/')[1])
+
+   requests.post(delete_url,data=json.dumps(postData),headers=headers,auth=('admin',args.password))
diff --git a/tools/cleanupRepo.py b/tools/cleanupRepo.py
new file mode 100755
index 0000000..d25b5c5
--- /dev/null
+++ b/tools/cleanupRepo.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+#
+#   Copyright 2017 Sandvine
+#
+#   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.
+#
+#
+import requests
+import json
+import pprint
+import argparse
+
+from dateutil import parser
+from dateutil.tz import tzutc
+from datetime import datetime
+import time
+
+arg_parser=argparse.ArgumentParser(description="Tool to retrieve the latest build from the artifactory server")
+arg_parser.add_argument('--branch',default=None)
+arg_parser.add_argument('repo')
+arg_parser.add_argument('--url',default='http://osm1.etsi.org:8081/')
+arg_parser.add_argument('--keep',default=5)
+arg_parser.add_argument('--password',default='')
+arg_parser.add_argument('--debug',default=None)
+
+args = arg_parser.parse_args()
+
+
+if args.branch:
+    url = args.url + 'artifactory/api/storage/' + args.repo + '/' + args.branch
+    delete_url = args.url + 'artifactory/' + args.repo + '/' + args.branch
+else:
+    url = args.url + 'artifactory/api/storage/' + args.repo
+    delete_url = args.url + 'artifactory/' + args.repo
+
+resp = requests.get(url)
+jsonData = json.loads(resp.content)
+
+# first entry is the latest build
+filtered_list = filter(lambda x: x['uri'].split('/')[1].isdigit(), jsonData['children'])
+folders_sorted = sorted(filtered_list, key=lambda x: int(x['uri'].split('/')[1]),reverse=True)
+
+if len(folders_sorted) < int(args.keep):
+    print("nothing to cleanup")
+    exit(0)
+
+
+for entry in folders_sorted[int(args.keep):]:
+    if args.debug:
+        print("going to delete {}".format(delete_url+entry['uri']))
+    else:
+        requests.delete(delete_url + entry['uri'], auth=('admin',args.password))
+
+
+# empty the trash can
+empty_trash_url=args.url + 'artifactory/ui/artifactactions/emptytrash'
+headers = {'Content-Type': 'application/json'}
+requests.post(empty_trash_url,headers=headers,auth=('admin',args.password))
+
+
diff --git a/tools/gen-repo.sh b/tools/gen-repo.sh
index b7bb2f5..b1e768f 100755
--- a/tools/gen-repo.sh
+++ b/tools/gen-repo.sh
@@ -14,6 +14,7 @@
     echo -e "  -h  <rsync user@host>    "
     echo -e "  -R  <rsync options>      "
     echo -e "  -P  <public key file>    "
+    echo -e "  -c  <changelogfile>      "
     exit 1
 }
 
@@ -33,6 +34,8 @@
     echo "RSYNC_USER_HOST $RSYNC_USER_HOST"
     echo "RSYNC_OPTIONS   $RSYNC_OPTIONS"
     echo "PUBLIC_KEY_FILE $PUBLIC_KEY_FILE"
+    echo "BUILD:          $BUILD"
+    echo "BUILD_NUMBER:   $BUILD_NUMBER"
 }
 
 IN_REPO="unstable"
@@ -44,8 +47,9 @@
 RSYNC_USER_HOST=osmusers@osm-download.etsi.org
 CURR_DIR=$(pwd)
 PUBLIC_KEY_FILE=~/OSM\ ETSI\ Release\ Key.gpg
+CHANGE_LOG_FILE=
 
-while getopts ":p:i:o:k:j::d:b:r:h:R:P:" o; do
+while getopts ":p:i:o:k:j::d:b:r:h:R:P:c:" o; do
     case "${o}" in
         p)
             PASSPHRASE_FILE=${OPTARG}
@@ -80,6 +84,9 @@
         P)
             PUBLIC_KEY_FILE=${OPTARG}
             ;;
+        c)
+            CHANGE_LOG_FILE=${OPTARG}
+            ;;
         *)
             usage
             exit 1
@@ -87,17 +94,18 @@
     esac
 done
 
-dump_vars
-
 BASE_DIR=$REPO_BASE/osm/debian/$RELEASE_DIR
 
 [ -z "$BUILD" ] && FATAL "missing option: -b <build>"
 
+BUILD_NUMBER=$(echo "$BUILD" | sed -e 's/.*:: //g')
+
+dump_vars
+
 [ -x $JFROG_CLI ] || FATAL "jfrog cli not found. Please install https://www.jfrog.com/getcli/ and use option '-j <jfrog cli location>'"
 
 $JFROG_CLI rt download --build "$BUILD" osm-release || FATAL "Failed to download"
 
-BUILD_NUMBER=$(basename "$BUILD")
 
 [ $PASSPHRASE_FILE ] && GPG_PASSPHRASE="--no-tty --no-use-agent --passphrase \"$(cat $PASSPHRASE_FILE)\""
 
@@ -105,10 +113,11 @@
 
 cp -R $BUILD_NUMBER/dists/$IN_REPO $BASE_DIR/dists/$OUT_REPO
 cp -R $BUILD_NUMBER/pool $BASE_DIR/
+[ -d "$BUILD_NUMBER/changelog" ] && cp -R $BUILD_NUMBER/changelog $BASE_DIR/
 
 cd $BASE_DIR
 
-for i in RO osmclient openvim SO UI; do
+for i in RO osmclient openvim SO UI IM; do
 
     # gpg sign the packages
     dpkg-sig -g "$GPG_PASSPHRASE" -k $GPGKEY --sign builder pool/$i/*.deb
@@ -136,4 +145,7 @@
 # copy over the public key file
 [ "$PUBLIC_KEY_FILE" ] && cp "$PUBLIC_KEY_FILE" osm/debian/$RELEASE_DIR
 
+# copy over the changelog file
+[ "$CHANGE_LOG_FILE" ] && cp "$CHANGE_LOG_FILE" osm/debian/$RELEASE_DIR
+
 rsync -avR $RSYNC_OPTIONS osm/debian/$RELEASE_DIR rsync://$RSYNC_USER_HOST/repos
diff --git a/tools/generatechangelog-pipeline.sh b/tools/generatechangelog-pipeline.sh
new file mode 100755
index 0000000..c527c54
--- /dev/null
+++ b/tools/generatechangelog-pipeline.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+REPO_NAME=$(basename $(git config --get remote.origin.url) | cut -d'.' -f1)
+# get the latest tag
+TAG_END="HEAD"
+TAG_START=$(git tag | sort -Vr | head -1)
+git pull --tags origin master &> /dev/null
+echo "<h1>$REPO_NAME Changelog</h1>"
+echo "<h2>tag: ${TAG_START} -> ${TAG_END}</h2>"
+git log --pretty=format:"<li> <a href=https://osm.etsi.org/gitweb/?p=osm/$REPO_NAME.git;a=commitdiff;h=%H>%h &bull;</a> %s</li> " --reverse  ${TAG_START}..${TAG_END}
diff --git a/tools/generatechangelog.sh b/tools/generatechangelog.sh
new file mode 100755
index 0000000..5fa902e
--- /dev/null
+++ b/tools/generatechangelog.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+if [ $# -ne 2 ]; then
+    echo "Usage $0 <repo> <outfile>"
+    exit 1
+fi
+
+REPO="$1"
+OUTFILE=$2
+
+modules="devops openvim RO SO UI IM osmclient"
+list=""
+for i in $modules; do
+    if [ $REPO == "$i" -o $REPO == "all" ]; then
+        list=$REPO
+        break
+    fi
+done
+
+[ $REPO == "all" ] && list=$modules
+
+if [ -z "$list" ]; then
+    echo "Repo must be one of these: $modules all"
+    exit 1
+fi
+
+TEMPDIR=$(mktemp -d)
+
+echo "<h1>OSM Changelog</h1>" >> $OUTFILE
+for i in $list; do
+    REPODIR=$TEMPDIR/$i
+    echo
+    echo $i
+    if [ ! -d $REPODIR ]; then
+        git clone https://osm.etsi.org/gerrit/osm/$i $REPODIR
+    fi
+    git -C $REPODIR checkout master
+    git -C $REPODIR pull --rebase
+    git -C $REPODIR fetch --tags
+    TAG_START=$(git -C $REPODIR tag | sort -Vr | head -2 | sort -V | head -1)
+    TAG_END=$(git -C $REPODIR tag | sort -Vr | head -1)
+    echo "<h2>Changes for $i tag: ${TAG_START}..${TAG_END}</h2>" >> $OUTFILE
+    #git -C $i log --pretty=format:"* %h; author: %cn; date: %ci; subject:%s" ${TAG_START}..${TAG_END} >> $OUTFILE
+    git -C $REPODIR log --pretty=format:"<li> <a href=https://osm.etsi.org/gitweb/?p=osm/$i.git;a=commitdiff;h=%H>%h &bull;</a> %s</li> " --reverse  ${TAG_START}..${TAG_END} >> $OUTFILE
+    echo "" >> $OUTFILE
+done
+
+exit 0
diff --git a/tools/newtag.sh b/tools/newtag.sh
index 78cd4bb..124c261 100755
--- a/tools/newtag.sh
+++ b/tools/newtag.sh
@@ -1,15 +1,14 @@
 #!/bin/bash
-if [ $# -ne 2 ]; then
-    echo "Usage $0 <repo> <tag>"
+if [ $# -ne 3 ]; then
+    echo "Usage $0 <repo> <tag> <user>"
     exit 1
 fi
 
-CURRENT_BRANCH="v2.0"
+USER=$3
 TAG="$2"
-tag_header="OSM Release TWO:"
-tag_message="$tag_header version $TAG"
+tag_header="OSM Release THREE:" tag_message="$tag_header version $TAG"
 
-modules="juju-charms devops descriptor-packages openvim RO SO UI osmclient"
+modules="devops openvim RO SO UI IM osmclient"
 list=""
 for i in $modules; do
     if [ "$1" == "$i" -o "$1" == "all" ]; then
@@ -26,14 +25,11 @@
 fi
 
 for i in $list; do
-    echo
     echo $i
-    if [ "$i" == "juju-charms" ] && [ "$1" == "all" ] ; then
-        #This is to allow "./newtag.sh all v2.0.0", and still checkout master in "juju-charms" before tagging
-        git -C $i checkout master
-    else
-        git -C $i checkout $CURRENT_BRANCH
+    if [ ! -d $i ]; then
+        git clone ssh://$USER@osm.etsi.org:29418/osm/$i
     fi
+    git -C $i checkout master
     git -C $i pull --rebase
     git -C $i tag -a $TAG -m"$tag_message"
     git -C $i push origin $TAG --follow-tags
@@ -41,4 +37,3 @@
 done
 
 exit 0
-