mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
SWIFT: listSwift refine
This commit is contained in:
parent
e5884365d9
commit
12eae7148c
@ -34,7 +34,7 @@ import com.cloud.user.Account;
|
||||
@Implementation(description = "Adds Swift.", responseObject = HostResponse.class)
|
||||
public class AddSwiftCmd extends BaseCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(AddSwiftCmd.class.getName());
|
||||
private static final String s_name = "addSwiftresponse";
|
||||
private static final String s_name = "addswiftresponse";
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
//////////////// API parameters /////////////////////
|
||||
|
||||
@ -35,9 +35,9 @@ import com.cloud.storage.Swift;
|
||||
import com.cloud.user.Account;
|
||||
|
||||
@Implementation(description = "List Swift.", responseObject = HostResponse.class)
|
||||
public class ListSwiftCmd extends BaseCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(ListSwiftCmd.class.getName());
|
||||
private static final String s_name = "ListSwiftresponse";
|
||||
public class ListSwiftsCmd extends BaseCmd {
|
||||
public static final Logger s_logger = Logger.getLogger(ListSwiftsCmd.class.getName());
|
||||
private static final String s_name = "listswiftresponse";
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
//////////////// API parameters /////////////////////
|
||||
@ -67,7 +67,7 @@ public class ListSwiftCmd extends BaseCmd {
|
||||
|
||||
@Override
|
||||
public void execute(){
|
||||
List<? extends Swift> result = _resourceService.listSwift(this);
|
||||
List<? extends Swift> result = _resourceService.listSwifts(this);
|
||||
ListResponse<SwiftResponse> response = new ListResponse<SwiftResponse>();
|
||||
List<SwiftResponse> swiftResponses = new ArrayList<SwiftResponse>();
|
||||
|
||||
@ -25,7 +25,7 @@ import com.cloud.api.commands.AddSecondaryStorageCmd;
|
||||
import com.cloud.api.commands.AddSwiftCmd;
|
||||
import com.cloud.api.commands.CancelMaintenanceCmd;
|
||||
import com.cloud.api.commands.DeleteClusterCmd;
|
||||
import com.cloud.api.commands.ListSwiftCmd;
|
||||
import com.cloud.api.commands.ListSwiftsCmd;
|
||||
import com.cloud.api.commands.PrepareForMaintenanceCmd;
|
||||
import com.cloud.api.commands.ReconnectHostCmd;
|
||||
import com.cloud.api.commands.UpdateHostCmd;
|
||||
@ -94,5 +94,5 @@ public interface ResourceService {
|
||||
|
||||
List<HypervisorType> getSupportedHypervisorTypes(long zoneId);
|
||||
|
||||
List<? extends Swift> listSwift(ListSwiftCmd cmd);
|
||||
List<? extends Swift> listSwifts(ListSwiftsCmd cmd);
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ listCapacity=com.cloud.api.commands.ListCapacityCmd;3
|
||||
|
||||
#### swift commands^M
|
||||
addSwift=com.cloud.api.commands.AddSwiftCmd;1
|
||||
listSwift=com.cloud.api.commands.ListSwiftCmd;1
|
||||
listSwifts=com.cloud.api.commands.ListSwiftsCmd;1
|
||||
|
||||
|
||||
#### host commands
|
||||
|
||||
@ -54,7 +54,7 @@ import com.cloud.api.commands.AddSecondaryStorageCmd;
|
||||
import com.cloud.api.commands.AddSwiftCmd;
|
||||
import com.cloud.api.commands.CancelMaintenanceCmd;
|
||||
import com.cloud.api.commands.DeleteClusterCmd;
|
||||
import com.cloud.api.commands.ListSwiftCmd;
|
||||
import com.cloud.api.commands.ListSwiftsCmd;
|
||||
import com.cloud.api.commands.PrepareForMaintenanceCmd;
|
||||
import com.cloud.api.commands.ReconnectHostCmd;
|
||||
import com.cloud.api.commands.UpdateHostCmd;
|
||||
@ -518,8 +518,8 @@ public class ResourceManagerImpl implements ResourceManager, ResourceService, Ma
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SwiftVO> listSwift(ListSwiftCmd cmd) {
|
||||
return _swiftMgr.listSwift(cmd);
|
||||
public List<SwiftVO> listSwifts(ListSwiftsCmd cmd) {
|
||||
return _swiftMgr.listSwifts(cmd);
|
||||
}
|
||||
|
||||
private List<HostVO> discoverHostsFull(Long dcId, Long podId, Long clusterId, String clusterName, String url, String username, String password, String hypervisorType, List<String> hostTags,
|
||||
|
||||
@ -112,7 +112,6 @@ import com.cloud.host.Host;
|
||||
import com.cloud.host.HostVO;
|
||||
import com.cloud.host.Status;
|
||||
import com.cloud.host.dao.HostDao;
|
||||
import com.cloud.host.dao.HostDetailsDao;
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.hypervisor.HypervisorGuruManager;
|
||||
import com.cloud.network.NetworkManager;
|
||||
|
||||
@ -30,7 +30,7 @@ import com.cloud.agent.api.to.SwiftTO;
|
||||
import com.cloud.api.commands.AddSwiftCmd;
|
||||
import com.cloud.api.commands.DeleteIsoCmd;
|
||||
import com.cloud.api.commands.DeleteTemplateCmd;
|
||||
import com.cloud.api.commands.ListSwiftCmd;
|
||||
import com.cloud.api.commands.ListSwiftsCmd;
|
||||
import com.cloud.exception.DiscoveryException;
|
||||
import com.cloud.storage.Swift;
|
||||
import com.cloud.storage.SwiftVO;
|
||||
@ -57,5 +57,5 @@ public interface SwiftManager extends Manager {
|
||||
|
||||
Long chooseZoneForTmpltExtract(Long tmpltId);
|
||||
|
||||
List<SwiftVO> listSwift(ListSwiftCmd cmd);
|
||||
}
|
||||
List<SwiftVO> listSwifts(ListSwiftsCmd cmd);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ import com.cloud.agent.api.to.SwiftTO;
|
||||
import com.cloud.api.commands.AddSwiftCmd;
|
||||
import com.cloud.api.commands.DeleteIsoCmd;
|
||||
import com.cloud.api.commands.DeleteTemplateCmd;
|
||||
import com.cloud.api.commands.ListSwiftCmd;
|
||||
import com.cloud.api.commands.ListSwiftsCmd;
|
||||
import com.cloud.configuration.Config;
|
||||
import com.cloud.configuration.dao.ConfigurationDao;
|
||||
import com.cloud.dc.DataCenterVO;
|
||||
@ -266,7 +266,7 @@ public class SwiftManagerImpl implements SwiftManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SwiftVO> listSwift(ListSwiftCmd cmd) {
|
||||
public List<SwiftVO> listSwifts(ListSwiftsCmd cmd) {
|
||||
if (cmd.getId() == null) {
|
||||
return _swiftDao.listAll();
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user