vmware: Annotate cisco related apis, remove IdentityMapper

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/4cf0b05a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/4cf0b05a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/4cf0b05a

Branch: refs/heads/api_refactoring
Commit: 4cf0b05a0be0ccedc74d691c77d9ed07e36669b1
Parents: a2f8f42
Author: Rohit Yadav <[email protected]>
Authored: Fri Jan 4 16:42:28 2013 -0800
Committer: Rohit Yadav <[email protected]>
Committed: Fri Jan 4 16:42:28 2013 -0800

----------------------------------------------------------------------
 .../cloud/api/commands/DeleteCiscoNexusVSMCmd.java |    6 +++---
 .../api/commands/DisableCiscoNexusVSMCmd.java      |    4 ++--
 .../cloud/api/commands/EnableCiscoNexusVSMCmd.java |    4 ++--
 .../cloud/api/response/CiscoNexusVSMResponse.java  |    4 ++++
 4 files changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4cf0b05a/plugins/hypervisors/vmware/src/com/cloud/api/commands/DeleteCiscoNexusVSMCmd.java
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/api/commands/DeleteCiscoNexusVSMCmd.java
 
b/plugins/hypervisors/vmware/src/com/cloud/api/commands/DeleteCiscoNexusVSMCmd.java
index c050f12..3e45ce2 100644
--- 
a/plugins/hypervisors/vmware/src/com/cloud/api/commands/DeleteCiscoNexusVSMCmd.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/api/commands/DeleteCiscoNexusVSMCmd.java
@@ -21,12 +21,12 @@ import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseAsyncCmd;
-import org.apache.cloudstack.api.IdentityMapper;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.PlugService;
 import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.SuccessResponse;
+import com.cloud.api.response.CiscoNexusVSMResponse;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
@@ -46,8 +46,8 @@ public class DeleteCiscoNexusVSMCmd extends BaseAsyncCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @IdentityMapper(entityTableName="virtual_supervisor_module")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, 
description="Id of the Cisco Nexus 1000v VSM device to be deleted")
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = 
CiscoNexusVSMResponse.class,
+            required=true, description="Id of the Cisco Nexus 1000v VSM device 
to be deleted")
     private Long id;
 
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4cf0b05a/plugins/hypervisors/vmware/src/com/cloud/api/commands/DisableCiscoNexusVSMCmd.java
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/api/commands/DisableCiscoNexusVSMCmd.java
 
b/plugins/hypervisors/vmware/src/com/cloud/api/commands/DisableCiscoNexusVSMCmd.java
index cdeb85d..1f1ff65 100644
--- 
a/plugins/hypervisors/vmware/src/com/cloud/api/commands/DisableCiscoNexusVSMCmd.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/api/commands/DisableCiscoNexusVSMCmd.java
@@ -47,8 +47,8 @@ public class DisableCiscoNexusVSMCmd extends BaseAsyncCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @IdentityMapper(entityTableName="virtual_supervisor_module")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, 
description="Id of the Cisco Nexus 1000v VSM device to be deleted")
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = 
CiscoNexusVSMResponse.class,
+            required=true, description="Id of the Cisco Nexus 1000v VSM device 
to be deleted")
     private Long id;
 
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4cf0b05a/plugins/hypervisors/vmware/src/com/cloud/api/commands/EnableCiscoNexusVSMCmd.java
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/api/commands/EnableCiscoNexusVSMCmd.java
 
b/plugins/hypervisors/vmware/src/com/cloud/api/commands/EnableCiscoNexusVSMCmd.java
index ad63ddd..5dc6721 100644
--- 
a/plugins/hypervisors/vmware/src/com/cloud/api/commands/EnableCiscoNexusVSMCmd.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/api/commands/EnableCiscoNexusVSMCmd.java
@@ -42,8 +42,8 @@ public class EnableCiscoNexusVSMCmd extends BaseAsyncCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @IdentityMapper(entityTableName="virtual_supervisor_module")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, 
description="Id of the Cisco Nexus 1000v VSM device to be enabled")
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, 
entityType=CiscoNexusVSMResponse.class,
+            required=true, description="Id of the Cisco Nexus 1000v VSM device 
to be enabled")
     private Long id;
 
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4cf0b05a/plugins/hypervisors/vmware/src/com/cloud/api/response/CiscoNexusVSMResponse.java
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/api/response/CiscoNexusVSMResponse.java
 
b/plugins/hypervisors/vmware/src/com/cloud/api/response/CiscoNexusVSMResponse.java
index 79985da..25a824e 100644
--- 
a/plugins/hypervisors/vmware/src/com/cloud/api/response/CiscoNexusVSMResponse.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/api/response/CiscoNexusVSMResponse.java
@@ -20,7 +20,11 @@ import org.apache.cloudstack.api.ApiConstants;
 import com.cloud.serializer.Param;
 import com.google.gson.annotations.SerializedName;
 import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.EntityReference;
 
+import com.cloud.network.CiscoNexusVSMDevice;
+
+@EntityReference(value=CiscoNexusVSMDevice.class)
 public class CiscoNexusVSMResponse extends BaseResponse {
 
     @SerializedName(ApiConstants.EXTERNAL_SWITCH_MGMT_DEVICE_ID) 
@Param(description="device id of the Cisco N1KV VSM device")

Reply via email to