4824 Commits

Author SHA1 Message Date
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
Sheng Yang
21fe5e1087 bug 14074: Specify networkId for list public ip
status 14074: resolved fixed
2012-03-12 12:00:31 -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
ecad50c801 bug 14151,14153: configuration variables are now hidden; added ldapRemove command 2012-03-12 16:50:00 +05:30
abhi
64eb2dfcb1 bug 14224: allowing Xenserver 6.0.2, with the assumption that the same patches and guest os type will work as with 6.0 2012-03-12 16:39:22 +05:30
abhi
87a32a4866 bug 14224: adding 6.0.2 2012-03-12 16:39:22 +05:30
Sheng Yang
476c671374 Refactor VirtualNetworkApplianceManagerImpl
Add separate create command for dhcp, userdata and password.
2012-03-09 19:02:47 -08:00
Sheng Yang
d62d3b5a01 Refactor rules appling in the VirtualNetworkApplianceManagerImpl 2012-03-09 18:00:06 -08:00
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
Vijayendra Bhamidipati
df51744979 Bug 13127: API error text refer to database ids instead of uuids
Description:

	Removed some wrong invocations to addProxyObject() when
	throwing exceptions in NetworkManagerImpl.java.

	Replaced db ids with uuids in various points in the code
	of NetworkManagerImpl.java, where exceptions are thrown.
2012-03-09 01:13:36 -08:00
Vijayendra Bhamidipati
a70f8a9b3d Bug 13127: API error text refer to database ids instead of uuids
Description:

	Replacing placement of db ids in exception messages to uuids
	in the file ManagementServerImpl.java.

	Since there are a large number of files that throw exceptions
	with db ids in them and they need to be changed, we will make
	the changes in multiple commits.
2012-03-08 23:25:50 -08:00
Vijayendra Bhamidipati
6ac79c4be2 Bug 13127: API error text refer to database ids instead of uuids
Description:

	Adding a new class AnnotationHelper, that provides routines
	to read annotations from a VO class.

	Cloudstack does the mapping between cloudstack java VO objects
	and the database tables using cglib. cglib creates proxy objects
	as the maps between VO objects and the database.  A VO (value
	object) class is populated after querying from the MYSQL database.

	Ideally, a getAnnotation() issued on a cglib proxy object should
	get a list of all the annotations in all classes in the inheritence
	chain. However, this functionality seems to be currently broken
	in cglib.  Hence, when querying for annotations given the object
	of a VO class, we need to get to the corresponding VO class of that
	cglib proxy class and issue a getAnnotation() on that class. To get
	the VO class, we simply need to get the super class of the proxy
	object. Also, we need to recurse to the root VO class in case the
	VO class extends another VO class.

	Note that the cache used by CS is ehcache.
2012-03-08 17:34:28 -08:00
Sheng Yang
e152e64ac0 Fix several wrong ResourceUnavailableException scopes 2012-03-08 11:55:31 -08:00
Alena Prokharchyk
4f741c833c bug 14170: issues #1-#3 are fixed 2012-03-07 13:37:16 -08:00
Alena Prokharchyk
65e160b7e6 bug 14173: add eip/elb network offering (if missing) during the management server start
status 14173: resolved fixed
2012-03-07 10:02:24 -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
prachi
996110c928 Bug 14000 - Neither Admin or regular user can create a VM when the Pod is disabled
Bug 14006 - Admin could not create a VM when the cluster is Disabled

Changes:
- For Root admin, planner will not filter out the disabled pods or clusters from the resource list
2012-03-05 17:04:22 -08:00
prachi
d2ecd8c89a Bug 13999 - Non-admin user should not be able to take snapshots
Changes:

