incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [7/8] git commit: commit ba3fef5d0650c42463d0f225f4ca14b5f9046c44 Author: Min Chen <min.chen@citrix.com> Date: Mon Dec 17 17:42:30 2012 -0800
Date Tue, 18 Dec 2012 20:02:49 GMT
commit ba3fef5d0650c42463d0f225f4ca14b5f9046c44
Author: Min Chen <min.chen@citrix.com>
Date:   Mon Dec 17 17:42:30 2012 -0800

    Remove IdentityProxy from AlertResponse and AsyncJobResponse.

Signed-off-by: Min Chen <min.chen@citrix.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/e017dc2c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/e017dc2c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/e017dc2c

Branch: refs/heads/api_refactoring
Commit: e017dc2c00650e173b1585566acf0460340e2219
Parents: 348d3ae
Author: Min Chen <min.chen@citrix.com>
Authored: Mon Dec 17 17:44:39 2012 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Mon Dec 17 17:44:39 2012 -0800

----------------------------------------------------------------------
 api/src/com/cloud/alert/Alert.java                 |    1 +
 .../com/cloud/network/security/SecurityGroup.java  |    2 +
 api/src/com/cloud/storage/Snapshot.java            |    2 +
 api/src/com/cloud/user/User.java                   |    2 +
 .../api/command/admin/resource/ListAlertsCmd.java  |    2 +-
 .../cloudstack/api/response/AlertResponse.java     |    7 +-
 .../cloudstack/api/response/AsyncJobResponse.java  |   70 +-------
 core/src/com/cloud/storage/SnapshotVO.java         |   56 +++---
 server/src/com/cloud/api/ApiDBUtils.java           |   76 ++++++++-
 server/src/com/cloud/api/ApiResponseHelper.java    |  135 ++++++++++++++-
 server/test/com/cloud/keystore/KeystoreTest.java   |   52 +++---
 11 files changed, 280 insertions(+), 125 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e017dc2c/api/src/com/cloud/alert/Alert.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/alert/Alert.java b/api/src/com/cloud/alert/Alert.java
