14201 Commits

Author SHA1 Message Date
Chip Childers
000cc72042 CLOUDSTACK-422: XSL files missing license header
Added license headers to the apidoc XSL files that were fooling RAT.

Signed-off-by: Chip Childers <chip.childers@gmail.com>
2012-10-31 14:13:48 -04:00
Rohit Yadav
23659684e8 maven: include tools/cli in top level pom
For developer profile include tools/cli in top level pom

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-31 23:19:24 +05:30
Rohit Yadav
b38cf801ac cli: setup.py for cloudmonkey
Version are named in reflection of CloudStack.
<cli major-version>.<cloudstack minor>.<cloudstack.major>
So, for CloudStack 4.1.0, version for cli should be 0.1.4

To create distribution:
  python setup.py sdist
  python setup.py install

Using pip:
  pip install dist/cloudmonkey*

Or pretty soon, from cheese shop:
  pip install cloudmonkey

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-31 23:19:21 +05:30
Rohit Yadav
039b938ecc maven: pom.xml for tools/cli
copies marvin to cli/cloudmonkey/

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-31 23:19:17 +05:30
Rohit Yadav
2ceaa3911e cli: cloudmonkey the command line interface
cloudmonkey
-----------
Apache CloudStack's very own monkey powered command line interface based on Marvin.
The neglected robot and monkey should rule the world!

Features:
- it's a shell and also a terminal tool
- scalable to find and run old and new APIs
- intuitive grammar and verbs
- autocompletion (functional hack)
- shell execution using ! or shell
- cfg support: user defined variables, like prompt, ruler, host, port etc.
- history
- colors
- dynamic API loading and rule generation
- leverages Marvin to get latest autogenerated APIs
- emacs like shortcuts on prompt
- uses apiKey and secretKey to interact with mgmt server
- logs all client commands
- PEP-8 compliant code

TODOs:
- Reverse search
- Fix input and output processing

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-31 23:19:14 +05:30
Rohit Yadav
ff9e60929c gitignore: ignore pythonic eggs and marvin in cli
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-31 23:19:10 +05:30
Rohit Yadav
d72d3ee22b marvin: check and use logger
Checks and only then calls logger

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-31 23:18:06 +05:30
Marcus Sorensen
1c0e2cf3f5 Summary: Implement Static NAT for KVM VPC
Detail: SetVPCStaticNatRules was one command that was left off of the initial
VPC implementation. This adds it in.

BUG-ID : CLOUDSTACK-426
Reviewed-by: Marcus Sorensen
Reported-by: Marcus Sorensen
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1351698124 -0600
2012-10-31 09:42:04 -06:00
Marcus Sorensen
761b4f60a1 Summary: Fix virtual router trying to resolve own host name (v2)
Detail: Make change in 95df86e1e030ab955ac09f145df37f3aef606c05 be specific
to VPC.

BUG-ID : NONE
Reviewed-by: Marcus Sorensen
Reported-by: Marcus Sorensen
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1351695701 -0600
2012-10-31 09:01:41 -06:00
marcus
95df86e1e0 Summary: Fix virtual router trying to resolve own host name
Detail: Several virtual router configuration commands, such as iptables
commands, run slowly due to attempting to do a name lookup on the virtual
router's hostname and having to time out. This is seen in the agent logs when
a virtual router command is run, as "unable to resolve host r-410-VM" or
similar. This can make for very slow router configuration, especially as the
number of network rules grows. This change simply sets the router's name to
the localhost IP in /etc/hosts

BUG-ID : NONE
Reviewed-by: Marcus Sorensen
Reported-by: Marcus Sorensen
Signed-off-by: Marcus Sorensen <shadowsor@gmail.com> 1351659441 -0600
2012-10-30 22:57:21 -06:00
Hugo Trippaers
4572bc0685 Summary: Sample packaging scripts
This is a manual merge of the maven-to-rpm branch. This commits show how an RPM
package can be built without waf. The current version only builds the management
server rpm and some related rpms like setup. The main missing items are agent rpm and
the awsapi rpm. But it should at least show how to use maven and packaging.

Several small tweaks are put into the client/pom.xml to make sure that the war
has all items required to run as a standalone war.
2012-10-30 16:31:36 +01:00
Hugo Trippaers
f65b268a2e Active the testrun by default in maven
Exclude the tests that need a database, these should move to the
integration test phase or use an in memory database maybe.
2012-10-30 14:15:07 +01:00
Hugo Trippaers
bd58ceccd8 Summary: Make the authenticator responsible for encoding the password and add a SHA256 salted authenticator
The authenticators now have an encode function that cloudstack will use to encode the user supplied password before storing it in the database. This makes it easier to add other authenticators with other hashing algorithms. The requires a two step approach to creating the admin account at first start as the authenticators are only present in the management-server component locator.

