1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

F #5499: Add attribute LXC_UNPRIVILEGED on Sunstone (#1467)

This commit is contained in:
Frederick Borges 2021-09-20 18:38:14 +02:00 committed by GitHub
parent 49c2c3e061
commit e85f740f9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 2 deletions

View File

@ -377,6 +377,10 @@ define(function(require) {
templateJSON["VCENTER_VM_FOLDER"] = WizardFields.retrieveInput($("#vcenter_vm_folder", context));
}
}
if (templateJSON["HYPERVISOR"] == "lxc"){
templateJSON["LXC_UNPRIVILEGED"] = $("#lxc_security_privileged", context).val().toUpperCase();
}
var sunstone_template = {};
@ -502,7 +506,9 @@ define(function(require) {
}
// LXC specific attributes
if (templateJSON["HYPERVISOR"] == "lxc") {}
if (templateJSON["HYPERVISOR"] == "lxc") {
$("#lxc_security_privileged").val(templateJSON["LXC_UNPRIVILEGED"].toLowerCase());
}
if (templateJSON["HYPERVISOR"]) {
$("input[name='hypervisor'][value='"+templateJSON["HYPERVISOR"]+"']", context).trigger("click");

View File

@ -121,6 +121,20 @@
</div>
</div>
</fieldset>
<fieldset class="hypervisor only_lxc" style="display: none;">
<legend>{{tr "LXC"}}</legend>
<div class="row">
<div class="medium-6 columns">
<label for="lxc_security_privileged">
{{tr "Security Privileged"}}
</label>
<select id="lxc_security_privileged">
<option selected="selected" value="yes">Yes</option>
<option value="no">No</option>
</select>
</div>
</div>
</fieldset>
{{#isFeatureEnabled "showback"}}
<div class="row">
<div class="medium-12 columns">

View File

@ -28,7 +28,7 @@ define(function(require) {
var showMandatory = false;
var showDefault = false;
var deleteTags = ["VCENTER_CUSTOMIZATION_SPEC"];
var deleteTags = ["VCENTER_CUSTOMIZATION_SPEC", "LXC_UNPRIVILEGED"];
function _reset(){
showDefault = false;