1 package org.openecomp.mso.client.aai;
\r
4 import java.io.IOException;
\r
5 import java.security.NoSuchAlgorithmException;
\r
6 import java.util.List;
\r
7 import java.util.UUID;
\r
9 import org.junit.BeforeClass;
\r
10 import org.junit.Ignore;
\r
11 import org.junit.Test;
\r
12 import org.openecomp.aai.domain.yang.Pserver;
\r
13 import static org.junit.Assert.assertEquals;
\r
14 import com.fasterxml.jackson.core.JsonParseException;
\r
15 import com.fasterxml.jackson.databind.JsonMappingException;
\r
16 public class AAIPServerTest {
\r
19 public static void setUp() {
\r
20 System.setProperty("mso.config.path", "src/test/resources");
\r
21 System.setProperty("javax.net.ssl.keyStore", "C:/etc/ecomp/mso/config/msoClientKeyStore.jks");
\r
22 System.setProperty("javax.net.ssl.keyStorePassword", "mso4you");
\r
23 System.setProperty("javax.net.ssl.trustStore", "C:/etc/ecomp/mso/config/msoTrustStore.jks");
\r
24 System.setProperty("javax.net.ssl.trustStorePassword", "mso_Domain2.0_4you");
\r
28 @Ignore // IGNORED FOR 1710 MERGE TO ONAP
\r
29 public void pserverTest() throws JsonParseException, JsonMappingException, IOException, NoSuchAlgorithmException {
\r
30 AAIRestClientImpl client = new AAIRestClientImpl();
\r
31 File file = new File("src/test/resources/__files/AAI/pserver.json");
\r
32 List<Pserver> list = client.getListOfPservers(file);
\r
34 assertEquals("", list.get(0).getHostname(), "test");
\r
38 @Ignore // IGNORED FOR 1710 MERGE TO ONAP
\r
39 public void pserverActualTest() throws JsonParseException, JsonMappingException, IOException, NoSuchAlgorithmException {
\r
40 AAIRestClientImpl client = new AAIRestClientImpl();
\r
41 List<Pserver> list = client.getPhysicalServerByVnfId("d946afed-8ebe-4c5d-9665-54fcc043b8e7", UUID.randomUUID().toString());
\r
42 assertEquals("", list.size(), 0);
\r