The SHA256 salted authenticator make use of this new system and adds a hashing algorithm based on SHA256 with a salt. This type of hash is far less susceptible to rainbow table attacks.

To make use of these new features the users password will be sent over the wire just as he typed it and it will be transformed into a hash on the server and compared with the stored password. This means that the hash will not go over the wire anymore.

The default authenticator in components.xml is still set to md5 for backwards compatibility. For new installations the sha256 could be enabled.
2012-10-30 12:56:56 +01:00
Prasanna Santhanam
07d555db37 Summary: secondary storage tests refactored
Detail: The secondary storage tests are now simplified. Since before
running tests we already ensure the health checks - template, builtin,
system vms are ready. there is no need to add additonal wait/sleep here.

Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351595163 +0530
2012-10-30 16:37:28 +05:30
marcus
843e140858 Summary: Allow public and private nic to be the same bridge
Detail: There was a regression in functionality introduced by
915babd970a9b4f209deceb3c4973b7d1c9c0c12 where the public
bridge could not also be the private bridge. This had several
additional consequences, this patch should revert the behavior
back while keeping the functionality enhancements introduced by that
commit.

BUG-ID : NONE
Reviewed-by: Dave Cahill
Reported-by: Dave Cahill via cloudstack-dev
Signed-off-by: Marcus Sorensen <shadowsor@gmail.com> 1351574006 -0600
2012-10-29 23:13:26 -06:00
Prasanna Santhanam
c916d6a1f1 Bash is not python!
Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351573594 +0530
2012-10-30 10:37:16 +05:30
Edison Su
a2d50c7e43 fix build 2012-10-29 12:55:15 -07:00
Hiroaki Kawai
c03712e86a CLOUDSTACK-423 : During VM migration on KVM, VifDriver.unplug is not
called.

VifDriver.unplug must be called in MigrateCommand which hooks VM
migration in source host, because plug will be called in
PrepareForMigration in destination host. But that operation is missing
in current LibvirtComputingResources.

Signed-off-by: Edison Su <sudison@gmail.com>
2012-10-29 11:36:25 -07:00
Hiroaki Kawai
cb9395498f kvm agent NIC unplug will always fail
On kvm computing host, vifdriver.unplug will always fails (throws
LibvirtException) and network cleanup will not be called. This was
because the code first undefine the computing domain, and then tries to
query the destroyed machine definition to fetch NIC information. IMHO,
kvm plugin code rounds LibvirtException too much.

Signed-off-by: Edison Su <sudison@gmail.com>
2012-10-29 11:35:49 -07:00
Jessica Wang
ce60cfee85 CS-16585: cloudstack 3.0 API - listProjects API - throw an API error if account is specified but domain is not. 2012-10-29 11:19:29 -07:00
Jessica Wang
6358acff54 cloudstack UI - project page - advanced search - (1) API doesn't take in zoneId, tagKey, tagValue. Therefore, remove the 3 fields from UI. (2) API takes in displayText. Therefore, add this field to UI. 2012-10-29 09:35:25 -07:00
Prasanna Santhanam
802ddd43ca Summary: Moving the test integration libraries into marvin for CLI work
Detail: Integration tests use these libraries (base,utils,common) for
simplifying the usage of the API. These define the verbs of each
entity's usage (create, delete, add etc). For the CLI to present the
simplified API we'll leverage the integration libraries.

+ Fixes to setup-test-data.sh - kvm and xen each use a different version
of the built-in Cent OS template, 5.5 and 5.3 namely.

At a later point the setup-test-data script needs to be obsoleted.
ostypeids in tests should directly be determined from listOsTypes API
calls

Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351520707 +0530
2012-10-29 20:23:02 +05:30
Rohit Yadav
c68c7e2a2d devcloud: Fix default template url and deploydb error
- Fix the default builtin template url. The previous url is not reachable by
  public network.
- Remove INSERT statement which already gets inserted in cloud.configuration
  by mvn -P developer -Ddeploydb

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-29 19:05:46 +05:30
Prasanna Santhanam
591cc5971f Summary: Do not filter by podid as systemvms span the zone
Detail: test_secondary_storage.py.test_systemvm_start() would try to
verify system VMs running under the zone but would filter by podid which
is not reqd. As systemVMs space a zone, filtering them zone-by-zone is
sufficient.

Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351506366 +0530
2012-10-29 15:57:35 +05:30
Hugo Trippaers
e24456f487 [CLOUDSTACK-415] Workaround this problem for now 2012-10-29 09:26:14 +01:00
Hugo Trippaers
200703e9b8 VMware stuff should be compile time dependency 2012-10-29 08:55:24 +01:00
Prasanna Santhanam
8d7ad6020d Built-In is of type CentOS 5.5 (64-bit)
Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351434029 +0530
2012-10-28 19:51:32 +05:30
Rohit Yadav
6c6d036447 CLOUDSTACK-196: cloud-set-guest-password enhancement to support Debian
(and derivatives)

