From: zhongjun Date: Mon, 24 Apr 2017 02:32:51 +0000 (+0800) Subject: Unify the kolla config in py X-Git-Tag: opnfv-5.0.RC1~106 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=a3ef3c57cf4b6dde928896b6ea39c864490042f1;p=daisy.git Unify the kolla config in py put the kolla nova-compute.conf file update handle to prepare/ execute.py for unify the all relate kolla config in py way. Change-Id: Iac585df97d2855038a83f9bfdadfb9e449660c9c Signed-off-by: zhongjun --- diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh index 75d30047..c287f361 100755 --- a/ci/deploy/deploy.sh +++ b/ci/deploy/deploy.sh @@ -293,8 +293,6 @@ scp $WORKSPACE/known_hosts root@$DAISY_IP:/root/.ssh/ if [ $IS_BARE == 0 ];then echo "====== add relate config of kolla ======" - ssh $SSH_PARAS $DAISY_IP "mkdir -p /etc/kolla/config/nova" - ssh $SSH_PARAS $DAISY_IP "echo -e '[libvirt]\nvirt_type=qemu\ncpu_mode=none' >> /etc/kolla/config/nova/nova-compute.conf" ssh $SSH_PARAS $DAISY_IP "bash $REMOTE_SPACE/deploy/prepare.sh -n $NETWORK" fi diff --git a/deploy/prepare/execute.py b/deploy/prepare/execute.py index 1e88755c..67c31b1b 100644 --- a/deploy/prepare/execute.py +++ b/deploy/prepare/execute.py @@ -38,6 +38,13 @@ def _config_service(service, subs): return _wrap +@_config_service('nova', ['compute']) +def _set_default_compute(): + return '[libvirt]\n' \ + 'virt_type=qemu\n' \ + 'cpu_mode=none\n' + + @_config_service('nova', ['api']) def _set_default_floating_pool(network_file): xnet = NetworkConfig(network_file=network_file).ext_network_name @@ -59,6 +66,7 @@ def main(): required=True, help='network configuration file') args = parser.parse_args() + _set_default_compute() _set_default_floating_pool(args.network_file) _set_trusts_auth()