112 Commits

Author SHA1 Message Date
Marc-Aurèle Brothier
893a88d225 CLOUDSTACK-10105: Use maven standard project structure in all projects (#2283)
Remove maven standard module (which only a few were using) and get ride of maven customization for the projects structure.

- moved all directories to src/main/java, src/main/resources, src/main/scripts, src/test/java, src/test/resources
- grep scan to search for src/com and src/org left over
- grep for <project>/scripts to fix pom.xml configuration
- remove custom <build> configuration in pom.xml

Signed-off-by: Marc-Aurèle Brothier <m@brothier.org>
2018-01-20 03:19:27 +05:30
Rohit Yadav
072dbc0720 Updating pom.xml version numbers for master to 4.12.0.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-01-15 17:43:45 +05:30
Rajani Karuturi
4bc7c270fa Updating pom.xml version numbers for release 4.11.0.0-SNAPSHOT
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2017-07-12 12:09:38 +05:30
Rajani Karuturi
9d2893d44a Updating pom.xml version numbers for release 4.10.0.0
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2017-07-03 10:06:43 +05:30
Rohit Yadav
9555492b4d Merge branch '4.9' 2016-08-23 14:16:53 +05:30
Rohit Yadav
f13c224da1 Updating pom.xml version numbers for release 4.9.1.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-19 13:53:39 +05:30
Will Stevens
62aa3b2bfa Updating pom.xml version numbers for release 4.10.0-SNAPSHOT
Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-07-29 10:11:34 -04:00
Will Stevens
227ff3884d Updating pom.xml version numbers for release 4.9.0
Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-07-25 16:56:04 -04:00
Rohit Yadav
4347776ac6 CLOUDSTACK-8562: DB-Backed Dynamic Role Based API Access Checker
This feature allows root administrators to define new roles and associate API
permissions to them.

A limited form of role-based access control for the CloudStack management server
API is provided through a properties file, commands.properties, embedded in the
WAR distribution. Therefore, customizing API permissions requires unpacking the
distribution and modifying this file consistently on all servers. The old system
also does not permit the specification of additional roles.

FS:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dynamic+Role+Based+API+Access+Checker+for+CloudStack

DB-Backed Dynamic Role Based API Access Checker for CloudStack brings following
changes, features and use-cases:
- Moves the API access definitions from commands.properties to the mgmt server DB
- Allows defining custom roles (such as a read-only ROOT admin) beyond the
  current set of four (4) roles
- All roles will resolve to one of the four known roles types (Admin, Resource
  Admin, Domain Admin and User) which maintains this association by requiring
  all new defined roles to specify a role type.
- Allows changes to roles and API permissions per role at runtime including additions or
  removal of roles and/or modifications of permissions, without the need
  of restarting management server(s)

Upgrade/installation notes:
- The feature will be enabled by default for new installations, existing
  deployments will continue to use the older static role based api access checker
  with an option to enable this feature
- During fresh installation or upgrade, the upgrade paths will add four default
  roles based on the four default role types
- For ease of migration, at the time of upgrade commands.properties will be used
  to add existing set of permissions to the default roles. cloud.account
  will have a new role_id column which will be populated based on default roles
  as well

Dynamic-roles migration tool: scripts/util/migrate-dynamicroles.py
- Allows admins to migrate to the dynamic role based checker at a future date
- Performs a harder one-way migrate and update
- Migrates rules from existing commands.properties file into db and deprecates it
- Enables an internal hidden switch to enable dynamic role based checker feature

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-11 09:45:19 +05:30
Remi Bergsma
43ab98d823 Updating pom.xml version numbers for release 4.9.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 15:12:20 +01:00
Remi Bergsma
32fcc47117 Updating pom.xml version numbers for release 4.8.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 09:39:00 +01:00
Remi Bergsma
62f218b7bd Updating pom.xml version numbers for release 4.8.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-20 23:43:35 +01:00
Remi Bergsma
8f5a2920e8 Updating pom.xml version numbers for release 4.8.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-21 22:09:31 +01:00
cirstofolini
1a64c247ad Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses. 2015-11-21 18:31:11 -02:00
Remi Bergsma
1f53f2a93e Updating pom.xml version numbers for release 4.7.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-15 18:54:13 +01:00
Rajani Karuturi
8bc0294014 Revert "Merge pull request #714 from rafaelweingartner/master-lrg-cs-hackday-003"
This reverts commit cd7218e241a8ac93df7a73f938320487aa526de6, reversing
changes made to f5a7395cc2ec37364a2e210eac60720e9b327451.

Reason for Revert:

noredist build failed with the below error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project cloud-plugin-hypervisor-vmware: Compilation failure
[ERROR] /home/jenkins/acs/workspace/build-master-noredist/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java:[484,12] error: non-static variable logger cannot be referenced from a static context
[ERROR] -> [Help 1]

even the normal build is broken as reported by @koushik-das on dev list
http://markmail.org/message/nngimssuzkj5gpbz
2015-08-31 11:27:57 +05:30
Rafael Weingartner
3818257a68 Solved jira ticket: CLOUDSTACK-8750 2015-08-28 22:35:08 -03:00
Laszlo Hornyak
3577423da9 removed executable flags from java classes
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-11-23 19:49:01 +01:00
Hugo Trippaers
4ebaf0a583 Bump master version to 4.6.0-SNAPSHOT after branching 4.5.0-SNAPSHOT 2014-10-29 14:54:23 +01:00
Santhosh Edukulla
31a42d2b7a Fixed few coverity patches
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-10-09 11:45:26 +05:30
Hugo Trippaers
dc3f0cbc63 Improve the handling of the findbug exclude files 2014-09-03 10:41:22 +02:00
Daan Hoogland
8b62b2cb92 findbugs: exclude known spiffy hacks a.k.a. false positives 2014-03-28 14:28:10 +01:00
Hugo Trippaers
4402685e11 Update master to 4.5.0-SNAPSHOT 2014-03-14 14:55:26 +01:00
Mandar Barve
b0c6d47347 - Updated APICommand annotation to add new flags that indicate if API request or response carry sensitive info - Updated all API classes with the new annotation flag values as per the API's sensitivity - Updated server code to check response annotation before audit logging
Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit df270d6387c362b960064ee5123c14782e767a19)
Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-02-25 22:59:10 +01:00
Alex Huang
be5e5cc641 All Checkstyle problems corrected 2013-12-12 12:26:07 -08:00
Alex Huang
433a631916 Reformat of source code to set a stable base for the future. I couldn't get checkstyle enabled. There's still about a thousand errors from checkstyle. Most of it from length errors from comments and strings. Will attempt to remove those tonight. This change is so large I just want to get it in before any merge nightmares. The changes are fairly minor though and I did a full compile and start a server with the reformat code. 2013-11-21 07:56:47 -08:00
Hugo Trippaers
cf715ff491 Bump 4.3.0 to 4.4.0 in master 2013-11-21 16:01:15 +01:00
Alex Huang
d620df2bdd Reformatted all of the code. 2013-11-21 06:15:26 -08:00
Alex Huang
8d62744681 Reformat all source code. Added checkstyle to check the source code 2013-11-20 07:26:53 -08:00
Darren Shepherd
67186429e1 Spring Modularization
ACS is now comprised of a hierarchy of spring application contexts.
Each plugin can contribute configuration files to add to an existing
module or create it's own module.

