diff --git a/descriptor-packages/.gitignore b/descriptor-packages/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..0766a22e85f32779d464e6b223beb1810a868a73 --- /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 793f30c095d8896674c708ad717d8f19683c60f1..61710bfce03b719b40f1554aedab2b59380c5b46 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 - -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 +SUBDIRS = vnfd nsd -$(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/mk/dirs.mk b/descriptor-packages/mk/dirs.mk new file mode 100644 index 0000000000000000000000000000000000000000..85a05e52d26823260b390ae43ee829d9c86a7a1a --- /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 0000000000000000000000000000000000000000..350af35e6f8af8dd9f2a3a47fd0883515687ae68 --- /dev/null +++ b/descriptor-packages/mk/pkg.mk @@ -0,0 +1,68 @@ +# +# 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 + +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 $(DEP_FILES) + $(Q)mkdir -p $@ + $(Q)cp -rf $</. $@ + $(Q)$(GEN_VNFD_PKG) $< $@ +else +$(BUILD_DIR)/$(PKG_BASE_NAME): src $(DEP_FILES) + $(Q)mkdir -p $@ + $(Q)cp -rf $</. $@ + $(Q)$(GEN_NSD_PKG) $< $@ +endif + +ifdef VNFD_CHARM +$(BUILD_DIR)/$(PKG_NAME): $(BUILD_DIR)/$(PKG_BASE_NAME) $(CHARM_BUILD_DIR)/$(VNFD_CHARM) + $(Q)echo "building $(PKG_BASE_NAME) with charm $(VNFD_CHARM)" + $(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): $(BUILD_DIR)/$(PKG_BASE_NAME) + $(Q)echo "building $(PKG_BASE_NAME)" + $(Q)$(GEN_PKG) --no-remove-files -d $(BUILD_DIR) $(BUILD_DIR)/$(PKG_BASE_NAME) +endif + +$(CHARM_BUILD_DIR)/%: $(CHARM_SRC_DIR)/% + $(Q)docker build -q -t $(CHARM_DOCKER_TAG) $(CHARM_DIR)/. + $(Q)docker run -u $$(id -u):$$(id -g) -v$(CHARM_DIR):$(CHARM_DIR) -w$(CHARM_DIR) $(CHARM_DOCKER_TAG) charm-build -o $(CHARM_DIR) $< + +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 0000000000000000000000000000000000000000..fdd20452b5238897ab663c6bb523fbfcf6d4844a --- /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 0000000000000000000000000000000000000000..c5f5f69127ac5004e4fc5bfe8ff2e25f25abaaaf --- /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 100% rename from descriptor-packages/src/nsd/VyOS_ns/VyOS_nsd.yaml rename to descriptor-packages/nsd/VyOS_ns/src/VyOS_nsd.yaml 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 diff --git a/descriptor-packages/nsd/cirros_2vnf_ns/Makefile b/descriptor-packages/nsd/cirros_2vnf_ns/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..c5f5f69127ac5004e4fc5bfe8ff2e25f25abaaaf --- /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 100% 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 diff --git a/descriptor-packages/src/nsd/cirros_2vnf_ns/icons/osm_2x.png b/descriptor-packages/nsd/cirros_2vnf_ns/src/icons/osm_2x.png similarity index 100% rename from descriptor-packages/src/nsd/cirros_2vnf_ns/icons/osm_2x.png rename to descriptor-packages/nsd/cirros_2vnf_ns/src/icons/osm_2x.png diff --git a/descriptor-packages/nsd/cirros_ns/Makefile b/descriptor-packages/nsd/cirros_ns/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..c5f5f69127ac5004e4fc5bfe8ff2e25f25abaaaf --- /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 100% rename from descriptor-packages/src/nsd/cirros_ns/cirros_nsd.yaml rename to descriptor-packages/nsd/cirros_ns/src/cirros_nsd.yaml diff --git a/descriptor-packages/src/nsd/cirros_ns/icons/osm_2x.png b/descriptor-packages/nsd/cirros_ns/src/icons/osm_2x.png similarity index 100% rename from descriptor-packages/src/nsd/cirros_ns/icons/osm_2x.png rename to descriptor-packages/nsd/cirros_ns/src/icons/osm_2x.png diff --git a/descriptor-packages/nsd/ims_allin1_corpa/Makefile b/descriptor-packages/nsd/ims_allin1_corpa/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..c5f5f69127ac5004e4fc5bfe8ff2e25f25abaaaf --- /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 100% 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 diff --git a/descriptor-packages/src/nsd/ims_allin1_corpa/icons/osm_2x.png b/descriptor-packages/nsd/ims_allin1_corpa/src/icons/osm_2x.png similarity index 100% rename from descriptor-packages/src/nsd/ims_allin1_corpa/icons/osm_2x.png rename to descriptor-packages/nsd/ims_allin1_corpa/src/icons/osm_2x.png 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 0000000000000000000000000000000000000000..c5f5f69127ac5004e4fc5bfe8ff2e25f25abaaaf --- /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 diff --git a/descriptor-packages/src/nsd/ping_pong_ns/ping_pong_nsd.yaml b/descriptor-packages/nsd/ping_pong_ns/src/ping_pong_nsd.yaml similarity index 100% rename from descriptor-packages/src/nsd/ping_pong_ns/ping_pong_nsd.yaml rename to descriptor-packages/nsd/ping_pong_ns/src/ping_pong_nsd.yaml 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 0000000000000000000000000000000000000000..c5f5f69127ac5004e4fc5bfe8ff2e25f25abaaaf --- /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 100% rename from descriptor-packages/src/nsd/ref1_ns/ref1_nsd.yaml rename to descriptor-packages/nsd/ref1_ns/src/ref1_nsd.yaml diff --git a/descriptor-packages/nsd/ref2_ns/Makefile b/descriptor-packages/nsd/ref2_ns/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..c5f5f69127ac5004e4fc5bfe8ff2e25f25abaaaf --- /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 100% rename from descriptor-packages/src/nsd/ref2_ns/ref2_nsd.yaml rename to descriptor-packages/nsd/ref2_ns/src/ref2_nsd.yaml 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 0000000000000000000000000000000000000000..c5f5f69127ac5004e4fc5bfe8ff2e25f25abaaaf --- /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/ubuntu_cirros_multidisk_ns/icons/osm_2x.png b/descriptor-packages/nsd/ubuntu_cirros_multidisk_ns/src/icons/osm_2x.png similarity index 100% rename from descriptor-packages/src/nsd/ubuntu_cirros_multidisk_ns/icons/osm_2x.png rename to descriptor-packages/nsd/ubuntu_cirros_multidisk_ns/src/icons/osm_2x.png 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 100% 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 diff --git a/descriptor-packages/nsd/ubuntu_xenial_ns/Makefile b/descriptor-packages/nsd/ubuntu_xenial_ns/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..c5f5f69127ac5004e4fc5bfe8ff2e25f25abaaaf --- /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/ubuntu_xenial_ns/icons/osm_2x.png b/descriptor-packages/nsd/ubuntu_xenial_ns/src/icons/osm_2x.png similarity index 100% rename from descriptor-packages/src/nsd/ubuntu_xenial_ns/icons/osm_2x.png rename to descriptor-packages/nsd/ubuntu_xenial_ns/src/icons/osm_2x.png 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 100% 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 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 07761d2f62abb83db78ce7a916ed33218a77dd92..4ac1ec4d05ec1089f9ce8fe49a289f567e2d5bb2 100755 --- a/descriptor-packages/src/gen_nsd_pkg.sh +++ b/descriptor-packages/tools/gen_nsd_pkg.sh @@ -42,7 +42,7 @@ if [ ! -e ${pkg_dest_dir} ]; then 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_dirs=( ns_config vnf_config icons scripts ) 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 81a655c9a1aa10542dee6a3cc6652431b937adbc..185a6b429b4ab9851189039c59da690bb8b394a5 100755 --- a/descriptor-packages/src/gen_vnfd_pkg.sh +++ b/descriptor-packages/tools/gen_vnfd_pkg.sh @@ -42,7 +42,7 @@ if [ ! -e ${pkg_dest_dir} ]; then 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_dirs=( charms icons scripts images ) 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 98% rename from descriptor-packages/src/generate_descriptor_pkg.sh rename to descriptor-packages/tools/generate_descriptor_pkg.sh index a09fb6afd6cfe2dcbe0321813d5d9068158dce46..d076b28a2767e8344fbbbeb8070a15cfa5a968de 100755 --- a/descriptor-packages/src/generate_descriptor_pkg.sh +++ b/descriptor-packages/tools/generate_descriptor_pkg.sh @@ -554,7 +554,7 @@ if [ $? != 0 ] ; then exit 1 fi -echo "$OPTS" +#echo "$OPTS" eval set -- "$OPTS >/dev/null 2>&1" while true; do @@ -795,7 +795,12 @@ if [ $CREATE == false ]; then 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 0000000000000000000000000000000000000000..fdd20452b5238897ab663c6bb523fbfcf6d4844a --- /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 0000000000000000000000000000000000000000..a08d58821f4199f7ea75c0bda37ae49d21267407 --- /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 100% rename from descriptor-packages/src/vnfd/VyOS_vnf/VyOS__vnfd.yaml rename to descriptor-packages/vnfd/VyOS_vnf/src/VyOS__vnfd.yaml diff --git a/descriptor-packages/src/vnfd/VyOS_vnf/icons/osm_2x.png b/descriptor-packages/vnfd/VyOS_vnf/src/icons/osm_2x.png similarity index 100% rename from descriptor-packages/src/vnfd/VyOS_vnf/icons/osm_2x.png rename to descriptor-packages/vnfd/VyOS_vnf/src/icons/osm_2x.png diff --git a/descriptor-packages/vnfd/cirros_vnf/Makefile b/descriptor-packages/vnfd/cirros_vnf/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..ad4b68cbd65f42f79f554de8c125a694b79da45a --- /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 100% rename from descriptor-packages/src/vnfd/cirros_vnf/cirros_vnfd.yaml rename to descriptor-packages/vnfd/cirros_vnf/src/cirros_vnfd.yaml 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 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 0000000000000000000000000000000000000000..52d95b563aefa06bbff360d760abc8a0f0353ed0 --- /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 100% 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 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 diff --git a/descriptor-packages/vnfd/ping_vnf/Makefile b/descriptor-packages/vnfd/ping_vnf/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..8c50a0a157f4bbf57e8cbf2a0d787b832e63c3ec --- /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 diff --git a/descriptor-packages/src/vnfd/ping_vnf/ping_vnfd.yaml b/descriptor-packages/vnfd/ping_vnf/src/ping_vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/ping_vnf/ping_vnfd.yaml rename to descriptor-packages/vnfd/ping_vnf/src/ping_vnfd.yaml diff --git a/descriptor-packages/vnfd/pong_vnf/Makefile b/descriptor-packages/vnfd/pong_vnf/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..8c50a0a157f4bbf57e8cbf2a0d787b832e63c3ec --- /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/pong_vnf/icons/rift_logo.png b/descriptor-packages/vnfd/pong_vnf/src/icons/rift_logo.png similarity index 100% rename from descriptor-packages/src/vnfd/pong_vnf/icons/rift_logo.png rename to descriptor-packages/vnfd/pong_vnf/src/icons/rift_logo.png diff --git a/descriptor-packages/src/vnfd/pong_vnf/pong_vnfd.yaml b/descriptor-packages/vnfd/pong_vnf/src/pong_vnfd.yaml similarity index 100% rename from descriptor-packages/src/vnfd/pong_vnf/pong_vnfd.yaml rename to descriptor-packages/vnfd/pong_vnf/src/pong_vnfd.yaml diff --git a/descriptor-packages/vnfd/ref11_vnf/Makefile b/descriptor-packages/vnfd/ref11_vnf/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..52d95b563aefa06bbff360d760abc8a0f0353ed0 --- /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 100% rename from descriptor-packages/src/vnfd/ref11_vnf/ref11_vnfd.yaml rename to descriptor-packages/vnfd/ref11_vnf/src/ref11_vnfd.yaml diff --git a/descriptor-packages/vnfd/ref12_vnf/Makefile b/descriptor-packages/vnfd/ref12_vnf/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..52d95b563aefa06bbff360d760abc8a0f0353ed0 --- /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 100% rename from descriptor-packages/src/vnfd/ref12_vnf/ref12_vnfd.yaml rename to descriptor-packages/vnfd/ref12_vnf/src/ref12_vnfd.yaml diff --git a/descriptor-packages/vnfd/ref21_vnf/Makefile b/descriptor-packages/vnfd/ref21_vnf/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..a08d58821f4199f7ea75c0bda37ae49d21267407 --- /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 100% rename from descriptor-packages/src/vnfd/ref21_vnf/ref21_vnfd.yaml rename to descriptor-packages/vnfd/ref21_vnf/src/ref21_vnfd.yaml diff --git a/descriptor-packages/vnfd/ref22_vnf/Makefile b/descriptor-packages/vnfd/ref22_vnf/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..a08d58821f4199f7ea75c0bda37ae49d21267407 --- /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 100% rename from descriptor-packages/src/vnfd/ref22_vnf/ref22_vnfd.yaml rename to descriptor-packages/vnfd/ref22_vnf/src/ref22_vnfd.yaml 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 0000000000000000000000000000000000000000..a08d58821f4199f7ea75c0bda37ae49d21267407 --- /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 100% 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 diff --git a/descriptor-packages/vnfd/ubuntu_xenial_vnf/Makefile b/descriptor-packages/vnfd/ubuntu_xenial_vnf/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..a08d58821f4199f7ea75c0bda37ae49d21267407 --- /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 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 100% 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 diff --git a/juju-charms/.gitignore b/juju-charms/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..9f751ef9f8a3ffb7f609d37ea938ee1f972d10ee --- /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 0000000000000000000000000000000000000000..36248e2dc17dcad5ad729ce15f64be00eecef0dd --- /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 a579390f1decbdb965384268d39db1ae5fd4424c..76d21ac5af50583d32fb059a60d5531162b1fce6 100644 --- a/juju-charms/Makefile +++ b/juju-charms/Makefile @@ -17,12 +17,13 @@ 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 all: $(CHARM_BUILD_DIRS) @@ -30,4 +31,5 @@ clean: -@ $(RM) -rf $(CHARM_BUILD_DIR) $(CHARM_BUILD_DIR)/%: $(CHARM_SRC_DIR)/% - charm-build -o $(BUILD_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) $<