104 Commits

Author SHA1 Message Date
Alex Huang
c1c952b42b should have used non url safe 2012-08-07 16:58:16 -07:00
Alex Huang
a6a864a1a8 Removed Base64 file and use the apache version 2012-08-07 15:41:54 -07:00
Chip Childers
8f71a2927f License header updates for the server folder. 2012-07-02 08:58:10 -04:00
saksham
f6d16d0ab5 CS-15018: Event USER.LOGIN should contain the client IP address. Changes made in accordance with the coding convention.
Reviewed-by: Alena Prokharchyk
2012-06-18 10:18:30 -07:00
frank
2f634c0913 Switch to Apache license 2012-04-03 04:50:05 -07:00
prachi
e43914ab58 Bug 14336 - Login API does not return UUID's
Changes done:
- Provide UUID for userid and domainid only while constructing the login response. Session will hold the DB id's as before, to ensure other parts keep working.
- This reverts commit de28aa3ddde5b601f2f234f2eccef871fbaf1a06.
2012-03-20 16:59:04 -07:00
prachi
a5d7cd3d51 Bug 14336 - Login API does not return UUID's
Changes:
- login API now returns back UUID for user and domain
2012-03-20 16:59:02 -07:00
prachi
280d533a6f Bug 14047 - login API fails when UUID is used for domain_id
Changes:
- API should accept UUID for domain and convert to id when needed
2012-03-20 16:59:00 -07:00
Alena Prokharchyk
e53cfeceb6 bug 14379: don't enable 8096 port by default (set global config variable to null by default, and don't create a listener on this port unless its set to valid integer) 2012-03-19 16:19:38 -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
e5b4cf5cf1 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-02-27 17:54:58 -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
Alena Prokharchyk
294d3a2fda Code format fixes 2012-02-10 15:10:21 -08:00
Alena Prokharchyk
1490e45a1c Fixed format style in a bunch of files (replaced tabs with spaces as a part of it) 2012-02-03 13:49:11 -08:00
Alena Prokharchyk
c581506103 bug 12306: list* command revamp 2012-01-09 10:07:42 -08:00
Alena Prokharchyk
0731dac370 bug 12399: introduced periodic thread that expires Project invitations
status 12399: resolved fixed
2011-12-09 12:21:41 -08:00
prachi
0769a3b3f3 API Server changes needed to read a properties file present within a jar provided in classpath. 2011-11-29 18:02:19 -08:00
Alex Huang
f6fcaa49ec Merge complete except for virtualnetworkappliancemanager 2011-11-10 15:18:16 -08:00
Alena
0785b64306 bug 11923: don't expose command name in the exception response when command is not available
status 11923: resolved fixed
reviewed-by: Will Chan
2011-11-07 18:00:33 -08:00
Kelven Yang
9489d6ffeb 1) Fix a serialization problem in command inherits AsyncCreateCommand.
2) Deal with special IDs (i.e. -1) in UUID translation
2011-11-07 18:00:14 -08:00
Kelven Yang
7e9b210d5c bug 6745: Fix problems in Async create commands 2011-11-03 07:34:02 -07:00
prachi
8570b25506 NAAS: APIServer changes to introduce framework to read commands from pluggable components having separate commands.properties file
Changes:
- Added a new interface 'PluggableService'
- Any component that can be packaged separately from cloudstack, can implement this interface and provide its own property file listing the API commands the component supports
- As an example have made VirtualNetworkApplianceService pluggable and a new configureRouter command is added
- ComponentLocator reads all the pluggable service from componentLibrary or from components.xml and instantiates the services.
- As an example, DefaultComponentLibrary adds the pluggable service 'VirtualNetworkApplianceService'
- Also components.xml.in has an entry to show how a pluggable service can be added, but it is commented out.
- APIServer now reads the commands for each pluggable service and when a command for such a service is called, APIServer sets the required instance of the pluggable service in the coomand.
- To do this a new annotation '@PlugService' is added that is processed by APIServer. This eliminates the dependency on the BaseCmd to instantiate the service instances.
2011-10-11 17:34:57 -07:00
alena
a1331d1cfc Intermidiate checkin to Project feature:
1) Introduce new managers - ProjectManager and DomainManager. Moved all domain related code from AccountManager to DomainManager.
2) Moved some code from ManagementServerImpl to the correct managers.
3) New resource limit for Domain - Project
2011-09-20 18:35:28 -07:00
alena
b883b25a12 bug 11348: make content type for "json" files configurable
status 11348: resolved fixed
2011-09-07 14:22:01 -07:00
kishan
066537a565 bug 4282: Removed caching of signatures. Added detailed error message expires parameter parsing 2011-09-07 17:51:09 +05:30
alena
39b78ee17c bug 11298: give detailed error message when failed to authenticate a user
status 11298: resolved fixed
2011-08-30 16:51:45 -07:00
kishan
83991a8494 bug 4282: Storing signatures cache using ehcache. ToDo- Relicate cache for clustered mgmt server setup 2011-08-12 20:27:20 +05:30
kishan
219336e07c bug 4282: Initial Checkin. Added new parameters expires, signatureversion. Checking expires time and storing used signatures in-memory locally implemented. 2011-08-10 19:52:43 +05:30
frank
6aaf3d5ae0 Merge branch 'cvm'
Conflicts:
	api/src/com/cloud/api/BaseCmd.java
	api/src/com/cloud/storage/Storage.java
	cloud.spec
	core/src/com/cloud/storage/template/DownloadManagerImpl.java
	server/src/com/cloud/agent/manager/AgentManagerImpl.java
	server/src/com/cloud/configuration/DefaultComponentLibrary.java
	server/src/com/cloud/deploy/FirstFitPlanner.java
	server/src/com/cloud/host/dao/HostDao.java
	server/src/com/cloud/storage/StorageManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/src/com/cloud/vm/VirtualMachineManagerImpl.java
	utils/src/com/cloud/utils/SerialVersionUID.java
