GitHub user rodrigo93 opened a pull request:
https://github.com/apache/cloudstack/pull/943
Removed unused adapters from async-job-component.xml.
I was looking the file /cloud-server/test/async-job-component.xml, and I
found an adapter configuration that seems to have no use. The reason for that
is explained as follows.
The adapter configuration is the following:
<adapters key="com.cloud.agent.manager.allocator.StorageAllocator">
<adapter name="Storage"
class="com.cloud.agent.manager.allocator.impl.FirstFitStorageAllocator">
<param name="storage.overprovisioning.factor">2</param>
</adapter>
<adapter name="
class="com.cloud.agent.manager.allocator.impl.RandomStoragePoolAllocator">
<param name="storage.overprovisioning.factor">2</param>
</adapter>
</adapters>
⢠class="com.cloud.agent.manager.allocator.impl.FirstFitStorageAllocator"
The class "com.cloud.agent.manager.allocator.impl.FirstFitStorageAllocator"
does not exist. The only reference for it is found in the following file:
- /cloud-server/test/async-job-component.xml
Therefore, we can conclude that there is no need for this line at that file.
â¢
class="com.cloud.agent.manager.allocator.impl.RandomStoragePoolAllocator"
Additionally, the class RandomStoragePoolAllocator.java is never used. The
only reference is found in the following file:
- /cloud-server/test/async-job-component.xml
I found a project called âcloud-plugin-storage-allocator-randomâ. This
project has only one package that contains only one class, which is the
RandomStoragePoolAllocator.java. Despite the names that are the same, the class
in âcloud-plugin-storage-allocator-randomâ project and the class
referenced in - /cloud-server/test/async-job-component.xml have different
packages. Therefore, I removed that configuration from async-job-component.xml
and the project that contains only the RandomStoragePoolAllocator class that is
never used.
Those changes leave us with an adapter configuration empty with the
following key:
⢠key="com.cloud.agent.manager.allocator.StorageAllocator"
Therefore, I removed it.
Furthermore, after I removed that configuration I noticed that there is no
such class StorageAllocator.java. However, it appears that exists test for it,
like the following classes:
- StorageAllocatorTestConfiguration.java
- StorageAllocatorTest.java.
I am not sure if these classes are tests for the class
StorageAllocator.java and for the possible configuration I have just removed.
If they are, we can remove both classes. Can someone help me on checking that?
I also removed the following configuration from
/cloudstack-plugins/pom.xml:
- <module>storage-allocators/random</module>
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rafaelweingartner/cloudstack
lrg-cs-hackday-009
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/943.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #943
----
commit a387cd06e0a3e8ee6285bd0ed18cd09b53482440
Author: Rodrigo Marques <[email protected]>
Date: 2015-10-17T19:35:57Z
Removed unused adapters that begins with "<adapters
key="com.cloud.agent.manager.allocator.StorageAllocator">".
commit bb23cdf1a460d484541eb2d6d384b3a68c1f50ef
Author: Rodrigo Marques <[email protected]>
Date: 2015-10-17T20:08:22Z
Removed unused configuration and project.
Unused configuration was removed from /cloudstack-plugins/pom.xml.
Removed unused project âcloud-plugin-storage-allocator-randomâ.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---