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
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>
Built-In is of type CentOS 5.5 (64-bit)

Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351434029 +0530
VMware stuff should be compile time dependency
[CLOUDSTACK-415] Workaround this problem for now
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
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>
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
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.
CS-16585: cloudstack 3.0 API - listProjects API - throw an API error if account is specified but domain is not.
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>
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>
fix build
Bash is not python!

Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1351573594 +0530
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
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
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.
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.
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.
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