15398 Commits

Author SHA1 Message Date
Edison Su
d7bc09f950 fix build 2013-01-03 11:35:41 -08:00
Rohit Yadav
c0a0318f29 setup/db: Fix missing semicolon in db create view command
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-03 11:24:12 -08:00
Isaac Chiang
6ce01c46fc UI: add generate key button to appropriate roles 2013-01-03 10:58:13 -08:00
Rohit Yadav
edb00bb613 Merge branch 'master' into api_refactoring 2013-01-03 08:32:56 -08:00
Hugo Trippaers
cc3d692ab8 Summary: Remove useless and commented code 2013-01-03 11:57:37 +01: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
580bf857ff server: ApiServer inits with processing cmd classes to fill apiname:class mapping
- Add maven dependency reflections (wtfl license, apl compliant)
- Use reflections to recurse and get apiname:class mapping

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-02 18:43:59 -08:00
Rohit Yadav
072c6f1988 acl: Remove getApiCommands() method on APIAccessChecker interface
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-02 18:43:59 -08:00
Rohit Yadav
c5b51b7c39 plugin: Remove memory mapping of apiname and class name in StaticRoleBasedAPIAccessChecker
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-02 18:43:59 -08:00
Rohit Yadav
65e4f00a10 Annotate api name on usage related apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-02 18:43:58 -08:00
Edison Su
e40042b554 refactor volumeservice api 2013-01-02 18:42:48 -08:00
Edison Su
ce2120d09d fix build 2013-01-02 17:43:55 -08:00
Min Chen
ebfb90e217 Create DB view for Account to speed up ListAccountsCmd, and add missing async job information for some response objects.
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-02 17:38:58 -08:00
Edison Su
5d1e97e407 add create volume 2013-01-02 17:32:54 -08:00
Rohit Yadav
bc8e0af0a3 plugin: ACL Static Role Based api access checker
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-02 17:06:19 -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
Edison Su
bba43f51dc vmware stuff should be compile time dependency 2013-01-02 16:25:17 -08:00
Kelven Yang
a4e0c4f012 fix jetty:run environment setup 2013-01-02 16:20:05 -08:00
Kelven Yang
6504fc6b09 Enforce strong typing for getting result from AsyncMethod 2013-01-02 15:48:45 -08:00
Rohit Yadav
d8d87adc22 Merge branch 'master' into api_refactoring
Conflicts:
	api/src/com/cloud/api/commands/ListS3sCmd.java
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
	setup/db/db/schema-40to410.sql

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-02 13:57:55 -08:00
Kelven Yang
e2078ec6e4 Solve Spring loading issues with a few Dao and Manager components 2013-01-02 13:55:26 -08:00
John Burwell
e4583ced2e S3-backed Secondary Storage 2013-01-02 10:28:47 -08:00
Wido den Hollander
3d2fefabdd db / upgrade: Add columns to sync_queue and sync_queue_item
These columns were not added by the upgrade from 4.0 to 4.1 causing SQL-errors

These columns are present in create-schema.sql, so by adding them here the upgrade also works to 4.1
2013-01-02 17:01:23 +01:00
Edison Su
8f3789dab2 fix build 2012-12-28 17:24:49 -08:00
Edison Su
13aef24ba2 add uml class diagram generated by objectaid 2012-12-28 16:51:25 -08:00
Alex Huang
56be555733 missing change 2012-12-28 16:49:12 -08:00
Alex Huang
c622bee1ed made changes to work with the new injection stuff 2012-12-28 16:44:26 -08:00
Alex Huang
e936c32a04 Fixed problems with inject checkin 2012-12-28 16:24:54 -08:00
Alex Huang
54cce5fa18 Getting things to compile 2012-12-28 16:07:56 -08:00
Rohit Yadav
d928014a75 api: Add CopyIsoCmd, boilerplate cmd class for api copyIso
Two apis, copyIso and copyTemplate point to the same Cmd class, the commit adds
the child class CopyIsoCmd that extends on CopyTemplateCmd. This just serves as
the boilerplate class. Every api cmd name maps 1:1 to a cmd class.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-28 01:49:43 -08:00
Rohit Yadav
983fe9712f api: Fix name field in @APICommand for CopyTemplateCmd.java
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-28 01:47:22 -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
Rohit Yadav
76ea0e7c45 api: Annotate and fill name field of @APICommand from commands.properties.in
- Reads and fills name field of all cmd class and api name mapping from
  commands.properties.in
- Automation using following python script ensures correctness of the change

import os
file_prefix = "api/src/"
search_pattern = "@APICommand("
pattern_len = len(search_pattern)
prop_file = "client/tomcatconf/commands.properties.in"
f = open(prop_file, 'r')
data = f.read()
f.close()
apis = filter(lambda x: x.strip()!='' and (not x.startswith('#')), data.split('\n'))
for api in apis:
    api_name = api.split('=')[0]
    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()

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-28 01:09:28 -08:00
Kelven Yang
259e6d5f74 Fix a few Spring bootstrap issues 2012-12-27 17:46:52 -08:00
Edison Su
9de3a1fae4 add create volume from base image command 2012-12-27 16:31:59 -08:00
Rohit Yadav
623e7389ef api: Make APIServer backward compatible to accept both uuid and id for pre 3.x apis
- Allow both uuid and id in param for pre 3.x apis
- Enforce uuid as param for all >= 3.x apis
- Use regex to better match uuid param

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-27 15:24:17 -08:00
Brian Federle
eff0716426 UI: Minor cosmetic fixes
-Fix missing icons on some dialog headers

-multiEdit: Fix overflow for long text strings

-Projects UI: Fix project selector margins, overflow on 'Events' box
 on project dashboard
2012-12-27 13:46:52 -08:00
Brian Federle
d3ca6a8a57 List view UI: Keep overflow row content in-line with mouse on hover 2012-12-27 12:02:38 -08:00
Brian Federle
23e75eb788 Increase max-width of list view table cells to 160px 2012-12-27 11:59:13 -08:00
Brian Federle
1b533f2354 List view UI: Add alt tag to table cells 2012-12-27 11:58:50 -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
bab974c3bc marvin : cloudstack-version is not reqd for json load
To build back cloudstack response we don't need to load the
'cloudstack-version' string, only the response
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
Prasanna Santhanam
617a0507e1 api: EntityReference for serviceOfferingResponse
ServiceOfferingResponse's entityReference was missed

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-26 19:11:19 -08:00
Prasanna Santhanam
840da55520 api: Entities will extend InternalIdentity and Identity
Entities correlated to the Identity and carry a uuid and those
correlated to InternalIdentity carry an id. Those entities that carry
both will correlated to Identity and InternalIdentity.

This refactors entities wherever possible to ensure the VO only
implements the first class entity.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2012-12-26 19:11:15 -08:00
Prasanna Santhanam
b80dccee3f api: ListTemplateCmd returns TemplateInfo not UserVmResponse
Correcting the incorrecty response entity when LIstTemplatesCmd was
caled
2012-12-26 18:32:57 -08:00
Rohit Yadav
b8369b808e api: Introduce name field which would hold the OTW api command name
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-26 15:56:14 -08:00