Synced fix on setup/bindir/cloud-set-guest-password.in too.
Note: we've duplicate files, one in tools

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-28 15:39:42 +05:30
Prasanna Santhanam
5e2c1ef26e Summary: Open up the integration api port on the developer profile
Detail: Included the sqlCommand query to insert the
integration.api.port=8096 during managment server boot.

This will only affect developer runs where debugging is enabled.

BUG-ID : CLOUDSTACK-421
Reviewed-by: Prasanna Santhanam <tsp@apache.org>
Reported-by: Prasanna Santhanam <tsp@apache.org>

Testing:
$ mvn clean install
$ mvn -P developer -pl developer -Ddeploydb
$ mvn -pl :cloud-client-ui jetty:run

mysql> select * from configuration where name like 'integr%';
+----------+----------+-------------------+----------------------+-------+-------------+
| category | instance | component         | name                 | value | description |
+----------+----------+-------------------+----------------------+-------+-------------+
| Advanced | DEFAULT  | management-server | integration.api.port | 8096 | NULL        |
+----------+----------+-------------------+----------------------+-------+-------------+
1 row in set (0.01 sec)

http://localhost:8096/client/api?command=listOsTypes&keyword=CentOS%205.5&response=json

Returns:
{
   "listostypesresponse":{
      "count":2,
      "ostype":[
         {
            "id":"2474781c-52b6-42a1-aee4-b2ee159bbb41",
            "oscategoryid":"2188dd50-5d27-4c41-8f90-97bbadfc2206",
            "description":"CentOS 5.5 (32-bit)"
         },
         {
            "id":"fd95b25a-a46c-439e-af5c-1d2f1c149edd",
            "oscategoryid":"2188dd50-5d27-4c41-8f90-97bbadfc2206",
            "description":"CentOS 5.5 (64-bit)"
         }
      ]
   }
}

Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351405027 +0530
2012-10-28 11:47:07 +05:30
Prasanna Santhanam
5b43d245a7 Summary: Extending API doc pom to package
Detail: Create tarball of apidocs for distribution from jenkins
% mvn -Pdeveloper package

Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351321002 +0530
2012-10-27 12:26:42 +05:30
Prasanna Santhanam
241daa53c6 Summary: Mavenize marvin on master
Detail: Maven will now compile, install and deploy marvin using the
developer profile
    $ mvn -P developer

compile - compiles the cloudstackAPI
package - packages the marvin source distributable
deploy  - installs using pip (reqd python 2.7) the Marvin package in to
site-packages/

BUG-ID : CLOUDSTACK-378
Reported-by: Prasanna Santhanam <tsp@apache.org>
Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351319186 +0530
2012-10-27 11:56:25 +05:30
Chiradeep Vittal
d7227bdf55 Enable vmware build with mvn 2012-10-26 18:13:00 -07:00
Brian Federle
cdbfe261ba Add new infrastructure icons 2012-10-26 13:33:38 -07:00
Jessica Wang
4e8cf95140 CS-16573: cloudstack UI - account page - disable account, enable account, lock account, delete account, update resource count - encode data passed to API call. 2012-10-26 11:44:36 -07:00
Jessica Wang
539760ec68 CS-16612: cloudstack UI - Shared VLAN UI change - Network page - if it's Shared network and login is not root-admin, hide delete and restart option. 2012-10-26 11:00:41 -07:00
Jessica Wang
ef0be741c3 CS-16573: cloudstack UI - basic search in account page, update account action - encode data passed to API call. 2012-10-26 10:59:32 -07:00
Rohit Yadav
dbe88c1ed3 CLOUDSTACK-417: Handle passwd-srvr securely on VR, port 8080
By default do not enable port 8080 in iptables-router. Since, the socat
server which serves the password is in an infinite loop, any incorrect
attempt is returned bad_request and passwd-srvr won't break.

When /etc/init.d/cloud-passwd-srvr is started:
  - It finds and removes any old rules on port 8080, eth0
  - It applies iptables rule that accepts only traffic from private cidr.

