acrn-config: assign VM IDs for dynamic scenario and launch setting

When dynamically creating or adding or deleting VMs, acrn config app
will assign VM IDs for the VMs with the orders of prelaunched VMs and SOS
VM and postlaunched VMs to be consistent with the VM order of vm_configs
in vm configuration. When dynamically creating launch scripts, acrn
config app will let users to specify the VM ID before launch setting.

Tracked-On: #4641

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
This commit is contained in:
Shuang Zheng
2020-04-21 18:43:34 +08:00
committed by wenlingz
parent bcfbc13fb0
commit b9a7cf3b24
6 changed files with 185 additions and 46 deletions

View File

@@ -43,20 +43,18 @@ the launch scripts will be generated into misc/acrn-config/xmls/config-xmls/[boa
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="addlaunchModalLabel">Add a new VM</h4>
<h4 class="modal-title" id="addlaunchModalLabel">Configure UOS for Post-launched VM</h4>
</div>
<div class="modal-body">
<div class="form-group row">
<label for="add_launch_type" class="col-sm-3 control-label">VM type: </label>
<label for="add_launch_type" class="col-sm-3 control-label">VM : </label>
<div class="dropdown col-sm-6">
<select class="selectpicker" data-width="auto" id="add_launch_type">
<option value="LAUNCH_STANDARD_VM">LAUNCH_STANDARD_VM</option>
<option value="LAUNCH_RTVM">LAUNCH_RTVM</option>
</select>
</div>
</div>
<div class="form-group row">
<label for="new_launch_name2" class="col-sm-3 control-label">Launch Name: </label>
<label for="new_launch_name2" class="col-sm-3 control-label">Launch Name : </label>
<div class="col-sm-6">
<input type="text" class="form-control" id="new_launch_name2"
value={{ launch }}>
@@ -138,15 +136,20 @@ the launch scripts will be generated into misc/acrn-config/xmls/config-xmls/[boa
<tr>
<td>
<div class="form-group">
<label class="col-sm-2 control-label">UOS: </label>
<label class="col-sm-3 control-label">UOS: </label>
<label class="col-sm-1 control-label" id="vm">{{vm.attrib['id']}}</label>
</div>
<div class="form-group">
<button type="button" class="btn" id="add_launch_vm" data-id="{{vm.attrib['id']}}" data-toggle="modal"
data-target="#add_launch_modal">Add a VM below</button>
<label class="col-sm-3 control-label">VM ID: </label>
<label class="col-sm-1 control-label" id="vm_id">
{{post_launch_vm_list[vm.attrib['id']|int-1][0] if post_launch_vm_list|length>=1 else ''}}</label>
</div>
<div class="form-group">
<button type="button" class="btn" id="remove_launch_vm" data-id="{{vm.attrib['id']}}">
<button type="button" class="col-sm-6 btn" id="add_launch_vm" data-id="{{vm.attrib['id']}}" data-toggle="modal"
data-target="#add_launch_modal">Configure an UOS below</button>
</div>
<div class="form-group">
<button type="button" class="col-sm-6 btn" id="remove_launch_vm" data-id="{{vm.attrib['id']}}">
Remove this VM</button>
</div>
</td>
@@ -380,7 +383,7 @@ the launch scripts will be generated into misc/acrn-config/xmls/config-xmls/[boa
{% endfor %}
<tr><td>
<button type="button" class="btn" id="add_launch_script" data-toggle="modal" data-id="-1"
data-target="#add_launch_modal">Add a New VM</button>
data-target="#add_launch_modal">Configure an UOS</button>
</td></tr>
</table>
{% else %}