199 Commits

Author SHA1 Message Date
Prasanna Santhanam
5bfe2f99d7 Enable the bean for network manager
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-05 12:37:41 +05:30
Prasanna Santhanam
b2dccf618f Removing unused simulator component library
And the components-simulator.xml configuration. Both are unused as we
use Spring injection now.

Remove unused rebootVM method

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-05 12:37:29 +05:30
Prasanna Santhanam
956a5967dd Pulling out Network operations into a separate manager
Network operations like VM, host and storage are pulled into a separate
managaer for simulator.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-05 12:23:07 +05:30
Edison Su
0ed441c690 CLOUDSTACK-2637: fix upload volume 2013-05-24 19:00:52 -07:00
Nitin Mehta
c11dbad9c9 merge master 2013-05-11 15:28:43 +05:30
Alex Huang
3047929367 Merged 2013-05-10 16:21:43 -07:00
Alex Huang
bc823f946c Fixed up the simulator to run with windows paths in cygwin 2013-05-06 16:34:41 -07:00
Alex Huang
3722d66aae Fixed up unit testing to use only an in class TestConfiguration 2013-05-06 16:34:27 -07:00
Min Chen
c60c373a38 Modify DownloadCommand to pass DataTO. 2013-05-02 23:05:19 -07:00
Min Chen
66f510bc38 Fix build error due to ListTemplateCommand change. 2013-04-26 14:02:42 -07:00
Min Chen
7543f314a7 Remove more VMTemplateHostDao references. 2013-04-23 17:12:21 -07:00
Min Chen
246e58013d Remove VMTemplateHostDao reference from TemplateManagerImpl. 2013-04-23 15:09:37 -07:00
Edison Su
abf40435f3 refactor downloadlistener, sync system vm templates when adding a new image store 2013-04-21 22:46:02 -07:00
Min Chen
bb64672715 Refactor DownloadMonitorImpl code, move some functionalities to
TemplateServiceImpl and VolumeServiceImpl.
2013-04-11 18:09:42 -07:00
Chiradeep Vittal
c5b11df6b7 QuickCloud: option to build with componentContext tailored for quickcloud
For now it replaces ConsoleProxyManagerImpl with StaticConsoleProxyManager
Usage: mvn install -Dquickcloud

QuickCloud: rename deploy profile

QuickCloud: remove cyclic dependency introduced in nonoss build by moving SecondaryStorageDiscoverer into services
However with this fix, developers will be unable to run 'PremiumSecondaryStorageResource' (for VMWare installations) using mvn exec:java.
Instead they will have to use the exploded archive from systemvm.zip
2013-04-09 14:45:26 -07:00
Chiradeep Vittal
e7983b25cc QuickCloud: Enable secondary storage daemon to run outside the system vm 2013-04-09 14:45:25 -07:00
Prasanna Santhanam
b798c45114 maven+marvin+simulator: Changes to the lifecycle steps
integration test is now run as follows:

Build
$ mvn -Pdeveloper -Dsimulator clean install

DB:
$ mvn -Pdeveloper -pl developer -Ddeploydb
$ mvn -Pdeveloper -pl developer -Ddeploydb-simulator

Setup:
$ mvn -Pdeveloper,marvin.setup -Dmarvin.config=setup/dev/advanced.cfg -pl :cloud-marvin integration-test

