mirror of https://github.com/apache/cloudstack.git
Bug 11741 - there is no ovm.public.network.device, ovm.private.network.device, ovm.guest.network.device in global configure page
status 11741: resovled fixed
This commit is contained in:
parent
edfbd2618f
commit
8decef98fd
|
|
@ -14,6 +14,7 @@ import javax.naming.ConfigurationException;
|
|||
import org.apache.log4j.Logger;
|
||||
import org.apache.xmlrpc.XmlRpcException;
|
||||
|
||||
import com.cloud.configuration.Config;
|
||||
import com.cloud.dc.ClusterVO;
|
||||
import com.cloud.dc.dao.ClusterDao;
|
||||
import com.cloud.exception.DiscoveryException;
|
||||
|
|
@ -32,11 +33,22 @@ import com.cloud.utils.ssh.SSHCmdHelper;
|
|||
@Local(value=Discoverer.class)
|
||||
public class OvmDiscoverer extends DiscovererBase implements Discoverer {
|
||||
private static final Logger s_logger = Logger.getLogger(OvmDiscoverer.class);
|
||||
protected String _publicNetworkDevice;
|
||||
protected String _privateNetworkDevice;
|
||||
protected String _guestNetworkDevice;
|
||||
|
||||
@Inject ClusterDao _clusterDao;
|
||||
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
super.configure(name, params);
|
||||
_publicNetworkDevice = _params.get(Config.OvmPublicNetwork.key());
|
||||
_privateNetworkDevice = _params.get(Config.OvmPrivateNetwork.key());
|
||||
_guestNetworkDevice = _params.get(Config.OvmGuestNetwork.key());
|
||||
return true;
|
||||
}
|
||||
|
||||
protected OvmDiscoverer() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -115,6 +127,15 @@ public class OvmDiscoverer extends DiscovererBase implements Discoverer {
|
|||
details.put("cluster", Long.toString(clusterId));
|
||||
details.put("agentusername", agentUsername);
|
||||
details.put("agentpassword", agentPassword);
|
||||
if (_publicNetworkDevice != null) {
|
||||
details.put("public.network.device", _publicNetworkDevice);
|
||||
}
|
||||
if (_privateNetworkDevice != null) {
|
||||
details.put("private.network.device", _privateNetworkDevice);
|
||||
}
|
||||
if (_guestNetworkDevice != null) {
|
||||
details.put("guest.network.device", _guestNetworkDevice);
|
||||
}
|
||||
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.putAll(details);
|
||||
|
|
|
|||
|
|
@ -208,15 +208,15 @@ public class OvmResourceBase implements ServerResource, HypervisorResource {
|
|||
}
|
||||
|
||||
if (_privateNetworkName != null && !bridges.contains(_privateNetworkName)) {
|
||||
throw new ConfigurationException("Cannot find bridge " + _privateNetworkName + " on hsot " + _ip + ", all bridges are:" + bridges);
|
||||
throw new ConfigurationException("Cannot find bridge " + _privateNetworkName + " on host " + _ip + ", all bridges are:" + bridges);
|
||||
}
|
||||
|
||||
if (_publicNetworkName != null && !bridges.contains(_publicNetworkName)) {
|
||||
throw new ConfigurationException("Cannot find bridge " + _publicNetworkName + " on hsot " + _ip + ", all bridges are:" + bridges);
|
||||
throw new ConfigurationException("Cannot find bridge " + _publicNetworkName + " on host " + _ip + ", all bridges are:" + bridges);
|
||||
}
|
||||
|
||||
if (_guestNetworkName != null && !bridges.contains(_guestNetworkName)) {
|
||||
throw new ConfigurationException("Cannot find bridge " + _guestNetworkName + " on hsot " + _ip + ", all bridges are:" + bridges);
|
||||
throw new ConfigurationException("Cannot find bridge " + _guestNetworkName + " on host " + _ip + ", all bridges are:" + bridges);
|
||||
}
|
||||
|
||||
/* set to false so each time ModifyStoragePoolCommand will re-setup heartbeat*/
|
||||
|
|
|
|||
|
|
@ -206,6 +206,11 @@ public enum Config {
|
|||
ElasticLoadBalancerVmNumVcpu("Advanced", ManagementServer.class, Integer.class, "network.loadbalancer.basiczone.elb.vm.vcpu.num", "1", "Number of VCPU for the elastic load balancer vm", null),
|
||||
ElasticLoadBalancerVmGcInterval("Advanced", ManagementServer.class, Integer.class, "network.loadbalancer.basiczone.elb.gc.interval.minutes", "30", "Garbage collection interval to destroy unused ELB vms in minutes. Minimum of 5", null),
|
||||
|
||||
// Ovm
|
||||
OvmPublicNetwork("Advanced", ManagementServer.class, String.class, "ovm.public.network.device", null, "Specify the public bridge on host for public network", null),
|
||||
OvmPrivateNetwork("Advanced", ManagementServer.class, String.class, "ovm.private.network.device", null, "Specify the private bridge on host for private network", null),
|
||||
OvmGuestNetwork("Advanced", ManagementServer.class, String.class, "ovm.guest.network.device", null, "Specify the private bridge on host for private network", null),
|
||||
|
||||
// XenServer
|
||||
VmAllocationAlgorithm("Advanced", ManagementServer.class, String.class, "vm.allocation.algorithm", "random", "If 'random', hosts within a pod will be randomly considered for VM/volume allocation. If 'firstfit', they will be considered on a first-fit basis.", null),
|
||||
XenPublicNetwork("Network", ManagementServer.class, String.class, "xen.public.network.device", null, "[ONLY IF THE PUBLIC NETWORK IS ON A DEDICATED NIC]:The network name label of the physical device dedicated to the public network on a XenServer host", null),
|
||||
|
|
|
|||
Loading…
Reference in New Issue