2011-08-08 14:14:09 -07:00
alena
daad9e4b81 Keep "encode.api.response" parameter in ApiServer class; initialize it as a part of init() method 2011-06-21 11:05:57 -07:00
Frank
379cbc1d55 Store all parameters of url call to BaseCmd.fullUrlParams so there will be no
changes in future API because all parameters can be retrieve from API command itself
2011-06-08 10:25:15 -07:00
alena
3d3bfcddaa bug 9858: added missing security checks to listAsyncJobs command
status 9858: resolved fixed

Conflicts:

	server/src/com/cloud/api/ApiServer.java
2011-05-21 15:00:50 -07:00
Chiradeep Vittal
303e2a7481 Start of zonesfeature / mycloud/cloudkit 2011-05-03 10:40:17 -07:00
alena
b7e4ec1749 bug 9564: 1) For all list commands set pageSize() to default.page.size if not specified 2) When pageSize is specified in the request, and it's more than default.page.size - throw an exception
status 9564: resolved fixed
2011-04-29 16:57:38 -07:00
will
633d024b7c - Merge all CloudZones Registration feature into master 2011-04-28 16:05:36 -07:00
alena
c7e120a72e Transform InvalidParameterValueException and PermissionDeniedException to proper API exceptions 2011-04-19 17:07:05 -07:00
Frank
92155522f2 Add license header to files 2011-04-14 11:23:14 -07:00
Alex Huang
075fba5899 stackmaid is now taskmanager 2011-04-05 10:17:22 -07:00
alena
af4459f24f Fixed list* api commands. 2011-04-04 11:36:49 -07:00
alena
2aeacd5a4c bug 3179: added "count" parameter to the response to all List* api commands 2011-04-01 19:29:08 -07:00
alena
2af8b32d31 bug 9245: save ownerAccountId (instead of callerAccountId) to account_id field in async_job table. We already save caller info to user_id field
status 9245: resolved fixed
2011-03-31 15:27:35 -07:00
nit
ded1184548 bug 8710: Introducing a new user role in cloudstack called RESOURCE_DOMAIN_ADMIN. The role would have all the domain_admin rights and the rights to list zone,pods,clusters and so on. More info in the bug 2011-03-25 18:04:09 -07:00
alena
7dce8412e4 Fixed API xml doc generation 2011-03-23 12:12:29 -07:00
alena
d3f04b2b38 bug 8945: introduced "default.page.limit" config param (default value is 500). Used for pagination in API list* commands.
status 8945: resolved fixed
2011-03-15 15:06:52 -07:00
alena
e4765fb32b bug 6969: return jobId/jobStatus for IpAddress and SecurityGroup as ids for these objects were introduced in 2.2.x 2011-02-22 09:09:55 -08:00
alena
a05400604b bug 8565: throw unsupported error code when non existing api command is sent
status 8565: resolved fixed
2011-02-15 16:01:09 -08:00
abhishek
f0f643dffe adding exceptions so that we can use login and logout commands via 8080 2011-02-08 14:06:33 -08:00
alena
6f55c4dd7e bug 8270: Synchronize on 1) ipAddress object when create/delete ipForwarding/portForwardingRule and vpn service 2) on networkId when assignTo/removeFrom/deleteLoadBalancer
status 8270: resolved fixed
2011-02-03 18:45:49 -08:00