aboutsummaryrefslogtreecommitdiffstats
path: root/setup/onap_on_openstack/launch_onap.py
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2018-01-18 20:43:47 +0800
committerHarry Huang <huangxiangyu5@huawei.com>2018-03-07 15:42:08 +0800
commit3e75ab6f1480659d6e12ddbfe3ae86fe2622d6d8 (patch)
tree2d5a17c1e73ba7def1f72c55a644b17cec80e90a /setup/onap_on_openstack/launch_onap.py
parent3d636def30cd293231e84a7f2ecf7db2dfad334d (diff)
Add scripts to setup ONAP on OpenStack
JIRA: Auto-5 Setup ONAP environment on OpenStack. Develop Using Python considering its proved performence within OPNFV testing project, and with its rich library we can operate REST calls and json parsing in a more elegant way, also others can reuse the existing module to develop use cases and test cases. Main workflow: 1. prepare OpenStack to launch ONAP (images, security rules, keypair, etc) 2. launch ONAP stack Change-Id: Id99affccbcaa86be134a535f89b26c54ad137e21 Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
Diffstat (limited to 'setup/onap_on_openstack/launch_onap.py')
-rw-r--r--setup/onap_on_openstack/launch_onap.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/setup/onap_on_openstack/launch_onap.py b/setup/onap_on_openstack/launch_onap.py
new file mode 100644
index 0000000..948adfc
--- /dev/null
+++ b/setup/onap_on_openstack/launch_onap.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+########################################################################
+# Copyright (c) 2018 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+########################################################################
+
+"""Launch ONAP on OpenStack"""
+
+import argparse
+from onap_os_builder import ONAP_os_builder
+
+__author__ = "Harry Huang <huangxiangyu5@huawei.com>"
+
+
+def read_cli_args():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--config', '-c',
+ dest = 'config',
+ action = 'store',
+ default = './config.yml',
+ help = 'config file')
+ return parser.parse_args()
+
+
+if __name__ == '__main__':
+ args = read_cli_args()
+ config = args.config
+ onap_builder = ONAP_os_builder(config)
+ onap_builder.clone_demo_code()
+ onap_builder.create_onap_vm_images()
+ onap_builder.create_onap_secgroup_rules()
+ onap_builder.set_quota()
+ onap_builder.create_onap_key()
+ onap_builder.set_onap_stack_params()
+ onap_builder.create_onap_stack()