164 Commits

Author SHA1 Message Date
Kelven Yang
2be270de89 Separate loadable components like Gurus, Elements, Adapters to componentContext.xml 2013-01-16 16:33:59 -08:00
Kelven Yang
f57dcaa820 Loadable components to be in separted Spring component bundling 2013-01-11 15:33:15 -08:00
Alex Huang
1294cdc701 pulled from master 2013-01-10 16:01:01 -08:00
Alex Huang
d6f44a4d6a merged from master 2013-01-10 15:55:42 -08:00
Rohit Yadav
c4e890c55d PluggableService: Refactor method to return map of key value pairs
- Makes plugins self contained so they decide their properties file format
- PluggableService creates the contract that implementing entity will return a
  properties map which is apiname:rolemask (both are strings)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 15:55:02 -08:00
Alex Huang
56e5fbdee2 removed import of componentlocator and inject from all files 2013-01-10 11:44:47 -08:00
Kelven Yang
0bcebd33b6 Fix problems after merge 2013-01-09 17:36:53 -08:00
Rohit Yadav
999ecb67df plugins: Import and @Parameter fixes
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 11:23:24 -08:00
Rohit Yadav
066edc1105 plugins: Fix pluggable service getPropertiesFiles() on f5, srx and netscaler
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 11:21:30 -08:00
Alex Huang
b6c56736e5 merge from master 2013-01-09 05:20:36 -08:00
Rohit Yadav
077f47193d
Sync changes: Merge branch 'master' into api_refactoring
Conflicts:
	plugins/network-elements/dns-notifier/pom.xml

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-08 20:36:17 -08:00
Noa Resare
4f98d879f6 maven: remove explicit submodule versions from module pom.xml
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-08 20:25:58 -08:00
Rohit Yadav
d613c59dcb plugins: Fix apidiscovery's annotation field values and example plugin's name
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-08 20:00:13 -08:00
Alex Huang
cf8de7ee17 Removed all the .project files 2013-01-08 14:11:00 -08:00
Alex Huang
30f2565d98 Merge branch 'api_refactoring' into javelin 2013-01-08 12:36:04 -08:00
Rohit Yadav
ed0637b8c2 api: Refactor move acl to org.apache.cloudstack
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-06 15:30:58 -08:00
Rohit Yadav
63481ecb34 CLOUDSTACK-212: Move api response classes to cloud-api under org.apache.cloudstack
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-05 16:27:36 -08:00
Rohit Yadav
5119785cf7 Get latest changes, merge branch 'master' into api_refactoring
Conflicts:
	api/src/com/cloud/network/element/RemoteAccessVPNServiceProvider.java
	server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
	server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
	setup/db/db/schema-40to410.sql

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-04 22:21:20 -08:00
Sheng Yang
42c8c73ab6 CLOUDSTACK-306: Introducing IpDeployingRequester and implement inline mode
For LB device in inline mode, the ip deployer(the owner of public ip) is the
firewall in front of it, not itself. So check if it's inline or not, if it's
inline, return the firewall as ip deployer
2013-01-04 19:18:03 -08:00
Sheng Yang
177e157cbf CLOUDSTACK-306: Move inline mode parameter from device to network offering
One F5 device can be used as inline and side-by-side at the same time(for
different networks). So we can define inline or not on network base.
2013-01-04 19:17:58 -08:00
Sheng Yang
717f9dcd4d CLOUDSTACK-306: Implement SRX firewall
Use SRX firewall filter as SRX firewall. The old security policy mechanism
cannot be used as IP based. This would enable SRX's ability to control traffic
for F5 behind it.
2013-01-04 19:17:50 -08:00
Rohit Yadav
596f9d0905 api: Annotate netscaler apis, remove IdentityMapper from everywhere
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-04 17:09:40 -08:00
Rohit Yadav
65a1284e83 srx: Annotate api classes, remove IdentityMapper
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-04 17:00:10 -08:00
Rohit Yadav
4dd5f14e76 f5: Annotate f5 cmd classes, remove IdentityMapper
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-04 16:49:27 -08:00
Rohit Yadav
a2f8f42575 nicira-nvp: Annotate nvp plugin, remove IdentityMapper
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-04 16:33:40 -08:00
Kelven Yang
2e9c55f8f6 More Spring issues to bootstrape javalin server 2013-01-04 14:25:12 -08:00
Rohit Yadav
edb00bb613 Merge branch 'master' into api_refactoring 2013-01-03 08:32:56 -08:00
Hugo Trippaers
282eb5fcf5 Summary: Unittest for nicira plugin
More unittests for the Guru

Add unittests for the Element
2013-01-03 11:57:14 +01:00
Hugo Trippaers
00847482cc Summary: Small fixes for issues found during unittests 2013-01-03 11:56:50 +01:00
Hugo Trippaers
6cf0c5683d Summary: Make canHandle protected
Change access to canHandle so it's easier to unittest. 

Make a note that answers can be null if the host is down, there should
be a way to deal with this, but for now an NPE is an adequate indication
that something is wrong.
2013-01-03 11:56:26 +01:00
Hugo Trippaers
9122809e00 Summary: nothing to see here, move along
Fix for a stupid mistake.
2013-01-03 11:56:02 +01:00
Rohit Yadav
d235859168 Fix PluggableService to provide interface for ACL adapters etc. to get configs
- Fix interface to return array of strings, or filenames
- Fix StaticRoleBased ACL adapter to process config files by going through all pluggable services
- Refactor interface names

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-02 16:29:39 -08:00
Rohit Yadav
774cb29b0c api: Annotate all remaining cmd classes with APICommand name field
Automates name field filling using following python program which reads from
various *commands.properties.in files and populates name fields based on the
name cmd class mapping defined in them.

