Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss

This commit is contained in:
Brian Federle 2011-11-11 14:21:08 -08:00
commit e1be1156fc
6 changed files with 13 additions and 5 deletions

View File

@ -90,7 +90,7 @@ public class UpdateNetworkServiceProviderCmd extends BaseAsyncCmd {
response.setResponseName(getCommandName());
this.setResponseObject(response);
}else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to add service provider to physical network");
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update service provider");
}
}

View File

@ -42,6 +42,7 @@ import com.cloud.agent.api.AttachIsoCommand;
import com.cloud.agent.api.AttachVolumeCommand;
import com.cloud.agent.api.BackupSnapshotCommand;
import com.cloud.agent.api.CheckHealthCommand;
import com.cloud.agent.api.CheckNetworkCommand;
import com.cloud.agent.api.CheckOnHostCommand;
import com.cloud.agent.api.CheckVirtualMachineCommand;
import com.cloud.agent.api.Command;
@ -244,6 +245,8 @@ public class HypervResource extends ServerResourceBase implements ServerResource
//return execute((VpnUsersCfgCommand) cmd);
} else if (cmd instanceof CheckSshCommand) {
return execute((CheckSshCommand)cmd);
} else if (cmd instanceof CheckNetworkCommand) {
//return execute((CheckNetworkCommand) cmd);
} else {
s_logger.info("SCVMM agent recived unimplemented command: " + _gson.toJson(cmd));
return Answer.createUnsupportedCommandAnswer(cmd);

View File

@ -38,6 +38,7 @@ import com.cloud.agent.api.BackupSnapshotCommand;
import com.cloud.agent.api.BumpUpPriorityCommand;
import com.cloud.agent.api.CheckHealthAnswer;
import com.cloud.agent.api.CheckHealthCommand;
import com.cloud.agent.api.CheckNetworkCommand;
import com.cloud.agent.api.CheckOnHostAnswer;
import com.cloud.agent.api.CheckOnHostCommand;
import com.cloud.agent.api.CheckRouterAnswer;
@ -393,6 +394,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
answer = execute((BumpUpPriorityCommand)cmd);
} else if (cmd instanceof GetDomRVersionCmd) {
answer = execute((GetDomRVersionCmd)cmd);
} else if (cmd instanceof CheckNetworkCommand) {
//answer = execute((CheckNetworkCommand) cmd);
} else {
answer = Answer.createUnsupportedCommandAnswer(cmd);
}

View File

@ -3912,7 +3912,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
}
// Delete networks
List<NetworkVO> networks = _networksDao.listByPhysicalNetworkIncludingRemoved(physicalNetworkId);
List<NetworkVO> networks = _networksDao.listByPhysicalNetwork(physicalNetworkId);
if (networks != null && !networks.isEmpty()) {
for (NetworkVO network : networks) {
_networksDao.remove(network.getId());
@ -4170,6 +4170,8 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
if(element != null && element.isReady(provider)){
provider.setState(PhysicalNetworkServiceProvider.State.Enabled);
update = true;
}else{
throw new CloudRuntimeException("Provider is not ready, cannot Enable the provider, please configure the provider first");
}
break;
case Disabled:

View File

@ -76,7 +76,7 @@ public interface NetworkDao extends GenericDao<NetworkVO, Long> {
Long getNetworkCountByOfferingId(long offeringId);
List<NetworkVO> listByPhysicalNetworkIncludingRemoved(long physicalNetworkId);
List<NetworkVO> listByPhysicalNetwork(long physicalNetworkId);
List<NetworkVO> listSecurityGroupEnabledNetworks();

View File

@ -346,10 +346,10 @@ public class NetworkDaoImpl extends GenericDaoBase<NetworkVO, Long> implements N
}
@Override
public List<NetworkVO> listByPhysicalNetworkIncludingRemoved(long physicalNetworkId) {
public List<NetworkVO> listByPhysicalNetwork(long physicalNetworkId) {
SearchCriteria<NetworkVO> sc = PhysicalNetworkSearch.create();
sc.setParameters("physicalNetworkId", physicalNetworkId);
return listIncludingRemovedBy(sc);
return listBy(sc);
}
@Override