398 Commits

Author SHA1 Message Date
Rafael da Fonseca
b869a16332 Remove unused import to fix checkstyle warning
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #400
2015-06-15 12:04:19 +03:00
Rafael da Fonseca
949e97dec6 Fix findbugs warning in LibvirtConsoleProxyLoadCommandWrapper Encoding is now specified in both server and clients for the console proxy getstatus command For some reason, findbugs did not detect unsafe encoding issue in ConsoleProxyResource.java, is properly specified now though... CitrixConsoleProxyLoadCommandWrapper was specifying system default encoding for operation, should be ok because default for xenserver is UTF-8 since it's linux based, but it's best to specify exact encoding set on the server end to be consistent
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-15 12:04:18 +03:00
Rafael da Fonseca
cc6d28fc98 Fix another findbugs encoding warning in CitrixResourceBase In this case, using default encoding is desired, since the purpose is to read shell command output, which uses the platform's default encoding. This gets rid of the findbugs warning.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #396
2015-06-15 11:59:48 +03:00
Rafael da Fonseca
faa38ad416 Fix findbugs encoding warning in CitrixResourceBase Output of text files should be UTF-8, this is the default for linux, will now always use the same format for every platform
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #395
2015-06-15 11:59:38 +03:00
wilderrodrigues
b267c5fc5a Replacing real IPs by 127.0.0.1. - It was causing problems in some environments - The Ips should have been removed in a previous commit, but some of them were missed
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #325
2015-05-29 11:25:40 +02:00
Jayapal
b616522088 CLOUDSTACK-8324: Corrected the file paths for xenserver command files
This closes #315
2015-05-28 17:02:09 +05:30
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
Rafael da Fonseca
79d24ae218 Fix xenserver tests for travis 2015-05-23 16:14:09 +02: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
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
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
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
508f10527f Refactoring the LibvirtComputingResource
- Adding LibvirtStopCommandWrapper
  - LibvirtRequestWrapper
  - 1 unit tests

Refactored the RequestWrapper to make it better.
  - Changes also applied to the CitrixRequestWrapper
2015-05-06 19:20:39 +02:00
Anshul Gangwar
866cc41145 CLOUDSTACK-8423: [Xenserver] Improved the performance for processing of ClusterVMMetaDataSync command which can cause slowness in DB if there are huge number of VMs
this closes #204
2015-04-30 14:44:36 +05:30
wilderrodrigues
3b0c031b9f Using the SSHCmdHelper instead of a SSH Session. 2015-04-29 13:05:21 +02:00
Daan Hoogland
cb02a32f79 findbugs: boxing/unboxing removed 2015-04-12 20:16:13 +02:00
Daan Hoogland
72b2422623 findbugs: removed identical override for CitrixResourceBase method
transferManagementNetwork
2015-04-12 20:10:20 +02:00
Daan Hoogland
332da26cb9 findbugs: unused retry count causing unintended useless null guard 2015-04-12 19:58:05 +02:00
wilderrodrigues
096d1b93b0 This closes #146
Refactoring the NetworkUsageCommand wrapper in order to cope with new design
   - Unit tests added: 100% coverage
2015-04-05 13:24:45 +02:00
wilderrodrigues
02d1cdd49a Refactoring the MigrateVolumeCommand wrapper in order to cope with new design
- Unit tests added: 43.1% coverage
   - It's a bit difficult to test the Xen API classes due to their static nature
2015-04-05 09:23:10 +02:00
wilderrodrigues
f6e162afe4 Refactoring the MigrateWithStorageCompleteCommand wrapper in order to cope with new design
- Unit tests added: 50% coverage
   - It's a bit difficult to test the Xen API classes due to their static nature
2015-04-05 09:23:10 +02:00
wilderrodrigues
d5414d26b4 Refactoring the MigrateWithStorageSendCommand wrapper in order to cope with new design
- Unit tests added: 47.2% coverage
   - It's a bit difficult to test the Xen API classes due to their static nature
2015-04-05 09:23:10 +02:00
wilderrodrigues
c5a2f926e0 Refactoring the MigrateWithStorageReceiveCommand wrapper in order to cope with new design
- Unit tests added: 65% coverage
   - It's a bit difficult to test the Xen API classes due to their static nature
2015-04-05 09:23:09 +02:00
wilderrodrigues
858b87f01c Refactoring the MigrateWithStorageCommand wrapper in order to cope with new design
- Unit tests added: 30.1% coverage
   - It's a bit difficult to test the Xen API classes due to their static nature
2015-04-05 09:23:09 +02:00
wilderrodrigues
240bcb8120 Refactoring the GetGPUStatsCommand wrapper in order to cope with new design
- Unit tests added: 100% coverage
2015-04-05 09:23:09 +02:00
wilderrodrigues
bcee7281c6 Started refctoring the remaining XenServer resources
- Just cleaning the formating
2015-04-05 09:23:09 +02:00
wilderrodrigues
3f89cd6494 Adding license headers that made RAT fail
- Test classes affected

