4 Commits

Author SHA1 Message Date
Vijayendra Bhamidipati
bfe1122bc6 Bug 13127: API error text refer to database ids instead of uuids
Description:

	Added a field name for the db id in the IdentityProxy class, and
	modified setProxyObject() to take an additional id name parameter.
	This will let us know the name of the uuid that we are returning.
	E.g.- domainId, zoneId, etc. The client can view this field in
	the json/xml output. Modified the JSON/XML serialization routines
	to append this new parameter to the serialized output for Exception
	Responses.
2012-02-27 17:55:01 -08:00
Vijayendra Bhamidipati
c3fbe29cf8 Bug 13127: API error text refer to database ids instead of uuids
Description:

	1) Added a setProxyObject() method to CloudException and RuntimeCloudException
	2) Modified a bunch of throw exceptions in NetworkManagerImpl.java to call setProxyObject() before throwing an exception.
	3) Changed scope of ProxyIdentity attribute to protected.
	4) Added routines to ServerApiException to get/set IdentityProxy object, and
	   routine in RuntimeCloudException to get the Idproxy object.
	5) Modified the exception handling around the dispatcher and handlerequest()
	   to copy over the IdentityProxy information before rethrowing an exception
	   eventually back to handle().
	6) Removed duplicate IdentityProxy object in ServerApiException.
	   It was extending RuntimeCloudException which already had an
	   IdentityProxy object.
2012-02-27 17:54:56 -08:00
Vijayendra Bhamidipati
768d7a2a26 Bug 13127: API error text refer to database ids instead of uuids
Description:

1)	Moved RuntimeCloudException from api/ to utils/.

	Added simple constructor to RuntimeCloudException.

	Modified all classes that extended RuntimeException
	to extend RuntimeCloudException. These classes
	are listed below:

		ServerApiException
		CloudAuthenticationException
		CloudExecutionException
		AsyncCommandQueued
		HypervisorVersionChangedException
		RuntimeCloudException

2)	Added overloaded constructed to CloudException.
	Modified all classes that extend Exception to extend CloudException instead.
	These classes are listed below:

		ConcurrentOperationException
                ConflictingNetworkSettingsException
                ConnectionException
                DiscoveryException
                InsufficientCapacityException
                ManagementServerException
                ResourceUnavailableException
                VirtualMachineMigrationException
                AgentControlChannelException
                OperationTimedoutException.java
                UnsupportedVersionException.java
                UsageServerException.java
                UnableDeleteHostException.java
                AgentAuthnException.java
                HttpCallException.java
                ActiveFencingException.java
                ClusterInvalidSessionException.java
                GreTunnelException.java
                OvsVlanExhaustedException.java
2012-02-27 17:54:53 -08:00
U-CITRITE\vijayendra1
698c1ebe12 Bug 13127: API error text refer to database ids instead of uuids
Description:

1)	Adding two new classes, CloudException and RunTimeCloudException.
	The former extends Exception and the latter RunTimeException.
	These will be used by classes that formerly directly extended
	Exception and RuntimeException. These two classes have an attribute
	of type IdentityProxy to enable exceptions fill in db ids in separate
	attribute fields rather than in a string. Doing so will allow the
	serialization module (GSON for JSON and other for XML) to kick in
	and convert this db id to a uuid in ApiServer.java just before the
	JSON/XML responses are sent out.

2)	Moving IdentityProxy.java from api/ to utils/ since
	both CloudException and RuntimeCloudException refer to it.

3)	Changing references to IdentityProxy class from api/ to utils/.

4)	While rebasing to master, a new file was added, merging
	api/src/com/cloud/api/response/IsoVmResponse.java to this diff.
2012-02-27 17:54:50 -08:00