diff options
author | Alex Yang <yangyang1@zte.com.cn> | 2017-09-13 21:10:40 +0800 |
---|---|---|
committer | Zhijiang Hu <hu.zhijiang@zte.com.cn> | 2017-09-25 06:07:18 +0000 |
commit | 6c26da419ff6fd6f82377e8e19187af37fe8d783 (patch) | |
tree | 0eb0259e41adc2d6b6c61dd5412f72dae351b20c /deploy/environment.py | |
parent | 459282da6a51520ed3a255f80569a437881a047a (diff) |
Use pxe bridge to replace the bridge in VM template
1. Eliminate hard code about pxe bridge
2. Replace the bridge in daisy VM template with the pxe bridge
provided by jenkins
Change-Id: I7a8463181847417d10705ce9ff4db6e68d505c6d
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
(cherry picked from commit 56975272e92efa3f5f6f719028dc147c1d90e9ce)
Diffstat (limited to 'deploy/environment.py')
-rw-r--r-- | deploy/environment.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/deploy/environment.py b/deploy/environment.py index 5371e6ca..14240549 100644 --- a/deploy/environment.py +++ b/deploy/environment.py @@ -135,7 +135,6 @@ class BareMetalEnvironment(DaisyEnvironmentBase): def create_daisy_server_vm(self): # TODO: refactor the structure of deploy.yml, add VM template param of Daisy Server - # add self.pxe_bridge into the vm template if 'template' in self.deploy_struct: # get VM name of Daisy Server from the template template = self.deploy_struct['template'] @@ -144,7 +143,8 @@ class BareMetalEnvironment(DaisyEnvironmentBase): create_vm(template, name=self.daisy_server_info['name'], - disks=[self.daisy_server_info['image']]) + disks=[self.daisy_server_info['image']], + physical_bridge=self.pxe_bridge) def reboot_nodes(self, boot_dev=None): for node in self.deploy_struct['hosts']: @@ -203,7 +203,6 @@ class VirtualEnvironment(DaisyEnvironmentBase): def create_daisy_server_vm(self): # TODO: refactor the structure of deploy.yml, add VM template param of Daisy Server - # add self.pxe_bridge into the vm template if 'template' in self.deploy_struct: # get VM name of Daisy Server from the template template = self.deploy_struct['template'] |