If Zone is disabled, deny permission to regular user while creating snapshots
2012-03-05 17:04:13 -08:00
Alena Prokharchyk
96cdc408d4 bug 14103: mark account for cleanup only in cleanupAccount and disableAccount method, not in the callers methods
status 14103: resolved fixed
2012-03-05 16:19:12 -08:00
frank
d7fb9177d1 allow more commands when resource state in maintenance mode 2012-03-05 15:38:06 -08:00
frank
b55997d39b allow SetupCommand when resource is in maintenance mode.
Since maintenance is resource state not agent status right now
2012-03-05 15:38:00 -08:00
frank
77ba5d0f8e Bug 14068 - Db upgrade: resource_state is incorrect for the host in UP state after the db upgrade from 2.2.x to 3.0
Bug 14099 - Db upgrade for storage network

status 14068: resovled fixed
status 14099: resovled fixed
2012-03-05 15:37:46 -08:00
Sheng Yang
1cd4ef5f07 bug 14110: Fix error message
status 14110: resolved fixed
2012-03-05 11:02:19 -08:00
kishan
de997c1e45 Bug 13952: Changed category of Usage configs
Status 13952: resolved fixed
Reviewed-By: Abhi
2012-03-05 18:58:49 +05:30
kishan
637b228130 Bug 14081: Added 3.0.0 templtae upgrade support. Added unit test case and DB dump
Status 14081: resolved fixed
Reviewed-By: Abhi
2012-03-05 17:25:38 +05:30
Likitha Shetty
9e716e6de3 Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss 2012-03-05 10:33:12 +05:30
Alena Prokharchyk
66e7e64915 Db upgrade for security group provider 2012-03-02 16:07:42 -08:00
Sheng Yang
d58f0a976d Fix element_id upgrade with network_id=0 2012-03-02 11:15:56 -08:00
kishan
d74260e197 Added systemVm template upgrade queries for XenServer 2012-03-02 20:33:26 +05:30
Alena Prokharchyk
6a1d7e309d More fixes to 2.2.x - 3.0 db upgrade 2012-03-01 18:31:50 -08:00
Alena Prokharchyk
fa0e25d146 bug 14080: do EQ instead of LIKE search when search for duplicated users during the user update
status 14080: resolved fixed
2012-03-01 15:11:46 -08:00
Sheng Yang
887256ad12 bug 14076: Fix the exception scope
status 14076: resolved fixed
2012-03-01 14:58:40 -08:00
kishan
93b859970f Bug 14039: Changed SSO key category Secure
Status 14039: resolved fixed
Reviewed-By: Abhi
2012-03-01 21:00:48 +05:30
Likitha Shetty
25db257a9a Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss 2012-03-01 14:39:43 +05:30
Alena Prokharchyk
152dfe4fd2 More fixes to the db upgrade 2012-02-29 16:26:44 -08:00
Alena Prokharchyk
e992a25e1a bug 14033: root/domain admin limits are always Unlimited. Return it as Unlimited in listResourceLimit response
status 14033: resolved fixed
2012-02-29 15:15:36 -08:00
Alena Prokharchyk
25676aa3c6 bug 14017: 1) Don't allow NULL value for Boolean type of config 2) Added a null check when compare config values
status 14017: resolved fixed
2012-02-29 13:09:47 -08:00
Alena Prokharchyk
ce433f9df2 Wrap deletePhysicalNetwork in transaction 2012-02-29 11:02:57 -08:00
Likitha Shetty
6915bd7e6a Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss 2012-02-29 18:48:48 +05:30
Kelven Yang
5aade501dc fix merge conflicts 2012-02-28 17:06:23 -08:00
Kelven Yang
52ebf15e7c Console proxy refactoring incremental check-in - new VNC protocol implementation 2012-02-28 17:03:38 -08:00
Sheng Yang
0d2693c1c4 Add element_id for 3.0 upgrade 2012-02-28 16:19:38 -08:00
Alena Prokharchyk
2eaefc4aa8 Fixed unittest and some issues with 2.2.14-3.0 upgrade 2012-02-28 15:17:14 -08:00
Likitha Shetty
62610f9207 Merge branch 'master' of ssh://git.cloud.com/var/lib/git/cloudstack-oss 2012-02-28 15:03:01 +05:30
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