mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CS-14956 Support for rate limiting policies in Nexus dvSwith feature for CloudStack
Removed global parameters that are not required. Cleanup. Reviewed-by: Devdeep Not sure why but changes in VmwareServerDiscoverer.java were not picked up when cherry-picking from 3.0.x. Putting them in this separate commit.
This commit is contained in:
parent
4ad8845b28
commit
90b87585e7
@ -10,7 +10,6 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
|
||||
package com.cloud.hypervisor.vmware;
|
||||
|
||||
import java.net.URI;
|
||||
@ -78,9 +77,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
|
||||
@Inject HostDao _hostDao;
|
||||
@Inject
|
||||
DataCenterDao _dcDao;
|
||||
|
||||
@Inject ResourceManager _resourceMgr;
|
||||
|
||||
@Inject CiscoNexusVSMDeviceDao _nexusDao;
|
||||
@Inject
|
||||
NetworkManager _netmgr;
|
||||
@ -116,15 +113,13 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
|
||||
String publicTrafficLabel = null;
|
||||
String guestTrafficLabel = null;
|
||||
Map<String, String> vsmCredentials = null;
|
||||
if (_vmwareMgr.getNexusVSwitchGlobalParameter()) {
|
||||
if (_vmwareMgr.getPrivateVSwitchTypeGlobalParameter() != null && _vmwareMgr.getPrivateVSwitchTypeGlobalParameter().equalsIgnoreCase("nexus")) {
|
||||
// Get physical network label
|
||||
privateTrafficLabel = _netmgr.getDefaultManagementTrafficLabel(dcId, HypervisorType.VMware);
|
||||
if (privateTrafficLabel != null) {
|
||||
s_logger.info("Detected private network label : " + privateTrafficLabel);
|
||||
}
|
||||
}
|
||||
|
||||
privateTrafficLabel = _netmgr.getDefaultManagementTrafficLabel(dcId, HypervisorType.VMware);
|
||||
if (privateTrafficLabel != null) {
|
||||
s_logger.info("Detected private network label : " + privateTrafficLabel);
|
||||
}
|
||||
|
||||
if (_vmwareMgr.getNexusVSwitchGlobalParameter()) {
|
||||
DataCenterVO zone = _dcDao.findById(dcId);
|
||||
NetworkType zoneType = zone.getNetworkType();
|
||||
if (zoneType != NetworkType.Basic) {
|
||||
@ -144,11 +139,10 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
|
||||
VmwareContext context = null;
|
||||
try {
|
||||
context = VmwareContextFactory.create(url.getHost(), username, password);
|
||||
if (privateTrafficLabel != null)
|
||||
context.registerStockObject("privateTrafficLabel", privateTrafficLabel);
|
||||
|
||||
if (_vmwareMgr.getNexusVSwitchGlobalParameter()) {
|
||||
if (_vmwareMgr.getPrivateVSwitchTypeGlobalParameter().equalsIgnoreCase("nexus")) {
|
||||
if (privateTrafficLabel != null)
|
||||
context.registerStockObject("privateTrafficLabel", privateTrafficLabel);
|
||||
}
|
||||
if (vsmCredentials != null) {
|
||||
s_logger.info("Stocking credentials of Nexus VSM");
|
||||
context.registerStockObject("vsmcredentials", vsmCredentials);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user