1953 Commits

Author SHA1 Message Date
Jayapal
6e96fc6f38 CLOUDSTACK-8324: Updated import and added ResourceWrapper annotation 2015-05-28 15:56:37 +05:30
Jayapal
3a8d1f7c55 CLOUDSTACK-8324: Added unit test cases for GetVmIpAddressCommand 2015-05-28 15:56:37 +05:30
Jayapal
e407986183 CLOUDSTACK-8324: Added config drive support for xenserver 2015-05-28 15:51:50 +05:30
Jayapal
7984ae5283 CLOUDSTACK-8324: Resource base changes for vm ip fetch 2015-05-28 15:42:08 +05:30
wilderrodrigues
b155129ae8 Fixing the packaging of the Xen resource tests - The package declaration of all Test classes was point to a package that was not represented as a directory - For example: Class A had "package b.c.d;" as declaration, but the class A was under directory "c"
Maven was bulding the project and executing the tests just fine because it uses "-sourcepath". However,
with IDEs and javac it would fail.

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #317
2015-05-27 16:06:33 +02:00
wilderrodrigues
ce9014d2ec Fix the NPE tht was being caught by the executeRequest() method. - The LibvirtUtilitiesHelper should have been injected, but it did not work on the Agent side. Due to that, when sending a StartCommand we were experiencing NPE, which made impossible to get SSVM/CPVM started. - The LibvirtUtilitiesHelper class is now being instantiated withing the LibvirtComputingResource
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #318
2015-05-27 13:19:57 +02:00
Rohit Yadav
cde6ef94b8 CLOUDSTACK-8247: Pull average Cpu util report between polling
Pull average Cpu util report between polling intervals instead of since boot
instead of using values since uptime

(cherry picked from commit 04176eaf171b46638be99b2f675aa2f09e99e1b8)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

This closes #297
2015-05-25 15:52:00 +02:00
Rohit Yadav
9dcfbceae7 kvm: for disabling pxe, pass empty file
Passing the file argument to the xml break for EL 7.1, the fix removes
the argument as just passing rombar='off' with its file arg to be empty string.

This closes #290

(cherry picked from commit aafa0c80b35a9f0e533e5a4b18d03f1e47cf9bfe)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-25 00:31:32 +02:00
Rafael da Fonseca
79d24ae218 Fix xenserver tests for travis 2015-05-23 16:14:09 +02:00
Rohit Yadav
d7f4498f76 kvm: Strip trailing comma for qemu-img convert options
Fix trailing comma for qemu-img convert options, Qemu 2.0+ not tolerant to it

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 90ac1aba13d431cdccf51dde2c4727b96388d985)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-22 13:33:54 +01:00
Rohit Yadav
c37060a1ff CLOUDSTACK-8338: Fix hypervisor stats reporting for KVM on EL7
EL7 has a different output to 'free', use /proc/meminfo instead of a tool to be
more consistent across distros

