Skip to content

Commit

Permalink
Add: option to optionally maintain virt-net config
Browse files Browse the repository at this point in the history
For LPM, there are different options to use along with the command,
which specifies what configuration to maintain and what not to.
To start with, we are enabling --vniccfg option with a value of 2,
which means "maintain virtual network configuration if possible".

Signed-off-by: Narasimhan V <[email protected]>
  • Loading branch information
narasimhan-v committed Aug 28, 2019
1 parent a0cc1a5 commit 4c99a09
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions io/net/virt-net/lpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def setUp(self):
self.cancel("HMC IP not got from lsrsrc command")
self.hmc_user = self.params.get("hmc_username", default='hscroot')
self.hmc_pwd = self.params.get("hmc_pwd", '*', default='abc123')
self.options = self.params.get("options", default='')

self.lpar = self.get_mcp_component("NodeNameList").split('.')[0]
if not self.lpar:
Expand Down Expand Up @@ -238,6 +239,8 @@ def do_migrate(self, server, remote_server, lpar, params):
cmd = "migrlpar -o m -m %s -t %s -p %s %s" % (server,
remote_server,
lpar, params)
if self.options:
cmd = "%s %s" % (cmd, self.options)
self.log.debug("\n".join(self.run_command(cmd)))
time.sleep(10)
if not self.is_lpar_in_server(remote_server, lpar):
Expand Down
1 change: 1 addition & 0 deletions io/net/virt-net/lpm.py.data/lpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ sriov_ports:
remote_sriov_adapters:
remote_sriov_ports:
bandwidth:
options: "--vniccfg 2"
1 change: 1 addition & 0 deletions io/net/virt-net/lpm.py.data/lpm_5_iterations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ sriov_ports:
remote_sriov_adapters:
remote_sriov_ports:
bandwidth:
options: "--vniccfg 2"
iteration: !mux
default: !mux
1:
Expand Down

0 comments on commit 4c99a09

Please sign in to comment.