Commit Graph

1430 Commits

Author SHA1 Message Date
Vijayendra Bhamidipati f601db1304 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-05-01 13:48:15 +01:00
Vijayendra Bhamidipati 1d749bb9d3 Bug 13127: API error text refer to database ids instead of uuids
Description:

	Modified the IdentityTypeAdapter's custom serializer to
	identify whether this is an exception response that is being
	serialized, by checking if the idFieldName is set. If so,
	serialize both uuid and the uuidProperty (for eg, zoneId and
	"zoneId" (string)) and pass back the json representation of that.

	Modified XML serializer also to build a list of uuids+fieldnames.

	Introduced a new field "cserrorcode" in ExceptionResponse. This
	refers to an error code that can be according to the specific
	Exception being thrown. This will be serialized as usual. There
	shouldn't be any need to do a db lookup for conversion for these
	error codes.
2012-05-01 13:28:22 +01:00
Vijayendra Bhamidipati bea85d47a7 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-05-01 13:28:21 +01:00
Vijayendra Bhamidipati 094f01be41 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-05-01 13:28:20 +01:00
Vijayendra Bhamidipati 7ea32a4471 Bug 13127: API error text refer to database ids instead of uuids
Description:

	1) Put in an IdentityProxy object in the ExceptionResponse class.
	   This allows us to copy over the IdentityProxy object contained
	   in the exception caught by handlerequest() when thrown by the
	   command's execute() method, into the Response object that is
	   prepared to return an exception response to the calling API
	   invocation.

	2) Modified the GSON serialization method to conver the entire
	   exception object into JSON format and not just the error text.

	3) Modify the updateDomain API to populate the exception it throws
	   upon detecting a duplicate domain to include the tablename and
	   domain db id in the exception's IdentityProxy object.

	NOTE:
	1) We can modify the base exception classes and the ExceptionResponse
	   class to contain a list of IdentityProxy objects rather than a
	   single one.
	2) We will need to modify all commands such that wherever applicable
	   (wherever a db id is involved), they populate the IdentityProxy
	   object(s) before throwing an exception.
2012-05-01 13:28:19 +01:00
Vijayendra Bhamidipati b4cefb4cc6 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-05-01 13:28:16 +01:00
Vijayendra Bhamidipati efdaa4d110 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-05-01 13:21:44 +01:00
U-CITRITE\vijayendra1 89db087981 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-05-01 13:21:42 +01:00
anthony 2466e499c8 removed unused files 2012-05-01 13:18:28 +01:00
Alena Prokharchyk f8e32a5b05 bug 13860: Added async job types to Account/User Async api commands and more logging.
Reviewed-by: Kelven Yang
2012-05-01 13:16:24 +01:00
prachi 05ea7c99f5 Added instanceType to some async commands related to physical network
Reviewed-By: Alena Prokharchyk

Conflicts:

	api/src/com/cloud/api/response/AsyncJobResponse.java
	api/src/com/cloud/async/AsyncJob.java
2012-05-01 13:12:42 +01:00
Jessica Tomechak aa8d3bca8f Expand documentation of returned alert types in listAlerts API Reference page. 2012-05-01 13:08:22 +01:00
prachi 9a4f5f90a2 Fix error from merge 2012-04-30 17:08:36 -07:00
prachi 4902673fce Added the missing @Implementation annotation for the new API command MarkDefaultZoneForAccountCmd 2012-04-30 17:08:34 -07:00
Likitha Shetty 6ab04076b5 Implementation of api 'markDefaultZoneForAccount'(to enable a user to mark a zone as default for an account).
reviewed-by: prachi
2012-04-30 17:08:32 -07:00
Likitha Shetty 860aa58540 Fix RevokeSecurityGroupIngressCmd in AWSAPI to use responsename returned by CloudStack
reviewed by: prachi
2012-04-30 17:08:18 -07:00
Likitha Shetty c130768b94 DescribeSecurityGroup: Use String instead of Long for RuleId
RevokeSecurityGroupIngress: Match the response name that CloudBridge uses with that provided by Cloudstack
2012-04-30 17:08:15 -07:00
Nitin Mehta 6a056ad139 bug CS-10789: More changes for the imageformat, introdueced new column in db for the format, created scripts for doffernt hypervisors ...and the list goes on. 2012-04-30 11:14:43 +05:30
Nitin Mehta c2d51d7038 bug CS-10789: Adding more code changes for usage, delete volume . 2012-04-30 11:11:54 +05:30
Nitin Mehta 10b32ce882 bug CS-10789: Adding volume sync and delete functionality. 2012-04-30 11:11:26 +05:30
Nitin Mehta 8196132f68 bug CS-10789: Preliminary upload and attach changes work . 2012-04-30 11:09:37 +05:30
Nitin Mehta 2d7471adb5 Bug 10808: More changes for uploadVolume. Create framework for upload volume progress communication between MS and SSVM. 2012-04-30 09:46:23 +05:30
Nitin Mehta 02407c48f3 Bug 10808: Add Upload Volume api and do validation. 2012-04-30 09:43:23 +05:30
Alena Prokharchyk 4e3bdb62d2 Account specific vlan ranges - fixed deleteVlanRange
Conflicts:

	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
2012-04-24 17:16:58 -07:00
Salvatore Orlando 0cdfa7f943 Removing connectivity from service provider list 2012-04-24 02:20:39 +01:00
Salvatore Orlando fbd5edc2e3 Fix conflict resolution errors
Conflicts:

	api/src/com/cloud/network/ovs/OvsCreateTunnelAnswer.java
2012-04-24 02:20:39 +01:00
Salvatore Orlando cc344ad038 Adding DB support for interfaces OVS tunnel manager will use as GRE endpoints
Conflicts:

	server/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
2012-04-24 02:20:38 +01:00
Salvatore Orlando 275840bcdb Now using vnets instead of network id for creating networks
Fixed issues with vif scripts on 5.6FP1
Fixed ipv6 issue on 5.6FP1
Plus other various fixes and improvements

Starting to remove debug code
NOTE: Network is configured correctly but instances do not start. Possibly indefinite wait occuring on some commands

Conflicts:

	server/src/com/cloud/api/ApiResponseHelper.java
2012-04-24 02:20:38 +01:00
Salvatore Orlando 5cdd19152a Open vSwitch tunnel manager
Applying patch with new ovs-tunnel-manager on top of cloudstack oss-master
2012-04-24 02:20:38 +01:00
Salvatore Orlando 2d12cfbc87 Fixing remaining issues with per-VIF flow script and removing version-specific scripts.
Now generating XSnetwork names using gre keys

Plus other minor corrections

Conflicts:

	server/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
	server/src/com/cloud/resource/ResourceManagerImpl.java
2012-04-24 02:20:38 +01:00
Salvatore Orlando 58165221ef Now using vnets instead of network id for creating networks
Fixed issues with vif scripts on 5.6FP1
Fixed ipv6 issue on 5.6FP1
Plus other various fixes and improvements

Starting to remove debug code
NOTE: Network is configured correctly but instances do not start. Possibly indefinite wait occuring on some commands

Conflicts:

	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
	server/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java
2012-04-24 02:20:37 +01:00
Salvatore Orlando f786505a1b Adding Missing file to source control 2012-04-24 02:20:37 +01:00
Salvatore Orlando 8c398654d3 Open vSwitch tunnel manager
Applying patch with new ovs-tunnel-manager on top of cloudstack oss-master

Conflicts:

	api/src/com/cloud/network/ovs/OvsCreateTunnelAnswer.java
