mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
F #4913: Remove RP confinement in cluster import wizard (CLI and Sunstone)
This commit is contained in:
parent
eff3fedbac
commit
a935b90ceb
@ -93,7 +93,6 @@ define(function(require) {
|
||||
columns : [
|
||||
'<input type="checkbox" class="check_all"/>',
|
||||
Locale.tr("Name"),
|
||||
Locale.tr("Resource Pool"),
|
||||
""
|
||||
]
|
||||
});
|
||||
@ -110,7 +109,7 @@ define(function(require) {
|
||||
}
|
||||
}
|
||||
rp_list += '</select>';
|
||||
var opts = { name: cluster_name , rp: rp_list};
|
||||
var opts = { name: cluster_name };
|
||||
var trow = $(RowTemplate(opts)).appendTo(tbody);
|
||||
|
||||
$(".check_item", trow).data("cluster", cluster);
|
||||
@ -172,8 +171,6 @@ define(function(require) {
|
||||
|
||||
VCenterCommon.importLoading({context : row_context});
|
||||
|
||||
var rp = $('.select_rp option:selected', row_context).val();
|
||||
|
||||
var host_json = {
|
||||
"host": {
|
||||
"name": $(this).data("cluster").cluster_name,
|
||||
@ -183,7 +180,7 @@ define(function(require) {
|
||||
"cluster_id": cluster_id
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var cluster_ref = $(this).data("cluster").cluster_ref;
|
||||
var vcenter_uuid = $(this).data("cluster").vcenter_uuid;
|
||||
var vcenter_version = $(this).data("cluster").vcenter_version;
|
||||
@ -197,24 +194,13 @@ define(function(require) {
|
||||
message : Locale.tr("Host created successfully. ID: %1$s", response.HOST.ID)
|
||||
});
|
||||
|
||||
if(rp != ""){
|
||||
var template_raw =
|
||||
"VCENTER_USER=\"" + that.opts.vcenter_user + "\"\n" +
|
||||
"VCENTER_PASSWORD=\"" + that.opts.vcenter_password + "\"\n" +
|
||||
"VCENTER_HOST=\"" + that.opts.vcenter_host + "\"\n" +
|
||||
"VCENTER_INSTANCE_ID=\"" + vcenter_uuid + "\"\n" +
|
||||
"VCENTER_CCR_REF=\"" + cluster_ref + "\"\n" +
|
||||
"VCENTER_VERSION=\"" + vcenter_version + "\"\n" +
|
||||
"VCENTER_RESOURCE_POOL=\"" + rp + "\"\n";
|
||||
} else {
|
||||
var template_raw =
|
||||
"VCENTER_USER=\"" + that.opts.vcenter_user + "\"\n" +
|
||||
"VCENTER_PASSWORD=\"" + that.opts.vcenter_password + "\"\n" +
|
||||
"VCENTER_HOST=\"" + that.opts.vcenter_host + "\"\n" +
|
||||
"VCENTER_INSTANCE_ID=\"" + vcenter_uuid + "\"\n" +
|
||||
"VCENTER_CCR_REF=\"" + cluster_ref + "\"\n" +
|
||||
"VCENTER_VERSION=\"" + vcenter_version + "\"\n";
|
||||
}
|
||||
var template_raw =
|
||||
"VCENTER_USER=\"" + that.opts.vcenter_user + "\"\n" +
|
||||
"VCENTER_PASSWORD=\"" + that.opts.vcenter_password + "\"\n" +
|
||||
"VCENTER_HOST=\"" + that.opts.vcenter_host + "\"\n" +
|
||||
"VCENTER_INSTANCE_ID=\"" + vcenter_uuid + "\"\n" +
|
||||
"VCENTER_CCR_REF=\"" + cluster_ref + "\"\n" +
|
||||
"VCENTER_VERSION=\"" + vcenter_version + "\"\n";
|
||||
|
||||
Sunstone.runAction("Host.update_template", response.HOST.ID, template_raw);
|
||||
},
|
||||
|
@ -19,7 +19,6 @@
|
||||
<input type="checkbox" class="check_item"/>
|
||||
</td>
|
||||
<td>{{name}}</td>
|
||||
<td>{{{rp}}}</td>
|
||||
<td>
|
||||
<span class="vcenter_import_result">
|
||||
</span>
|
||||
|
@ -126,30 +126,6 @@ def self.import_clusters(con_ops, options)
|
||||
answer = STDIN.gets.strip
|
||||
one_cluster_id = answer if !answer.empty?
|
||||
end
|
||||
|
||||
rpools = cluster[:rp_list]
|
||||
|
||||
if !rpools.empty?
|
||||
|
||||
STDOUT.print "\n Do you want to confine this cluster in "\
|
||||
"a resource pool (y/[n])? "
|
||||
|
||||
if STDIN.gets.strip.downcase == 'y'
|
||||
|
||||
rpool_list = ""
|
||||
rpools.each do |rp|
|
||||
rpool_list << " - " << rp[:name] << "\n"
|
||||
end
|
||||
|
||||
STDOUT.print "\n Please specify one resource pool from "\
|
||||
"the following list:\n\n#{rpool_list}"
|
||||
|
||||
STDOUT.print "\n Your resource pool choice: "
|
||||
|
||||
answer = STDIN.gets.strip
|
||||
rpool = answer if !answer.empty?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
one_host = VCenterDriver::ClusterComputeResource.to_one(cluster,
|
||||
|
Loading…
x
Reference in New Issue
Block a user