When cloud-passwd-srvr is stopped:
  - It removes iptables rules on port 8080, eth0

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-26 21:37:32 +05:30
Hugo Trippaers
6a9c588d33 Fix loading of external script so they will be loaded from the webapp classloader.
This change will allow the Script class to look for resources in the classpath of the webapp. This makes it possible to distribute the management server as a single prepackaged war. An added benefit is easier integration with IDE's that have the option to start webapps internally.

Also fixes a bug/feature in the URL handling were some components of the script path were translated to urlencoding. This  change means that files are more often found in the first two steps of the findScript method which saves some filesystem calls.
2012-10-26 15:32:00 +02:00
Hugo Trippaers
e59726ad95 [CLOUDSTACK-359] Hook up the other side of the event propagation 2012-10-26 14:25:14 +02:00
Rohit Yadav
3663af1434 cloud-setup-databases: modify try-except-finally for < python 2.4
Make cloud-setup-databases compatible to python 2.4 and before.

Add code Prasanna Santhanam <tsp@apache.org>
Partially revert a6dcd7af4962a584f46d9b7271e2c225618624ed which removed
the fix for CLOUDSTACK-199: Fix how cloud-setup-databases parses
  Patch splits by right most @ in supplied argument to get
  user:password and host substrings.

Less than python <2.4 the following is unsupported and produces a
SyntaxError.
    try:
        ...code ...
    except ValueError:
        ...code ...
    finally:
        ...code ...

Workaround is the following
    try:
        try:
            ...code ...
        except ValueError:
            ...code ...
    finally:

Credits to Prasanna Santhanam <tsp@apache.org>

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-26 14:20:37 +05:30
Jessica Wang
7d15dc1d4d CS-16605: cloudstack 3.0 UI - create network offering - Mode dropdown (side by side/inline) - do not pass capabilitytype=InlineMode to API call when "side by side" is selected. Only pass it when "inline" is selected. 2012-10-25 15:59:54 -07:00
Brian Federle
e6c3e59e39 UI custom actions/enable static NAT: fix loading state
Fixes a bug where the loading state is not immediataly set for the
detail view on performing certain custom UI actions, particularly
enable static NAT.

This passes a separate 'start' function to the custom widgets, which
triggers the loading state, and 'complete' when the action
completes (i.e., the server call is done)
2012-10-25 14:40:16 -07:00
Brian Federle
0b2e5f1b17 CS-16567: Support quickview for custom actions
For custom actions (such as enable static NAT), fix instance list row
not updating when accessing via the quickview.
2012-10-25 13:59:53 -07:00
Alex Huang
525f96b7ae fixed tab problems 2012-10-25 13:13:47 -07:00
Min Chen
7b7f4cd1fd CLOUDSTACK-409: ThreadLocal Transaction and its db connection got reset for user managed db connnection, causing ClusterHeartBeat thread frequently trying to get db connection. Add unit test to test user managed transaction. 2012-10-25 13:06:50 -07:00
Jessica Wang
e531763d87 Revert "cloudstack UI - Static NAT, Port Forwarding and Firewall Implementation on JuniperSRX - IP Address page - configuration - Firewall - exclude ICMP from Protocol dropdown."
This reverts commit b7ccae0dde6f6949e5314036a7aa71460d676316.
2012-10-25 12:43:25 -07:00
Jessica Wang
0c96db5898 Revert "cloudstack UI - Static NAT, Port Forwarding and Firewall Implementation on JuniperSRX - IP Address page - configuration - Firewall - call listNetworkOfferings API only when the screen is navigated from Guest Network section, but not from VPC section."
This reverts commit a8e18f05298218d858c1833e52d2d3e4dd1ab5df.
2012-10-25 12:42:10 -07:00
Jessica Wang
aee0bf3e7b Revert "cloudstack UI - Static NAT, Port Forwarding and Firewall Implementation on JuniperSRX - IP Address page - configuration - if Firewall is provided by JuniperSRX, hide Firewall icon when Port forwarding is configured on IP Address."
This reverts commit 714b0593d3dfaa81af3c13d19a8105d1036954f7.
2012-10-25 12:40:41 -07:00
Jessica Wang
2b36ad8f92 CS-16612: cloudstack UI - create network offering - show all services regardless of guestIpType(Shared/Isolated). 2012-10-25 12:09:38 -07:00
Brian Federle
062190ccd8 Support IP address and services UI for shared networks
Currently, the IP addresses section and PF/LB/FW rule configuration is
disabled for shared networks; this change enables it for any shared
network with the source NAT service enabled. This makes the UI the
same for how it is with isolated networks.
2012-10-25 12:07:45 -07:00