import os
search_pattern = "@APICommand("
pattern_len = len(search_pattern)
prop_files = [
"client/tomcatconf/cisconexusvsm_commands.properties.in",
"client/tomcatconf/f5bigip_commands.properties.in",
"client/tomcatconf/junipersrx_commands.properties.in",
"client/tomcatconf/netapp_commands.properties.in",
"client/tomcatconf/netscalerloadbalancer_commands.properties.in",
"client/tomcatconf/nicira-nvp_commands.properties.in",
"client/tomcatconf/simulator_commands.properties.in",]
file_prefixes = [
"plugins/hypervisors/vmware/src/",
"plugins/network-elements/f5/src/",
"plugins/network-elements/juniper-srx/src/",
"plugins/file-systems/netapp/src/",
"plugins/network-elements/netscaler/src/",
"plugins/network-elements/nicira-nvp/src/",
"plugins/hypervisors/simulator/src/",]
counter = 0
for prop_file in prop_files:
    f = open(prop_file, 'r')
    data = f.read()
    f.close()
    file_prefix = file_prefixes[counter]
    apis = filter(lambda x: x.strip()!='' and (not x.startswith('#')), data.split('\n'))
    for api in apis:
        api_name = api.split('=')[0].strip()
        cmd_name = file_prefix + api.split('=')[1].split(';')[0].replace('.', '/').strip() + ".java"
        if not os.path.exists(cmd_name):
            print cmd_name, api_name
        f = open(cmd_name, 'r')
        d = f.read()
        f.close()
        idx = d.find(search_pattern) + pattern_len
        new_str = d[:idx] + "name = \"%s\", " % api_name + d[idx:]
        f = open(cmd_name, 'w')
        f.write(new_str)
        f.close()
    counter += 1

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-28 01:28:47 -08:00
Kelven Yang
259e6d5f74 Fix a few Spring bootstrap issues 2012-12-27 17:46:52 -08:00
Rohit Yadav
7a7fe583e0 Rename Implementation annotation to APICommand
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-26 15:55:34 -08:00
Rohit Yadav
057ac12d23 Enforce InternalIdentity interface on all VO classes that impls long getId()
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-26 15:09:44 -08:00
Rohit Yadav
018b5215e0 api: Annotate apis in various plugins
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 18:03:23 -08:00
Rohit Yadav
1bd47d48ab api: Annotate some nicira apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 17:43:42 -08:00
Rohit Yadav
e849d70af1 api: Annotate some juniper-src apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 17:41:10 -08:00
Rohit Yadav
296b49c2f8 Merge branch 'master' into test-merge-api
Conflicts:
	api/src/com/cloud/agent/api/BackupSnapshotCommand.java
	api/src/com/cloud/agent/api/storage/PrimaryStorageDownloadCommand.java
	api/src/com/cloud/agent/api/to/PortForwardingRuleTO.java
	api/src/com/cloud/network/NetworkService.java
	api/src/com/cloud/resource/ResourceService.java
	api/src/org/apache/cloudstack/api/ApiConstants.java
	api/src/org/apache/cloudstack/api/ResponseGenerator.java
	api/src/org/apache/cloudstack/api/response/SSHKeyPairResponse.java
	client/tomcatconf/commands.properties.in
	core/src/com/cloud/storage/SnapshotVO.java
	pom.xml
	server/src/com/cloud/api/ApiDispatcher.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/rules/RulesManagerImpl.java
	server/src/com/cloud/offerings/NetworkOfferingVO.java
	server/src/com/cloud/resource/ResourceManagerImpl.java
	server/src/com/cloud/upgrade/dao/Upgrade40to41.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
	setup/db/create-schema.sql
	setup/db/db/schema-40to410.sql

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 13:54:46 -08:00
Min Chen
98b022a430 Remove IdentityProxy from plugin response classes.
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-19 13:09:02 -08:00
Alex Huang
392feacd27 missed license 2012-12-18 13:04:34 -08:00
Alex Huang
591fb34795 Added dns-notifier as example plugin 2012-12-18 12:01:26 -08:00
Hugo Trippaers
859412c1ce Fix headers
again....
2012-12-14 11:58:25 +01:00
Hugo Trippaers
2235776aed Unittests for NiciraNvpGuestNetworkGuru
These unittests do not depend on the componentlocator but instead are
completely dependent on mock objects. This ensures that they can be run
standalone without any requirements on the environment.

Includes some fixes to NiciraNvpGuestNetworkGuru and GuestNetworkGuru
2012-12-14 10:41:36 +01:00
Rohit Yadav
e398b1e47a api: Refactor command and response classes to org.apache.cloudstack.api.*
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 19:23:24 -08:00
Rohit Yadav
af28c06998 api: move and group all under command, org.apache.cloudstack.command.*
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 18:30:54 -08:00
Hugo Trippaers
9c8eba1da3 Fix the tests
Note to self, surefire actually runs with assertions enabled where junit
inside eclipse doesn't. Sure surefire will mark tests as failed when an
assertion is triggered. Take care when mocking stuff.
2012-12-07 17:34:14 +01:00
Hugo Trippaers
2b74b6e827 Start removing the old ant build files
Removed all build.xml files from the plugins
2012-12-07 15:58:56 +01:00
Hugo Trippaers
fa207d2b4d Add unittests for NiciraNvpApi
Added some unittests for the NiciraNvpApi. These tests mainly validate
the logic of the execute methods, which are the main thing in this
class. Other methods are basically wrappers around these functions.

Changed NiciraNvpApi to have a factory method for obtaining the
HttpMethod. This makes it easier to mock it.

Changed the executeMethods in NiciraNvpApi to protected so the unittests
have access.

Fixed a bug in NiciraNvpApi where releaseconnection was not called in
some cases.
2012-12-07 15:55:26 +01:00