Code rewrite and Python3 support
[samplevnf.git] / VNFs / DPPD-PROX / helper-scripts / rapid / createrapidk8s.py
1 #!/usr/bin/env python2.7
2
3 ##
4 ## Copyright (c) 2019 Intel Corporation
5 ##
6 ## Licensed under the Apache License, Version 2.0 (the "License");
7 ## you may not use this file except in compliance with the License.
8 ## You may obtain a copy of the License at
9 ##
10 ##     http://www.apache.org/licenses/LICENSE-2.0
11 ##
12 ## Unless required by applicable law or agreed to in writing, software
13 ## distributed under the License is distributed on an "AS IS" BASIS,
14 ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 ## See the License for the specific language governing permissions and
16 ## limitations under the License.
17 ##
18
19 from k8sdeployment import K8sDeployment
20
21 # Config file name for deployment creation
22 CREATE_CONFIG_FILE_NAME = "rapid.pods"
23
24 # Config file name for runrapid script
25 RUN_CONFIG_FILE_NAME = "rapid.env"
26
27 # Create a new deployment
28 deployment = K8sDeployment()
29
30 # Load config file with test environment description
31 deployment.load_create_config(CREATE_CONFIG_FILE_NAME)
32
33 # Create PODs for test
34 deployment.create_pods()
35
36 # Save config file for runrapid script
37 deployment.save_runtime_config(RUN_CONFIG_FILE_NAME)