mirror of https://github.com/apache/cloudstack.git
Added instanceType to some async commands related to physical network
Reviewed-By: Alena Prokharchyk Conflicts: api/src/com/cloud/api/response/AsyncJobResponse.java api/src/com/cloud/async/AsyncJob.java
This commit is contained in:
parent
31a3b878a3
commit
7181fed101
|
|
@ -30,6 +30,7 @@ import com.cloud.api.Implementation;
|
|||
import com.cloud.api.Parameter;
|
||||
import com.cloud.api.ServerApiException;
|
||||
import com.cloud.api.response.ProviderResponse;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.exception.ResourceAllocationException;
|
||||
import com.cloud.network.PhysicalNetworkServiceProvider;
|
||||
|
|
@ -131,4 +132,9 @@ public class AddNetworkServiceProviderCmd extends BaseAsyncCreateCmd {
|
|||
public String getEventDescription() {
|
||||
return "Adding physical network ServiceProvider: " + getEntityId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsyncJob.Type getInstanceType() {
|
||||
return AsyncJob.Type.PhysicalNetworkServiceProvider;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import com.cloud.api.Implementation;
|
|||
import com.cloud.api.Parameter;
|
||||
import com.cloud.api.ServerApiException;
|
||||
import com.cloud.api.response.TrafficTypeResponse;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.exception.ResourceAllocationException;
|
||||
import com.cloud.network.PhysicalNetworkTrafficType;
|
||||
|
|
@ -151,4 +152,9 @@ public class AddTrafficTypeCmd extends BaseAsyncCreateCmd {
|
|||
public String getEventDescription() {
|
||||
return "Adding physical network traffic type: " + getEntityId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsyncJob.Type getInstanceType() {
|
||||
return AsyncJob.Type.TrafficType;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import com.cloud.api.Implementation;
|
|||
import com.cloud.api.Parameter;
|
||||
import com.cloud.api.ServerApiException;
|
||||
import com.cloud.api.response.SuccessResponse;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
|
|
@ -101,4 +102,9 @@ public class DeleteNetworkServiceProviderCmd extends BaseAsyncCmd {
|
|||
public String getEventDescription() {
|
||||
return "Deleting Physical network ServiceProvider: " + getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsyncJob.Type getInstanceType() {
|
||||
return AsyncJob.Type.PhysicalNetworkServiceProvider;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import com.cloud.api.Implementation;
|
|||
import com.cloud.api.Parameter;
|
||||
import com.cloud.api.ServerApiException;
|
||||
import com.cloud.api.response.SuccessResponse;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
|
|
@ -88,5 +89,9 @@ public class DeleteTrafficTypeCmd extends BaseAsyncCmd {
|
|||
return EventTypes.EVENT_TRAFFIC_TYPE_DELETE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsyncJob.Type getInstanceType() {
|
||||
return AsyncJob.Type.TrafficType;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import com.cloud.api.Implementation;
|
|||
import com.cloud.api.Parameter;
|
||||
import com.cloud.api.ServerApiException;
|
||||
import com.cloud.api.response.ProviderResponse;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.network.PhysicalNetworkServiceProvider;
|
||||
import com.cloud.user.Account;
|
||||
|
|
@ -103,5 +104,10 @@ public class UpdateNetworkServiceProviderCmd extends BaseAsyncCmd {
|
|||
public String getEventDescription() {
|
||||
return "Updating physical network ServiceProvider: " + getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AsyncJob.Type getInstanceType() {
|
||||
return AsyncJob.Type.PhysicalNetworkServiceProvider;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import com.cloud.api.Implementation;
|
|||
import com.cloud.api.Parameter;
|
||||
import com.cloud.api.ServerApiException;
|
||||
import com.cloud.api.response.TrafficTypeResponse;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.network.PhysicalNetworkTrafficType;
|
||||
import com.cloud.user.Account;
|
||||
|
|
@ -111,5 +112,8 @@ public class UpdateTrafficTypeCmd extends BaseAsyncCmd {
|
|||
return EventTypes.EVENT_TRAFFIC_TYPE_UPDATE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AsyncJob.Type getInstanceType() {
|
||||
return AsyncJob.Type.TrafficType;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@ package com.cloud.api.response;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.api.ApiConstants;
|
||||
import com.cloud.api.IdentityProxy;
|
||||
import com.cloud.api.ResponseObject;
|
||||
|
|
@ -119,6 +117,10 @@ public class AsyncJobResponse extends BaseResponse {
|
|||
this.jobInstanceId.setTableName("security_group");
|
||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.PhysicalNetwork.toString())) {
|
||||
this.jobInstanceId.setTableName("physical_network");
|
||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.TrafficType.toString())) {
|
||||
this.jobInstanceId.setTableName("physical_network_traffic_types");
|
||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.PhysicalNetworkServiceProvider.toString())) {
|
||||
this.jobInstanceId.setTableName("physical_network_service_providers");
|
||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.FirewallRule.toString())) {
|
||||
this.jobInstanceId.setTableName("firewall_rules");
|
||||
} else if (!jobInstanceType.equalsIgnoreCase(AsyncJob.Type.None.toString())){
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ public interface AsyncJob extends Identity {
|
|||
IpAddress,
|
||||
SecurityGroup,
|
||||
PhysicalNetwork,
|
||||
TrafficType,
|
||||
PhysicalNetworkServiceProvider,
|
||||
FirewallRule
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue