alena
c5d78a726e
Modified exception handing in API. Following exceptions are supported now (location - BaseCmd.java):
...
* MALFORMED_PARAMETER_ERROR - when type of the request parameter is invalid (String instead of Long for id for example)
* PARAM_ERROR - when invalid parameter value is specified in api request. For example, id of non existing vm for StartVmCmd
* ACCOUNT_RESOURCE_LIMIT_ERROR - when user tries to exceed his resource limits by executing the api command.
* INSUFFICIENT_CAPACITY_ERROR - when resource fails to create/start due to insufficient capacity.
* RESOURCE_UNAVAILABLE_ERROR - when user tries to create a vm when storage is not available.
* RESOURCE_IN_USE_ERROR - when user tries to delete/modify resource while it's in use. For example, when we try to delete a network group when it contains ingress rules.
* NETWORK_RULE_CONFLICT_ERROR - when LB/PF rule to add conflicts with existing rule
* ACCOUNT_ERROR - when user is not authorized to execute operation on the resource.
* INTERNAL_ERROR
2010-11-16 11:56:34 -08:00
alena
5fafef9970
More api refactor - build api response is execute() method instead of getResponse method.
2010-11-09 09:58:05 -08:00
alena
1c24deda34
1) Refactored current Apis not to use reflection for method invocation. In new version following has to be done:
...
* Implement callCreate() and execute() methods in apis extending BaseAsyncCreateCmd (example - CreateVolumeCmd)
* Implement execute() method in apis extending BaseCmd and BaseAsyncCmd (example - deleteVolumeCmd and deleteUserCmd)
We no longer need createMethod(), method(), manager() fields in @Implementation annotation, cleanup has to be done.
2) Moved Account/User related methods to AccountManagerImpl. Methods are exposed via AccountService interface.
3) Enhanced exception handing for Api calls.
4) Created ConfigurationService interface, all Api config methods are exposed via it.
2010-11-08 11:27:36 -08:00
will
05ab3bf673
bug 7063: AsyncJobResult should now return the correct success and error tags upon the completion of a async job. It should now follow either the format ... jobresult.success or jobresult.errorcode and jobresult.errortext
...
- Fixed a lot of other Async related packaging issues. It's not all done but will continue to refactor this later.
2010-11-05 17:30:03 -07:00
Alex Huang
e27bb550fe
Harmony among gurus
2010-11-03 21:18:31 -07:00
Alex Huang
560d7a275e
Removed InternalErrorException. Renamed the lock methods on the DAO objects to be more understandable.
2010-11-02 12:25:08 -07:00
Alex Huang
3279c26796
Removed a bunch of InternalErrorException
2010-11-02 12:25:08 -07:00
kishan
3a0f30a049
bug 6408: remove security groups/port forwarding service in virtual network case
...
status 6408: resolved fixed
2010-11-01 14:28:03 +05:30
Kris McQueen
484f334d7a
bug 6799: if there's an exception executing the Async command, create an error response with the appropriate information so that queryAsyncJobResult returns the relevant information
...
status 6799: resolved fixed
2010-10-27 18:23:23 -07:00
Kris McQueen
e63d17dd41
bug 6739: stopSystemVm needs to return the appropriate VM instance type. The manager methods were returing VMInstanceVO, which is not sufficient for getting, for example, active viewer sessions from the console proxy object. Make sure the right VO object is returned, and all the data should be available for the API to generate a full response.
...
status 6739: resolved fixed
2010-10-26 17:33:53 -07:00
Kris McQueen
a788d2cb2e
bug 6736: rebootSystemVm should return the vm properties, not success true/false.
...
status 6736: resolved fixed
2010-10-26 17:19:55 -07:00
Alex Huang
2bc938c3f8
checkins for problems.
2010-10-26 09:35:24 -07:00
nit
497c60d63d
Extending extract functionlity for volumes to allow download. The
...
extraction can have two modes FTP_UPLOAD and HTTP_DOWNLOAD. In the former one
the user would provide the ftp url where the entity needs to be uploaded and in
the later the user would be provided a HTTP URL where from he/she can download
the entity. This url would be exposed for a specific time limit and would not
function after the time limit
2010-10-26 18:49:43 +05:30
Kris McQueen
e6f7a480ae
bug 6674: Fix VM responses
...
- ostypeid -> guestosid
- findRootVolume is now in ApiDBUtils (from mgmt server) since it's for API responses only
- add rootdeviceid and rootdevicetype to various VM respones (listVirtualMachines, deployVirtualMachine, start/stopVirtualMachine)
status 6674: resolved fixed
2010-10-22 13:57:03 -07:00
nit
6723549fc7
bug 6399: extending extract functionlity for templates and ISO's to allow download. The extraction can have two modes FTP_UPLOAD and HTTP_DOWNLOAD. In the former one the user would provide the ftp url where the entity needs to be uploaded and in the later the user would be provided a HTTP URL where from he/she can download the entity. This url would be exposed for a specific time limit and would not function after the time limit.
2010-10-20 11:40:03 +05:30
Kris McQueen
8e086d7a21
resolving merge conflicts between 2.1.refactor and master
2010-10-12 16:28:16 -07:00
Kris McQueen
2740ba6c40
final merge of master->2.1.refactor preparing for merge back into master
2010-10-12 14:46:24 -07:00
Alex Huang
ce091de3d2
more changes for refactor
2010-10-12 07:17:47 -07:00
nit
09768ca751
bug 5363: Adding Scheduled and Started event for SNAPSHOT.CREATE.
...
status 5363: resolved fixed
2010-10-04 19:51:19 +05:30
edison
26807bc701
bug 6362: Need to call guestos.getDisplayName to the guest os name now.
...
status 6362: resolved fixed
2010-09-30 12:26:37 -07:00
edison
7615f569ff
after rebase, fix bugs
2010-09-29 18:41:55 -07:00
edison
6fc7528809
create data volume is splitted into two stage:
...
1. create a volume entry in the database,
2. when user attaching the volume to a VM, then actually create the volume on storage pool.
2010-09-29 18:41:54 -07:00
edison
9e0f57bc0e
change code for new UI
2010-09-29 18:40:52 -07:00
edison
8943cc6745
create volume
...
Conflicts:
api/src/com/cloud/vm/VmCharacteristics.java
core/src/com/cloud/dc/ClusterVO.java
core/src/com/cloud/server/ManagementServer.java
server/src/com/cloud/network/NetworkManager.java
server/src/com/cloud/storage/allocator/AbstractStoragePoolAllocator.java
2010-09-29 18:40:51 -07:00
Kris McQueen
9e2d1f5e70
Refactoring disableUser and disableAccount to new API framework (they are both async commands).
2010-09-29 13:57:26 -07:00
anthony
319d4f1aa0
snapshot redesign
...
1. use full snapshot and delta snapshot, there are maxsnashot/2 of delta snapshot between two full snapshot
2. only support one policy for one volume
3. remove all coleases in secondary storage.
2010-09-28 18:37:46 -07:00
Kris McQueen
848ce60097
Merging master into 2.1.refactor, resolve the merge conflicts as best I can. New commands related to extracting template/iso/volume and related to instance groups were refactored to the new API framework.
2010-09-28 15:47:14 -07:00
nit
27a32380f2
bug 5360: Adding scheduled and started events for USER.DELETE.
...
status 5360: resolved fixed
2010-09-27 20:39:05 +05:30
Kris McQueen
62257d4021
Fix serializing async job responses by writing a custom adapter for ResponseObjects. Improve exception handling when calling async commands (the job still needs to complete, but with FAILED status).
2010-09-24 13:52:35 -07:00
Kris McQueen
2a4ddac41a
Change getResponse() to return a ResponseObject so that the caller can choose how to serialize. This in in preparation for serializing the async commands to the database with class information and deserializing them into the ResponseObject itself when queryAsyncJobResult is called. Once the ResponseObject is deserialized, the proper string can be returned to the caller.
...
The previous behavior had the JSON response from the command embedded into the queryAsyncJobResult response as a string rather than a JSON object which prevented the client from being able to read the response. With this new behavior an actual JSON object should be returned which can then be parsed on the client side.
2010-09-23 17:34:28 -07:00
abhishek
188711c18d
bug 6236: fixing some more api issues, this time with the stopped vm.
...
status 6236: resolved fixed
2010-09-23 16:21:10 -07:00
abhishek
24dd41f9d0
some api changes to enable vm functioning
2010-09-23 16:09:21 -07:00
abhishek
eee7c2c97e
bug 6212: returning a whole bunch of new params in the api response
...
status 6212: resolved fixed
2010-09-23 15:36:19 -07:00
abhishek
29f8c5d94c
bug 6217: incremental checkin
2010-09-23 14:55:13 -07:00
abhishek
5d97c029bf
bug 6217: incremental checkin
2010-09-23 14:55:13 -07:00
abhishek
2d67815ddf
bug 6239: some changes to the router api
...
status 6239: resolved fixed
2010-09-23 10:23:03 -07:00
abhishek
29bf0cd718
bug 6238: fixing some api issues with the deploy vm cmd
...
status 6238: resolved fixed
2010-09-23 10:05:56 -07:00
abhishek
32884572b9
bug 6241: incremental checkin
2010-09-22 15:32:42 -07:00
nit
8b23507f68
bug 6270: Fixed DeleteTemplate so that QueryAsyncJob API returns jobresulttype and jobresult values as well on a successful Deletion of the template.
...
status 6270: resolved fixed
2010-09-22 15:36:38 +05:30
Kris McQueen
c32d6e7524
Template id is not a required parameter when listing templates. The proper serialized name for the async job id is jobid, not id. Sadly, ctxAccoutId != ctxAccountId, ugh, no wonder the UserContext wasn't getting set up correctly. Clean up some miscellaneous unnecessary casts.
2010-09-21 17:00:50 -07:00
nit
0669c2c1d4
Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss
2010-09-21 13:37:47 +05:30
nit
7ff551bd5c
bug 4286: Extract functionality - code cleanup
2010-09-21 13:36:57 +05:30
abhishek
a9c96b4da0
bug 3120: incremental checkin
2010-09-20 14:54:06 -07:00
nit
33e683e2c7
bug 4286: Making ExtractVolumeCommand async and some code cleanup
2010-09-19 18:34:12 +05:30
nit
3b8c811143
bug 4286: Making ExtractVolumeCommand async and some code cleanup
2010-09-19 18:33:47 +05:30
Kris McQueen
e2e0e76063
More work on serializing responses. Now responses have to have the name set on them, and the name will eventually be serialized to the JSON/XML response the way it used to work for commands themselves [the result of cmd.getName() was written to the response string]. For list respones, we wrap the individual objects in a ListResponse object that has the name of the response, and the individual objects have the object name so that accounts will be something like <listaccountsresponse><account><...></account><account><...></account></listaccountsresponse>.
2010-09-17 17:13:04 -07:00
Kris McQueen
4a73639d67
Fix up setting the response object correctly after dispatching the api method call. Begin working on the serialization of the responses which don't include the command name just yet, that's coming.
2010-09-17 14:56:55 -07:00
Kris McQueen
d7b6ccd056
Comment out code in executors during the transition to the new API framework. The code is being left around for reference during testing/debugging of the new framework and will be removed in the future.
2010-09-17 11:13:29 -07:00
nit
636dc041c7
bug 4286: Making extractIsoCmd and extractTemplateCmd async
2010-09-17 17:04:07 +05:30
nit
fceb9378ca
bug 4286: Making extractIsoCmd and extractTemplateCmd async
2010-09-17 16:59:09 +05:30