224 Commits

Author SHA1 Message Date
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
Hugo Trippaers
1fbf2a2864 Fix bug in Port Forwarding
Nicira NVP can't handle a range of port when implementing port
forwarding, so return an error message when a rule is being implemented
that uses port ranges.

Include unittest to verify this behaviour
2012-12-06 16:50:56 +01:00
Hugo Trippaers
cfd2a0bdf8 Fixes for some bug discovered while writing unittests
Rewritten handling for static nat and port forwarding, should make some
more sense now and the complex functions are split in smaller units.

Fix a small bug in Match

Add equals function to NatRule that ignores the uuid field.
2012-12-06 14:45:58 +01:00
Hugo Trippaers
22ef646b23 Add more unittests for NiciraNvpResource 2012-12-06 14:45:58 +01:00
Hugo Trippaers
48308ec070 Redoing NatRule usage and some fixes based on issues found while writing
unittests
2012-12-06 14:45:37 +01:00
Hugo Trippaers
700050a713 More unittests for NiciraNvpResource
Add some basic unittest for NatRule
2012-12-06 14:45:09 +01:00
Hugo Trippaers
b0955e43ff Put the mockito version in the central version list 2012-12-06 14:42:59 +01:00
Murali Reddy
6657246cd4 Summary: partical check-in for L4-L7 network services in the shared
network in the advanced zone

Changing the F5, NetScaler, SRX network elemetns to handle both 'isolated networks'
and 'shared networks' in the advanced zone

Bug ID:CLOUDSTACK-312 enable L4-L7 network services in the shared network in the advanced zone
2012-12-06 11:55:19 +05:30
Marcus Sorensen
7ce2227108 Summary: master - Copy qcow2 instead of converting if source and dest are qcow2
Detail: If source image is qcow2, and we want a qcow2 image, then doing a
convert strips off compression and any snapshots the user had in that image. If
a backing file exists, we stick with convert so we can pull in both the backing
file and the COW image, otherwise we just cp the qcow2 file. This is also faster

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1354755241 -0700
2012-12-05 17:54:01 -07:00
anthony
40682fc43d CLOUDSTACK-587:
use setMemoryLimits instead
2012-12-05 05:24:46 -08:00
Hugo Trippaers
0902f60c61 Quickly add the license header before Chip finds out. 2012-12-02 11:19:32 -08:00
Hugo Trippaers
751e74708e Setup unittests for the nicira nvp plugin
Changed the creation of the NiciraNvpApi to a factory method that can be
overridden by a mock object.

Setup two tests to test the configure function of the NiciraNvpResource
to test this factory method.
2012-12-02 10:50:14 -08:00
Marcus Sorensen
05d3f86b16 Summary: Fix orphaned patch disks for system VMs on KVM
Detail: This patch deletes any patchdisk found when deleting root volume for
system VM.

BUG-ID: CLOUDSTACK-566
Bugfix-for: 4.0.1
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1354222335 -0700
2012-11-29 13:52:15 -07:00
Marcus Sorensen
5aad7cc307 Summary: Pull patch from 4.0 that skips deleting patchVbd when systemvms are
stopped

Detail: This patch fixed an issue with hosts trying to stop system vms that were
already not running and deleting a patch disk for the system vm running on
another host. It got applied to 4.0 but not master.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1354222160 -0700
2012-11-29 13:49:20 -07:00
Hiroaki Kawai
a28f4cac3c HttpClient needs releaseConnection method call
reviewboard: https://reviews.apache.org/r/8186/

Signed-off-by: Hugo Trippaers <trippie@gmail.com>
2012-11-29 20:23:30 +01:00
Hiroaki Kawai
c8832cd4b6 Commit https://reviews.apache.org/r/8075/
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2012-11-19 12:02:26 +01:00
Marcus Sorensen
88180fc139 Summary: Direct template imaging for CLVM, bypass copy template to primary
Detail: Because of the way most other primary storage types work with cloudstack
   (i.e. backing stores) CLVM actually copies the template to a local logical
   volume on primary storage, then uses that. This causes all of your primary
   storage to be littered with a copy of every template used. Since we're not
   using these, dump the template direct to the newly created logical volume.
   This is faster as well since the template is sparse; we're not creating a fat
   template on primary storage and then copying that to a logical volume when we
   deploy from template.

BUG-ID: CLOUDSTACK-508
Bugfix-for: 4.1
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1353221260 -0700
2012-11-17 23:47:39 -07:00
Vijay Venkatachalam
affc162556 AutoScale: Fixing issues that occurred during rebase with master 2012-11-16 11:04:37 +05:30
Vijay Venkatachalam
527b5c8ee2 Autoscale: Supporting network element independent counter parameters Reviewed-By:Devdeep 2012-11-16 10:57:00 +05:30
Vijay Vekatachalam
4836aba56f Create Autoscale config in Netscaler with unique Identifier based on Vmgroup 2012-11-16 10:56:59 +05:30
Vijay Vekatachalam
35b0e086d4 enable Autoscale VMs to be named as Autoscale-LB-<lbname> 2012-11-16 10:56:59 +05:30
Vijay Vekatachalam
57416188a2 Enabling aUtoscale VMs to be provisioned in a loadbalancer's network 2012-11-16 10:56:59 +05:30
Deepak Garg
bf1e6ed991 CS-15644-Autoscale: Implemented UUIDs for templateId-serviceOff Reviewed-By:Vijay 2012-11-16 10:56:58 +05:30
Vijay venkatachalam
3e32a29048 Autoscale:Changes for addressing AutoScale bugs CS-15930, CS-15931, CS-15934, CS-15935 2012-11-16 10:56:58 +05:30
Vijay venkatachalam
c7f84cae77 Autoscale:7078-NetScaler's API changes for autoscale 2012-11-16 10:56:58 +05:30
Vijay venkatachalam
3ceebc140a AutoScale. Re-organized NetScalerResource. Bringing autoscale functions in a logical order. 2012-11-16 10:56:57 +05:30
Vijay venkatachalam
eec892dfbc Handling of errors during AutoScaleConfig in NetScaler. 2012-11-16 10:56:57 +05:30
Vijay
dda4d39b55 AutoScale changes in Apache master 2012-11-16 10:56:44 +05:30
Marcus Sorensen
b42f3f53d8 Summary: Fix empty traffic labels causing NullPointerExceptions on KVM
Detail: In com.cloud.hypervisor.kvm.resource.BridgeVifDriver.java, in 2 places
an if block should have evaluated to true if trafficLabel was null, however it
was causing a NullPointerException instead.

