diff options
author | Zhijiang Hu <hu.zhijiang@zte.com.cn> | 2017-05-15 03:53:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-05-15 03:53:31 +0000 |
commit | cbdb2b6ab819f1cad4cfcdc47c53d76030305633 (patch) | |
tree | ad3c4147ee7f6b14e54a8720e92e3fc7f08e208f /deploy/environment.py | |
parent | 86e864f2cc5a079a29eb171d5795e1e3ce39bbc1 (diff) | |
parent | fb09a7ed97707b6a007721ff4b72a904c4204e93 (diff) |
Merge "refacort deploy.yml and add jsonschema to validate it"
Diffstat (limited to 'deploy/environment.py')
-rw-r--r-- | deploy/environment.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/deploy/environment.py b/deploy/environment.py index 088e5008..21a0970a 100644 --- a/deploy/environment.py +++ b/deploy/environment.py @@ -11,6 +11,9 @@ import os import shutil import time +from config.schemas import ( + MIN_NODE_DISK_SIZE, +) from daisy_server import ( DaisyServer ) @@ -183,8 +186,9 @@ class VirtualEnvironment(DaisyEnvironmentBase): def create_virtual_node(self, node): name = node['name'] roles = node['roles'] - controller_size = self.deploy_struct.get('disks', {'controller': 200}).get('controller') - compute_size = self.deploy_struct.get('disks', {'compute': 200}).get('compute') + disks = self.deploy_struct.get('disks', {}) + controller_size = disks.get('controller', MIN_NODE_DISK_SIZE) + compute_size = disks.get('compute', MIN_NODE_DISK_SIZE) LI('Begin to create virtual node %s, roles %s' % (name, roles)) if 'CONTROLLER_LB' in roles: @@ -201,9 +205,6 @@ class VirtualEnvironment(DaisyEnvironmentBase): if 'template' in node: template = node['template'] disk_file = path_join(self.storage_dir, name + '.qcow2') - # TODO: modify the sizes in deploy.yml to more than 100G - if size < 200: - size = 200 create_virtual_disk(disk_file, size) create_vm(template, name, disk_file) |