Fixed typos Signed-off-by: Milamber <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/20614598 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/20614598 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/20614598 Branch: refs/heads/cisco-vnmc-api-integration Commit: 20614598bfd91f09c0d4407265df0701896c26a1 Parents: ed2aa9f Author: Pascal Borreli <[email protected]> Authored: Sat Apr 13 00:09:15 2013 +0000 Committer: Milamber <[email protected]> Committed: Sat Apr 13 13:28:32 2013 +0000 ---------------------------------------------------------------------- api/src/com/cloud/vm/DiskProfile.java | 2 +- client/tomcatconf/applicationContext.xml.in | 6 +- .../subsystem/api/storage/CommandResult.java | 2 +- .../api/storage/ObjectInDataStoreStateMachine.java | 2 +- .../image/motion/DefaultImageMotionStrategy.java | 4 +- .../test/MockHypervisorHostEndPointRpcServer.java | 72 +++++++ .../test/MockHypervsiorHostEndPointRpcServer.java | 72 ------- .../integration-test/test/resource/component.xml | 2 +- .../storage/HypervisorHostEndPointRpcServer.java | 119 +++++++++++ .../storage/HypervsiorHostEndPointRpcServer.java | 119 ----------- .../allocator/AbstractStoragePoolAllocator.java | 2 +- .../allocator/ZoneWideStoragePoolAllocator.java | 2 +- .../storage/datastore/DataObjectManagerImpl.java | 6 +- .../driver/DefaultPrimaryDataStoreDriverImpl.java | 4 +- .../DefaultPrimaryDatastoreProviderImpl.java | 6 +- .../volume/TemplateInstallStrategyImpl.java | 6 +- .../dns-notifier/resources/components-example.xml | 2 +- .../CloudStackPrimaryDataStoreProviderImpl.java | 6 +- .../cloud/network/ExteralIpAddressAllocator.java | 165 --------------- .../cloud/network/ExternalIpAddressAllocator.java | 165 +++++++++++++++ server/src/com/cloud/network/IpAddrAllocator.java | 2 +- .../com/cloud/template/TemplateManagerImpl.java | 2 +- server/test/resources/network-mgr-component.xml | 2 +- .../cloud/utils/component/ComponentContext.java | 4 +- 24 files changed, 387 insertions(+), 387 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/api/src/com/cloud/vm/DiskProfile.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/vm/DiskProfile.java b/api/src/com/cloud/vm/DiskProfile.java index e34a334..e3a3386 100644 --- a/api/src/com/cloud/vm/DiskProfile.java +++ b/api/src/com/cloud/vm/DiskProfile.java @@ -139,7 +139,7 @@ public class DiskProfile { this.hyperType = hyperType; } - public HypervisorType getHypersorType() { + public HypervisorType getHypervisorType() { return this.hyperType; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/client/tomcatconf/applicationContext.xml.in ---------------------------------------------------------------------- diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in index 0d13877..15cd6fe 100644 --- a/client/tomcatconf/applicationContext.xml.in +++ b/client/tomcatconf/applicationContext.xml.in @@ -454,11 +454,11 @@ <property name="name" value="Balance"/> </bean> - <bean id="ExteralIpAddressAllocator" class="com.cloud.network.ExteralIpAddressAllocator"> + <bean id="ExternalIpAddressAllocator" class="com.cloud.network.ExternalIpAddressAllocator"> <property name="name" value="Basic"/> </bean> - <bean id="hyervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter" /> + <bean id="hypervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter" /> <bean id="clusterAlertAdapter" class="com.cloud.alert.ClusterAlertAdapter" /> <bean id="consoleProxyAlertAdapter" class="com.cloud.alert.ConsoleProxyAlertAdapter" /> <bean id="secondaryStorageVmAlertAdapter" class="com.cloud.alert.SecondaryStorageVmAlertAdapter" /> @@ -733,7 +733,7 @@ <bean id="defaultEndPointSelector" class="org.apache.cloudstack.storage.endpoint.DefaultEndPointSelector" /> <bean id="defaultPrimaryDataStoreProviderManagerImpl" class="org.apache.cloudstack.storage.datastore.manager.DefaultPrimaryDataStoreProviderManagerImpl" /> <bean id="eventUtils" class="com.cloud.event.EventUtils" /> - <bean id="hypervsiorHostEndPointRpcServer" class="org.apache.cloudstack.storage.HypervsiorHostEndPointRpcServer" /> + <bean id="hypervisorHostEndPointRpcServer" class="org.apache.cloudstack.storage.HypervisorHostEndPointRpcServer" /> <bean id="iSCSI" class="org.apache.cloudstack.storage.datastore.type.ISCSI" /> <bean id="ISO" class="org.apache.cloudstack.storage.image.format.ISO" /> <bean id="imageDataFactoryImpl" class="org.apache.cloudstack.storage.image.ImageDataFactoryImpl" /> http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java ---------------------------------------------------------------------- diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java index 6b6139b..cc45914 100644 --- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java @@ -34,7 +34,7 @@ public class CommandResult { return !this.success; } - public void setSucess(boolean success) { + public void setSuccess(boolean success) { this.success = success; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java ---------------------------------------------------------------------- diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java index 726ce08..f619ef4 100644 --- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java @@ -26,7 +26,7 @@ public interface ObjectInDataStoreStateMachine extends StateObject<ObjectInDataS Creating2("This is only used with createOnlyRequested event"), Creating("The object is being creating on data store"), Created("The object is created"), - Ready("Template downloading is complished"), + Ready("Template downloading is accomplished"), Copying("The object is being coping"), Destroying("Template is destroying"), Destroyed("Template is destroyed"), http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java ---------------------------------------------------------------------- diff --git a/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java index c49a521..a70fd8a 100644 --- a/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java +++ b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java @@ -70,12 +70,12 @@ public class DefaultImageMotionStrategy implements ImageMotionStrategy { CommandResult result = new CommandResult(); if (!answer.getResult()) { - result.setSucess(answer.getResult()); + result.setSuccess(answer.getResult()); result.setResult(answer.getDetails()); } else { TemplateOnPrimaryDataStoreInfo templateStore = context.getTemplate(); templateStore.setPath(answer.getPath()); - result.setSucess(true); + result.setSuccess(true); } parentCall.complete(result); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervisorHostEndPointRpcServer.java ---------------------------------------------------------------------- diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervisorHostEndPointRpcServer.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervisorHostEndPointRpcServer.java new file mode 100644 index 0000000..8fc161b --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervisorHostEndPointRpcServer.java @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cloudstack.storage.test; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.storage.HostEndpointRpcServer; +import org.apache.cloudstack.storage.HypervisorHostEndPoint; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; + +public class MockHypervisorHostEndPointRpcServer implements HostEndpointRpcServer { + private ScheduledExecutorService executor; + public MockHypervisorHostEndPointRpcServer() { + executor = Executors.newScheduledThreadPool(10); + } + + protected class MockRpcCallBack implements Runnable { + private final Command cmd; + private final AsyncCompletionCallback<Answer> callback; + public MockRpcCallBack(Command cmd, final AsyncCompletionCallback<Answer> callback) { + this.cmd = cmd; + this.callback = callback; + } + @Override + public void run() { + try { + Answer answer = new Answer(cmd, false, "unknown command"); + /*if (cmd instanceof CopyTemplateToPrimaryStorageCmd) { + answer = new CopyTemplateToPrimaryStorageAnswer(cmd, UUID.randomUUID().toString()); + } else if (cmd instanceof CreateVolumeFromBaseImageCommand) { + answer = new CreateVolumeAnswer(cmd, UUID.randomUUID().toString()); + }*/ + + callback.complete(answer); + } catch (Exception e) { + e.printStackTrace(); + } + } + + } + + public void sendCommandAsync(HypervisorHostEndPoint host, final Command command, final AsyncCompletionCallback<Answer> callback) { + executor.schedule(new MockRpcCallBack(command, callback), 10, TimeUnit.SECONDS); + } + + @Override + public Answer sendCommand(HypervisorHostEndPoint host, Command command) { + // TODO Auto-generated method stub + return null; + } +} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervsiorHostEndPointRpcServer.java ---------------------------------------------------------------------- diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervsiorHostEndPointRpcServer.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervsiorHostEndPointRpcServer.java deleted file mode 100644 index d698576..0000000 --- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervsiorHostEndPointRpcServer.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cloudstack.storage.test; - -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; - -import org.apache.cloudstack.framework.async.AsyncCompletionCallback; -import org.apache.cloudstack.storage.HostEndpointRpcServer; -import org.apache.cloudstack.storage.HypervisorHostEndPoint; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; - -public class MockHypervsiorHostEndPointRpcServer implements HostEndpointRpcServer { - private ScheduledExecutorService executor; - public MockHypervsiorHostEndPointRpcServer() { - executor = Executors.newScheduledThreadPool(10); - } - - protected class MockRpcCallBack implements Runnable { - private final Command cmd; - private final AsyncCompletionCallback<Answer> callback; - public MockRpcCallBack(Command cmd, final AsyncCompletionCallback<Answer> callback) { - this.cmd = cmd; - this.callback = callback; - } - @Override - public void run() { - try { - Answer answer = new Answer(cmd, false, "unknown command"); - /*if (cmd instanceof CopyTemplateToPrimaryStorageCmd) { - answer = new CopyTemplateToPrimaryStorageAnswer(cmd, UUID.randomUUID().toString()); - } else if (cmd instanceof CreateVolumeFromBaseImageCommand) { - answer = new CreateVolumeAnswer(cmd, UUID.randomUUID().toString()); - }*/ - - callback.complete(answer); - } catch (Exception e) { - e.printStackTrace(); - } - } - - } - - public void sendCommandAsync(HypervisorHostEndPoint host, final Command command, final AsyncCompletionCallback<Answer> callback) { - executor.schedule(new MockRpcCallBack(command, callback), 10, TimeUnit.SECONDS); - } - - @Override - public Answer sendCommand(HypervisorHostEndPoint host, Command command) { - // TODO Auto-generated method stub - return null; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/integration-test/test/resource/component.xml ---------------------------------------------------------------------- diff --git a/engine/storage/integration-test/test/resource/component.xml b/engine/storage/integration-test/test/resource/component.xml index 0368ad4..5ba87e8 100644 --- a/engine/storage/integration-test/test/resource/component.xml +++ b/engine/storage/integration-test/test/resource/component.xml @@ -75,7 +75,7 @@ </bean> - <bean id="ExteralIpAddressAllocator" class="com.cloud.network.ExteralIpAddressAllocator"> + <bean id="ExternalIpAddressAllocator" class="com.cloud.network.ExternalIpAddressAllocator"> <property name="name" value="Basic"/> </bean> http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPointRpcServer.java ---------------------------------------------------------------------- diff --git a/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPointRpcServer.java b/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPointRpcServer.java new file mode 100644 index 0000000..bc21776 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPointRpcServer.java @@ -0,0 +1,119 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cloudstack.storage; + +import javax.annotation.PostConstruct; +import javax.inject.Inject; + +import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.framework.async.AsyncRpcConext; +import org.apache.cloudstack.framework.rpc.RpcCallbackListener; +import org.apache.cloudstack.framework.rpc.RpcException; +import org.apache.cloudstack.framework.rpc.RpcProvider; +import org.apache.cloudstack.framework.rpc.RpcServiceDispatcher; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; +import com.cloud.utils.exception.CloudRuntimeException; + +@Component +public class HypervisorHostEndPointRpcServer implements HostEndpointRpcServer { + private static final Logger s_logger = Logger.getLogger(HypervisorHostEndPointRpcServer.class); + + @Inject + private RpcProvider rpcProvider; + + public HypervisorHostEndPointRpcServer() { + } + + public HypervisorHostEndPointRpcServer(RpcProvider rpcProvider) { + rpcProvider = rpcProvider; + rpcProvider.registerRpcServiceEndpoint(RpcServiceDispatcher.getDispatcher(this)); + } + + @PostConstruct + public void Initialize() { + rpcProvider.registerRpcServiceEndpoint(RpcServiceDispatcher.getDispatcher(this)); + } + + @Override + public void sendCommandAsync(HypervisorHostEndPoint host, final Command command, final AsyncCompletionCallback<Answer> callback) { + rpcProvider.newCall(host.getHostAddr()).addCallbackListener(new RpcCallbackListener<Answer>() { + @Override + public void onSuccess(Answer result) { + callback.complete(result); + } + + @Override + public void onFailure(RpcException e) { + Answer answer = new Answer(command, false, e.toString()); + callback.complete(answer); + } + }).apply(); + } + + private class SendCommandContext<T> extends AsyncRpcConext<T> { + private T answer; + + public SendCommandContext(AsyncCompletionCallback<T> callback) { + super(callback); + } + + public void setAnswer(T answer) { + this.answer = answer; + } + + public T getAnswer() { + return this.answer; + } + + } + + @Override + public Answer sendCommand(HypervisorHostEndPoint host, Command command) { + SendCommandContext<Answer> context = new SendCommandContext<Answer>(null); + AsyncCallbackDispatcher<HypervisorHostEndPointRpcServer, Answer> caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().sendCommandCallback(null, null)) + .setContext(context); + + this.sendCommandAsync(host, command, caller); + + synchronized (context) { + try { + context.wait(); + } catch (InterruptedException e) { + s_logger.debug(e.toString()); + throw new CloudRuntimeException("wait on context is interrupted", e); + } + } + + return context.getAnswer(); + } + + protected Object sendCommandCallback(AsyncCallbackDispatcher<HypervisorHostEndPointRpcServer, Answer> callback, SendCommandContext<Answer> context) { + context.setAnswer((Answer)callback.getResult()); + synchronized(context) { + context.notify(); + } + return null; + } +} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java ---------------------------------------------------------------------- diff --git a/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java b/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java deleted file mode 100644 index f441f39..0000000 --- a/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.cloudstack.storage; - -import javax.annotation.PostConstruct; -import javax.inject.Inject; - -import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher; -import org.apache.cloudstack.framework.async.AsyncCompletionCallback; -import org.apache.cloudstack.framework.async.AsyncRpcConext; -import org.apache.cloudstack.framework.rpc.RpcCallbackListener; -import org.apache.cloudstack.framework.rpc.RpcException; -import org.apache.cloudstack.framework.rpc.RpcProvider; -import org.apache.cloudstack.framework.rpc.RpcServiceDispatcher; -import org.apache.log4j.Logger; -import org.springframework.stereotype.Component; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; -import com.cloud.utils.exception.CloudRuntimeException; - -@Component -public class HypervsiorHostEndPointRpcServer implements HostEndpointRpcServer { - private static final Logger s_logger = Logger.getLogger(HypervsiorHostEndPointRpcServer.class); - - @Inject - private RpcProvider rpcProvider; - - public HypervsiorHostEndPointRpcServer() { - } - - public HypervsiorHostEndPointRpcServer(RpcProvider rpcProvider) { - rpcProvider = rpcProvider; - rpcProvider.registerRpcServiceEndpoint(RpcServiceDispatcher.getDispatcher(this)); - } - - @PostConstruct - public void Initialize() { - rpcProvider.registerRpcServiceEndpoint(RpcServiceDispatcher.getDispatcher(this)); - } - - @Override - public void sendCommandAsync(HypervisorHostEndPoint host, final Command command, final AsyncCompletionCallback<Answer> callback) { - rpcProvider.newCall(host.getHostAddr()).addCallbackListener(new RpcCallbackListener<Answer>() { - @Override - public void onSuccess(Answer result) { - callback.complete(result); - } - - @Override - public void onFailure(RpcException e) { - Answer answer = new Answer(command, false, e.toString()); - callback.complete(answer); - } - }).apply(); - } - - private class SendCommandContext<T> extends AsyncRpcConext<T> { - private T answer; - - public SendCommandContext(AsyncCompletionCallback<T> callback) { - super(callback); - } - - public void setAnswer(T answer) { - this.answer = answer; - } - - public T getAnswer() { - return this.answer; - } - - } - - @Override - public Answer sendCommand(HypervisorHostEndPoint host, Command command) { - SendCommandContext<Answer> context = new SendCommandContext<Answer>(null); - AsyncCallbackDispatcher<HypervsiorHostEndPointRpcServer, Answer> caller = AsyncCallbackDispatcher.create(this); - caller.setCallback(caller.getTarget().sendCommandCallback(null, null)) - .setContext(context); - - this.sendCommandAsync(host, command, caller); - - synchronized (context) { - try { - context.wait(); - } catch (InterruptedException e) { - s_logger.debug(e.toString()); - throw new CloudRuntimeException("wait on context is interrupted", e); - } - } - - return context.getAnswer(); - } - - protected Object sendCommandCallback(AsyncCallbackDispatcher<HypervsiorHostEndPointRpcServer, Answer> callback, SendCommandContext<Answer> context) { - context.setAnswer((Answer)callback.getResult()); - synchronized(context) { - context.notify(); - } - return null; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java ---------------------------------------------------------------------- diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java index 6334ca7..3a66b85 100755 --- a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java +++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java @@ -176,7 +176,7 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement Long clusterId = pool.getClusterId(); ClusterVO cluster = _clusterDao.findById(clusterId); - if (!(cluster.getHypervisorType() == dskCh.getHypersorType())) { + if (!(cluster.getHypervisorType() == dskCh.getHypervisorType())) { if (s_logger.isDebugEnabled()) { s_logger.debug("StoragePool's Cluster does not have required hypervisorType, skipping this pool"); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java ---------------------------------------------------------------------- diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java index 7c6c946..1d3cd81 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java +++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java @@ -57,7 +57,7 @@ public class ZoneWideStoragePoolAllocator extends AbstractStoragePoolAllocator { DeploymentPlan plan, ExcludeList avoid, int returnUpTo) { s_logger.debug("ZoneWideStoragePoolAllocator to find storage pool"); List<StoragePool> suitablePools = new ArrayList<StoragePool>(); - HypervisorType hypervisor = dskCh.getHypersorType(); + HypervisorType hypervisor = dskCh.getHypervisorType(); if (hypervisor != null) { if (hypervisor != HypervisorType.KVM) { s_logger.debug("Only kvm supports zone wide storage"); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java ---------------------------------------------------------------------- diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java index 218f901..9d1afbe 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java @@ -109,7 +109,7 @@ public class DataObjectManagerImpl implements DataObjectManager { if (obj == null) { CreateCmdResult result = new CreateCmdResult( null, null); - result.setSucess(false); + result.setSuccess(false); result.setResult(e.toString()); callback.complete(result); return; @@ -124,7 +124,7 @@ public class DataObjectManagerImpl implements DataObjectManager { data, store); } catch (Exception e) { CreateCmdResult result = new CreateCmdResult(null, null); - result.setSucess(false); + result.setSuccess(false); result.setResult(e.toString()); callback.complete(result); return; @@ -153,7 +153,7 @@ public class DataObjectManagerImpl implements DataObjectManager { s_logger.debug("state transation failed", e1); } CreateCmdResult result = new CreateCmdResult(null, null); - result.setSucess(false); + result.setSuccess(false); result.setResult(e.toString()); callback.complete(result); return; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java ---------------------------------------------------------------------- diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java index 6d0c2c6..e5ee742 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java @@ -144,12 +144,12 @@ public class DefaultPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver CreateVolumeAnswer answer = (CreateVolumeAnswer)callback.getResult(); CommandResult result = new CommandResult(); if (answer == null || answer.getDetails() != null) { - result.setSucess(false); + result.setSuccess(false); if (answer != null) { result.setResult(answer.getDetails()); } } else { - result.setSucess(true); + result.setSuccess(true); VolumeObject volume = context.getVolume(); volume.setPath(answer.getVolumeUuid()); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java ---------------------------------------------------------------------- diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java index 46fa738..8c674dc 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java @@ -42,7 +42,7 @@ public class DefaultPrimaryDatastoreProviderImpl implements PrimaryDataStoreProv @Inject PrimaryDataStoreProviderManager storeMgr; - protected DataStoreLifeCycle lifecyle; + protected DataStoreLifeCycle lifecycle; protected String uuid; protected long id; @Override @@ -52,12 +52,12 @@ public class DefaultPrimaryDatastoreProviderImpl implements PrimaryDataStoreProv @Override public DataStoreLifeCycle getDataStoreLifeCycle() { - return this.lifecyle; + return this.lifecycle; } @Override public boolean configure(Map<String, Object> params) { - lifecyle = ComponentContext.inject(DefaultPrimaryDataStoreLifeCycleImpl.class); + lifecycle = ComponentContext.inject(DefaultPrimaryDataStoreLifeCycleImpl.class); driver = ComponentContext.inject(DefaultPrimaryDataStoreDriverImpl.class); listener = ComponentContext.inject(DefaultHostListener.class); return true; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java ---------------------------------------------------------------------- diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java index 5f1735c..e099619 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java @@ -107,7 +107,7 @@ public class TemplateInstallStrategyImpl implements TemplateInstallStrategy { if (obj == null) { CreateBaseImageResult result = new CreateBaseImageResult( null); - result.setSucess(false); + result.setSuccess(false); result.setResult(e.toString()); callback.complete(result); return null; @@ -122,7 +122,7 @@ public class TemplateInstallStrategyImpl implements TemplateInstallStrategy { template, store); } catch (Exception e) { CreateBaseImageResult result = new CreateBaseImageResult(null); - result.setSucess(false); + result.setSuccess(false); result.setResult(e.toString()); callback.complete(result); return null; @@ -145,7 +145,7 @@ public class TemplateInstallStrategyImpl implements TemplateInstallStrategy { s_logger.debug("state transation failed", e1); } CreateBaseImageResult result = new CreateBaseImageResult(null); - result.setSucess(false); + result.setSuccess(false); result.setResult(e.toString()); callback.complete(result); return null; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/plugins/network-elements/dns-notifier/resources/components-example.xml ---------------------------------------------------------------------- diff --git a/plugins/network-elements/dns-notifier/resources/components-example.xml b/plugins/network-elements/dns-notifier/resources/components-example.xml index 6493e74..2e9c5be 100755 --- a/plugins/network-elements/dns-notifier/resources/components-example.xml +++ b/plugins/network-elements/dns-notifier/resources/components-example.xml @@ -86,7 +86,7 @@ under the License. <adapter name="Balance" class="com.cloud.storage.secondary.SecondaryStorageVmDefaultAllocator"/> </adapters> <adapters key="com.cloud.network.IpAddrAllocator"> - <adapter name="Basic" class="com.cloud.network.ExteralIpAddressAllocator"/> + <adapter name="Basic" class="com.cloud.network.ExternalIpAddressAllocator"/> </adapters> <adapters key="com.cloud.server.auth.UserAuthenticator"> <!-- <adapter name="SHA256SALT" class="com.cloud.server.auth.SHA256SaltedUserAuthenticator"/> --> http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/provider/CloudStackPrimaryDataStoreProviderImpl.java ---------------------------------------------------------------------- diff --git a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/provider/CloudStackPrimaryDataStoreProviderImpl.java b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/provider/CloudStackPrimaryDataStoreProviderImpl.java index 4d46d99..826f07a 100644 --- a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/provider/CloudStackPrimaryDataStoreProviderImpl.java +++ b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/provider/CloudStackPrimaryDataStoreProviderImpl.java @@ -37,7 +37,7 @@ public class CloudStackPrimaryDataStoreProviderImpl implements private final String providerName = "ancient primary data store provider"; protected PrimaryDataStoreDriver driver; protected HypervisorHostListener listener; - protected DataStoreLifeCycle lifecyle; + protected DataStoreLifeCycle lifecycle; CloudStackPrimaryDataStoreProviderImpl() { @@ -50,12 +50,12 @@ public class CloudStackPrimaryDataStoreProviderImpl implements @Override public DataStoreLifeCycle getDataStoreLifeCycle() { - return this.lifecyle; + return this.lifecycle; } @Override public boolean configure(Map<String, Object> params) { - lifecyle = ComponentContext.inject(CloudStackPrimaryDataStoreLifeCycleImpl.class); + lifecycle = ComponentContext.inject(CloudStackPrimaryDataStoreLifeCycleImpl.class); driver = ComponentContext.inject(CloudStackPrimaryDataStoreDriverImpl.class); listener = ComponentContext.inject(DefaultHostListener.class); return true; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/server/src/com/cloud/network/ExteralIpAddressAllocator.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/ExteralIpAddressAllocator.java b/server/src/com/cloud/network/ExteralIpAddressAllocator.java deleted file mode 100644 index 2b78712..0000000 --- a/server/src/com/cloud/network/ExteralIpAddressAllocator.java +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -package com.cloud.network; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.util.Map; - -import javax.ejb.Local; -import javax.inject.Inject; -import javax.naming.ConfigurationException; - -import org.apache.log4j.Logger; - -import com.cloud.configuration.dao.ConfigurationDao; -import com.cloud.dc.dao.VlanDao; -import com.cloud.network.dao.IPAddressDao; -import com.cloud.utils.component.AdapterBase; -import com.cloud.utils.exception.CloudRuntimeException; - -@Local(value=IpAddrAllocator.class) -public class ExteralIpAddressAllocator extends AdapterBase implements IpAddrAllocator{ - private static final Logger s_logger = Logger.getLogger(ExteralIpAddressAllocator.class); - String _name; - @Inject ConfigurationDao _configDao = null; - @Inject IPAddressDao _ipAddressDao = null; - @Inject VlanDao _vlanDao; - private boolean _isExternalIpAllocatorEnabled = false; - private String _externalIpAllocatorUrl = null; - - - @Override - public IpAddr getPrivateIpAddress(String macAddr, long dcId, long podId) { - if (_externalIpAllocatorUrl == null || this._externalIpAllocatorUrl.equalsIgnoreCase("")) { - return new IpAddr(); - } - String urlString = this._externalIpAllocatorUrl + "?command=getIpAddr&mac=" + macAddr + "&dc=" + dcId + "&pod=" + podId; - s_logger.debug("getIP:" + urlString); - - BufferedReader in = null; - try { - URL url = new URL(urlString); - URLConnection conn = url.openConnection(); - conn.setReadTimeout(30000); - - in = new BufferedReader(new InputStreamReader(conn.getInputStream())); - String inputLine; - while ((inputLine = in.readLine()) != null) { - s_logger.debug(inputLine); - String[] tokens = inputLine.split(","); - if (tokens.length != 3) { - s_logger.debug("the return value should be: mac,netmask,gateway"); - return new IpAddr(); - } - return new IpAddr(tokens[0], tokens[1], tokens[2]); - } - - return new IpAddr(); - } catch (MalformedURLException e) { - throw new CloudRuntimeException("URL is malformed " + urlString, e); - } catch (IOException e) { - return new IpAddr(); - } finally { - if (in != null) { - try { - in.close(); - } catch (IOException e) { - } - } - } - - } - - @Override - public IpAddr getPublicIpAddress(String macAddr, long dcId, long podId) { - /*TODO: call API to get ip address from external DHCP server*/ - return getPrivateIpAddress(macAddr, dcId, podId); - } - - @Override - public boolean releasePrivateIpAddress(String ip, long dcId, long podId) { - /*TODO: call API to release the ip address from external DHCP server*/ - if (_externalIpAllocatorUrl == null || this._externalIpAllocatorUrl.equalsIgnoreCase("")) { - return false; - } - - String urlString = this._externalIpAllocatorUrl + "?command=releaseIpAddr&ip=" + ip + "&dc=" + dcId + "&pod=" + podId; - - s_logger.debug("releaseIP:" + urlString); - BufferedReader in = null; - try { - URL url = new URL(urlString); - URLConnection conn = url.openConnection(); - conn.setReadTimeout(30000); - - in = new BufferedReader(new InputStreamReader(conn.getInputStream())); - - return true; - } catch (MalformedURLException e) { - throw new CloudRuntimeException("URL is malformed " + urlString, e); - } catch (IOException e) { - return false; - } finally { - if (in != null) { - try { - in.close(); - } catch (IOException e) { - } - } - } - } - - @Override - public boolean releasePublicIpAddress(String ip, long dcId, long podId) { - /*TODO: call API to release the ip address from external DHCP server*/ - return releasePrivateIpAddress(ip, dcId, podId); - } - - @Override - public boolean exteralIpAddressAllocatorEnabled() { - return _isExternalIpAllocatorEnabled; - } - - @Override - public boolean configure(String name, Map<String, Object> params) throws ConfigurationException { - _isExternalIpAllocatorEnabled = Boolean.parseBoolean(_configDao.getValue("direct.attach.network.externalIpAllocator.enabled")); - _externalIpAllocatorUrl = _configDao.getValue("direct.attach.network.externalIpAllocator.url"); - _name = name; - - return true; - } - - @Override - public String getName() { - return _name; - } - - @Override - public boolean start() { - return true; - } - - @Override - public boolean stop() { - return true; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/server/src/com/cloud/network/ExternalIpAddressAllocator.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/ExternalIpAddressAllocator.java b/server/src/com/cloud/network/ExternalIpAddressAllocator.java new file mode 100644 index 0000000..f24fa2d --- /dev/null +++ b/server/src/com/cloud/network/ExternalIpAddressAllocator.java @@ -0,0 +1,165 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package com.cloud.network; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.util.Map; + +import javax.ejb.Local; +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.log4j.Logger; + +import com.cloud.configuration.dao.ConfigurationDao; +import com.cloud.dc.dao.VlanDao; +import com.cloud.network.dao.IPAddressDao; +import com.cloud.utils.component.AdapterBase; +import com.cloud.utils.exception.CloudRuntimeException; + +@Local(value=IpAddrAllocator.class) +public class ExternalIpAddressAllocator extends AdapterBase implements IpAddrAllocator{ + private static final Logger s_logger = Logger.getLogger(ExternalIpAddressAllocator.class); + String _name; + @Inject ConfigurationDao _configDao = null; + @Inject IPAddressDao _ipAddressDao = null; + @Inject VlanDao _vlanDao; + private boolean _isExternalIpAllocatorEnabled = false; + private String _externalIpAllocatorUrl = null; + + + @Override + public IpAddr getPrivateIpAddress(String macAddr, long dcId, long podId) { + if (_externalIpAllocatorUrl == null || this._externalIpAllocatorUrl.equalsIgnoreCase("")) { + return new IpAddr(); + } + String urlString = this._externalIpAllocatorUrl + "?command=getIpAddr&mac=" + macAddr + "&dc=" + dcId + "&pod=" + podId; + s_logger.debug("getIP:" + urlString); + + BufferedReader in = null; + try { + URL url = new URL(urlString); + URLConnection conn = url.openConnection(); + conn.setReadTimeout(30000); + + in = new BufferedReader(new InputStreamReader(conn.getInputStream())); + String inputLine; + while ((inputLine = in.readLine()) != null) { + s_logger.debug(inputLine); + String[] tokens = inputLine.split(","); + if (tokens.length != 3) { + s_logger.debug("the return value should be: mac,netmask,gateway"); + return new IpAddr(); + } + return new IpAddr(tokens[0], tokens[1], tokens[2]); + } + + return new IpAddr(); + } catch (MalformedURLException e) { + throw new CloudRuntimeException("URL is malformed " + urlString, e); + } catch (IOException e) { + return new IpAddr(); + } finally { + if (in != null) { + try { + in.close(); + } catch (IOException e) { + } + } + } + + } + + @Override + public IpAddr getPublicIpAddress(String macAddr, long dcId, long podId) { + /*TODO: call API to get ip address from external DHCP server*/ + return getPrivateIpAddress(macAddr, dcId, podId); + } + + @Override + public boolean releasePrivateIpAddress(String ip, long dcId, long podId) { + /*TODO: call API to release the ip address from external DHCP server*/ + if (_externalIpAllocatorUrl == null || this._externalIpAllocatorUrl.equalsIgnoreCase("")) { + return false; + } + + String urlString = this._externalIpAllocatorUrl + "?command=releaseIpAddr&ip=" + ip + "&dc=" + dcId + "&pod=" + podId; + + s_logger.debug("releaseIP:" + urlString); + BufferedReader in = null; + try { + URL url = new URL(urlString); + URLConnection conn = url.openConnection(); + conn.setReadTimeout(30000); + + in = new BufferedReader(new InputStreamReader(conn.getInputStream())); + + return true; + } catch (MalformedURLException e) { + throw new CloudRuntimeException("URL is malformed " + urlString, e); + } catch (IOException e) { + return false; + } finally { + if (in != null) { + try { + in.close(); + } catch (IOException e) { + } + } + } + } + + @Override + public boolean releasePublicIpAddress(String ip, long dcId, long podId) { + /*TODO: call API to release the ip address from external DHCP server*/ + return releasePrivateIpAddress(ip, dcId, podId); + } + + @Override + public boolean externalIpAddressAllocatorEnabled() { + return _isExternalIpAllocatorEnabled; + } + + @Override + public boolean configure(String name, Map<String, Object> params) throws ConfigurationException { + _isExternalIpAllocatorEnabled = Boolean.parseBoolean(_configDao.getValue("direct.attach.network.externalIpAllocator.enabled")); + _externalIpAllocatorUrl = _configDao.getValue("direct.attach.network.externalIpAllocator.url"); + _name = name; + + return true; + } + + @Override + public String getName() { + return _name; + } + + @Override + public boolean start() { + return true; + } + + @Override + public boolean stop() { + return true; + } +} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/server/src/com/cloud/network/IpAddrAllocator.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/IpAddrAllocator.java b/server/src/com/cloud/network/IpAddrAllocator.java index d79125b..6cdf597 100644 --- a/server/src/com/cloud/network/IpAddrAllocator.java +++ b/server/src/com/cloud/network/IpAddrAllocator.java @@ -52,5 +52,5 @@ public interface IpAddrAllocator extends Adapter { public IpAddr getPrivateIpAddress(String macAddr, long dcId, long podId); public boolean releasePublicIpAddress(String ip, long dcId, long podId); public boolean releasePrivateIpAddress(String ip, long dcId, long podId); - public boolean exteralIpAddressAllocatorEnabled(); + public boolean externalIpAddressAllocatorEnabled(); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/server/src/com/cloud/template/TemplateManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java b/server/src/com/cloud/template/TemplateManagerImpl.java index 2892e00..576440a 100755 --- a/server/src/com/cloud/template/TemplateManagerImpl.java +++ b/server/src/com/cloud/template/TemplateManagerImpl.java @@ -273,7 +273,7 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager, if (type == HypervisorType.BareMetal) { adapter = AdapterBase.getAdapterByName(_adapters, TemplateAdapterType.BareMetal.getName()); } else { - // see HyervisorTemplateAdapter + // see HypervisorTemplateAdapter adapter = AdapterBase.getAdapterByName(_adapters, TemplateAdapterType.Hypervisor.getName()); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/server/test/resources/network-mgr-component.xml ---------------------------------------------------------------------- diff --git a/server/test/resources/network-mgr-component.xml b/server/test/resources/network-mgr-component.xml index 42d3c2e..b55a68b 100644 --- a/server/test/resources/network-mgr-component.xml +++ b/server/test/resources/network-mgr-component.xml @@ -78,7 +78,7 @@ under the License. <!--<adapter name="NiciraNvpGuestNetworkGuru" class="com.cloud.network.guru.NiciraNvpGuestNetworkGuru"/> --> </adapters> <adapters key="com.cloud.network.IpAddrAllocator"> - <adapter name="Basic" class="com.cloud.network.ExteralIpAddressAllocator"/> + <adapter name="Basic" class="com.cloud.network.ExternalIpAddressAllocator"/> </adapters> <adapters key="com.cloud.network.element.NetworkElement"> <adapter name="VirtualRouter" class="com.cloud.network.element.VirtualRouterElement"/> http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/utils/src/com/cloud/utils/component/ComponentContext.java ---------------------------------------------------------------------- diff --git a/utils/src/com/cloud/utils/component/ComponentContext.java b/utils/src/com/cloud/utils/component/ComponentContext.java index 796d4ec..5c5194c 100644 --- a/utils/src/com/cloud/utils/component/ComponentContext.java +++ b/utils/src/com/cloud/utils/component/ComponentContext.java @@ -71,14 +71,14 @@ public class ComponentContext implements ApplicationContextAware { beanFactory.configureBean(bean, entry.getKey()); } - Map<String, ComponentLifecycle> lifecyleComponents = getApplicationContext().getBeansOfType(ComponentLifecycle.class); + Map<String, ComponentLifecycle> lifecycleComponents = getApplicationContext().getBeansOfType(ComponentLifecycle.class); Map[] classifiedComponents = new Map[ComponentLifecycle.MAX_RUN_LEVELS]; for(int i = 0; i < ComponentLifecycle.MAX_RUN_LEVELS; i++) { classifiedComponents[i] = new HashMap<String, ComponentLifecycle>(); } - for(Map.Entry<String, ComponentLifecycle> entry : lifecyleComponents.entrySet()) { + for(Map.Entry<String, ComponentLifecycle> entry : lifecycleComponents.entrySet()) { classifiedComponents[entry.getValue().getRunLevel()].put(entry.getKey(), entry.getValue()); }
