From 539a587a9096e522a10f51740c8c9422c03f56d9 Mon Sep 17 00:00:00 2001 From: Zhijiang Hu Date: Fri, 2 Jun 2017 22:45:39 +0800 Subject: Set compute to qemu only in virtual deployment Change-Id: I0660c016e18491395c7253e5576f8fa1c8aa051e Signed-off-by: Zhijiang Hu --- deploy/prepare/execute.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'deploy/prepare') diff --git a/deploy/prepare/execute.py b/deploy/prepare/execute.py index 67c31b1b..2b46119d 100644 --- a/deploy/prepare/execute.py +++ b/deploy/prepare/execute.py @@ -39,7 +39,7 @@ def _config_service(service, subs): @_config_service('nova', ['compute']) -def _set_default_compute(): +def _set_qemu_compute(): return '[libvirt]\n' \ 'virt_type=qemu\n' \ 'cpu_mode=none\n' @@ -65,8 +65,15 @@ def main(): type=str, required=True, help='network configuration file') + parser.add_argument('-b', '--is-baremetal', + type=str, + required=True, + help='0 for virtual, 1 for baremetal') args = parser.parse_args() - _set_default_compute() + + if args.is_baremetal == '0': + _set_qemu_compute() + _set_default_floating_pool(args.network_file) _set_trusts_auth() -- cgit 1.2.3-korg