mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +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.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
// Automatically generated by addcopyright.py at 04/03/2012
|
// Automatically generated by addcopyright.py at 04/03/2012
|
||||||
|
|
||||||
package com.cloud.hypervisor.vmware;
|
package com.cloud.hypervisor.vmware;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
@ -78,9 +77,7 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
|
|||||||
@Inject HostDao _hostDao;
|
@Inject HostDao _hostDao;
|
||||||
@Inject
|
@Inject
|
||||||
DataCenterDao _dcDao;
|
DataCenterDao _dcDao;
|
||||||
|
|
||||||
@Inject ResourceManager _resourceMgr;
|
@Inject ResourceManager _resourceMgr;
|
||||||
|
|
||||||
@Inject CiscoNexusVSMDeviceDao _nexusDao;
|
@Inject CiscoNexusVSMDeviceDao _nexusDao;
|
||||||
@Inject
|
@Inject
|
||||||
NetworkManager _netmgr;
|
NetworkManager _netmgr;
|
||||||
@ -116,15 +113,13 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
|
|||||||
String publicTrafficLabel = null;
|
String publicTrafficLabel = null;
|
||||||
String guestTrafficLabel = null;
|
String guestTrafficLabel = null;
|
||||||
Map<String, String> vsmCredentials = 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);
|
privateTrafficLabel = _netmgr.getDefaultManagementTrafficLabel(dcId, HypervisorType.VMware);
|
||||||
if (privateTrafficLabel != null) {
|
if (privateTrafficLabel != null) {
|
||||||
s_logger.info("Detected private network label : " + privateTrafficLabel);
|
s_logger.info("Detected private network label : " + privateTrafficLabel);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
if (_vmwareMgr.getNexusVSwitchGlobalParameter()) {
|
||||||
DataCenterVO zone = _dcDao.findById(dcId);
|
DataCenterVO zone = _dcDao.findById(dcId);
|
||||||
NetworkType zoneType = zone.getNetworkType();
|
NetworkType zoneType = zone.getNetworkType();
|
||||||
if (zoneType != NetworkType.Basic) {
|
if (zoneType != NetworkType.Basic) {
|
||||||
@ -144,11 +139,10 @@ public class VmwareServerDiscoverer extends DiscovererBase implements Discoverer
|
|||||||
VmwareContext context = null;
|
VmwareContext context = null;
|
||||||
try {
|
try {
|
||||||
context = VmwareContextFactory.create(url.getHost(), username, password);
|
context = VmwareContextFactory.create(url.getHost(), username, password);
|
||||||
if (_vmwareMgr.getNexusVSwitchGlobalParameter()) {
|
|
||||||
if (_vmwareMgr.getPrivateVSwitchTypeGlobalParameter().equalsIgnoreCase("nexus")) {
|
|
||||||
if (privateTrafficLabel != null)
|
if (privateTrafficLabel != null)
|
||||||
context.registerStockObject("privateTrafficLabel", privateTrafficLabel);
|
context.registerStockObject("privateTrafficLabel", privateTrafficLabel);
|
||||||
}
|
|
||||||
|
if (_vmwareMgr.getNexusVSwitchGlobalParameter()) {
|
||||||
if (vsmCredentials != null) {
|
if (vsmCredentials != null) {
|
||||||
s_logger.info("Stocking credentials of Nexus VSM");
|
s_logger.info("Stocking credentials of Nexus VSM");
|
||||||
context.registerStockObject("vsmcredentials", vsmCredentials);
|
context.registerStockObject("vsmcredentials", vsmCredentials);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user