Search in sources :

Example 11 with NetworkInfo

use of org.onap.so.openstack.beans.NetworkInfo in project so by onap.

the class MsoNeutronUtilsTest method queryNetworkTest_404.

@Test
public void queryNetworkTest_404() throws Exception {
    NetworkInfo networkInfo = msoNeutronUtils.queryNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId", "MTN13");
    Assert.assertNull(networkInfo);
}
Also used : NetworkInfo(org.onap.so.openstack.beans.NetworkInfo) Test(org.junit.Test) BaseTest(org.onap.so.BaseTest)

Example 12 with NetworkInfo

use of org.onap.so.openstack.beans.NetworkInfo in project so by onap.

the class MsoNeutronUtilsTest method queryNetworkTest.

@Test
public void queryNetworkTest() throws Exception {
    StubOpenStack.mockOpenStackGetNeutronNetwork(wireMockServer, "GetNeutronNetwork.json", "43173f6a-d699-414b-888f-ab243dda6dfe");
    NetworkInfo networkInfo = msoNeutronUtils.queryNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId", "MTN13");
    Assert.assertEquals("net1", networkInfo.getName());
}
Also used : NetworkInfo(org.onap.so.openstack.beans.NetworkInfo) Test(org.junit.Test) BaseTest(org.onap.so.BaseTest)

Aggregations

NetworkInfo (org.onap.so.openstack.beans.NetworkInfo)12 Test (org.junit.Test)10 BaseTest (org.onap.so.BaseTest)6 Network (com.woorea.openstack.quantum.model.Network)4 ArrayList (java.util.ArrayList)2 List (java.util.List)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Optional (java.util.Optional)1 NetworkException (org.onap.so.adapters.network.exceptions.NetworkException)1 CloudSite (org.onap.so.db.catalog.beans.CloudSite)1 HeatTemplate (org.onap.so.db.catalog.beans.HeatTemplate)1 NetworkResource (org.onap.so.db.catalog.beans.NetworkResource)1 StackInfo (org.onap.so.openstack.beans.StackInfo)1 MsoException (org.onap.so.openstack.exceptions.MsoException)1 NetworkType (org.onap.so.openstack.utils.MsoNeutronUtils.NetworkType)1