mirror of https://github.com/apache/cloudstack.git
merge adding host fix from 2.2.4
This commit is contained in:
parent
fc2ed28227
commit
24c87c306b
|
|
@ -475,7 +475,6 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
|||
return attache;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Answer sendToSecStorage(HostVO ssHost, Command cmd) {
|
||||
if( ssHost.getType() == Host.Type.LocalSecondaryStorage ) {
|
||||
|
|
@ -505,6 +504,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public long sendToSecStorage(HostVO ssHost, Command cmd, Listener listener) {
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ public class ResourceManagerImpl implements ResourceManager, ResourceService, Ma
|
|||
String url = cmd.getUrl();
|
||||
return discoverHostsFull(dcId, null, null, null, url, null, null, "SecondaryStorage", null, null, null);
|
||||
}
|
||||
|
||||
|
||||
private List<HostVO> discoverHostsFull(Long dcId, Long podId, Long clusterId, String clusterName, String url, String username, String password, String hypervisorType, List<String> hostTags,
|
||||
Map<String, String> params, String allocationState) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException {
|
||||
URI uri = null;
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ dictionary = {
|
|||
<div id="host_password_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<!--
|
||||
<li input_group="vmware" style="display: none;">
|
||||
<label for="host_vcenter_address">
|
||||
<fmt:message key="label.vcenter.host"/>:</label>
|
||||
|
|
@ -227,6 +228,7 @@ dictionary = {
|
|||
<div id="host_vcenter_dc_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
-->
|
||||
<li input_group="vmware" style="display: none;">
|
||||
<label for="host_vcenter_host">
|
||||
<fmt:message key="label.esx.host"/>:</label>
|
||||
|
|
|
|||
|
|
@ -744,6 +744,7 @@ dictionary = {
|
|||
<div id="host_password_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<!--
|
||||
<li input_group="vmware" style="display: none;">
|
||||
<label for="host_vcenter_address">
|
||||
<fmt:message key="label.vcenter.host"/>:</label>
|
||||
|
|
@ -772,6 +773,7 @@ dictionary = {
|
|||
<div id="host_vcenter_dc_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
-->
|
||||
<li input_group="vmware" style="display: none;">
|
||||
<label for="host_vcenter_host">
|
||||
<fmt:message key="label.esx.host"/>:</label>
|
||||
|
|
|
|||
|
|
@ -440,6 +440,8 @@ dictionary = {
|
|||
<div id="host_password_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<!--
|
||||
<li input_group="vmware" style="display: none;">
|
||||
<label for="host_vcenter_address">
|
||||
<fmt:message key="label.vcenter.host"/>:</label>
|
||||
|
|
@ -468,6 +470,7 @@ dictionary = {
|
|||
<div id="host_vcenter_dc_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
-->
|
||||
<li input_group="vmware" style="display: none;">
|
||||
<label for="host_vcenter_host">
|
||||
<fmt:message key="label.esx.host"/>:</label>
|
||||
|
|
|
|||
|
|
@ -919,6 +919,7 @@
|
|||
<div id="host_password_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<!--
|
||||
<li input_group="vmware" style="display: none;">
|
||||
<label for="host_vcenter_address">
|
||||
<fmt:message key="label.vcenter.host"/>:</label>
|
||||
|
|
@ -947,6 +948,7 @@
|
|||
<div id="host_vcenter_dc_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
-->
|
||||
<li input_group="vmware" style="display: none;">
|
||||
<label for="host_vcenter_host">
|
||||
<fmt:message key="label.esx.host"/>:</label>
|
||||
|
|
|
|||
|
|
@ -407,6 +407,7 @@ dictionary = {
|
|||
<div id="host_password_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
<!--
|
||||
<li input_group="vmware" style="display: none;">
|
||||
<label for="host_vcenter_address">
|
||||
<fmt:message key="label.vcenter.host"/>:</label>
|
||||
|
|
@ -435,6 +436,7 @@ dictionary = {
|
|||
<div id="host_vcenter_dc_errormsg" class="dialog_formcontent_errormsg" style="display: none;">
|
||||
</div>
|
||||
</li>
|
||||
-->
|
||||
<li input_group="vmware" style="display: none;">
|
||||
<label for="host_vcenter_host">
|
||||
<fmt:message key="label.esx.host"/>:</label>
|
||||
|
|
|
|||
|
|
@ -606,10 +606,14 @@ function bindAddHostButton($leftmenuItem1) {
|
|||
clusterObj = clustersUnderOnePod[clusterId];
|
||||
hypervisor = clusterObj.hypervisortype;
|
||||
if(hypervisor == "VMware") {
|
||||
|
||||
// for VMware, we can only add host to existing cluster, only host address is needed as of now
|
||||
/*
|
||||
isValid &= validateString("vCenter Address", $thisDialog.find("#host_vcenter_address"), $thisDialog.find("#host_vcenter_address_errormsg"));
|
||||
isValid &= validateString("vCenter User", $thisDialog.find("#host_vcenter_username"), $thisDialog.find("#host_vcenter_username_errormsg"));
|
||||
isValid &= validateString("vCenter Password", $thisDialog.find("#host_vcenter_password"), $thisDialog.find("#host_vcenter_password_errormsg"));
|
||||
isValid &= validateString("vCenter Datacenter", $thisDialog.find("#host_vcenter_dc"), $thisDialog.find("#host_vcenter_dc_errormsg"));
|
||||
*/
|
||||
isValid &= validateString("vCenter Host", $thisDialog.find("#host_vcenter_host"), $thisDialog.find("#host_vcenter_host_errormsg"));
|
||||
} else {
|
||||
if (hypervisor == "BareMetal") {
|
||||
|
|
@ -638,6 +642,7 @@ function bindAddHostButton($leftmenuItem1) {
|
|||
array1.push("&hosttags=" + todb(trim($thisDialog.find("#host_tags").val())));
|
||||
|
||||
if(hypervisor == "VMware") {
|
||||
/*
|
||||
var username = trim($thisDialog.find("#host_vcenter_username").val());
|
||||
array1.push("&username="+todb(username));
|
||||
|
||||
|
|
@ -647,7 +652,11 @@ function bindAddHostButton($leftmenuItem1) {
|
|||
var hostname = trim($thisDialog.find("#host_vcenter_address").val());
|
||||
hostname += "/" + todb(trim($thisDialog.find("#host_vcenter_dc").val()));
|
||||
hostname += "/" + todb(trim($thisDialog.find("#host_vcenter_host").val()));
|
||||
|
||||
*/
|
||||
array1.push("&username=");
|
||||
array1.push("&password=");
|
||||
var hostname = trim($thisDialog.find("#host_vcenter_host").val());
|
||||
|
||||
var url;
|
||||
if(hostname.indexOf("http://")==-1)
|
||||
url = "http://" + hostname;
|
||||
|
|
|
|||
|
|
@ -878,10 +878,12 @@ function initAddHostShortcut() {
|
|||
clusterObj = clustersUnderOnePod[clusterId];
|
||||
hypervisor = clusterObj.hypervisortype;
|
||||
if(hypervisor == "VMware") {
|
||||
/*
|
||||
isValid &= validateString("vCenter Address", $thisDialog.find("#host_vcenter_address"), $thisDialog.find("#host_vcenter_address_errormsg"));
|
||||
isValid &= validateString("vCenter User", $thisDialog.find("#host_vcenter_username"), $thisDialog.find("#host_vcenter_username_errormsg"));
|
||||
isValid &= validateString("vCenter Password", $thisDialog.find("#host_vcenter_password"), $thisDialog.find("#host_vcenter_password_errormsg"));
|
||||
isValid &= validateString("vCenter Datacenter", $thisDialog.find("#host_vcenter_dc"), $thisDialog.find("#host_vcenter_dc_errormsg"));
|
||||
*/
|
||||
isValid &= validateString("vCenter Host", $thisDialog.find("#host_vcenter_host"), $thisDialog.find("#host_vcenter_host_errormsg"));
|
||||
} else {
|
||||
if (hypervisor == "BareMetal") {
|
||||
|
|
@ -922,6 +924,7 @@ function initAddHostShortcut() {
|
|||
array1.push("&hosttags=" + todb(trim($thisDialog.find("#host_tags").val())));
|
||||
|
||||
if(hypervisor == "VMware") {
|
||||
/*
|
||||
var username = trim($thisDialog.find("#host_vcenter_username").val());
|
||||
array1.push("&username="+todb(username));
|
||||
|
||||
|
|
@ -931,7 +934,11 @@ function initAddHostShortcut() {
|
|||
var hostname = trim($thisDialog.find("#host_vcenter_address").val());
|
||||
hostname += "/" + trim($thisDialog.find("#host_vcenter_dc").val());
|
||||
hostname += "/" + trim($thisDialog.find("#host_vcenter_host").val());
|
||||
|
||||
*/
|
||||
array1.push("&username=");
|
||||
array1.push("&password=");
|
||||
var hostname = trim($thisDialog.find("#host_vcenter_host").val());
|
||||
|
||||
var url;
|
||||
if(hostname.indexOf("http://")==-1)
|
||||
url = "http://" + todb(hostname);
|
||||
|
|
|
|||
|
|
@ -795,10 +795,12 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) {
|
|||
clusterObj = clustersUnderOnePod[clusterId];
|
||||
hypervisor = clusterObj.hypervisortype;
|
||||
if(hypervisor == "VMware") {
|
||||
/*
|
||||
isValid &= validateString("vCenter Address", $thisDialog.find("#host_vcenter_address"), $thisDialog.find("#host_vcenter_address_errormsg"));
|
||||
isValid &= validateString("vCenter User", $thisDialog.find("#host_vcenter_username"), $thisDialog.find("#host_vcenter_username_errormsg"));
|
||||
isValid &= validateString("vCenter Password", $thisDialog.find("#host_vcenter_password"), $thisDialog.find("#host_vcenter_password_errormsg"));
|
||||
isValid &= validateString("vCenter Datacenter", $thisDialog.find("#host_vcenter_dc"), $thisDialog.find("#host_vcenter_dc_errormsg"));
|
||||
*/
|
||||
isValid &= validateString("vCenter Host", $thisDialog.find("#host_vcenter_host"), $thisDialog.find("#host_vcenter_host_errormsg"));
|
||||
} else {
|
||||
if (hypervisor == "BareMetal") {
|
||||
|
|
@ -838,7 +840,8 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) {
|
|||
array1.push("&hosttags=" + todb(trim($thisDialog.find("#host_tags").val())));
|
||||
|
||||
if(hypervisor == "VMware") {
|
||||
var username = trim($thisDialog.find("#host_vcenter_username").val());
|
||||
/*
|
||||
var username = trim($thisDialog.find("#host_vcenter_username").val());
|
||||
array1.push("&username="+todb(username));
|
||||
|
||||
var password = trim($thisDialog.find("#host_vcenter_password").val());
|
||||
|
|
@ -847,7 +850,11 @@ function bindAddHostButtonOnZonePage($button, zoneId, zoneName) {
|
|||
var hostname = trim($thisDialog.find("#host_vcenter_address").val());
|
||||
hostname += "/" + trim($thisDialog.find("#host_vcenter_dc").val());
|
||||
hostname += "/" + trim($thisDialog.find("#host_vcenter_host").val());
|
||||
|
||||
*/
|
||||
array1.push("&username=");
|
||||
array1.push("&password=");
|
||||
var hostname = trim($thisDialog.find("#host_vcenter_host").val());
|
||||
|
||||
var url;
|
||||
if(hostname.indexOf("http://")==-1)
|
||||
url = "http://" + todb(hostname);
|
||||
|
|
|
|||
Loading…
Reference in New Issue