mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 20:02:38 +09:00
* F #4913 Replaced vCenter Template UUID with VCENTER_TEMPLATE_REF field * F #4913 Replaced CUSTOMIZATION_SPEC with VCENTER_CUSTOMIZATION_SPEC and stored that value in USER_TEMPLATE not in VCENTER_PUBLIC_CLOUD * F #4913 added posibility to instanciate MV * F #4913 Removed VCENTER_PUBLIC_CLOUD * F #4913 Used VCENTER_REF when import a template
This commit is contained in:
1 parent
d73adc1c24
commit
2245d7d5ce
7 files changed
+23
-27
No files matched your search
@@ -165,14 +165,8 @@ define(function(require) {
|
||||
// part of an array, and it is filled in different tabs, the $.extend deep
|
||||
// merge can't work. We define an auxiliary attribute for it.
|
||||
|
||||
if (templateJSON["VCENTER_PUBLIC_CLOUD"]) {
|
||||
if (templateJSON['PUBLIC_CLOUD'] == undefined) {
|
||||
templateJSON['PUBLIC_CLOUD'] = [];
|
||||
}
|
||||
|
||||
templateJSON['PUBLIC_CLOUD'].push(templateJSON["VCENTER_PUBLIC_CLOUD"]);
|
||||
|
||||
delete templateJSON["VCENTER_PUBLIC_CLOUD"];
|
||||
if (templateJSON['PUBLIC_CLOUD'] == undefined) {
|
||||
templateJSON['PUBLIC_CLOUD'] = [];
|
||||
}
|
||||
|
||||
// PCI with TYPE=NIC is not defined in the 'other' tab. Because it is
|
||||
|
||||
+4
-4
@@ -190,8 +190,8 @@ define(function(require) {
|
||||
var customization = WizardFields.retrieveInput($('input.vcenter_customizations_value', context));
|
||||
|
||||
if (customization) {
|
||||
templateJSON["VCENTER_PUBLIC_CLOUD"] = {
|
||||
CUSTOMIZATION_SPEC : customization
|
||||
templateJSON["USER_TEMPLATE"] = {
|
||||
VCENTER_CUSTOMIZATION_SPEC : customization
|
||||
};
|
||||
}
|
||||
} else {
|
||||
@@ -258,8 +258,8 @@ define(function(require) {
|
||||
if(this["TYPE"] == "vcenter"){
|
||||
$("input#context_type_vcenter", context).click();
|
||||
|
||||
if(this["CUSTOMIZATION_SPEC"]){
|
||||
WizardFields.fillInput($('input.vcenter_customizations_value', context), this["CUSTOMIZATION_SPEC"]);
|
||||
if(this["VCENTER_CUSTOMIZATION_SPEC"]){
|
||||
WizardFields.fillInput($('input.vcenter_customizations_value', context), this["VCENTER_CUSTOMIZATION_SPEC"]);
|
||||
} else if(userInputsJSON || contextJSON) {
|
||||
$("input#context_type_opennebula", context).click();
|
||||
}
|
||||
|
||||
+9
-7
@@ -160,9 +160,9 @@ define(function(require) {
|
||||
$(".only_" + this.value).show();
|
||||
|
||||
if (this.value == "vcenter"){
|
||||
$("#vcenter_template_uuid", context).attr("required", "");
|
||||
$("#vcenter_template_ref", context).attr("required", "");
|
||||
} else {
|
||||
$("#vcenter_template_uuid", context).removeAttr("required");
|
||||
$("#vcenter_template_ref", context).removeAttr("required");
|
||||
}
|
||||
// There is another listener in context.js setup
|
||||
});
|
||||
@@ -187,10 +187,7 @@ define(function(require) {
|
||||
if(templateJSON["MEMORY_UNIT_COST"] == "GB")
|
||||
templateJSON["MEMORY_COST"] = templateJSON["MEMORY_COST"] * 1024;
|
||||
if (templateJSON["HYPERVISOR"] == 'vcenter') {
|
||||
templateJSON["VCENTER_PUBLIC_CLOUD"] = {
|
||||
'TYPE': 'vcenter',
|
||||
'VM_TEMPLATE': WizardFields.retrieveInput($("#vcenter_template_uuid", context))
|
||||
};
|
||||
templateJSON["VCENTER_TEMPLATE_REF"] = WizardFields.retrieveInput($("#vcenter_template_ref", context));
|
||||
|
||||
if (Config.isFeatureEnabled("vcenter_deploy_folder")) {
|
||||
templateJSON["DEPLOY_FOLDER"] = WizardFields.retrieveInput($("#vcenter_deploy_folder", context))
|
||||
@@ -304,7 +301,7 @@ define(function(require) {
|
||||
|
||||
$.each(publicClouds, function(){
|
||||
if(this["TYPE"] == "vcenter"){
|
||||
WizardFields.fillInput($("#vcenter_template_uuid", context), this["VM_TEMPLATE"]);
|
||||
WizardFields.fillInput($("#vcenter_template_ref", context), this["VCENTER_TEMPLATE_REF"]);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@@ -350,6 +347,11 @@ define(function(require) {
|
||||
delete templateJSON["RESOURCE_POOL"];
|
||||
}
|
||||
|
||||
if(templateJSON["VCENTER_TEMPLATE_REF"]){
|
||||
WizardFields.fillInput($("#vcenter_template_ref", context), templateJSON["VCENTER_TEMPLATE_REF"]);
|
||||
delete templateJSON["VCENTER_TEMPLATE_REF"];
|
||||
}
|
||||
|
||||
CapacityCreate.fill($("div.capacityCreate", context), templateJSON);
|
||||
|
||||
WizardFields.fill(context, templateJSON);
|
||||
|
||||
+3
-3
@@ -56,10 +56,10 @@
|
||||
<legend>{{tr "vCenter"}}</legend>
|
||||
<div class="row hypervisor only_vcenter" style="display: none;">
|
||||
<div class="medium-6 columns">
|
||||
<label for="vcenter_template_uuid">
|
||||
{{tr "vCenter Template UUID"}}
|
||||
<label for="vcenter_template_ref">
|
||||
{{tr "vCenter Template Ref"}}
|
||||
</label>
|
||||
<input type="text" id="vcenter_template_uuid"/>
|
||||
<input type="text" id="vcenter_template_ref"/>
|
||||
</div>
|
||||
<div class="medium-6 columns">
|
||||
<div class="row">
|
||||
|
||||
@@ -215,8 +215,8 @@ define(function(require) {
|
||||
}
|
||||
|
||||
if (Config.isFeatureEnabled("vcenter_deploy_folder")){
|
||||
if(!$.isEmptyObject(original_tmpl.TEMPLATE.PUBLIC_CLOUD.TYPE) &&
|
||||
original_tmpl.TEMPLATE.PUBLIC_CLOUD.TYPE === 'vcenter'){
|
||||
if(!$.isEmptyObject(original_tmpl.TEMPLATE.HYPERVISOR) &&
|
||||
original_tmpl.TEMPLATE.HYPERVISOR === 'vcenter'){
|
||||
$.extend(tmp_json, DeployFolder.retrieveChanges($(".deployFolderContext" + template_id)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ define(function(require){
|
||||
|
||||
if (Config.isFeatureEnabled("vcenter_deploy_folder")){
|
||||
var deployFolderContext = context;
|
||||
var template_public_cloud_type = element.TEMPLATE.PUBLIC_CLOUD.TYPE
|
||||
var template_public_cloud_type = element.TEMPLATE.HYPERVISOR
|
||||
|
||||
if ($.isEmptyObject(template_public_cloud_type)) {
|
||||
deployFolderContext.html("");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<label class="inline">
|
||||
<a href="#{{data.uuid}}Advanced" class="accordion_advanced_toggle"> <i class="fa fa-fw fa-chevron-down"/><i class="fa fa-fw fa-chevron-up"/>
|
||||
<a href="#{{data.vcenter_ref}}Advanced" class="accordion_advanced_toggle"> <i class="fa fa-fw fa-chevron-down"/><i class="fa fa-fw fa-chevron-up"/>
|
||||
</a>
|
||||
{{data.name}}
|
||||
</label>
|
||||
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-11 large-centered columns">
|
||||
<div id="{{data.uuid}}Advanced" class="content" hidden>
|
||||
<div id="{{data.vcenter_ref}}Advanced" class="content" hidden>
|
||||
{{#if datastore}}
|
||||
<div class="vcenter_datastore_input row">
|
||||
<div class="medium-3 columns">
|
||||
|
||||
Reference in new issue
Block a user