247 Commits

Author SHA1 Message Date
Sheng Yang
42c8c73ab6 CLOUDSTACK-306: Introducing IpDeployingRequester and implement inline mode
For LB device in inline mode, the ip deployer(the owner of public ip) is the
firewall in front of it, not itself. So check if it's inline or not, if it's
inline, return the firewall as ip deployer
2013-01-04 19:18:03 -08:00
Sheng Yang
177e157cbf CLOUDSTACK-306: Move inline mode parameter from device to network offering
One F5 device can be used as inline and side-by-side at the same time(for
different networks). So we can define inline or not on network base.
2013-01-04 19:17:58 -08:00
Sheng Yang
717f9dcd4d CLOUDSTACK-306: Implement SRX firewall
Use SRX firewall filter as SRX firewall. The old security policy mechanism
cannot be used as IP based. This would enable SRX's ability to control traffic
for F5 behind it.
2013-01-04 19:17:50 -08: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
Edison Su
bba43f51dc vmware stuff should be compile time dependency 2013-01-02 16:25:17 -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
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
Devdeep Singh
8f6fdc3efc CLOUDSTACK-227: Fix NPE and throw an exception if the network is not found in Xen
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 19:03:03 -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
39fea6f6fc simulator: fixing pom.xml for build 2012-12-22 13:07:48 -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
Alex Huang
392feacd27 missed license 2012-12-18 13:04:34 -08:00
Alex Huang
591fb34795 Added dns-notifier as example plugin 2012-12-18 12:01:26 -08:00
Marcus Sorensen
6ed1989133 Summary: Allow for custom storage adaptors based on pool type in KVM
Detail: Instead of using LibvirtStorageAdaptor for everything, you can create
your own storage adaptor and use it. We select storage adaptor based on storage
pool type, thus we needed to adjust LibvirtComputingResource to pass pool type
to everything in KVMStoragePoolManager. This in turn required that we pass the
info necessary to LibvirtComputingResource as well, so a few agent Commands were
modified.

Note this patch in and of itself shouldn't change any existing behavior, just
allow for new storage adaptors to be selected based on storage pool type.

Reviewed-by: Edison Su
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1355769696 -0700
2012-12-17 11:41:36 -07:00
Hugo Trippaers
859412c1ce Fix headers
again....
2012-12-14 11:58:25 +01:00
Hugo Trippaers
2235776aed Unittests for NiciraNvpGuestNetworkGuru
These unittests do not depend on the componentlocator but instead are
completely dependent on mock objects. This ensures that they can be run
standalone without any requirements on the environment.

Includes some fixes to NiciraNvpGuestNetworkGuru and GuestNetworkGuru
2012-12-14 10:41:36 +01:00
Edison Su
b70c1a5a84 Backs NFS-based secondary storage with an S3-compatible object store. Periodically, a reaper thread synchronizes templates and ISOs stored on a NFS secondary storage mount with a configured S3 object store. It also pushes snapshots to the object store when they are created and downloads them in other zones on-demand. In addition to permitting the use of commodity or IaaS storage solutions for static assets, it provides a means of automatically synchronizing template and ISO assets across multiple zones. 2012-12-13 23:18:37 -08:00
Devdeep Singh
5405242674 master - Bug ID: CLOUDSTACK-369. Unable to add XenServer 6.1 to cloudstack. Created a new resource for XS 6.1. Also introduced a guest map for the list of supported os.
Signed-off-by: Devdeep Singh <devdeep.singh@citrix.com>
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2012-12-10 15:17:07 +05:30
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