Test:
$ mvn -Pdeveloper,marvin.test -Dmarvin.config=setup/dev/advanced.cfg -pl :cloud-marvin integration-test

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-04-02 19:56:33 +05:30
Prasanna Santhanam
873ec27135 simulator: by default don't start the simulator discoverers
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-03-20 14:52:32 +05:30
Bharat Kumar
23e54bb0f4 Cloudstack-711: Cpu and Ram Overcommit Ratio. 2013-02-22 17:31:06 +05:30
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
Prasanna Santhanam
edac894f31 spring changes for simulator component
allow spring to do DI for simulator plugin. componentContext.xml will
have simulator components disabled by default.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-02-19 16:40:57 +05:30
Kishan Kavala
fc0bf21a13 CLOUDSTACK-786, CLOUDSTACK-1014: Moved usage APIs to cloud-api. Removed ManagementServerExt. Usage API related implementation is added to UsageServiceImpl 2013-02-05 16:49:34 +05:30
Kelven Yang
176523254e Improve component lifecycle management with system run-level concept 2013-01-30 15:21:02 -08:00
Alex Huang
f7e75d3aaf Fixed the problems with simulator. Turned off the skip tests 2013-01-21 10:37:53 -08:00
Alex Huang
fe6f0457d5 fixed unit tests from merge 2013-01-18 15:58:55 -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
Min Chen
8608925216 Consolidate RuntimeCloudException and CloudRuntimeException into one
class CloudRuntimeException, and removed RuntimeCloudException to avoid
confusion.
2013-01-15 18:07:08 -08:00
Rohit Yadav
bca2c928e8 PluggableService: Fix interface definition
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-14 19:01:26 -08:00
Alex Huang
1294cdc701 pulled from master 2013-01-10 16:01:01 -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
fac2270240 more files changed 2013-01-10 15:29:14 -08:00
Alex Huang
56e5fbdee2 removed import of componentlocator and inject from all files 2013-01-10 11:44:47 -08:00
Prasanna Santhanam
b18c03a006 simulator: formatting changes
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-01-09 15:13:12 +05:30
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
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
Prasanna Santhanam
539fca3520 Simulator: Fixing the listTemplatesCommand
Should return the ListTemplatesAnswer and ListVolumes returns
ListVolumesAnswer

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-26 19:22:17 -08:00
Prasanna Santhanam
39db3be294 Simulator: Fixing the listTemplatesCommand
Should return the ListTemplatesAnswer and ListVolumes returns
ListVolumesAnswer

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-26 19:20:32 -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
78d70d349b Merge branch 'master' into api_refactoring
- Applies Isaac Chian'gs fix (CLOUDSTACK-648) to allow user change their password
- TODO: Fix response, only partially applied

Conflicts:
	api/src/org/apache/cloudstack/api/response/UserResponse.java
	client/tomcatconf/commands.properties.in
	server/src/com/cloud/api/ApiResponseHelper.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-25 09:51:17 -08:00
Prasanna Santhanam
1f1a13448f simulator: resurrect simulator hypervisor as plugin
Multiple fixes:
1. changes to the mvn configuration
    a. include simulator to client.war
    b. activate simulator by profile
2. templates for simulator
3. developer prefill for simulator
    a. Use deplydb-simulator to setup simulator db
4. Inherit components-simulator.xml from components.xml
5. ListVolumesCommand missed for MockStorageManager
6. Include simulator properties into utils/db.properties

TODO:
 Secondary storage VMs don't come up because ComponentLocator doesn't
retain a unique set of adapaters by name. Fix this in subsequent
checkin.
2012-12-23 19:28:57 -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
Prasanna Santhanam
f0c3b4c62a simulator:Using the priority to decide b/w MASTER/BACKUP
BootArgs carry router priority for master and backup and simulator will
reuse the priority to decide RvR status. Deprecating the odd/even logic.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-22 14:09:59 -08:00
Prasanna Santhanam
ed25ec0500 simulator: simulator maintenance mode and simulator latency per command
Detail:
To induce latency for a command you have to use an API call like so
http://localhost:8096/client/api?command=configureSimulator&zoneid=1&podid=1&name=CheckRouterCommand&value=wait:80|timeout:0

(This is a hidden API command just for the simulator)

You will see the configuration effected in the mockconfiguration table of
simulator db. You can introduce the latency at runtime without restarting
management server.

mysql> select * from mockconfiguration;
+----+----------------+--------+------------+---------+--------------------+-------------------+
| id | data_center_id | pod_id | cluster_id | host_id | name               | values            |
+----+----------------+--------+------------+---------+--------------------+-------------------+
|  1 |              1 |      1 |       NULL |    NULL | CheckRouterCommand | wait:80|timeout:0 |
+----+----------------+--------+------------+---------+--------------------+-------------------+
1 row in set (0.00 sec)

By providing the optional zoneid, podid, clusterid, hostid you can induce the
latency at various levels. This delay will happen before the command is
processed and post-execution return Command's Answer back to management
server.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-22 13:57:13 -08:00
Prasanna Santhanam
beff1f45b1 Simulator: components-simulator.xml resource
The extended simulator component including the Simulator Managers and
Discoverers
2012-12-22 13:55:32 -08:00
Prasanna Santhanam
d6083ce51d Simulator: moving hypervisor simulator into plugin
Simulator just like any hypervisor should be a plugin.
resurrecting it to aid api refactoring tests. WIP

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-22 13:02:57 -08:00