use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class KubevirtLoadBalancerManagerTest method setUp.
@Before
public void setUp() throws Exception {
lbStore = new DistributedKubevirtLoadBalancerStore();
TestUtils.setField(lbStore, "coreService", new TestCoreService());
TestUtils.setField(lbStore, "storageService", new TestStorageService());
TestUtils.setField(lbStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
lbStore.activate();
target = new KubevirtLoadBalancerManager();
TestUtils.setField(target, "coreService", new TestCoreService());
target.kubevirtLoadBalancerStore = lbStore;
target.addListener(testListener);
target.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class KubevirtNetworkManagerTest method setUp.
@Before
public void setUp() throws Exception {
networkStore = new DistributedKubevirtNetworkStore();
TestUtils.setField(networkStore, "coreService", new TestCoreService());
TestUtils.setField(networkStore, "storageService", new TestStorageService());
TestUtils.setField(networkStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
networkStore.activate();
target = new KubevirtNetworkManager();
TestUtils.setField(target, "coreService", new TestCoreService());
target.networkStore = networkStore;
target.addListener(testListener);
target.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class KubevirtPodManagerTest method setUp.
@Before
public void setUp() throws Exception {
kubevirtPodStore = new DistributedKubevirtPodStore();
TestUtils.setField(kubevirtPodStore, "coreService", new TestCoreService());
TestUtils.setField(kubevirtPodStore, "storageService", new TestStorageService());
TestUtils.setField(kubevirtPodStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
kubevirtPodStore.activate();
target = new KubevirtPodManager();
TestUtils.setField(target, "coreService", new TestCoreService());
target.kubevirtPodStore = kubevirtPodStore;
target.addListener(testListener);
target.activate();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class KubevirtSecurityGroupManagerTest method setUp.
/**
* Initial setup for this unit test.
*/
@Before
public void setUp() throws Exception {
store = new DistributedKubevirtSecurityGroupStore();
TestUtils.setField(store, "coreService", new TestCoreService());
TestUtils.setField(store, "storageService", new TestStorageService());
TestUtils.setField(store, "eventExecutor", MoreExecutors.newDirectExecutorService());
store.activate();
target = new KubevirtSecurityGroupManager();
TestUtils.setField(target, "coreService", new TestCoreService());
target.sgStore = store;
target.addListener(testListener);
target.activate();
sgRule11 = DefaultKubevirtSecurityGroupRule.builder().id(SECURITY_GROUP_RULE_ID_1_1).securityGroupId(SECURITY_GROUP_ID_1).remoteGroupId(SECURITY_GROUP_ID_1).direction(SECURITY_GROUP_DIRECTION).etherType(SECURITY_GROUP_ETH_TYPE).portRangeMax(SECURITY_GROUP_PORT_RANGE_MAX_1).portRangeMin(SECURITY_GROUP_PORT_RANGE_MIN_1).protocol(SECURITY_GROUP_PROTOCOL_1).remoteIpPrefix(SECURITY_GROUP_REMOTE_IP_PREFIX_1).build();
sgRule12 = DefaultKubevirtSecurityGroupRule.builder().id(SECURITY_GROUP_RULE_ID_1_2).securityGroupId(SECURITY_GROUP_ID_1).remoteGroupId(SECURITY_GROUP_ID_2).direction(SECURITY_GROUP_DIRECTION).etherType(SECURITY_GROUP_ETH_TYPE).portRangeMax(SECURITY_GROUP_PORT_RANGE_MAX_2).portRangeMin(SECURITY_GROUP_PORT_RANGE_MIN_2).protocol(SECURITY_GROUP_PROTOCOL_2).remoteIpPrefix(SECURITY_GROUP_REMOTE_IP_PREFIX_2).build();
sg1 = DefaultKubevirtSecurityGroup.builder().id(SECURITY_GROUP_ID_1).name(SECURITY_GROUP_NAME_1).description(SECURITY_GROUP_DESCRIPTION_1).build();
sg2 = DefaultKubevirtSecurityGroup.builder().id(SECURITY_GROUP_ID_2).name(SECURITY_GROUP_NAME_2).description(SECURITY_GROUP_DESCRIPTION_2).build();
}
use of org.onosproject.store.service.TestStorageService in project onos by opennetworkinglab.
the class KubevirtApiConfigManagerTest method setUp.
/**
* Initial setup for this unit test.
*/
@Before
public void setUp() {
apiConfig1 = DefaultKubevirtApiConfig.builder().scheme(KubevirtApiConfig.Scheme.HTTP).ipAddress(IpAddress.valueOf("10.10.10.2")).port(6443).state(DISCONNECTED).datacenterId("BD").clusterId("BD-MEH-CT01").build();
apiConfig2 = DefaultKubevirtApiConfig.builder().scheme(KubevirtApiConfig.Scheme.HTTP).ipAddress(IpAddress.valueOf("10.10.10.3")).port(6443).state(DISCONNECTED).datacenterId("BD").clusterId("BD-MEH-CT01").build();
configStore = new DistributedKubevirtApiConfigStore();
TestUtils.setField(configStore, "coreService", new TestCoreService());
TestUtils.setField(configStore, "storageService", new TestStorageService());
TestUtils.setField(configStore, "eventExecutor", MoreExecutors.newDirectExecutorService());
configStore.activate();
target = new KubevirtApiConfigManager();
target.storageService = new TestStorageService();
target.coreService = new TestCoreService();
target.clusterService = new TestClusterService();
target.leadershipService = new TestLeadershipService();
target.configStore = configStore;
target.addListener(testListener);
target.activate();
testListener.events.clear();
}
Aggregations