-
Notifications
You must be signed in to change notification settings - Fork 770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[testbed-cli-add-topo] Code change for deploying testbed with peers on multiple servers #15547
Conversation
continue | ||
elif server_index != -1: | ||
offset = int(offset.split(',')[1]) | ||
if base + offset >= len(values): # if the vm is not defined in iventory files veos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this comment
return yaml.safe_load(f) | ||
_ret = yaml.safe_load(f) | ||
if server_index != -1: | ||
for _name, _attr in _ret['topology']['VMs'].items(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it is a kind of intrusive schema change, is possible to do it smartly? Why user input is required for VM distribution?
@@ -88,7 +102,7 @@ def first_n_elements(values, num): | |||
return values[0:int(num)] | |||
|
|||
|
|||
def filter_vm_targets(values, topology, vm_base): | |||
def filter_vm_targets(values, topology, vm_base, server_index=-1): | |||
""" | |||
This function takes a list of host VMs as parameter 'values' and then extract a list of host VMs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the doc comment as well.
…ing testbed with peers on multiple servers (#15643) In PR #15547, we define server index in topology file which make topology file and testbed yaml file is coupled. To decouple them, in new design #15395, we remove server index in topology file and add dut_interfaces in testbed yaml, so there is no more change on topology file schema. What is the motivation for this PR? Decouple topology file and testbed file in design. How did you do it? Record all information in testbed schema How did you verify/test it? Deploy testbed
Description of PR
Summary:
Fixes # (issue)
This is add-topo implementation for PR: #15395
Type of change
Back port request
Approach
What is the motivation for this PR?
When deploying a testbed with a great number of virtual ceos neighbors, we will create ceos containers on same server, however, the server doesn't have infinite resources such as memory to deploy that.
To leverage the servers instead of single server, we proposal this design for deploying testbed with multiple servers.
How did you do it?
Extend current script and ansible file to support add-topo operation for multi-servers deployment.
How did you verify/test it?
Add-topo and remove-topo on testbed.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation