mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-4477: in order to select hypervisor host which can access storage pool, need to check storage_pool_host_ref
Conflicts: engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentManagerSimpleImpl.java engine/storage/integration-test/test/org/apache/cloudstack/storage/test/EndpointSelectorTest.java engine/storage/integration-test/test/org/apache/cloudstack/storage/test/FakeDriverTestConfiguration.java
This commit is contained in:
parent
a82b179878
commit
f4dbf8786f
|
|
@ -26,6 +26,10 @@ import java.util.Map;
|
|||
import javax.inject.Inject;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import com.cloud.host.Host;
|
||||
import com.cloud.host.Status;
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
import com.cloud.utils.fsm.StateMachine2;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.agent.AgentManager;
|
||||
|
|
@ -246,6 +250,7 @@ public class DirectAgentManagerSimpleImpl extends ManagerBase implements AgentMa
|
|||
e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
package org.apache.cloudstack.storage.test;
|
||||
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
|
@ -28,6 +29,7 @@ import java.util.UUID;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import com.cloud.server.LockMasterListener;
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.junit.Before;
|
||||
|
|
@ -58,6 +60,9 @@ import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreDao;
|
|||
import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
|
||||
|
||||
import com.cloud.agent.AgentManager;
|
||||
|
||||
import com.cloud.agent.AgentManager;
|
||||
|
||||
import com.cloud.dc.ClusterVO;
|
||||
import com.cloud.dc.DataCenter;
|
||||
import com.cloud.dc.DataCenterVO;
|
||||
|
|
@ -88,6 +93,7 @@ import com.cloud.user.User;
|
|||
import com.cloud.utils.component.ComponentContext;
|
||||
import com.cloud.utils.db.Merovingian2;
|
||||
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { "classpath:/fakeDriverTestContext.xml" })
|
||||
public class EndpointSelectorTest {
|
||||
|
|
@ -121,6 +127,8 @@ public class EndpointSelectorTest {
|
|||
ImageStoreVO imageStore;
|
||||
@Inject
|
||||
AccountManager accountManager;
|
||||
|
||||
LockMasterListener lockMasterListener;
|
||||
VolumeInfo vol = null;
|
||||
FakePrimaryDataStoreDriver driver = new FakePrimaryDataStoreDriver();
|
||||
@Inject
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ import com.cloud.storage.snapshot.SnapshotSchedulerImpl;
|
|||
import com.cloud.user.DomainManager;
|
||||
import com.cloud.utils.component.ComponentContext;
|
||||
|
||||
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.DataMotionStrategy;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
|
||||
|
|
@ -61,7 +60,6 @@ public class FakeDriverTestConfiguration extends ChildTestConfiguration{
|
|||
return Mockito.mock(DomainManager.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Bean
|
||||
public EndPointSelector selector() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue