17 Commits

Author SHA1 Message Date
Alex Huang
fe6f0457d5 fixed unit tests from merge 2013-01-18 15:58:55 -08:00
Marcus Sorensen
975021dda1 Summary: adding resizeVolume api call
Detail: This merges the resizevolume feature branch, which provides the
ability to migrate a disk between disk offerings, thereby changing its
size, or specifying a new size if current disk offering is custom.

BUG-ID: CLOUDSTACK-644
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1358358209 -0700
2013-01-16 17:43:35 -07:00
Min Chen
7f8262d45e Remove IdentityProxy and IdentityTypeAdapter class.
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-09 17:40:58 -08:00
Min Chen
dcbb0ecef5 Fix CLOUDSTACK-936: fix nonoss build due to CloudException IdentityProxy
removal.
2013-01-09 13:47:53 -08:00
Rohit Yadav
7c5c3c5dfc api: Re-add deleted addProxyObject method on CloudException
- This was removed part of the response work
- Re-adding as this kind of method definition is available in several other
  exception classes and is used in a lot of cmd classes and in service layer
- TODO: We need to find a way to replace old code and refactor method with the
  new definition that gets only uuid.
- FIXME: Some tables don't have uuid for ex. ClusterVSMMapVO, in this case
  we should keep the method until we find a way to fix this issue

Partially reverting a88ce6bb7f495dddeb954d1fc7826176646b3590

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 05:43:41 -08:00
Min Chen
a88ce6bb7f Remove IdentityProxy from CloudException and ExceptionResponse. 2012-12-19 23:49:44 -08:00
Rohit Yadav
5e0501d116 api_refactor: refactor project apis
- Fix refactored apis in commands*.in
- Fix comments etc.
- Expand tabs, remove trailing whitespace
- Fix trailing whitespaces for all *.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 22:10:32 -08:00
David Nalley
c15948a3ef committing Chip Childers patches fixing licensing headers
Applying to the following directories:
* api
* deamonize
* agnet
* agent-simulator
* cloud-cli
2012-06-12 12:32:58 -04:00
David Nalley
d5377b0ae3 more line ending fixes 2012-04-06 22:51:32 -04:00
frank
2f634c0913 Switch to Apache license 2012-04-03 04:50:05 -07:00
Vijayendra Bhamidipati
005ba5e2b5 Bug 13127: API error text refer to database ids instead of uuids
Description:

	Adding overloaded addProxyObject() function to CloudException
	and RuntimeCloudException classes and using this function
	to stuff exceptions with IDs, to reduce code footprint.
2012-03-15 16:27:52 -07:00
Vijayendra Bhamidipati
57c54e23d6 Bug 14060: Include a CloudStack error code in an Exception Response
Bug 13127: API error text refer to database ids instead of uuids

Code-Reviewers: Ewan Mellor, Kelven Yang

Description:

	1. A new class CSExceptionErrorCode has been added to utils.
	   It contains a list of error codes for each type of
	   Exception class. Use fully qualified package paths for
	   Exceptions in CSExceptionErrorCode.  We log any exception
	   name not found in the list of error codes for exceptions.

	2. Whenever we throw an exception exobj anywhere in the
	   CS code, the CSErrorCode is set in the base class
	   constructor.

	3. We add a new field csErrorCode in classes CloudException,
	   RuntimeCloudException, ExecutionException and
	   ExceptionResponse.

	4. Two places in ApiServer.java were wrongly modified when
	   putting in changes for bug 13127 to not throw an exception.
	   This has been corrected in this commit.
2012-03-05 17:39:09 -08:00
Vijayendra Bhamidipati
59631452b9 Bug 13127: API error text refer to database ids instead of uuids
Description:

	Modify Exception handling to enable addition of multiple
	uuids in a single exception thrown by API functions. Both
	XML and JSON outputs will store all uuids and Fieldnames.
	This will make it easier to provide more information when
	an exception occurs - for example, a zone id, a cluster id,
	host id, and then a specific property id.
2012-02-27 17:55:03 -08:00
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