1381 Commits

Author SHA1 Message Date
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
prachi
e37732c4de Bug 13766 - VMs are still running after disabling the zone
Reviewed-by: Sheng Yang

Changes:
- Do not check if allocation_state is 'Enabled' in planner if the caller is Root Admin.
- This should let Root Admin create a VM in a disabled Zone.
2012-02-22 17:34:00 -08:00
Alena Prokharchyk
798accae10 Added isTagged parameter to listNetworkOfferings api. When set to true, it will return offerings with not null tag values
Reviewed-by: Jessica Wang
2012-02-22 16:09:35 -08:00
Alena Prokharchyk
df7439eca2 bug 13928: more description to migrateVm api
status 13928: resolved fixed
Reviewed-by: Jessica Tomechak
2012-02-22 15:07:19 -08:00
Alena Prokharchyk
2992c608c4 bug 13919: do includingRemoved Nic search when remove firewall rules during the vm expunge
status 13919: resolved fixed
Reviewed-by: Sheng Yang
2012-02-21 18:02:44 -08:00
Alena Prokharchyk
2e9511e2ae Changed isElastic to isSystem for the publicIpAddress assigned during the vm deployment in EIP enabled network
Reviewed-by: Chiradeep
2012-02-21 15:39:49 -08:00
Alena Prokharchyk
12b79da6c2 bug 13903: return vm's hostName as a displayName when displayName is null in bunch of api responses
status 13903: resolved fixed
Reviewed-by: Kelven Yang
2012-02-21 10:46:00 -08:00
frank
65351fd1ce Bug 13809 - Unable to execute API command deletestoragenetworkiprange due to invalid value. Object dc_storage_network_ip_range(uuid: undefined) does not exist.
status 13809: resolved fixed
reviewed-by: Sheng Yang
2012-02-17 16:24:38 -08:00
frank
a1fa313902 Bug 13568 - secondary storage VM's static route for nfs server breaks things!
status 13568: resolved fixed
reviewed-by: Sheng Yang
2012-02-17 16:24:32 -08:00
prachi
7181fed101 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-02-17 15:41:34 -08:00
Alena Prokharchyk
31a3b878a3 bug 13864: for elastic IP address return the purpose (staticNat or Lb) in listPublicIpAddresses api response
Reviewed-by: Frank
2012-02-17 15:42:21 -08:00
Alena Prokharchyk
4d27f3c44b bug 13866: return publicIp info in listVms api response when vm is linked to public ip via static nat
Reviewed-by: Frank
2012-02-17 15:42:17 -08:00
Alena Prokharchyk
cf28936b5f bug 13860: set entity type in a bunch of async api commands
status 13860: resolved fixed
Reviewed-by: Prachi Damle
2012-02-17 14:16:13 -08:00
Edison Su
39403e845b bug 13843: storageid is mandatory
status 13843: resolved fixed
Reviewed-by: frank
2012-02-17 13:04:48 -08:00
Jessica Tomechak
458058bc87 Expand documentation of returned alert types in listAlerts API Reference page. 2012-02-17 04:22:04 -08:00
abhi
1d96a17698 bug 13812: throw error if addition of host fails 2012-02-17 16:27:29 +05:30
kishan
ced6fd46b8 Bug 12954: Added usage for security groups. Usage will be generated for each security group that is assigned to a Vm.
Status 12954: resolved fixed
Reviewed-By: Nitin
2012-02-17 13:50:18 +05:30
anthony
61603335b2 bug 13810: by default, remove local storage when host is removed
status 13810: resolved fixed

reviewed-by : edison
2012-02-16 18:27:40 -08:00
Alena Prokharchyk
5e9a15c07d bug 13708: make a search by traffic type when locate physical network in the zone
status 13708: resolved fixed
reviewed-by: Prachi Damle
2012-02-14 12:47:33 -08:00
Alena Prokharchyk
5446826a2f Added instanceType to some physical network async commands
Reviewed-by: Kelven Yang
2012-02-14 12:47:26 -08:00
Alena Prokharchyk
294d3a2fda Code format fixes 2012-02-10 15:10:21 -08:00
Nitin Mehta
b2c7986ba3 Bug 13059: Remove topused flag.
Reviewed-By: Kishan
2012-02-10 17:07:21 +05:30
Edison Su
1ab89dd436 add cert chain in db, and also open the api to upload a cert chain 2012-02-09 14:56:40 -08:00
frank
aa9d250280 port copy template fix to acton 2012-02-09 14:19:08 -08:00
prachi
05af078358 Bug 8791 - user dispersing allocator
Changes:
To migrate systems using 'use.user.concentrated.pod.allocation' as true and 'vm.allocation.algorithm' as true, we need to
add following changes:

- There will be 5 values to 'vm.allocation.algorithm': 'random', 'firstfit', 'userdispersing', 'userconcentratedpod_random', 'userconcentratedpod_firstfit'
- 'userconcentratedpod_random' means we apply user concentration to pods and clusters. To hosts and pools we use random ordering.
- 'userconcentratedpod_firstfit' means we apply user concentration to pods and clusters. To hosts and pools we use firstfit ordering.
2012-02-08 17:03:38 -08:00
Sheng Yang
fadec7afe7 Add "changecidr" parameter for updateNetwork API
CIDR may be different after update to a service offering contained external
network element, user is required to acknowledge this, otherwise the update
won't process
2012-02-08 15:57:50 -08:00
Sheng Yang
9317eb6bc3 Revert dynamic cidr change 2012-02-08 15:54:22 -08:00
Sheng Yang
18ec438793 Revert zone guest cidr setting 2012-02-08 15:54:16 -08:00
Alena Prokharchyk
30f9d1d82e Merged listCapacity and ListTopConsumedResources calls. To list most consumed resources, pass sortBy=usage to listCapacity api 2012-02-08 13:33:06 -08:00
Nitin Mehta
e6beb08f1b Bug 13059: Keeping the param name more intuitive Also adding the ciode for listing used and total capacity as well.
Reviewed-By: Kishan
2012-02-08 18:03:22 +05:30
Nitin Mehta
cbc47b9021 Bug 13059: For listing top consumed resources only uyse enabled zone for sec storage Also improve the transaction logic.
Reviewed-By: Kishan
2012-02-08 15:34:56 +05:30
abhi
44c172bdc2 bug 12980: added trust store for ssl 2012-02-08 13:07:19 +05:30
Nitin Mehta
1fc0afe3f2 Bug 13059: Remove the listTipConsumedResources api and introduced a sortbyusage flag in the listCapacity call.
Reviewed-By: Kishan
2012-02-08 11:50:55 +05:30