Skip to content

Commit

Permalink
ConfigHelper is replace by a facade pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
spark404 authored and wilderrodrigues committed Mar 16, 2015
1 parent 4cfe2a3 commit 0a95c44
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 40 deletions.
39 changes: 0 additions & 39 deletions core/src/com/cloud/agent/resource/virtualnetwork/ConfigHelper.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import com.cloud.agent.api.routing.GetRouterAlertsCommand;
import com.cloud.agent.api.routing.GroupAnswer;
import com.cloud.agent.api.routing.NetworkElementCommand;
import com.cloud.agent.resource.virtualnetwork.facade.AbstractConfigItemFacade;
import com.cloud.utils.ExecutionResult;
import com.cloud.utils.NumbersUtil;
import com.cloud.utils.exception.CloudRuntimeException;
Expand Down Expand Up @@ -325,7 +326,14 @@ public boolean connect(final String ipAddress, int retry, int sleep) {
}

private List<ConfigItem> generateCommandCfg(NetworkElementCommand cmd) {
return ConfigHelper.generateCommandCfg(cmd);
/*
* [TODO] Still have to migrate LoadBalancerConfigCommand and BumpUpPriorityCommand
* [FIXME] Have a look at SetSourceNatConfigItem
*/

final AbstractConfigItemFacade configItemFacade = AbstractConfigItemFacade.getInstance(cmd.getClass());

return configItemFacade.generateConfig(cmd);
}

private Answer execute(AggregationControlCommand cmd) {
Expand Down

0 comments on commit 0a95c44

Please sign in to comment.