Additionally, for the mgmt server, ACS custom AOP is no longer used
and instead we use Spring AOP to manage interceptors.
2013-10-02 15:41:04 -07:00
Chip Childers
8225374138 Updating pom.xml version numbers for release 4.3.0-SNAPSHOT
Signed-off-by: Chip Childers <chipchilders@apache.org>
2013-08-01 10:35:00 -04:00
Alex Huang
3f7c558de5 Removed all the extra mockito, inject, and junit dependencies. Changed any test/resource to test/resources and rely on the master pom to tell us where the resources are instead of each individual project 2013-07-26 16:34:08 -07:00
ahuang
11e1e585b1 UserContext switched to CallContext. Added generic storage mechanism for other code to carry information throughout a call. Made the calling User and Account a must have. Added an interface to carry entities in error. Fixed up the code. Part of the vmsync branch 2013-07-16 11:24:21 -07:00
Nitin Mehta
c11dbad9c9 merge master 2013-05-11 15:28:43 +05:30
Prasanna Santhanam
5d67c98e5b marvin+apidiscovery: Extend API discovery plugin
API discovery plugin will return embedded entities for marvin to
discovery and generate it's API classes.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-04-02 18:31:30 +05:30
Rohit Yadav
9bcfaffc31 plugins: Add it's to cmdClass in ApiDiscovery, spring fails to self inject
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-03-12 14:44:10 +05:30
frank
1f15c1e9e7 CloudStack CLOUDSTACK-774
Supporting kickstart in CloudStack baremetal

fixing bugs to align to new code base

Conflicts:

	client/tomcatconf/componentContext.xml.in
