24135 Commits

Author SHA1 Message Date
Rohit Yadav
d64d59e8f7 BaseCmd: Use HttpUtils to have single source of static string values
cloud-api depends on cloud-utils, it makes sense to refactor and put common
and static stuff in cloud-utils

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:32 +02:00
Rohit Yadav
315feb0683 utils: refactor HTTP transport stuff to HttpUtils
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:31 +02:00
Rohit Yadav
f11dcf8ef5 ApiServletTest: Fix test, now login/logout have their own API/class
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:31 +02:00
Rohit Yadav
224dc9f8e5 APIAuthenticator: refactor signature of APIAuthenticator interface's authenticate
Pass HttpServletResponse as it can be useful for authenticators which need to
have their own writer interface/method

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:31 +02:00
Rohit Yadav
6ec1a1b604 ApiServlet: move setting of response type up in the layer
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:31 +02:00
Rohit Yadav
7434f1bd33 ApiXmlDocWriter: get rid of hardcoded login/logout docs
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:31 +02:00
Rohit Yadav
ee57f47e29 ApiServlet: use the new and refactored authentication mechanism
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:31 +02:00
Rohit Yadav
2e5bbc9a0d ApiXmlDocWriter: remove hardcoded login and logout apis
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:31 +02:00
Rohit Yadav
b587291d55 ApiResponseSerializer: Skip extra boxing for Auth responses
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:30 +02:00
Rohit Yadav
d29f467d91 response: add command response for login and logout command classes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:30 +02:00
Rohit Yadav
bd2898e491 APIAuthenticationManagerImpl: add the auth manager and bean entry in spring xmls
- This implements ManageBase, is a pluggable service
- Has a mechanism to return commands, useful for apidocs etc.
- Has a method to return APIAuthenticator based on API command name

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:30 +02:00
Rohit Yadav
f7821ecf09 DefaultLoginAPIAuthenticatorCmd: Refactor and implement the default login mechanism
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:30 +02:00
Rohit Yadav
1330559b8d DefaultLogoutAPIAuthenticatorCmd: Refactor and implement the logout mechanism
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:30 +02:00
Rohit Yadav
ac3adfeca7 APIAuthenticationManager: Add Auth manager definition
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:30 +02:00
Rohit Yadav
4d3fbc54ad APIAuthenticationType: Add auth enum type, login or logout
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:30 +02:00
Rohit Yadav
31722c2674 APIAuthenticator: Add interface definition for the auth mechanisms
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:29 +02:00
Rohit Yadav
a6a63dd2d3 saml2: add opensaml as dependency
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:29 +02:00
Rohit Yadav
6016613d5b commands.properties: add login,logout,samlsso,samlslo apis
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:29 +02:00
Rohit Yadav
e6d2b2391b ApiErrorCode: Add API error code 401, 405
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:29 +02:00
Rohit Yadav
accd57486e ApiConstants: add Api constant registered
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:29 +02:00
Rohit Yadav
c35f704f21 saml2: add spring security saml2 extension 1.0.0.RELEASE
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:29 +02:00
Rohit Yadav
f7f8f07f47 client: add saml2 plugin dependency on client artifact
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:29 +02:00
Rohit Yadav
c4f200265b CLOUDSTACK-7083: Add SAML2 SSO plugin skeleton and stub
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-12 12:01:28 +02:00
sanjeev
bc92bfd827 CLOUDSTACK: Test script to verify fix for CS-5332
Signed-off-by: sanjeev <sanjeev@apache.org>
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-08-12 13:45:55 +05:30
Min Chen
737f76df8c CLOUDSTACK-7312:ISOs cannot be downloaded from URLs without matching
file extensions.
2014-08-11 15:00:32 -07:00
amoghvk
d1d722f9bd CLOUDSTACK-7295: VMs is Stopped state have no host ID, resulting in NPE 2014-08-11 14:56:58 -07:00
Alena Prokharchyk
97efbc56e4 CLOUDSTACK-7283: listUsers - for regular user, only return the caller info. If there are more users under the same account, their information should never be returned 2014-08-11 13:51:11 -07:00
Rajani Karuturi
736ff5f8e5 Fixed CLOUDSTACK-7303 [LDAP] while importing ldap users, update the user info if it already exists in cloudstack 2014-08-11 17:54:31 +05:30
Santhosh Edukulla
5efded3ae9 Fixed few coverity issues reported 2014-08-11 17:52:32 +05:30
Santhosh Edukulla
fd96ad02d7 Fixed few coverity reported issues around concurrency, null checks 2014-08-11 16:55:23 +05:30
Santhosh Edukulla
f9e11540c7 Fixed few coverity issues 2014-08-11 16:02:19 +05:30
Alena Prokharchyk
354756219c CLOUDSTACK-6486: Guest network guru - when add network, validate isolation method in case insensitive manner 2014-08-08 17:08:13 -07:00
Jessica Wang
d1f6d75426 UI > Infrastructure > Add Primary Storage > use custom function if it's available. 2014-08-08 14:09:17 -07:00
Rohit Yadav
4217d157c5 appliance: box commands for dumb bash in cleaning branch name, in build.sh
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit edb5650c737d582595e134aab286e7304f299983)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-08 21:24:18 +02:00
Rohit Yadav
e71009a571 appliance: fix branch finding method from e16414e even Junio can be wrong
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit bbaefb8e5def610a654fba907c8ec3f868416bdf)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-08 20:30:42 +02:00
Mihaela Stoica
57f611df16 CLOUDSTACK-6695: Added support to the UI for uploading a chain of certificates
In the "SSL Certificate" dialog we added:
- new field for the root certificate;
- a button to add intermediate certificates if necessary; when this is pressed, a new field, called "Intermediate certificate 1" is added; pressed again, "Intermediate certificate 2" field is added, and so on.