index c9368a3..da75de8 100644
--- a/api/src/com/cloud/alert/Alert.java
+++ b/api/src/com/cloud/alert/Alert.java
@@ -20,6 +20,7 @@ import java.util.Date;
 
 public interface Alert {
     long getId();
+    String getUuid();
     short getType();
     String getSubject();
     Long getPodId();

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e017dc2c/api/src/com/cloud/network/security/SecurityGroup.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/security/SecurityGroup.java b/api/src/com/cloud/network/security/SecurityGroup.java
index f6817d7..a496aa5 100644
--- a/api/src/com/cloud/network/security/SecurityGroup.java
+++ b/api/src/com/cloud/network/security/SecurityGroup.java
@@ -22,6 +22,8 @@ import com.cloud.acl.ControlledEntity;
 public interface SecurityGroup extends ControlledEntity {
     long getId();
 
+    String getUuid();
+
     String getName();
 
     String getDescription();

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e017dc2c/api/src/com/cloud/storage/Snapshot.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/storage/Snapshot.java b/api/src/com/cloud/storage/Snapshot.java
index a37cc94..c60b19a 100644
--- a/api/src/com/cloud/storage/Snapshot.java
+++ b/api/src/com/cloud/storage/Snapshot.java
@@ -69,6 +69,8 @@ public interface Snapshot extends ControlledEntity {
 
     Long getId();
 
+    String getUuid();
+
     long getAccountId();
 
     long getVolumeId();

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e017dc2c/api/src/com/cloud/user/User.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/user/User.java b/api/src/com/cloud/user/User.java
index c625c16..e1b9f73 100644
--- a/api/src/com/cloud/user/User.java
+++ b/api/src/com/cloud/user/User.java
@@ -23,6 +23,8 @@ public interface User extends OwnedBy {
 
     public long getId();
 
+    public String getUuid();
+
     public Date getCreated();
 
     public Date getRemoved();

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e017dc2c/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java
index f58744a..32dc3d9 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java
@@ -77,7 +77,7 @@ public class ListAlertsCmd extends BaseListCmd {
         List<AlertResponse> alertResponseList = new ArrayList<AlertResponse>();
         for (Alert alert : result.first()) {
             AlertResponse alertResponse = new AlertResponse();
-            alertResponse.setId(alert.getId());
+            alertResponse.setId(alert.getUuid());
             alertResponse.setAlertType(alert.getType());
             alertResponse.setDescription(alert.getSubject());
             alertResponse.setLastSent(alert.getLastSent());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e017dc2c/api/src/org/apache/cloudstack/api/response/AlertResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/AlertResponse.java b/api/src/org/apache/cloudstack/api/response/AlertResponse.java
index c35aad2..fdadd97 100644
--- a/api/src/org/apache/cloudstack/api/response/AlertResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/AlertResponse.java
@@ -19,7 +19,6 @@ package org.apache.cloudstack.api.response;
 import java.util.Date;
 
 import org.apache.cloudstack.api.ApiConstants;
-import com.cloud.utils.IdentityProxy;
 import com.cloud.serializer.Param;
 import com.google.gson.annotations.SerializedName;
 import org.apache.cloudstack.api.BaseResponse;
@@ -27,7 +26,7 @@ import org.apache.cloudstack.api.BaseResponse;
 @SuppressWarnings("unused")
 public class AlertResponse extends BaseResponse {
     @SerializedName(ApiConstants.ID) @Param(description="the id of the alert")
-    private IdentityProxy id = new IdentityProxy("alert");
+    private String id;
 
     @SerializedName(ApiConstants.TYPE) @Param(description="One of the following alert types:
" +
       "MEMORY = 0, CPU = 1, STORAGE = 2, STORAGE_ALLOCATED = 3, PUBLIC_IP = 4, PRIVATE_IP
= 5, HOST = 6, USERVM = 7, " +
@@ -45,8 +44,8 @@ public class AlertResponse extends BaseResponse {
     @SerializedName(ApiConstants.SENT) @Param(description="the date and time the alert was
sent")
     private Date lastSent;
 
-    public void setId(Long id) {
-        this.id.setValue(id);
+    public void setId(String id) {
+        this.id = id;
     }
 
     public void setAlertType(Short alertType) {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e017dc2c/api/src/org/apache/cloudstack/api/response/AsyncJobResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/AsyncJobResponse.java b/api/src/org/apache/cloudstack/api/response/AsyncJobResponse.java
index d255ec4..42912be 100644
--- a/api/src/org/apache/cloudstack/api/response/AsyncJobResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/AsyncJobResponse.java
@@ -23,17 +23,16 @@ import org.apache.cloudstack.api.BaseResponse;
 import org.apache.cloudstack.api.ResponseObject;
 import com.cloud.async.AsyncJob;
 import com.cloud.serializer.Param;
-import com.cloud.utils.IdentityProxy;
 import com.google.gson.annotations.SerializedName;
 
 @SuppressWarnings("unused")
 public class AsyncJobResponse extends BaseResponse {
 
     @SerializedName("accountid") @Param(description="the account that executed the async
command")
-    private IdentityProxy accountId = new IdentityProxy("account");
+    private String accountId;
 
     @SerializedName(ApiConstants.USER_ID) @Param(description="the user that executed the
async command")
-    private IdentityProxy userId = new IdentityProxy("user");
+    private String userId;
 
     @SerializedName("cmd") @Param(description="the async command executed")
     private String cmd;
@@ -57,17 +56,17 @@ public class AsyncJobResponse extends BaseResponse {
     private String jobInstanceType;
 
     @SerializedName("jobinstanceid") @Param(description="the unique ID of the instance/entity
object related to the job")
-    private IdentityProxy jobInstanceId = new IdentityProxy();
+    private String jobInstanceId;
 
     @SerializedName(ApiConstants.CREATED) @Param(description="  the created date of the job")
     private Date created;
 
-    public void setAccountId(Long accountId) {
-        this.accountId.setValue(accountId);
+    public void setAccountId(String accountId) {
+        this.accountId = accountId;
     }
 
-    public void setUserId(Long userId) {
-        this.userId.setValue(userId);
+    public void setUserId(String userId) {
+        this.userId = userId;
     }
 
     public void setCmd(String cmd) {
@@ -97,61 +96,10 @@ public class AsyncJobResponse extends BaseResponse {
 
     public void setJobInstanceType(String jobInstanceType) {
         this.jobInstanceType = jobInstanceType;
-
-        if(jobInstanceType != null) {
-            if(jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Volume.toString())) {
-                this.jobInstanceId.setTableName("volumes");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Template.toString()))
{
-                this.jobInstanceId.setTableName("vm_template");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Iso.toString())) {
-                this.jobInstanceId.setTableName("vm_template");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.VirtualMachine.toString())
|| jobInstanceType.equalsIgnoreCase(AsyncJob.Type.ConsoleProxy.toString()) || jobInstanceType.equalsIgnoreCase(AsyncJob.Type.SystemVm.toString())
|| jobInstanceType.equalsIgnoreCase(AsyncJob.Type.DomainRouter.toString()) ) {
-                this.jobInstanceId.setTableName("vm_instance");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Snapshot.toString()))
{
-                this.jobInstanceId.setTableName("snapshots");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Host.toString())) {
-                this.jobInstanceId.setTableName("host");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.StoragePool.toString()))
{
-                this.jobInstanceId.setTableName("storage_pool");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.IpAddress.toString()))
{
-                this.jobInstanceId.setTableName("user_ip_address");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.SecurityGroup.toString()))
{
-                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.Account.toString()))
{
-                this.jobInstanceId.setTableName("account");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.User.toString())) {
-                this.jobInstanceId.setTableName("user");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.StaticRoute.toString()))
{
-                this.jobInstanceId.setTableName("static_routes");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.PrivateGateway.toString()))
{
-                this.jobInstanceId.setTableName("vpc_gateways");
-            }else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Counter.toString()))
{
-                this.jobInstanceId.setTableName("counter");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Condition.toString()))
{
-                this.jobInstanceId.setTableName("conditions");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.AutoScalePolicy.toString()))
{
-                this.jobInstanceId.setTableName("autoscale_policies");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.AutoScaleVmProfile.toString()))
{
-                this.jobInstanceId.setTableName("autoscale_vmprofiles");
-            } else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.AutoScaleVmGroup.toString()))
{
-                this.jobInstanceId.setTableName("autoscale_vmgroups");
-            } else if (!jobInstanceType.equalsIgnoreCase(AsyncJob.Type.None.toString())){
-                // TODO : when we hit here, we need to add instanceType -> UUID entity
table mapping
-                assert(false);
-            }
-        }
     }
 
-    public void setJobInstanceId(Long jobInstanceId) {
-        this.jobInstanceId.setValue(jobInstanceId);
+    public void setJobInstanceId(String jobInstanceId) {
+        this.jobInstanceId = jobInstanceId;
     }
 
     public void setCreated(Date created) {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e017dc2c/core/src/com/cloud/storage/SnapshotVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/SnapshotVO.java b/core/src/com/cloud/storage/SnapshotVO.java
index 9bf1924..0569225 100644
--- a/core/src/com/cloud/storage/SnapshotVO.java
+++ b/core/src/com/cloud/storage/SnapshotVO.java
@@ -35,25 +35,25 @@ import com.google.gson.annotations.Expose;
 
 @Entity
 @Table(name="snapshots")
-public class SnapshotVO implements Snapshot, Identity {
-	
+public class SnapshotVO implements Snapshot {
+
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     @Column(name="id")
     private long id = -1;
-    
+
     @Column(name="data_center_id")
     long dataCenterId;
 
     @Column(name="account_id")
     long accountId;
-    
+
     @Column(name="domain_id")
     long domainId;
 
     @Column(name="volume_id")
     Long volumeId;
-    
+
     @Column(name="disk_offering_id")
     Long diskOfferingId;
 
@@ -64,7 +64,7 @@ public class SnapshotVO implements Snapshot, Identity {
     @Expose
     @Column(name="name")
     String name;
-    
+
     @Expose
     @Column(name="status", updatable = true, nullable=false)
     @Enumerated(value=EnumType.STRING)
@@ -75,10 +75,10 @@ public class SnapshotVO implements Snapshot, Identity {
 
     @Column(name="type_description")
     String typeDescription;
-    
+
     @Column(name="size")
     long size;
-    
+
     @Column(name=GenericDao.CREATED_COLUMN)
     Date created;
 
@@ -87,10 +87,10 @@ public class SnapshotVO implements Snapshot, Identity {
 
     @Column(name="backup_snap_id")
     String backupSnapshotId;
-    
+
     @Column(name="swift_id")
     Long swiftId;
-    
+
     @Column(name="sechost_id")
     Long secHostId;
 
@@ -100,14 +100,14 @@ public class SnapshotVO implements Snapshot, Identity {
     @Column(name="hypervisor_type")
     @Enumerated(value=EnumType.STRING)
     HypervisorType  hypervisorType;
-    
+
     @Expose
     @Column(name="version")
     String version;
-    
+
     @Column(name="uuid")
     String uuid;
-    
+
     public SnapshotVO() {
     	this.uuid = UUID.randomUUID().toString();
     }
@@ -129,7 +129,7 @@ public class SnapshotVO implements Snapshot, Identity {
         this.version = "2.2";
     	this.uuid = UUID.randomUUID().toString();
     }
-    
+
     @Override
     public Long getId() {
         return id;
@@ -165,7 +165,7 @@ public class SnapshotVO implements Snapshot, Identity {
     public String getPath() {
         return path;
     }
-    
+
     public void setPath(String path) {
     	this.path = path;
     }
@@ -178,7 +178,7 @@ public class SnapshotVO implements Snapshot, Identity {
     public short getsnapshotType() {
         return snapshotType;
     }
-    
+
     @Override
     public Type getType() {
         if (snapshotType < 0 || snapshotType >= Type.values().length) {
@@ -186,7 +186,7 @@ public class SnapshotVO implements Snapshot, Identity {
         }
         return Type.values()[snapshotType];
     }
-    
+
     public Long getSwiftId() {
         return swiftId;
     }
@@ -207,11 +207,11 @@ public class SnapshotVO implements Snapshot, Identity {
     public HypervisorType getHypervisorType() {
     	return hypervisorType;
     }
-    
+
     public void setSnapshotType(short snapshotType) {
         this.snapshotType = snapshotType;
     }
-    
+
     @Override
     public boolean isRecursive(){
         if ( snapshotType >= Type.HOURLY.ordinal() && snapshotType <= Type.MONTHLY.ordinal()
) {
@@ -246,32 +246,32 @@ public class SnapshotVO implements Snapshot, Identity {
     public Date getRemoved() {
         return removed;
     }
-    
+
 	@Override
     public Status getStatus() {
 		return status;
 	}
-	
+
 	public void setStatus(Status status) {
 		this.status = status;
 	}
-	
+
 	public String getBackupSnapshotId(){
 		return backupSnapshotId;
 	}
-	
+
     public long getPrevSnapshotId(){
 		return prevSnapshotId;
 	}
-	
+
 	public void setBackupSnapshotId(String backUpSnapshotId){
 		this.backupSnapshotId = backUpSnapshotId;
 	}
-	
+
 	public void setPrevSnapshotId(long prevSnapshotId){
 		this.prevSnapshotId = prevSnapshotId;
 	}
-	   
+
     public static Type getSnapshotType(String snapshotType) {
         for ( Type type : Type.values()) {
             if ( type.equals(snapshotType)) {
@@ -280,12 +280,12 @@ public class SnapshotVO implements Snapshot, Identity {
         }
         return null;
     }
-    
+
     @Override
     public String getUuid() {
     	return this.uuid;
     }
-    
+
     public void setUuid(String uuid) {
     	this.uuid = uuid;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e017dc2c/server/src/com/cloud/api/ApiDBUtils.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiDBUtils.java b/server/src/com/cloud/api/ApiDBUtils.java
index 4e41d68..60a9b26 100755
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@ -95,33 +95,50 @@ import com.cloud.network.NetworkManager;
 import com.cloud.network.NetworkProfile;
 import com.cloud.network.NetworkRuleConfigVO;
 import com.cloud.network.NetworkVO;
+import com.cloud.network.PhysicalNetworkVO;
 import com.cloud.network.Site2SiteVpnGatewayVO;
 import com.cloud.network.Site2SiteCustomerGatewayVO;
 import com.cloud.network.Networks.TrafficType;
 import com.cloud.network.as.AutoScalePolicy;
 import com.cloud.network.as.AutoScalePolicyConditionMapVO;
+import com.cloud.network.as.AutoScalePolicyVO;
 import com.cloud.network.as.AutoScaleVmGroupPolicyMapVO;
+import com.cloud.network.as.AutoScaleVmGroupVO;
+import com.cloud.network.as.AutoScaleVmProfileVO;
 import com.cloud.network.as.ConditionVO;
 import com.cloud.network.as.CounterVO;
 import com.cloud.network.as.dao.AutoScalePolicyConditionMapDao;
 import com.cloud.network.as.dao.AutoScalePolicyDao;
+import com.cloud.network.as.dao.AutoScaleVmGroupDao;
 import com.cloud.network.as.dao.AutoScaleVmGroupPolicyMapDao;
+import com.cloud.network.as.dao.AutoScaleVmProfileDao;
 import com.cloud.network.as.dao.ConditionDao;
 import com.cloud.network.as.dao.CounterDao;
 import com.cloud.network.dao.FirewallRulesCidrsDao;
+import com.cloud.network.dao.FirewallRulesDao;
 import com.cloud.network.dao.IPAddressDao;
 import com.cloud.network.dao.LoadBalancerDao;
 import com.cloud.network.dao.NetworkDao;
+import com.cloud.network.dao.PhysicalNetworkDao;
 import com.cloud.network.dao.NetworkDomainDao;
 import com.cloud.network.dao.NetworkRuleConfigDao;
+import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
+import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
+import com.cloud.network.dao.PhysicalNetworkTrafficTypeDao;
+import com.cloud.network.dao.PhysicalNetworkTrafficTypeVO;
 import com.cloud.network.dao.Site2SiteVpnGatewayDao;
 import com.cloud.network.dao.Site2SiteCustomerGatewayDao;
 import com.cloud.network.router.VirtualRouter;
+import com.cloud.network.rules.FirewallRuleVO;
 import com.cloud.network.security.SecurityGroup;
 import com.cloud.network.security.SecurityGroupManager;
 import com.cloud.network.security.SecurityGroupVO;
 import com.cloud.network.security.dao.SecurityGroupDao;
+import com.cloud.network.vpc.StaticRouteVO;
+import com.cloud.network.vpc.VpcGatewayVO;
 import com.cloud.network.vpc.VpcManager;
+import com.cloud.network.vpc.dao.StaticRouteDao;
+import com.cloud.network.vpc.dao.VpcGatewayDao;
 import com.cloud.offering.NetworkOffering;
 import com.cloud.offering.ServiceOffering;
 import com.cloud.offerings.NetworkOfferingVO;
@@ -248,6 +265,7 @@ public class ApiDBUtils {
     private static DataCenterDao _zoneDao;
     private static NetworkOfferingDao _networkOfferingDao;
     private static NetworkDao _networkDao;
+    private static PhysicalNetworkDao _physicalNetworkDao;
     private static ConfigurationService _configMgr;
     private static ConfigurationDao _configDao;
     private static ConsoleProxyDao _consoleProxyDao;
@@ -268,6 +286,8 @@ public class ApiDBUtils {
     private static AutoScalePolicyConditionMapDao _asPolicyConditionMapDao;
     private static AutoScaleVmGroupPolicyMapDao _asVmGroupPolicyMapDao;
     private static AutoScalePolicyDao _asPolicyDao;
+    private static AutoScaleVmProfileDao _asVmProfileDao;
+    private static AutoScaleVmGroupDao _asVmGroupDao;
     private static CounterDao _counterDao;
     private static ResourceTagJoinDao _tagJoinDao;
     private static EventJoinDao _eventJoinDao;
@@ -277,6 +297,12 @@ public class ApiDBUtils {
     private static ProjectAccountJoinDao _projectAccountJoinDao;
     private static ProjectInvitationJoinDao _projectInvitationJoinDao;
 
+    private static PhysicalNetworkTrafficTypeDao _physicalNetworkTrafficTypeDao;
+    private static PhysicalNetworkServiceProviderDao _physicalNetworkServiceProviderDao;
+    private static FirewallRulesDao _firewallRuleDao;
+    private static StaticRouteDao _staticRouteDao;
+    private static VpcGatewayDao _vpcGatewayDao;
+
     static {
         _ms = (ManagementServer) ComponentLocator.getComponent(ManagementServer.Name);
         ComponentLocator locator = ComponentLocator.getLocator(ManagementServer.Name);
@@ -324,6 +350,7 @@ public class ApiDBUtils {
         _securityGroupJoinDao = locator.getDao(SecurityGroupJoinDao.class);
         _networkOfferingDao = locator.getDao(NetworkOfferingDao.class);
         _networkDao = locator.getDao(NetworkDao.class);
+        _physicalNetworkDao = locator.getDao(PhysicalNetworkDao.class);
         _configDao = locator.getDao(ConfigurationDao.class);
         _consoleProxyDao = locator.getDao(ConsoleProxyDao.class);
         _firewallCidrsDao = locator.getDao(FirewallRulesCidrsDao.class);
@@ -343,8 +370,6 @@ public class ApiDBUtils {
         _asPolicyConditionMapDao = locator.getDao(AutoScalePolicyConditionMapDao.class);
         _counterDao = locator.getDao(CounterDao.class);
         _asVmGroupPolicyMapDao = locator.getDao(AutoScaleVmGroupPolicyMapDao.class);
-        _asVmGroupPolicyMapDao = locator.getDao(AutoScaleVmGroupPolicyMapDao.class);
-        _counterDao = locator.getDao(CounterDao.class);
         _tagJoinDao = locator.getDao(ResourceTagJoinDao.class);
         _vmGroupJoinDao = locator.getDao(InstanceGroupJoinDao.class);
         _eventJoinDao = locator.getDao(EventJoinDao.class);
@@ -353,6 +378,13 @@ public class ApiDBUtils {
         _projectAccountJoinDao = locator.getDao(ProjectAccountJoinDao.class);
         _projectInvitationJoinDao = locator.getDao(ProjectInvitationJoinDao.class);
 
+        _physicalNetworkTrafficTypeDao = locator.getDao(PhysicalNetworkTrafficTypeDao.class);
+        _physicalNetworkServiceProviderDao = locator.getDao(PhysicalNetworkServiceProviderDao.class);
+        _firewallRuleDao = locator.getDao(FirewallRulesDao.class);
+        _staticRouteDao = locator.getDao(StaticRouteDao.class);
+        _vpcGatewayDao = locator.getDao(VpcGatewayDao.class);
+        _asVmProfileDao = locator.getDao(AutoScaleVmProfileDao.class);
+        _asVmGroupDao = locator.getDao(AutoScaleVmGroupDao.class);
 
         // Note: stats collector should already have been initialized by this time, otherwise
a null instance is returned
         _statsCollector = StatsCollector.getInstance();
@@ -738,6 +770,14 @@ public class ApiDBUtils {
         return _vlanDao.listVlansByNetworkId(networkId);
     }
 
+    public static PhysicalNetworkVO findPhysicalNetworkById(long id) {
+        return _physicalNetworkDao.findById(id);
+    }
+
+    public static PhysicalNetworkTrafficTypeVO findPhysicalNetworkTrafficTypeById(long id)
{
+        return _physicalNetworkTrafficTypeDao.findById(id);
+    }
+
     public static NetworkVO findNetworkById(long id) {
         return _networkDao.findById(id);
     }
@@ -945,6 +985,38 @@ public class ApiDBUtils {
         return _counterDao.findById(counterId);
     }
 
+    public static ConditionVO findConditionById(long conditionId){
+        return _asConditionDao.findById(conditionId);
+    }
+
+    public static PhysicalNetworkServiceProviderVO findPhysicalNetworkServiceProviderById(long
providerId){
+        return _physicalNetworkServiceProviderDao.findById(providerId);
+    }
+
+    public static FirewallRuleVO findFirewallRuleById(long ruleId){
+        return _firewallRuleDao.findById(ruleId);
+    }
+
+    public static StaticRouteVO findStaticRouteById(long routeId){
+        return _staticRouteDao.findById(routeId);
+    }
+
+    public static VpcGatewayVO findVpcGatewayById(long gatewayId){
+        return _vpcGatewayDao.findById(gatewayId);
+    }
+
+    public static AutoScalePolicyVO findAutoScalePolicyById(long policyId){
+        return _asPolicyDao.findById(policyId);
+    }
+
+    public static AutoScaleVmProfileVO findAutoScaleVmProfileById(long profileId){
+        return _asVmProfileDao.findById(profileId);
+    }
+
+    public static AutoScaleVmGroupVO findAutoScaleVmGroupById(long groupId){
+        return _asVmGroupDao.findById(groupId);
+    }
+
     ///////////////////////////////////////////////////////////////////////
     //  Newly Added Utility Methods for List API refactoring             //
     ///////////////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e017dc2c/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 51c9017..5f584f7 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -159,6 +159,7 @@ import com.cloud.network.Networks.TrafficType;
 import com.cloud.network.PhysicalNetwork;
 import com.cloud.network.PhysicalNetworkServiceProvider;
 import com.cloud.network.PhysicalNetworkTrafficType;
+import com.cloud.network.PhysicalNetworkVO;
 import com.cloud.network.RemoteAccessVpn;
 import com.cloud.network.Site2SiteCustomerGateway;
 import com.cloud.network.Site2SiteCustomerGatewayVO;
@@ -168,13 +169,19 @@ import com.cloud.network.Site2SiteVpnGatewayVO;
 import com.cloud.network.VirtualRouterProvider;
 import com.cloud.network.VpnUser;
 import com.cloud.network.as.AutoScalePolicy;
+import com.cloud.network.as.AutoScalePolicyVO;
 import com.cloud.network.as.AutoScaleVmGroup;
+import com.cloud.network.as.AutoScaleVmGroupVO;
 import com.cloud.network.as.AutoScaleVmProfile;
+import com.cloud.network.as.AutoScaleVmProfileVO;
 import com.cloud.network.as.Condition;
 import com.cloud.network.as.ConditionVO;
 import com.cloud.network.as.Counter;
+import com.cloud.network.as.CounterVO;
+import com.cloud.network.dao.PhysicalNetworkTrafficTypeVO;
 import com.cloud.network.router.VirtualRouter;
 import com.cloud.network.rules.FirewallRule;
+import com.cloud.network.rules.FirewallRuleVO;
 import com.cloud.network.rules.LoadBalancer;
 import com.cloud.network.rules.PortForwardingRule;
 import com.cloud.network.rules.StaticNatRule;
@@ -184,7 +191,9 @@ import com.cloud.network.security.SecurityRule;
 import com.cloud.network.security.SecurityRule.SecurityRuleType;
 import com.cloud.network.vpc.PrivateGateway;
 import com.cloud.network.vpc.StaticRoute;
+import com.cloud.network.vpc.StaticRouteVO;
 import com.cloud.network.vpc.Vpc;
+import com.cloud.network.vpc.VpcGatewayVO;
 import com.cloud.network.vpc.VpcOffering;
 import com.cloud.offering.DiskOffering;
 import com.cloud.offering.NetworkOffering;
@@ -2001,8 +2010,14 @@ public class ApiResponseHelper implements ResponseGenerator {
     @Override
     public AsyncJobResponse createAsyncJobResponse(AsyncJob job) {
         AsyncJobResponse jobResponse = new AsyncJobResponse();
-        jobResponse.setAccountId(job.getAccountId());
-        jobResponse.setUserId(job.getUserId());
+        Account account = ApiDBUtils.findAccountById(job.getAccountId());
+        if (account != null) {
+            jobResponse.setAccountId(account.getUuid());
+        }
+        User user = ApiDBUtils.findUserById(job.getUserId());
+        if (user != null) {
+            jobResponse.setUserId(user.getUuid());
+        }
         jobResponse.setCmd(job.getCmd());
         jobResponse.setCreated(job.getCreated());
         jobResponse.setJobId(job.getId());
@@ -2011,7 +2026,121 @@ public class ApiResponseHelper implements ResponseGenerator {
 
         if (job.getInstanceType() != null && job.getInstanceId() != null) {
             jobResponse.setJobInstanceType(job.getInstanceType().toString());
-            jobResponse.setJobInstanceId(job.getInstanceId());
+            String jobInstanceId = null;
+            if (job.getInstanceType() == AsyncJob.Type.Volume) {
+                VolumeVO volume = ApiDBUtils.findVolumeById(job.getInstanceId());
+                if (volume != null) {
+                    jobInstanceId = volume.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.Template || job.getInstanceType()
== AsyncJob.Type.Iso) {
+                VMTemplateVO template = ApiDBUtils.findTemplateById(job.getInstanceId());
+                if (template != null) {
+                    jobInstanceId = template.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.VirtualMachine || job.getInstanceType()
== AsyncJob.Type.ConsoleProxy
+                    || job.getInstanceType() == AsyncJob.Type.SystemVm || job.getInstanceType()
== AsyncJob.Type.DomainRouter) {
+                VMInstanceVO vm = ApiDBUtils.findVMInstanceById(job.getInstanceId());
+                if (vm != null) {
+                    jobInstanceId = vm.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.Snapshot) {
+                Snapshot snapshot = ApiDBUtils.findSnapshotById(job.getInstanceId());
+                if (snapshot != null) {
+                    jobInstanceId = snapshot.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.Host) {
+                Host host = ApiDBUtils.findHostById(job.getInstanceId());
+                if (host != null) {
+                    jobInstanceId = host.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.StoragePool) {
+                StoragePoolVO spool = ApiDBUtils.findStoragePoolById(job.getInstanceId());
+                if (spool != null) {
+                    jobInstanceId = spool.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.IpAddress) {
+                IPAddressVO ip = ApiDBUtils.findIpAddressById(job.getInstanceId());
+                if (ip != null) {
+                    jobInstanceId = ip.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.SecurityGroup) {
+                SecurityGroup sg = ApiDBUtils.findSecurityGroupById(job.getInstanceId());
+                if (sg != null) {
+                    jobInstanceId = sg.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.PhysicalNetwork) {
+                PhysicalNetworkVO pnet = ApiDBUtils.findPhysicalNetworkById(job.getInstanceId());
+                if (pnet != null) {
+                    jobInstanceId = pnet.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.TrafficType) {
+                PhysicalNetworkTrafficTypeVO trafficType = ApiDBUtils.findPhysicalNetworkTrafficTypeById(job.getInstanceId());
+                if (trafficType != null) {
+                    jobInstanceId = trafficType.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.PhysicalNetworkServiceProvider)
{
+                PhysicalNetworkServiceProvider sp = ApiDBUtils.findPhysicalNetworkServiceProviderById(job.getInstanceId());
+                if (sp != null) {
+                    jobInstanceId = sp.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.FirewallRule) {
+                FirewallRuleVO fw = ApiDBUtils.findFirewallRuleById(job.getInstanceId());
+                if (fw != null) {
+                    jobInstanceId = fw.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.Account) {
+                Account acct = ApiDBUtils.findAccountById(job.getInstanceId());
+                if (acct != null) {
+                    jobInstanceId = acct.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.User) {
+                User usr = ApiDBUtils.findUserById(job.getInstanceId());
+                if (usr != null) {
+                    jobInstanceId = usr.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.StaticRoute) {
+                StaticRouteVO route = ApiDBUtils.findStaticRouteById(job.getInstanceId());
+                if (route != null) {
+                    jobInstanceId = route.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.PrivateGateway) {
+                VpcGatewayVO gateway = ApiDBUtils.findVpcGatewayById(job.getInstanceId());
+                if (gateway != null) {
+                    jobInstanceId = gateway.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.Counter) {
+                CounterVO counter = ApiDBUtils.getCounter(job.getInstanceId());
+                if (counter != null) {
+                    jobInstanceId = counter.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.Condition) {
+                ConditionVO condition = ApiDBUtils.findConditionById(job.getInstanceId());
+                if (condition != null) {
+                    jobInstanceId = condition.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.AutoScalePolicy) {
+                AutoScalePolicyVO policy = ApiDBUtils.findAutoScalePolicyById(job.getInstanceId());
+                if (policy != null) {
+                    jobInstanceId = policy.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.AutoScaleVmProfile) {
+                AutoScaleVmProfileVO profile = ApiDBUtils.findAutoScaleVmProfileById(job.getInstanceId());
+                if (profile != null) {
+                    jobInstanceId = profile.getUuid();
+                }
+            } else if (job.getInstanceType() == AsyncJob.Type.AutoScaleVmGroup) {
+                AutoScaleVmGroupVO group = ApiDBUtils.findAutoScaleVmGroupById(job.getInstanceId());
+                if (group != null) {
+                    jobInstanceId = group.getUuid();
+                }
+            } else if (job.getInstanceType() != AsyncJob.Type.None) {
+                // TODO : when we hit here, we need to add instanceType -> UUID
+                // entity table mapping
+                assert (false);
+            }
+            if (jobInstanceId != null) {
+                jobResponse.setJobInstanceId(jobInstanceId);
+            }
         }
         jobResponse.setJobResultCode(job.getResultCode());
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e017dc2c/server/test/com/cloud/keystore/KeystoreTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/keystore/KeystoreTest.java b/server/test/com/cloud/keystore/KeystoreTest.java
index 21d5d9c..47212c1 100644
--- a/server/test/com/cloud/keystore/KeystoreTest.java
+++ b/server/test/com/cloud/keystore/KeystoreTest.java
@@ -29,9 +29,9 @@ import org.apache.cloudstack.api.response.UserVmResponse;
 public class KeystoreTest extends TestCase {
     private final static Logger s_logger = Logger.getLogger(KeystoreTest.class);
 
-	private String keyContent = 
-		"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALV5vGlkiWwoZX4hTRplPXP8qtST\n" + 
-		"hwZhko8noeY5vf8ECwmd+vrCTw/JvnOtkx/8oYNbg/SeUt1EfOsk6gqJdBblGFBZRMcUJlIpqE9z\n" + 
+	private String keyContent =
+		"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALV5vGlkiWwoZX4hTRplPXP8qtST\n" +
+		"hwZhko8noeY5vf8ECwmd+vrCTw/JvnOtkx/8oYNbg/SeUt1EfOsk6gqJdBblGFBZRMcUJlIpqE9z\n" +
 		"uv68U9G8Gfi/qvRSY336hibw0J5bZ4vn1QqmyHDB+Czea9AjFUV7AEVG15+vED7why+/AgMBAAEC\n" +
 		"gYBmFBPnNKYYMKDmUdUNA+WNWJK/ADzzWe8WlzR6TACTcbLDthl289WFC/YVG42mcHRpbxDKiEQU\n" +
 		"MnIR0rHTO34Qb/2HcuyweStU2gqR6omxBvMnFpJr90nD1HcOMJzeLHsphau0/EmKKey+gk4PyieD\n" +
@@ -42,8 +42,8 @@ public class KeystoreTest extends TestCase {
 		"/DURBUn+1l5pyCKrZnDbvaALSLATLvjmFTuGjoHszy2OeKnOZmEqExWnKKE/VYuPyhy6V7i3TwJA\n" +
 		"f8skDgtPK0OsBCa6IljPaHoWBjPc4kFkSTSS1d56hUcWSikTmiuKdLyBb85AADSZYsvHWrte4opN\n" +
 		"dhNukMJuRA==\n";
-	
-	private String certContent = 
+
+	private String certContent =
 		"-----BEGIN CERTIFICATE-----\n" +
 		"MIIE3jCCA8agAwIBAgIFAqv56tIwDQYJKoZIhvcNAQEFBQAwgcoxCzAJBgNVBAYT\n" +
 		"AlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYD\n" +
@@ -73,27 +73,27 @@ public class KeystoreTest extends TestCase {
 		"k0fLF4+i/pt9hVCz0QrZ28RUhXf825+EOL0Gw+Uzt+7RV2cCaJrlu4cDrDom2FRy\n" +
 		"E8I=\n" +
 		"-----END CERTIFICATE-----\n";
-    
+
     @Override
     @Before
     public void setUp() {
-/*    	
+/*
         MockComponentLocator locator = new MockComponentLocator("management-server");
         locator.addDao("keystoreDao", KeystoreDaoImpl.class);
         locator.addManager("KeystoreManager", KeystoreManagerImpl.class);
         locator.makeActive(new DefaultInterceptorLibrary());
-*/        
+*/
     }
-    
+
     @Override
     @After
     public void tearDown() throws Exception {
     }
 
-/*    
+/*
     public void testKeystoreSave() throws Exception {
     	KeystoreVO ksVo;
-    	
+
         ComponentLocator locator = ComponentLocator.getCurrentLocator();
 
         KeystoreDao ksDao = locator.getDao(KeystoreDao.class);
@@ -103,18 +103,18 @@ public class KeystoreTest extends TestCase {
         assertTrue(ksVo.getCertificate().equals("CPVMCertificate"));
         assertTrue(ksVo.getKey().equals("KeyForCertificate"));
         assertTrue(ksVo.getDomainSuffix().equals("realhostip.com"));
-        
+
         ksDao.save("CPVMCertificate", "CPVMCertificate Again", "KeyForCertificate Again",
"again.realhostip.com");
-        
+
         ksVo = ksDao.findByName("CPVMCertificate");
         assertTrue(ksVo != null);
         assertTrue(ksVo.getCertificate().equals("CPVMCertificate Again"));
         assertTrue(ksVo.getKey().equals("KeyForCertificate Again"));
         assertTrue(ksVo.getDomainSuffix().equals("again.realhostip.com"));
-        
+
         ksDao.expunge(ksVo.getId());
     }
-    
+
     public void testStripeKey() throws Exception {
     	Pattern regex = Pattern.compile("(^[\\-]+[^\\-]+[\\-]+[\\n]?)([^\\-]+)([\\-]+[^\\-]+[\\-]+$)");
     	Matcher m = regex.matcher("-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEAm4bLUORp9oM65GV9XrPrbs+K563DjUR1M8mP1HaE+Y4lX5pk\nvQjC/xoEqSs5pxDDWXAkoexvxij8A4AWcsKU1Q+ep2E+GcytBoz8XINGvgb8cQNn\n/4PlVWKp7j5SDDNCfleYvmiRn8k6P4mxVJOHKzwb/IwQcKghyqAF1w==\n-----END
RSA PRIVATE KEY-----");
@@ -126,19 +126,19 @@ public class KeystoreTest extends TestCase {
     		assertTrue(false);
     	}
     }
-    
+
     public void testKeystoreManager() throws Exception {
         ComponentLocator locator = ComponentLocator.getCurrentLocator();
-        
+
         KeystoreManagerImpl ksMgr = ComponentLocator.inject(KeystoreManagerImpl.class);
         assertTrue(ksMgr.configure("TaskManager", new HashMap<String, Object>()));
         assertTrue(ksMgr.start());
-        
+
         ksMgr.saveCertificate("CPVMCertificate", certContent, keyContent, "realhostip.com");
-        
+
         byte[] ksBits = ksMgr.getKeystoreBits("CPVMCertificate", "realhostip", "vmops.com");
         assertTrue(ksBits != null);
-        
+
         try {
         	KeyStore ks = CertificateHelper.loadKeystore(ksBits, "vmops.com");
         	assertTrue(ks != null);
@@ -150,11 +150,11 @@ public class KeystoreTest extends TestCase {
         KeystoreVO ksVo = ksDao.findByName("CPVMCertificate");
         ksDao.expunge(ksVo.getId());
     }
-*/    
+*/
     public void testUuid() {
     	UserVmResponse vm = new UserVmResponse();
         vm.setId(Long.toString(3L));
-/*    	
+/*
     	vm.setAccountName("admin");
     	vm.setName("i-2-3-KY");
     	vm.setDisplayName("i-2-3-KY");
@@ -165,18 +165,18 @@ public class KeystoreTest extends TestCase {
     	vm.setZoneId(1L);
     	vm.setZoneName("KY");
     	vm.setHostId(1L);
-    	
+
     	vm.setObjectName("virtualmachine");
-*/    	
+*/
     	String result = ApiSerializerHelper.toSerializedStringOld(vm);
         // String result = "org.apache.cloudstack.api.response.UserVmResponse/virtualmachine/{\"id\":{\"_tableName\":\"vm_instance\",\"_value\":3},\"name\":\"i-2-3-KY\",\"displayname\":\"i-2-3-KY\",\"account\":\"admin\",\"projectid\":{\"_tableName\":\"projects\"},\"domainid\":{\"_tableName\":\"domain\",\"_value\":1},\"domain\":\"ROOT\",\"created\":\"2011-11-02T21:54:07-0700\",\"state\":\"Running\",\"haenable\":false,\"groupid\":{\"_tableName\":\"instance_group\"},\"zoneid\":{\"_tableName\":\"data_center\",\"_value\":1},\"zonename\":\"KY\",\"hostid\":{\"_tableName\":\"host\",\"_value\":1},\"hostname\":\"xenserver-basic\",\"templateid\":{\"_tableName\":\"vm_template\",\"_value\":2},\"templatename\":\"CentOS
5.3(64-bit) no GUI (XenServer)\",\"templatedisplaytext\":\"CentOS 5.3(64-bit) no GUI (XenServer)\",\"passwordenabled\":false,\"isoid\":{\"_tableName\":\"vm_template\"},\"serviceofferingid\":{\"_tableName\":\"disk_offering\",\"_value\":7},\"serviceofferingname\":\"Small
Instance\",\
 "cpunumber\":1,\"cpuspeed\":500,\"memory\":512,\"guestosid\":{\"_tableName\":\"guest_os\",\"_value\":12},\"rootdeviceid\":0,\"rootdevicetype\":\"NetworkFilesystem\",\"securitygroup\":[],\"jobid\":{\"_tableName\":\"async_job\"},\"nic\":[{\"id\":7,\"networkid\":200,\"netmask\":\"255.255.255.0\",\"gateway\":\"10.1.1.1\",\"ipaddress\":\"10.1.1.116\",\"isolationuri\":\"vlan://1699\",\"broadcasturi\":\"vlan://1699\",\"traffictype\":\"Guest\",\"type\":\"Virtual\",\"isdefault\":true,\"macaddress\":\"02:00:39:a7:00:01\"}],\"hypervisor\":\"XenServer\"}";
     	System.out.println(result);
     	//Object obj = ApiSerializerHelper.fromSerializedString(result);
 
     	AlertResponse alert = new AlertResponse();
-    	alert.setId(100L);
+    	alert.setId("100");
     	alert.setDescription("Hello");
-    	
+
     	result = ApiSerializerHelper.toSerializedStringOld(alert);
     	System.out.println(result);
     	ApiSerializerHelper.fromSerializedString(result);


Mime
View raw message