Docker build for SO
[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}/ping_vnfd_with_vca.tar.gz
38   ${CMAKE_CURRENT_BINARY_DIR}/pong_vnfd_with_vca.tar.gz
39   ${CMAKE_CURRENT_BINARY_DIR}/ping_pong_nsd_with_vca.tar.gz
40   ${CMAKE_CURRENT_BINARY_DIR}/pong_vnfd_with_epa.tar.gz
41   ${CMAKE_CURRENT_BINARY_DIR}/ping_vnfd_with_vip.tar.gz
42   ${CMAKE_CURRENT_BINARY_DIR}/pong_vnfd_with_vip.tar.gz
43   ${CMAKE_CURRENT_BINARY_DIR}/ping_pong_nsd_with_vip.tar.gz
44   ${CMAKE_CURRENT_BINARY_DIR}/ping_vnfd_with_image.tar.gz
45   ${CMAKE_CURRENT_BINARY_DIR}/pong_vnfd_with_image.tar.gz
46   ${CMAKE_CURRENT_BINARY_DIR}/ping_vnfd_with_vca.tar.gz
47   ${CMAKE_CURRENT_BINARY_DIR}/pong_vnfd_with_vca.tar.gz
48   ${CMAKE_CURRENT_BINARY_DIR}/ping_pong_nsd_with_vca.tar.gz
49   ${CMAKE_CURRENT_BINARY_DIR}/ping_vnfd_with_image.tar.gz
50   ${CMAKE_CURRENT_BINARY_DIR}/pong_vnfd_with_image.tar.gz
51   ${CMAKE_CURRENT_BINARY_DIR}/ping_vnfd_with_vnf_input_parameters.tar.gz
52   ${CMAKE_CURRENT_BINARY_DIR}/pong_vnfd_with_vnf_input_parameters.tar.gz
53   ${CMAKE_CURRENT_BINARY_DIR}/ping_pong_nsd_with_vnf_input_parameters.tar.gz)
54
55 add_custom_command(
56     OUTPUT ${PACKAGE_OUTPUT}
57     COMMAND ${CMAKE_CURRENT_BINARY_DIR}/generate_packages.sh
58     DEPENDS
59        mano_yang
60        rwcloud_yang
61        ${CMAKE_CURRENT_SOURCE_DIR}/ping_pong_nsd.py
62        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/ping_setup.py
63        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/ping_rate.py
64        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/ping_start_stop.py
65        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/pong_setup.py
66        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/pong_start_stop.py
67        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/ping_initial_config.py
68        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/pong_initial_config.py
69        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/start_traffic.py
70        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/stop_traffic.py
71        ${CMAKE_CURRENT_SOURCE_DIR}/rift/mano/examples/primitive_test.py
72   )
73
74 add_custom_target(ping_pong_pkg_gen ALL
75     DEPENDS mano_yang rwcloud_yang ${PACKAGE_OUTPUT}
76   )
77
78 install(
79     FILES ${PACKAGE_OUTPUT}
80     DESTINATION
81       usr/rift/mano/examples/ping_pong_ns
82       COMPONENT ${INSTALL_COMPONENT}
83     )
84
85 rift_python_install_tree(
86   COMPONENT ${INSTALL_COMPONENT}
87   FILES
88     rift/mano/examples/ping_pong_nsd.py
89     rift/mano/examples/ping_setup.py
90     rift/mano/examples/ping_start_stop.py
91     rift/mano/examples/pong_setup.py
92     rift/mano/examples/pong_start_stop.py
93     rift/mano/examples/start_traffic.py
94     rift/mano/examples/ping_set_rate.py
95     rift/mano/examples/stop_traffic.py
96     rift/mano/examples/ping_initial_config.py
97     rift/mano/examples/pong_initial_config.py
98     rift/mano/examples/ping_set_rate.py
99     rift/mano/examples/primitive_test.py
100   )
101
102 install(
103   PROGRAMS
104     rift/mano/examples/ping_scale.py
105     stand_up_ping_pong
106   DESTINATION usr/bin
107   COMPONENT ${INSTALL_COMPONENT}
108   )
109