We upload the certificates in order: first the root certificate (with id=1), then the intermediate certificates (with id=2,3,..) and finally the server certificate.
When uploading a certificate, we wait for the upload to be completed successfully and only then we proceed to uploading the next one. If one fails, we report failure and don't continue with the remaining.

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2014-08-08 10:57:12 -07:00
Rohit Yadav
ffe0f2f60f appliance: use the right way to get git branch name
Taken from Junio C Hamano's blog [1], git's maintainer, he must not be wrong :)

[1] http://git-blame.blogspot.ch/2013/06/checking-current-branch-programatically.html

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit e16414e56d8f398f8ddbbde89d3ee833582b8bb2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-08 19:22:20 +02:00
Min Chen
d33278250d CLOUDSTACK-7264:NPE while creating scheduled/recurring snapshots for the
removed account with cleanup_needed=1.
2014-08-08 09:42:55 -07:00
Rohit Yadav
2491630f51 git: don't let db-police hook fail for no changes in setup/db
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-08 15:52:07 +02:00
Rohit Yadav
a0006a6990 appliance: change the way we find git branch in build.sh
(cherry picked from commit 493c0a68d2332cb9275902128c28f926a909f4ed)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	tools/appliance/build.sh
2014-08-08 15:44:33 +02:00
Gaurav Aradhye
a52a1cd4fc CLOUDSTACK-7292: Fixed issue in test_deploy_vm_root_resize.py
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-08-08 18:06:36 +05:30
Rohit Yadav
2020183cd8 ListStorageTagsCmd: Seif forgot to add license in 67ca255
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-08 14:32:19 +02:00
Rohit Yadav
47625af7c3 CLOUDSTACK-6360: Fix JDK paths in ubuntu packaging init scripts, don't use 1.6
Since we've agreed to use JDK/JRE 1.7, this enforces that for Ubuntu builds
- this fix remove usage of 1.6 paths in JDK_DIR for cloud-{agent, management, usage}.
- adds oracle jdk 1.7 path (in case a user is using that)
- adds mysql-connector-java path to CLASSPATH for usage server
- adds libmysql-java pkg dependency (tested and available for precise and trusty)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 96d6a2a03734ebbb9f41196d56c409d544a268ea)

Conflicts:
	packaging/debian/init/cloud-usage
Adds pessimistic logic to try the hard coded paths if Rajani's logic fails
2014-08-08 14:26:47 +02:00
Joris van Lieshout
b8deb6ba3f volume /usr was sized to small and ends up being 100% full on SSVMs and CVMs. By juggling some partman-auto numbers the space gets devided more evenly. After this patch /usr should be around 80% full. I've also reduced the swap space because this makes no sense on virtual instances.
Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-08-08 12:58:12 +02:00
Rohit Yadav
38928a44b5 CLOUDSTACK-6323: Change getUser API arg to userapikey
By default the getUser API picks apikey arg from HTTP request to return the
User object with that api key. We use apikey in the request, so it would return
the same user calling the API. This commit uses the USER_API_KEY in the API
annotation instead.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 72e06b4d9b40c42d28cc148a331c9c5461a10f6e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-08 12:55:13 +02:00
Likitha Shetty
b41a78ce0f CLOUDSTACK-7248. [VMware] Extract volume fails with an NPE.
Synchronize attach disk to VM on the VM object value instead of using a DB lock.
2014-08-08 15:31:03 +05:30
Likitha Shetty
bb7fc59947 Revert "CLOUDSTACK-7077. Quickly attaching multiple data disks to a VM fails."
This reverts commit a9b3ab089d6cb0bc1494e10b2be90292f4c79289.
2014-08-08 15:31:03 +05:30
Jessica Wang
74847dce47 UI > dialog widget > text field > set default value > pass context to function(){}. 2014-08-07 18:55:52 -07:00
seif
67ca2557f9 Changes for a new API command to list the storage tags 2014-08-07 17:46:06 -06:00
Alena Prokharchyk
6d1482b97b CLOUDSTACK-7283: listUsers API is available for regular users now 2014-08-07 14:01:58 -07:00