Skip to content

Commit e1be115

Browse files
committed
Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss
2 parents 7098603 + 20e53ce commit e1be115

6 files changed

Lines changed: 13 additions & 5 deletions

File tree

‎api/src/com/cloud/api/commands/UpdateNetworkServiceProviderCmd.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void execute(){
9090
response.setResponseName(getCommandName());
9191
this.setResponseObject(response);
9292
}else {
93-
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to add service provider to physical network");
93+
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to update service provider");
9494
}
9595
}
9696

‎core/src/com/cloud/hypervisor/hyperv/resource/HypervResource.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import com.cloud.agent.api.AttachVolumeCommand;
4343
import com.cloud.agent.api.BackupSnapshotCommand;
4444
import com.cloud.agent.api.CheckHealthCommand;
45+
import com.cloud.agent.api.CheckNetworkCommand;
4546
import com.cloud.agent.api.CheckOnHostCommand;
4647
import com.cloud.agent.api.CheckVirtualMachineCommand;
4748
import com.cloud.agent.api.Command;
@@ -244,6 +245,8 @@ public Answer executeRequest(Command cmd) {
244245
//return execute((VpnUsersCfgCommand) cmd);
245246
} else if (cmd instanceof CheckSshCommand) {
246247
return execute((CheckSshCommand)cmd);
248+
} else if (cmd instanceof CheckNetworkCommand) {
249+
//return execute((CheckNetworkCommand) cmd);
247250
} else {
248251
s_logger.info("SCVMM agent recived unimplemented command: " + _gson.toJson(cmd));
249252
return Answer.createUnsupportedCommandAnswer(cmd);

‎core/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import com.cloud.agent.api.BumpUpPriorityCommand;
3939
import com.cloud.agent.api.CheckHealthAnswer;
4040
import com.cloud.agent.api.CheckHealthCommand;
41+
import com.cloud.agent.api.CheckNetworkCommand;
4142
import com.cloud.agent.api.CheckOnHostAnswer;
4243
import com.cloud.agent.api.CheckOnHostCommand;
4344
import com.cloud.agent.api.CheckRouterAnswer;
@@ -393,6 +394,8 @@ public Answer executeRequest(Command cmd) {
393394
answer = execute((BumpUpPriorityCommand)cmd);
394395
} else if (cmd instanceof GetDomRVersionCmd) {
395396
answer = execute((GetDomRVersionCmd)cmd);
397+
} else if (cmd instanceof CheckNetworkCommand) {
398+
//answer = execute((CheckNetworkCommand) cmd);
396399
} else {
397400
answer = Answer.createUnsupportedCommandAnswer(cmd);
398401
}

‎server/src/com/cloud/network/NetworkManagerImpl.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3912,7 +3912,7 @@ public boolean deletePhysicalNetwork(Long physicalNetworkId) {
39123912
}
39133913

39143914
// Delete networks
3915-
List<NetworkVO> networks = _networksDao.listByPhysicalNetworkIncludingRemoved(physicalNetworkId);
3915+
List<NetworkVO> networks = _networksDao.listByPhysicalNetwork(physicalNetworkId);
39163916
if (networks != null && !networks.isEmpty()) {
39173917
for (NetworkVO network : networks) {
39183918
_networksDao.remove(network.getId());
@@ -4170,6 +4170,8 @@ public PhysicalNetworkServiceProvider updateNetworkServiceProvider(Long id, Stri
41704170
if(element != null && element.isReady(provider)){
41714171
provider.setState(PhysicalNetworkServiceProvider.State.Enabled);
41724172
update = true;
4173+
}else{
4174+
throw new CloudRuntimeException("Provider is not ready, cannot Enable the provider, please configure the provider first");
41734175
}
41744176
break;
41754177
case Disabled:

‎server/src/com/cloud/network/dao/NetworkDao.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public interface NetworkDao extends GenericDao<NetworkVO, Long> {
7676

7777
Long getNetworkCountByOfferingId(long offeringId);
7878

79-
List<NetworkVO> listByPhysicalNetworkIncludingRemoved(long physicalNetworkId);
79+
List<NetworkVO> listByPhysicalNetwork(long physicalNetworkId);
8080

8181
List<NetworkVO> listSecurityGroupEnabledNetworks();
8282

‎server/src/com/cloud/network/dao/NetworkDaoImpl.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,10 @@ public List<NetworkVO> listSecurityGroupEnabledNetworks() {
346346
}
347347

348348
@Override
349-
public List<NetworkVO> listByPhysicalNetworkIncludingRemoved(long physicalNetworkId) {
349+
public List<NetworkVO> listByPhysicalNetwork(long physicalNetworkId) {
350350
SearchCriteria<NetworkVO> sc = PhysicalNetworkSearch.create();
351351
sc.setParameters("physicalNetworkId", physicalNetworkId);
352-
return listIncludingRemovedBy(sc);
352+
return listBy(sc);
353353
}
354354

355355
@Override

0 commit comments

Comments
 (0)