4 ## Copyright (c) 2019 Intel Corporation
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
10 ## http://www.apache.org/licenses/LICENSE-2.0
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.
20 from rapid_k8s_deployment import K8sDeployment
22 # Config file name for deployment creation
23 CREATE_CONFIG_FILE_NAME = "rapid.pods"
25 # Config file name for runrapid script
26 RUN_CONFIG_FILE_NAME = "rapid.env"
29 # Parse command line arguments
30 argparser = argparse.ArgumentParser()
31 argparser.add_argument("-c", "--clean", action = "store_true",
32 help = "Terminate pod-rapid-* PODs. "
33 "Clean up cluster before or after the testing.")
34 args = argparser.parse_args()
36 # Create a new deployment
37 deployment = K8sDeployment()
39 # Load config file with test environment description
40 deployment.load_create_config(CREATE_CONFIG_FILE_NAME)
43 deployment.delete_pods()
46 # Create PODs for test
47 deployment.create_pods()
49 # Save config file for runrapid script
50 deployment.save_runtime_config(RUN_CONFIG_FILE_NAME)
52 if __name__ == "__main__":