Remove config template from use in ping-pong
[osm/SO.git] / examples / ping_pong_ns / CMakeLists.txt
1
2 #   Copyright 2016 RIFT.IO Inc
3 #
4 #   Licensed under the Apache License, Version 2.0 (the "License");
5 #   you may not use this file except in compliance with the License.
6 #   You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #   Unless required by applicable law or agreed to in writing, software
11 #   distributed under the License is distributed on an "AS IS" BASIS,
12 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #   See the License for the specific language governing permissions and
14 #   limitations under the License.
15 #
16 # Author(s): Anil Gunturu
17 # Creation Date: 03/26/2014
18
19
20 cmake_minimum_required(VERSION 2.8)
21
22 configure_file(
23   ${CMAKE_CURRENT_SOURCE_DIR}/generate_packages.sh.in
24   ${CMAKE_CURRENT_BINARY_DIR}/generate_packages.sh
25   ESCAPE_QUOTES @ONLY
26   )
27
28 set(PACKAGE_OUTPUT
29   ${CMAKE_CURRENT_BINARY_DIR}/ping_pong_nsd.tar.gz
30   ${CMAKE_CURRENT_BINARY_DIR}/ping_vnfd.tar.gz
31   ${CMAKE_CURRENT_BINARY_DIR}/pong_vnfd.tar.gz
32   ${CMAKE_CURRENT_BINARY_DIR}/ping_pong_nsd_aws.tar.gz
33   ${CMAKE_CURRENT_BINARY_DIR}/ping_vnfd_aws.tar.gz
34   ${CMAKE_CURRENT_BINARY_DIR}/pong_vnfd_aws.tar.gz
35   ${CMAKE_CURRENT_BINARY_DIR}/ping_pong_nsd_with_epa.tar.gz
36   ${CMAKE_CURRENT_BINARY_DIR}/ping_vnfd_with_epa.tar.gz
37   ${CMAKE_CURRENT_BINARY_DIR}/pong_vnfd_with_epa.tar.gz
38   ${CMAKE_CURRENT_BINARY_DIR}/ping_vnfd_with_image.tar.gz
39   ${CMAKE_CURRENT_BINARY_DIR}/pong_vnfd_with_image.tar.gz)
40
41 add_custom_command(
42     OUTPUT ${PACKAGE_OUTPUT}
43     COMMAND ${CMAKE_CURRENT_BINARY_DIR}/generate_packages.sh
44     DEPENDS 
45        mano_yang 
46        rwcloud_yang 
47        ${CMAKE_CURRENT_SOURCE_DIR}/ping_pong_nsd.py
48        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/ping_initial_config.py
49        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/pong_initial_config.py
50        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/ping_set_rate.py
51        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/start_traffic.py
52   )
53
54 add_custom_target(ping_pong_pkg_gen ALL
55     DEPENDS mano_yang rwcloud_yang ${PACKAGE_OUTPUT}
56   )
57
58 install(
59     FILES ${PACKAGE_OUTPUT}
60     DESTINATION
61       usr/rift/mano/examples/ping_pong_ns
62       COMPONENT ${PKG_LONG_NAME}
63     )
64
65 install(
66     FILES
67       ${CMAKE_CURRENT_BINARY_DIR}/ping_vnfd_with_image.tar.gz
68       ${CMAKE_CURRENT_BINARY_DIR}/pong_vnfd_with_image.tar.gz
69     DESTINATION
70       usr/rift/mano/examples/ping_pong_ns
71     COMPONENT ${PKG_LONG_NAME}
72     OPTIONAL
73     )
74
75 rift_python_install_tree(
76   COMPONENT ${PKG_LONG_NAME}
77   FILES
78     rift/mano/examples/ping_pong_nsd.py
79     rift/mano/examples/ping_initial_config.py
80     rift/mano/examples/pong_initial_config.py
81     rift/mano/examples/ping_set_rate.py
82     rift/mano/examples/start_traffic.py
83   )
84
85 install(
86   PROGRAMS
87     stand_up_ping_pong
88   DESTINATION usr/bin
89   COMPONENT ${PKG_LONG_NAME}
90   )
91