2626 Commits

Author SHA1 Message Date
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
0c6758f917 Merge branch 'improvement/annotations_xen_kvm'
This closes #280
2015-05-22 12:55:53 +02:00
Rohit Yadav
1c81b241e7 CLOUDSTACK-8505: Don't allow non-POST requests for default login API
We add a new contract to pass Http request to authentication plugin system. In
the default login API, we disallow non-POST requests.

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

Conflicts:
	api/src/org/apache/cloudstack/api/auth/APIAuthenticator.java
	plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java
	plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmd.java
	plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java
	plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmdTest.java
	plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmdTest.java
	plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmdTest.java
	server/src/com/cloud/api/ApiServlet.java
	server/src/com/cloud/api/auth/DefaultLoginAPIAuthenticatorCmd.java
	server/src/com/cloud/api/auth/DefaultLogoutAPIAuthenticatorCmd.java
	server/test/com/cloud/api/ApiServletTest.java
2015-05-22 11:44:34 +01:00
wilderrodrigues
3228854a97 Merge branch 'improvement/annotations_kvm_citrix' of https://github.com/schubergphilis/cloudstack into improvement/annotations_xen_kvm
Testing branch
2015-05-22 12:38:08 +02:00
Koushik Das
1cd2e9bc44 Merge branch 'CLOUDSTACK-8301' of https://github.com/apache/cloudstack 2015-05-22 09:47:59 +05:30
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
Koushik Das
d423df66cc CLOUDSTACK-8301: Enable configuring local storage use for system VMs at zone level
Code cleanup, added helper method to get default system offering based on "system.vm.use.local.storage".
2015-05-19 21:32:14 +05:30
Koushik Das
3f7e31ed05 CLOUDSTACK-8301: Enable configuring local storage use for system VMs at zone level
Made system.vm.use.local.storage a zone level configuration.
2015-05-19 21:32:14 +05:30
Devdeep Singh
a99c9d0e68 Implementation for the ability to disable a storage pool for provisioning
... of new volumes. Following changes are implemented 1. Disable or enable a pool with the
updateStoragePool api. A new 'enabled' parameter added for the same. 2. When a
pool is disabled the state of the pool is updated to 'Disabled' in the db. On
enabling it is updated back to 'Up'. Alert is raised when a pool is disabled or
enabled. 3. Updated other storage providers to also honour the disabled state.
4. A disabled pool is skipped by allocators for provisioing of new volumes. 5.
Since the allocators skip a disabled pool for provisioning of volumes, the
volumes are also not listed as a destination for volume migration.

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Disabling+Storage+Pool+for+Provisioning

This closes #257

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-19 11:16:49 +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
45c0fa2faa Merge branch 'refactor/libvirt_resource' of https://github.com/schubergphilis/cloudstack
This closes #233
2015-05-13 11:23:12 +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
Mike Tutkowski
ac2bccd2a2 Removing unused imports 2015-05-07 13:52:25 -06:00
Mike Tutkowski
bcd227fb6b Pass on all operations to CloudStackPrimaryDataStoreDriverImpl 2015-05-07 12:24:05 -06:00
Daan Hoogland
1c408dec37 Merge branch '4.5' after 4.5.1 vote passes 2015-05-07 16:03:26 +02:00
Rohit Yadav
4ba72a877c Updating pom.xml version numbers for release 4.5.2-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-07 15:33:01 +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