This closes #143
2015-04-03 10:43:30 +02:00
wilderrodrigues
57d0931b49 Adding more tests to cover other possibilities concerning different versions of the XenServer
Adding a better algorithm in order to corver deeper inheritance form the command classes
Removing some unsued variables.
2015-03-31 16:49:48 +02:00
wilderrodrigues
d93935caac We don't need the Start, Stop, Reboot command in the CitrixRebaseClaas anymore. 2015-03-31 10:38:33 +02:00
wilderrodrigues
3ad30a01a8 Refactoring XenServer56NetworkUsageCommandWrapper in order to cope with the new design
- Unit tests added
CitrixResourceBase, XenServer56Resource and XenServer56FP1Resource are now done.

i
2015-03-31 10:38:33 +02:00
wilderrodrigues
f3842c81f8 Refactoring XenServer56 and 56FP1 Resources in order to cope with new FenceCommandWrapper
- Unit tests added

Also removed an unit test that was doing nothing.
2015-03-31 10:38:33 +02:00
wilderrodrigues
4600eef87c Removing all private/protected/public execute() methods from CitrixResourceBase class
Started the refactor of the XenServer56Resource class
  - Unit test added
Changing the CitrixRequestWrapper in order to cope with multiple resources classes and commands

Still have to remove few methods form CitrixResourceBase
2015-03-31 10:38:32 +02:00
wilderrodrigues
02571728c6 Refactored the remaining commands
- Unit tests added

In the executeRequest I needed to keep the following:

// We need this one because the StorageSubSystemCommand is from another hierarchy.
        if (cmd instanceof StorageSubSystemCommand) {
            return storageHandler.handleStorageCommands((StorageSubSystemCommand) cmd);
        }
2015-03-31 10:38:32 +02:00
wilderrodrigues
24bbfbc1e6 Refactoring other 8 command wrapper in order to cope with the new design
- Advanced unit tests added for half of the commands
  - Basic unit tests added for the other half
2015-03-31 10:38:32 +02:00
wilderrodrigues
fbcae54a5b Refactoring NetworkRulesSystemVmCommand, OvsCreateTunnelCommand, OvsDestroyBridgeCommand, OvsDestroyTunnelCommand, OvsSetupBridgeCommand in order to
cope with new design.

   - Meny unit ests added.
2015-03-31 10:38:31 +02:00
wilderrodrigues
751c14b929 Refactoring CleanupNetworkRulesCmd, OvsCreateGreTunnelCommand, OvsDeleteFlowCommand, OvsVpcPhysicalTopologyConfigCommand and OvsVpcRoutingPolicyConfigCommand
in order to cope with the new design.

  - Meny new unit tests added that cover more than the basics!
2015-03-31 10:38:31 +02:00
wilderrodrigues
30b770aeab Refactoring CheckSshCommand, OvsFetchInterfaceCommand and SecurityGroupRulesCommand to cope with new design.
- Unit Tests added
2015-03-31 10:38:30 +02:00
wilderrodrigues
74faf73408 Refactoring CheckOnHostCommand, ModifySshKeysCommand, OvsSetTagAndFlowCommand and StartCommand to cope with new design
- Unit tests added
2015-03-31 10:38:30 +02:00
wilderrodrigues
18470a48d0 Refactoring PingTestCommand to cope with new design
- Basic tests added
2015-03-31 10:38:30 +02:00
wilderrodrigues
3a70912b7c Make methods in subclasses public.
Remove the if-commands that I have already refactored.
2015-03-31 10:38:29 +02:00
wilderrodrigues
637a56c3c1 Refactoring GetVncPortCommand, MaintainCommand and SetupCommand to cope with new design.
- Basic test added, but could not mock all the static stuff so the test is not complete yet.
     Will look further into it.
2015-03-31 10:38:29 +02:00
wilderrodrigues
11d0336803 Refactoring GetStorageStatsCommand and PrimaryStorageDownloadCommand to cope with the new design
Fix the NPE in the constructor that was never used
  - Basic tests added for all changes
2015-03-31 10:38:29 +02:00
wilderrodrigues
ea374b6a2f Refactoring AttachIsoCommand, AttachVolumeCommand and UpgradeSnapshotCommand to cope with new design
- Basic tests added
2015-03-31 10:38:28 +02:00
wilderrodrigues
6c775951c7 Refactoring DeleteStoragePoolCommand, ModifyStoragePoolCommand and ResizeVolumeCommand to cope with new design
- Basic tests added.
2015-03-31 10:38:28 +02:00
wilderrodrigues
a06958f469 Refactoring DestroyCommand and CreateStoragePoolCommand wrappers to cope with the new design
- Basic tests added

s Please enter the commit message for your changes. Lines starting
2015-03-31 10:38:27 +02:00
wilderrodrigues
a70d80dfd6 Refactoring PrepareForMigrationCommand and MigrateCommand in order to cope with the new design
- Basic tests added
2015-03-31 10:38:27 +02:00