1413 Commits

Author SHA1 Message Date
Nitin Mehta
4434aa0d2d 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-23 13:44:34 +05:30
Nitin Mehta
14adf23700 bug CS-10789: Adding more code changes for usage, delete volume . 2012-04-23 13:42:53 +05:30
Nitin Mehta
ac2175bdbc bug CS-10789: Adding volume sync and delete functionality. 2012-04-23 12:29:38 +05:30
Nitin Mehta
54956280e6 Preliminary upload and attach changes work .. 2012-04-23 12:28:36 +05:30
Nitin Mehta
564cef8ddf More changes for uploadVolume. Create framework for upload volume progress communication between MS and SSVM. 2012-04-23 12:14:35 +05:30
Kelven Yang
c5083787c2 Hardening console proxy AJAX protocol to address security concerns 2012-04-19 12:10:33 -07:00
Alena Prokharchyk
03ccb7f313 CS-14512: fixed deployVm with ipToNetworkList when uuid is used for networkIds
Conflicts:

	server/src/com/cloud/api/ApiResponseHelper.java
2012-04-16 15:43:56 -07:00
Alena Prokharchyk
662a234916 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.
Conflicts:

	api/src/com/cloud/api/commands/StopVMCmd.java
2012-04-16 13:22:46 -07:00
Alena Prokharchyk
676a28177b Added one more parameter - haHost(boolean) - to listHosts api command. The parameter identifies if the host is dedicated for ha only
Conflicts:

	server/src/com/cloud/api/ApiResponseHelper.java
2012-04-12 11:50:36 -07:00
Alena Prokharchyk
98fd5cf959 bug 14622: introduced ha tagging for host
status 14622: resolved fixed

Conflicts:

	server/src/com/cloud/host/dao/HostDao.java
2012-04-09 15:18:01 -07:00
David Nalley
d5377b0ae3 more line ending fixes 2012-04-06 22:51:32 -04:00
Alena Prokharchyk
2d1a6b0b35 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:48 -07:00
Alena Prokharchyk
c0130a5c41 Code cleanup for createVlanRange api 2012-04-04 15:03:04 -07:00
Alena Prokharchyk
b14bac0977 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:52:32 -07:00
frank
2f634c0913 Switch to Apache license 2012-04-03 04:50:05 -07:00
Alena Prokharchyk
a4e8133b78 bug 14559: podId is required parameter in addCluster api
status 14559: resolved fixed
2012-03-30 10:37:14 -07:00
Alena Prokharchyk
1e0d976dc5 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:22:51 -07:00
kishan
026641f48c Added version for APIs changed in 3.0.1
Reviewed-By: Nitin
2012-03-28 14:36:32 +05:30
kishan
57f935ca03 Added since version to API response docs 2012-03-27 11:12:59 +05:30
Nitin Mehta
a78537398c Bug 14490: Fix NPE in ListCapacity 2012-03-24 16:24:51 +05:30
Nitin Mehta
a5a7be4c7e Bug 10808: Add Upload Volume api and do validation. 2012-03-24 13:59:59 +05:30
Alena Prokharchyk
15019d1e5c 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:22 -07:00
prachi
45c7ad63bf 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:52:32 -07:00
Alena Prokharchyk
fec3a87d09 bug 14388: don't return console proxy / ssvm service offerings
status 14388: resolved fixed
2012-03-19 14:50:09 -07:00
Alena
eab2a0c5b8 bug 14338: podId is required in addHost command
status 14338: resolved fixed
2012-03-16 16:03:48 -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
b1bb0afad4 Bug 13127: API error text refer to database ids instead of uuids
Description:

	Modifying the API functions' exception handling to call
	addProxyObject() wherever applicable, and removing some
	wrong calls to addProxyObject() that were put in in an
	earlier commit for this bug.

	With this commit, we cover many API functions to use the
	new exception handling code, but some pieces may still be
	left out. These will be covered as work in progress, when
	making changes to the CS API code.
2012-03-12 18:05:45 -07:00
Sheng Yang
ec5a225a78 Refactor VirtualRouterNetworkManagerImpl
Refactor applyDhcpEntry and applyUserData to use applyRules framework.
2012-03-12 16:10:48 -07:00
Alena Prokharchyk
ad1192e264 bug 14239: limit number of Isolated account specific networks per account
status 14239: resolved fixed

Conflicts:

	api/src/com/cloud/api/commands/CreateNetworkCmd.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/test/com/cloud/network/MockNetworkManagerImpl.java
2012-03-12 15:53:30 -07:00
Alena Prokharchyk
251af27a7a bug 14247: implemented search by storage id in listSystemVms
status 14247: resolved fixed
2012-03-12 10:24:48 -07:00
abhi
2b437f6a12 adding remove cmd for ldap 2012-03-12 16:56:43 +05:30
abhi
ecad50c801 bug 14151,14153: configuration variables are now hidden; added ldapRemove command 2012-03-12 16:50:00 +05:30
Alena Prokharchyk
6910740582 Revert "bug 14151,14153: configuration variables are now hidden; added ldapRemove command"
Reverting the commit in order to fix the build
This reverts commit 0ab0fcfa5c3b8825b8a92e3c2d2dee8e8ca6152b.
2012-03-09 09:53:56 -08:00
abhi
b7b751fdf6 bug 14151,14153: configuration variables are now hidden; added ldapRemove command 2012-03-09 16:56:01 +05:30
Alena Prokharchyk
87f2480b09 Fixed upload custom certificate api broken due to default api field length restriction 2012-03-07 15:33:08 -08:00
Alena Prokharchyk
f3935d667f bug 14156: return instancename parameter in userVm response to ROOT admin only 2012-03-06 13:39:13 -08:00
prachi
5148145d18 Bug 14028 - Add hostid parameter to StartVmCmd to enable admins to start VM on a particular host
Changes:
- Added hostid to StartVMCmd. Only root admin can use it.
2012-03-05 17:50:23 -08: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
83101a752f 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-02-27 17:55:06 -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
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
Alena Prokharchyk
867db1ae5e Don't initialize the logger in AsyncJobResponse class 2012-02-27 14:22:58 -08:00
Alena Prokharchyk
856418e700 bug 13860: Added async job types to Account/User Async api commands and more logging.
Reviewed-by: Kelven Yang
2012-02-27 10:36:17 -08:00
Alena Prokharchyk
75bbefec63 More details to api doc
Reviewed-by: Jessica Tomechak
2012-02-24 16:12:17 -08:00
Alena Prokharchyk
f03fc196ad bug 13961: always return NetworkUsageAnswer from the networkUsageCommand
status 13961: resolved fixed
Reviewed-by: Alex Huang
2012-02-23 11:15:38 -08:00
Alena Prokharchyk
6b9abf832b bug 13944: when delete the account, expunge detached volumes on the backend
status 13944: resolved fixed
Reviewed-by: Frank Zhang
2012-02-22 17:59:22 -08:00