21 Commits

Author SHA1 Message Date
Kris McQueen
95da86ef1a bug 6733: re-throw ServerApiExceptions when dispatching API commands rather than logging them and throwing a generic INTERNAL_ERROR exception
status 6733: resolved fixed
2010-10-26 16:54:42 -07:00
abhishek
c6588c0e25 adding some error return handling to api dispatcher, and cleaning up some of the code paths to return the right error messages 2010-10-26 14:27:26 -07:00
Jessica Wang
958aaaaf87 new UI - instance page - refactor submenu. 2010-10-22 20:23:05 -07:00
Alex Huang
25e4ed6997 more changes in the api 2010-10-21 16:53:42 -07:00
Alex Huang
d5d8f27cad Added more changes to the api 2010-10-21 15:11:49 -07:00
abhishek
7c11c04427 reverting the change for bug 6361; this was an accidental push instead of commit 2010-10-19 15:21:01 -07:00
abhishek
523862f571 bug 6361: further name changes from network to security group 2010-10-19 14:35:17 -07:00
Kris McQueen
8e086d7a21 resolving merge conflicts between 2.1.refactor and master 2010-10-12 16:28:16 -07:00
Kris McQueen
9c593352d0 Fixing events for async jobs so that there's a scheduled event recorded with appropriate type/description whenever the API framework schedules the async command to run. A few miscellaneous fixes as well uncovered during regression testing (router response was not parsed correctly by UI, etc.) 2010-10-05 20:26:18 -07:00
Kris McQueen
41a16a478a Fixes required for regressions found running automated tests. (1) method signatures that weren't properly refactored to new API framework (2) API request parameter types should always be specified lest they default to String which may or may not be desired (3) better exception handling with regard to Queued commands and generic exceptions (4) fix eventing to pass the proper accountId where neccessary 2010-10-01 14:11:18 -07:00
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
c26426c7c7 Throw an exception when the dispatcher can't find the implementation for an API command. 2010-09-21 18:26:57 -07:00
Kris McQueen
12ef5106b6 Fixing serialization of JSON responses to handle both regular objects and list-style responses. Add missing managers to API dispatcher. Fix a typo in listAlerts command implementation method. Add signatures for various add host/storage APIs. 2010-09-20 15:20:32 -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
3f6a438d92 Refactoring the AsyncJobManager to queue jobs appropriately if there is a need to synchronize execution on an object, e.g. a router. API developers can now call command.synchronizeCommand(String, Long) to force the command to be synchronized on a particular object type [the string arg] with a particular id [the long arg]. When synchronizeCommand() is invoked, an exception maybe thrown by the framework (AsyncCommandQueued exception) to force the business logic to abort. The command will then be queued and invoked at the appropriate time. The synchronizeCommand() is re-entrant and will be a no-op if the command has already been queued and is now ready for execution. 2010-09-16 19:05:06 -07:00
Kris McQueen
dbb2897626 Unexposed parameters can now be assigned to commands. This are for internal use of the command, and will be serialized/deserialized during execution/response phases, but will not be accepted as part of the API request. Also create a DB utility file for the API to use which delegates requests to the DAOs. Mostly this utility class will look up objects by ID, and it allows the removal of similar methods from ManagementServer, thereby reducing some of the clutter in ManagementServer. 2010-09-14 14:54:04 -07:00
Kris McQueen
f4caf145c3 Refactoring dispatching API commands from the scheduled async job. Instead of calling an executor, the dispatcher invokes the method on the manager directly. After the command is executed the response is serialized to the async job table so it can be queried later. Also serialize a response for async create commands that includes the id of the object being created. 2010-09-13 18:28:19 -07:00
Kris McQueen
da03aee028 Add snapshot manager to the list of managers that can be invoked through the API. This prepares the way for refactoring createSnapshot, but since the method is an async create that also needs to create a policy first and generally does not follow any other patters, I'll do this one last. 2010-08-18 19:08:23 -07:00
Kris McQueen
21ab91dc2c refactoring CreateNetworkGroup API command to new API framework 2010-08-17 19:07:00 -07:00
Kris McQueen
96f76062f9 Moving createDiskOffering to configurationManager, make AssignToLoadBalancer async 2010-08-11 19:32:09 -07:00
Manuel Amador (Rudd-O)
ac730ec496 Branch 2.1.refactor committed 2010-08-11 09:13:42 -07:00