2012-04-24 02:20:37 +01:00
Kelven Yang 4d28e40c00 Hardening console proxy AJAX protocol to address security concerns 2012-04-19 12:07:35 -07:00
Alena Prokharchyk 1e8856efa0 CS-14512: fixed deployVm with ipToNetworkList when uuid is used for networkIds
Conflicts:

	server/src/com/cloud/api/ApiResponseHelper.java

Conflicts:

	server/src/com/cloud/api/ApiResponseHelper.java
2012-04-16 15:45:19 -07:00
Alena Prokharchyk 8bb5a96cbe CS-14297: added "forced" option to deleteStoragePool command. If forced=true, all destroyed volumes are marked as Expunged even when we can't reach primary storage at the moment of deletion. 2012-04-16 13:16:59 -07:00
Alena Prokharchyk 572abbf9d5 Added one more parameter - haHost(boolean) - to listHosts api command. The parameter identifies if the host is dedicated for ha only 2012-04-12 11:51:44 -07:00
Alena Prokharchyk b7f5bc099d bug 14622: introduced ha tagging for host
status 14622: resolved fixed
2012-04-09 15:17:13 -07:00
Alena Prokharchyk d3bca8df8f bug 14615: deployVm can work 2 diff ways now: 1) Default way - create and start the vm. 2) Create the vm without starting it. Note that vm's volumes stay in Allocated state -not created on the backend till the point where vm starts
status 14615: resolved fixed
2012-04-06 11:30:26 -07:00
Alena Prokharchyk 07778f8db3 Code cleanup for createVlanRange api 2012-04-04 15:02:51 -07:00
Alena Prokharchyk 0bd655f79b bug 14539: 1) introduced 2 new config parameters defining default offerings for ssvm and cpvm - consoleproxy.service.offering and secstorage.service.offering
2) Added new api - changeServiceForSystemVm - to support service offering upgrade for system vms
3) Removed global config parameters that are not in use anymore: consoleproxy.ram.size, consoleproxy.cpu.mhz, secstorage.vm.ram.size, secstorage.vm.cpu.mhz
2012-04-03 10:51:35 -07:00
frank 72d284de7d Switch to Apache license 2012-04-03 04:54:14 -07:00
Alena Prokharchyk 8fa14c7200 bug 14559: podId is required parameter in addCluster api
status 14559: resolved fixed

Conflicts:

	server/src/com/cloud/resource/ResourceManagerImpl.java
2012-03-30 10:38:48 -07:00
Alena Prokharchyk 4cf8954d37 bug 14599: initialize errorString to not null value to ensure valid json response even in case when api server doesn't reset errorString while forming the response. 2012-03-30 10:16:51 -07:00
kishan e1a3c3cbaa Added version for APIs changed in 3.0.1
Reviewed-By: Nitin
2012-03-28 14:35:31 +05:30
kishan 8a794c1276 Added since version to API response docs
Reviewed-By: Nitin
2012-03-28 14:35:13 +05:30
Nitin Mehta 277c0c8bca Bug 14490: Fix NPE in ListCapacity 2012-03-24 16:32:48 +05:30
Alena Prokharchyk e9bb106527 bug 14439: added search by name/description to listGuestOS and listGuestOSCategories apis
status 14439: resolved fixed
reviewed-by: Frank Zhang
2012-03-22 11:33:11 -07:00
prachi 64311cc3ab Bug 14299 - Fix adding public ip range per account
Changes:
Fixed as described in the bug.

* CreateVlanIpRangeCmd still accept account/domainId info
* if account owns:
- one Isolated network with source nat service enabled, use this network
- more than one Isolated network with source nat service enabled - error out
- none Isolated networks with source nat service enabled, create it only in
case when there is an Isolated network offering with Availability=Required and
source nat service enabled.
2012-03-21 16:46:13 -07:00
Alena Prokharchyk 7964665cb4 bug 14388: don't return console proxy / ssvm service offerings
status 14388: resolved fixed
2012-03-19 14:52:11 -07:00