BUG-ID : NONE
Bugfix-for: 4.0
Reviewed-by: Marcus Sorensen
Reported-by: Dave Cahill
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1352307750 -0700
2012-11-07 10:02:30 -07:00
Chip Childers
713418c0aa Fixed license headers in 2 files
Signed-off-by: Chip Childers <chip.childers@gmail.com>
2012-10-31 14:29:38 -04: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
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
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
Hugo Trippaers
200703e9b8 VMware stuff should be compile time dependency 2012-10-29 08:55:24 +01:00
Hugo Trippaers
6a20802640 Fix runtime dependencies for vmware modules
The vmware modules should be listed as provided so they are never
packaged. However this also means that you have to put them in the
web-inf/lib directory by hand.

Set the version of the api in the central pom for easy reference.

Add wsdl4j as a runtime requirement. It is actually required by the
vmware implementation but it is easier to list it as a requirements for
the component here as vmware is not in any maven repo

put the dependency on vim back in the dependencies. It is not required
for compile, but is required as runtime by apputils.
2012-10-22 17:58:36 +02:00
Hugo Trippaers
53cea844bc The interface change introduced by commit
214bbf3ebd957f571901869f319da61ebad7ed23 broke the nonoss build.
2012-10-18 09:40:13 +02:00
Alena Prokharchyk
214bbf3ebd CLOUDSTACK-279: fixed deleteProject when executed by the regular user. Always pass System account as a caller when do account cleanup
Conflicts:

	api/src/com/cloud/api/commands/DeleteRemoteAccessVpnCmd.java
	server/src/com/cloud/network/element/CiscoNexusVSMElement.java
	server/src/com/cloud/network/element/ElasticLoadBalancerElement.java
	server/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
	server/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
	server/src/com/cloud/network/element/NetscalerElement.java
	server/src/com/cloud/network/element/OvsElement.java
	server/src/com/cloud/network/element/VpcJuniperSRXExternalFirewallElement.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/vpc/VpcManagerImpl.java
	server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
	server/src/com/cloud/storage/StorageManager.java
2012-10-17 17:26:19 -07:00
Hugo Trippaers
28c31e3707 truncate names that are longer than 40 characters, this is the max
length nicira api accepts for display_name.
2012-10-17 13:29:03 +02:00
Hugo Trippaers
11dc1f0b8e Check manageontap sdk version and provide instructions. 2012-10-15 17:25:40 +02:00
Hugo Trippaers
3bb136292b Double check vmware dependencies and provide information on where to get
them.
2012-10-15 16:57:59 +02:00
Rohit Yadav
9b1b145192 CLOUDSTACK-346: Replace vmware-lib-jaxrpc with axis-jaxrpc
vmware-lib-jaxrpc is now provided by axis-jaxrpc-1.4.jar, the former is
the same as latter (bit by bit) and only difference is the file name.

- Fix dependency in vmware-base's pom.xml
- Fix dependency in hypervisor-plugin-vmware's pom.xml
- Fix install-non-oss.sh by reverting commit:
    2e6ddc6c36f4ce79e67ad223647071bccfc41c52.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-15 16:44:30 +05:30
Hugo Trippaers
a4a3194899 Fix license headers 2012-10-15 10:22:12 +02:00
Chip Childers
b48d0d7d08 CLOUDSTACK-326: Removing extra license and README files
Signed-off-by: Chip Childers <chip.childers@gmail.com>
2012-10-12 14:29:51 -04:00
Hugo Trippaers
c07d6d28ee Merge branch 'nicira-l3support'
This commit merges the nicira-l3support branch with master. This
effectively adds nicira nvp l3 support to master. The NiciraNVP Provider
can support the following services with this modification: Connectivity,
SourceNat, StaticNat and PortForwarding

Testing done:
Create, Delete network offerings with Nicira Element
Use Gui to add, modify, remove Nicira Element and Provider
Provision, deprovision SourceNat networks
Provision, deprovision Portforwarding and StaticNat rules

Tested with Nicira NVP release 2.1.0, 2.2.0 and 2.2.1 (2.2.x recommended)
2012-10-12 14:15:17 +02:00
Hugo Trippaers
51f9a98871 Check all TODO and FIXME tasks 2012-10-12 12:02:54 +02:00
Hugo Trippaers
ab8ba3d61d Implement the portforwarding code in the resource
Fix a small naming typo
2012-10-12 11:57:27 +02:00
Hugo Trippaers
553a72047f Implement static nat handling 2012-10-11 18:13:47 +02:00