(cherry picked from commit 212a05a345aa19cd2597b7ff5d6a1da7b35b9fc1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
2015-05-22 12:10:54 +01:00
wilderrodrigues
add4277720 CLOUDSTACK-8502
Added CitrixStorageSubSystemCommandWrapper to complete the CitrixResourceBase refactor.
  - All 101 unit tests are green
2015-05-21 13:59:49 +02:00
wilderrodrigues
3efdc6c356 CLOUDSTACK-8502
Using Annotations on the Libvirt wrappers in order to increase maintainability
  - All wrappers modified
  - All 143 unit tests are green
2015-05-21 13:37:27 +02:00
wilderrodrigues
7ff1a81cee CLOUDSTACK-8502
Using Annotations on the Citrix wrappers in order to increase maintainability
  - All wrappers modified
  - All 100 unit tests are green
2015-05-21 13:36:55 +02:00
wilderrodrigues
14c123e082 Merge branch 'fix/libvirt_unittests_timeout' of https://github.com/schubergphilis/cloudstack
This closes #270
2015-05-20 15:56:13 +02:00
wilderrodrigues
982a0235a0 CLOUDSTACK-8486
Removing real IPs from the tests because they cause a long running time for LibvirtComputingResourceTest
    - In a local machine it takes 1.977s, but in a KVM test environment it's taking 257.879 sec
2015-05-20 14:52:08 +02:00
Wido den Hollander
3894d34b2c CLOUDSTACK-8489: Set smbios information for guest
This allows a guest to easily detect that it is running inside CloudStack
and see which UUID it has.
2015-05-20 13:28:56 +02:00
wilderrodrigues
ab7473eea0 Changing the JUnit runner in order to avoid problems with Java 8 - All tests passed using different approaches - Maven with parameters: -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 - Maven without parameters
All builds were executed using javac 1.8.0_31

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #266
2015-05-20 09:53:46 +01:00
wilderrodrigues
0cdb4b6108 Fixing the testGetHostStatsCommand test under LibvirtComputingResourceTest. - Removed the expected value from the Test annotation - Mocking the bash path in order to avoid environment/OS issues
Fixing typo on LibvirtRequestWrapper
  - Replace linbvirtCommands by libvirtCommands on LibvirtRequestWrapper

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #255
2015-05-18 20:07:02 +02:00
wilderrodrigues
c7d2e444d2 Fixing license header in a file added during the LibVirt refactor
- New class is MigrateKVMAsync
2015-05-13 11:56:43 +02:00
wilderrodrigues
f575206ad4 Fixing testModifySshKeysCommand in the LibvirtComputingResourceTest class
- The test was okay, but when running in an environment where a /root/.ssh/id_rsa existed, it would return true then fail
  - We now mock the calls to methods that return the key paths, instead of relying in the static variables
2015-05-08 19:53:03 +02:00
wilderrodrigues
74ad48db55 Refactoring the LibvirtComputingResource
- Adding LibvirtStartCommandWrapper
  - 8 unit tests added
  - KVM hypervisor plugin with 23.2% coverage
2015-05-06 19:24:16 +02:00
wilderrodrigues
09656ca84e Refactoring the LibvirtComputingResource
- Adding LibvirtNetworkElementCommandWrapper and LibvirtStorageSubSystemCommandWrapper
  - 2 unit tests added
  - KVM hypervisor plugin with 22.2% coverage

I also refactored the StorageSubSystemCommand interface into an abstract class
  - Remove the pseudo-multiple-inheritance implementation
    - The StorageSubSystemCommand was an interface, not related to the Command class
      and its implementation were extending the Command class anyway. The whole structure is better now.
2015-05-06 19:24:16 +02:00
wilderrodrigues
08106e34d0 Refactoring the LibvirtComputingResource
- Adding LibvirtResizeVolumeCommandWrapper
  - 5 unit tests added
  - KVM hypervisor plugin with 22.1% coverage
2015-05-06 19:24:15 +02:00
wilderrodrigues
ae505e7bef Refactoring the LibvirtComputingResource
- Addin LibvirtPvlanSetupCommandWrapper
  - 6 unit tests added
  - KVM hypervisor plugin with 21% coverage

From the 6 tests added, 2 were extra tests to increase the coverage of the LibvirtStopCommandWrapper
  - Increased from 35% to 78.7%
2015-05-06 19:24:15 +02:00
wilderrodrigues
7fd43f33d3 Refactoring the LibvirtComputingResource
- 5 unit tests added
  - KVM hypervisor plugin with 20.1% coverage
2015-05-06 19:24:15 +02:00
wilderrodrigues
0b1b2b6d92 Refactoring the LibvirtComputingResource
- Adding LibvirtCopyVolumeCommandWrapper

Refactoring the LibvirtUtilitiesHelper
  - Changing method name

Did not add any test to this commit due to the refactor mentioned abot.
Will proceed and add the tests

i# Please enter the commit message for your changes. Lines starting
2015-05-06 19:24:15 +02:00
wilderrodrigues
885b9e45d7 Renaming LibvirtConnectionWrapper to LibvirtUtilitiesHelper
- Gave it a better, more suggestive, name since I now added other methods to the class.
  - It makes easier to mock objects and get a better coverage of the classes
2015-05-06 19:24:14 +02:00
wilderrodrigues
b3913ca1fb Refactoring the LibvirtComputingResource
- Adding LibvirtCreatePrivateTemplateFromSnapshotCommandWrapper
  - 5 unit tests added
  - KVM hypervisor plugin with 19.5% coverage
2015-05-06 19:24:14 +02:00
wilderrodrigues
bcf78d3b43 Refactoring the LibvirtComputingResource
- Adding LibvirtBackupSnapshotCommandWrapper, LibvirtCreatePrivateTemplateFromVolumeCommandWrapper and LibvirtManageSnapshotCommandWrapper
  - 3 unit tests added
  - KVM hypervisor plugin with 18.3% coverage

Less tests added to those classes because the code is quite complex and way too long.
The tests added are just covering the new flow, to make sure it works fine. I will come back to those classes later.
2015-05-06 19:24:13 +02:00
wilderrodrigues
52d9f0c206 Refactoring the LibvirtComputingResource
- Adding LibvirtNetworkUsageCommandWrapper, LibvirtPlugNicCommandWrapper and LibvirtUnPlugNicCommandWrapper
  - 9 unit tests added
  - KVM hypervisor plugin with 18.3% coverage
2015-05-06 19:24:13 +02:00
wilderrodrigues
ff7ae9ca0c Refactoring the LibvirtComputingResource
- Adding LibvirtCreateVolumeFromSnapshotCommandWrapper, LibvirtFenceCommandWrapper and LibvirtSecurityGroupRulesCommandWrapper
  - 6 unit tests added
  - KVM hypervisor plugin with 17.2% coverage
2015-05-06 19:24:13 +02:00
wilderrodrigues
3c8b217262 Refactoring the LibvirtComputingResource
- Adding LibvirtCheckOnHostCommandWrapper and LibvirtOvsCreateTunnelCommandWrapper
  - 4 unit tests added
  - KVM hypervisor plugin with 16.2% coverage
2015-05-06 19:24:12 +02:00
wilderrodrigues
6748a73b82 Refactoring the LibvirtComputingResource
- Adding 4 new command wrappers
  - 12 unit tests added
  - KVM hypervisor plugin with 15.5% coverage
2015-05-06 19:24:12 +02:00
wilderrodrigues
5499eecd33 Refactoring the LibvirtComputingResource
- Adding 7 new command wrappers
  - 10 unit tests added
  - KVM hypervisor plugin with 14.8% coverage
2015-05-06 19:24:12 +02:00
wilderrodrigues
4887ce7254 Refactoring the LibvirtComputingResource
- Adding LibvirtOvsDestroyBridgeCommandWrapper, LibvirtOvsSetupBridgeCommandWrapper
  - 4 unit tests added
  - KVM hypervisor plugin with 13.9% coverage

More tests added to cover LibvirtPrepareForMigrationCommandWrapper
  - Coverage of this wrapper broght from 37% to 90.6%
  - 4 new tests added
2015-05-06 19:24:11 +02:00
wilderrodrigues
0d860af659 Refactoring the LibvirtComputingResource
- Adding LibvirtDeleteStoragePoolCommandWrapper, LibvirtGetStorageStatsCommandWrapper and LibvirtUpgradeSnapshotCommandWrapper
  - 7 unit tests added
  - KVM hypervisor plugin with 13.6% coverage
2015-05-06 19:24:11 +02:00
wilderrodrigues
8268d353a2 Refactoring the LibvirtComputingResource
- Adding LibvirtPrimaryStorageDownloadCommandWrapper
  - 4 unit tests added
  - KVM hypervisor plugin with 13.3% coverage
2015-05-06 19:24:11 +02:00
wilderrodrigues
4472cade2f Refactoring the LibvirtComputingResource
- Adding LibvirtDestroyCommandWrapper
  - 2 unit tests added
  - KVM hypervisor plugin with 12.9% coverage
2015-05-06 19:24:11 +02:00
wilderrodrigues
cb4670279f Refactoring the LibvirtComputingResource
- Adding LibvirtCreateCommandWrapper and LibvirtMaintainCommandWrapper
  - 4 unit tests added
  - KVM hypervisor plugin with 12.7% coverage
2015-05-06 19:24:10 +02:00
wilderrodrigues
6f757c6bf0 Refactoring the LibvirtComputingResource
- Adding LibvirtModifySshKeysCommandWrapper
  - 1 unit test added
  - KVM hypervisor plugin with 12.3% coverage
2015-05-06 19:24:10 +02:00
wilderrodrigues
f14c7c2074 Refactoring the LibvirtComputingResource
- Adding LibvirtGetVncPortCommandWrapper
  - 2 unit tests added
  - KVM hypervisor plugin with 12.1% coverage
2015-05-06 19:20:43 +02:00
wilderrodrigues
7319a12600 Refactoring the LibvirtComputingResource
- Adding LibvirtCheckConsoleProxyLoadCommandWrapper, LibvirtConsoleProxyLoadCommandWrapper, LibvirtWatchConsoleProxyLoadCommandWrapperand CitrixConsoleProxyLoadCommandWrapper
  - 2 unit tests added
  - KVM hypervisor plugin with 12% coverage

Refactored the CommandWrapper interface in order to remove the esecuteProxyLoadScan, which is now
implemented bu subclasses.
2015-05-06 19:20:43 +02:00
wilderrodrigues
08a9523dcd Fixing assertion on the tests that are execting exceptions 2015-05-06 19:20:43 +02:00
wilderrodrigues
40886b337c Refactoring the LibvirtComputingResource
- Adding LibvirtAttachVolumeCommandWrapper
  - 3 unit tests added
  - KVM hypervisor plugin with 11.7% coverage
2015-05-06 19:20:42 +02:00
wilderrodrigues
4d216f1a63 Refactoring the LibvirtComputingResource
- Adding LibvirtAttachIsoCommandWrapper, LibvirtAttachIsoCommandWrapper and LibvirtAttachIsoCommandWrapper
  - 7 unit tests added
  - KVM hypervisor plugin with 11.5% coverage
2015-05-06 19:20:42 +02:00
wilderrodrigues
be1e517615 Refactoring the LibvirtComputingResource
- Adding LibvirtPingTestCommandWrapper
  - 3 unit tests added
  - KVM hypervisor plugin with 11.2% coverage
2015-05-06 19:20:42 +02:00
wilderrodrigues
28e55462f1 Refactoring the LibvirtComputingResource
- Adding LibvirtMigrateCommandWrapper
  - 1 unit tests added
  - KVM hypervisor plugin with 10.9% coverage
2015-05-06 19:20:41 +02:00
wilderrodrigues
d730efb866 Refactoring the LibvirtComputingResource
- Adding LibvirtCheckHealthCommandWrapper and LibvirtPrepareForMigrationCommandWrapper
  - 2 unit tests added
  - KVM hypervisor plugin with 10.8% coverage
2015-05-06 19:20:41 +02:00
wilderrodrigues
54f68f519f Removing the CheckStateCommand form the IF statement on LibvirtComputingResource
- It's not used and if so would cause an infinite loop.
2015-05-06 19:20:41 +02:00