2013-02-21 15:42:38 -08:00
Rohit Yadav
80d58b6c73 CLOUDSTACK-1317: Bump CloudStack package version to 4.2.0-SNAPSHOT in all poms
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-20 16:42:56 +05:30
Rohit Yadav
b59a18d1a1 CLOUDSTACK-1210: Fix pluggable service, apiserver, mgmt server impl, api-discovery
- Mgmt server impl is a pluggable service, fix it's method
- Fix getCommands() to return all cmd api classes supported by this mgmt server
- For api-discovery, get commands from pluggable services only, don't use reflections
- Don't use reflections in ApiServer, iterate pluggableservices
- Fix api discovery unit test
- The fix was done automatically using following python program along with
  following step:

1. Get all apis provided by default mgmt server, all of them are in cloud-api now
   cd api/src/org/apache/cloudstack/api/command
   find . >> apis
2. For all apis, generate java code that adds the class to the cmdList arraylist:
   f = open('apis', 'r')
   data = f.read()
   f.close()
   output = ""
   for a in data.split('\n'):
     output += "cmdList.add(%s);" % a.split('/')[-1].replace('.java', '.class')
   # wrote output to a file, copied content to mgmt server impl's getCommands()
   # similarly, fixed import statements using same code, splitting on /

Testing:
Ran apiserver, put breakpoints in ApiServer's init() where classes are processed
Total cmd classes found by reflections (ReflectUtil) = 354
Total cmd classes found by getCommands for all pluggable services = 354

Next, copied the comma separated values for each set to a string in ipython, a & b
set(a).difference(set(b)) returned null.

The above test implies both set of cmd classes found by both methods, i.e. using
reflections and using getCommands() had same set of apis and all were unique.

Conclusion:
The changes are idempotent and don't break api server's cmd class api discovery
processing.

BUG-ID: CLOUDSTACK-1210

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-08 16:48:13 +05:30
Rohit Yadav
44316f7398 ApiDiscovery: Fix tests and make constructor light weight, let spring run init()
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-06 20:07:27 +05:30
Hugo Trippaers
d296a8fa65 Revert "ApiDiscovery: Discovery apis provided by PluggableServices as well"
This reverts commit 1b9e5c3006b5b9ee6b301d65fc8d81675914c826.

Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2013-02-06 14:17:22 +01:00
Rohit Yadav
1b9e5c3006 ApiDiscovery: Discovery apis provided by PluggableServices as well
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-06 16:54:46 +05:30
Rohit Yadav
356866c72b Merge branch 'master' into javelin
- Fixed new join dao impls as spring components
- Fixed component context xml to load api rate limit checker
- Fixed root pom.xml for duplicate plugin
- Fixed list data centers method
- Fixed following conflicts:
	api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java
	api/src/org/apache/cloudstack/api/command/user/offering/ListServiceOfferingsCmd.java
	api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
	api/src/org/apache/cloudstack/api/command/user/template/ExtractTemplateCmd.java
	plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java
	server/src/com/cloud/api/ApiDBUtils.java
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/api/query/QueryManagerImpl.java
	server/src/com/cloud/configuration/DefaultComponentLibrary.java
	server/src/com/cloud/server/ManagementServerImpl.java
	server/src/com/cloud/storage/swift/SwiftManagerImpl.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-24 19:18:53 -08:00
Rohit Yadav
34f3e1c9a1 ApiDiscoveryServiceImpl: Fix fields variable definition from array to set
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-23 14:57:41 -08:00
Rohit Yadav
6482e27081 ApiDiscovery: Add mockito, unit test for ApiDiscovery service impl
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-22 14:28:31 -08:00
Rohit Yadav
26d8113f99 plugins: Indentation fix for pom.xml, add build/test rules for api discovery
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-22 14:28:31 -08:00
Rohit Yadav
179db40e3a ApiDiscovery: Fix response and service impl to make them test-able 2013-01-22 14:28:30 -08:00
Alex Huang
10d9c019a9 All merge conflicts resolved 2013-01-18 12:14:57 -08:00
Min Chen
3dabd5fbf3 Clean up ApiServer, ApiServlet and ApiDispatcher flow to handle various CloudRuntimeException
and CloudException in one place, and Introduced ApiErrorCode to handle CloudStack API error
code to standard Http code mapping.

Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-16 22:36:34 -08:00
Kelven Yang
497dcd5044 Get rid of PlugService annotation, replace it with Spring standard injection in command classes 2013-01-16 18:44:44 -08:00