netapp: Fix as pluggable service and return list of apis it offers Signed-off-by: Rohit Yadav <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/3a0588f3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/3a0588f3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/3a0588f3 Branch: refs/heads/ui-plugins Commit: 3a0588f317f81a121ab226e22651b6e58215daa8 Parents: 41fc03d Author: Rohit Yadav <[email protected]> Authored: Fri Feb 8 16:20:46 2013 +0530 Committer: Rohit Yadav <[email protected]> Committed: Fri Feb 8 16:36:24 2013 +0530 ---------------------------------------------------------------------- .../netapp/src/com/cloud/netapp/NetappManager.java | 3 +- .../src/com/cloud/netapp/NetappManagerImpl.java | 22 ++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3a0588f3/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManager.java ---------------------------------------------------------------------- diff --git a/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManager.java b/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManager.java index 7216c50..1ee87f1 100644 --- a/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManager.java +++ b/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManager.java @@ -24,8 +24,9 @@ import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceInUseException; import com.cloud.utils.component.Manager; +import com.cloud.utils.component.PluggableService; -public interface NetappManager extends Manager { +public interface NetappManager extends Manager, PluggableService { enum AlgorithmType { RoundRobin, LeastFull http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3a0588f3/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java ---------------------------------------------------------------------- diff --git a/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java b/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java index 90bb9b2..8f7b6d8 100644 --- a/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java +++ b/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java @@ -17,6 +17,7 @@ package com.cloud.netapp; import java.io.IOException; +import java.lang.Override; import java.net.UnknownHostException; import java.rmi.ServerException; import java.util.ArrayList; @@ -40,6 +41,7 @@ import netapp.manage.NaServer; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; +import com.cloud.api.commands.netapp.*; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceInUseException; @@ -123,7 +125,25 @@ public class NetappManagerImpl extends ManagerBase implements NetappManager return s; } - + + @Override + public List<Class<?>> getCommands() { + List<Class<?>> cmdList = new ArrayList<Class<?>>(); + cmdList.add(CreateLunCmd.class); + cmdList.add(ListLunsCmd.class); + cmdList.add(DissociateLunCmd.class); + cmdList.add(CreateVolumeOnFilerCmd.class); + cmdList.add(ModifyVolumePoolCmd.class); + cmdList.add(ListVolumesOnFilerCmd.class); + cmdList.add(ListVolumePoolsCmd.class); + cmdList.add(DestroyLunCmd.class); + cmdList.add(CreateVolumePoolCmd.class); + cmdList.add(DeleteVolumePoolCmd.class); + cmdList.add(AssociateLunCmd.class); + cmdList.add(DestroyVolumeOnFilerCmd.class); + return cmdList; + } + @Override public void modifyPool(String poolName, String algorithm) throws InvalidParameterValueException {
