diff options
Diffstat (limited to 'vnf-sdk-function-test/src/main')
4 files changed, 22 insertions, 18 deletions
diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceNode.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceNode.java index 28ae31e..0d38f06 100644 --- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceNode.java +++ b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceNode.java @@ -27,6 +27,12 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class ServiceNode { + + private String ip; + + private String port; + + private int ttl; public String getIp() { return ip; @@ -52,9 +58,5 @@ public class ServiceNode { this.ttl = ttl; } - private String ip; - - private String port; - - private int ttl; + } diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceRegisterEntity.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceRegisterEntity.java index d32e2af..c6d885a 100644 --- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceRegisterEntity.java +++ b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceRegisterEntity.java @@ -30,6 +30,18 @@ import lombok.NoArgsConstructor; @AllArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class ServiceRegisterEntity { + + private String serviceName; + + private String version; + + private String url; + + private String protocol; + + private String visualRange; + + private List<ServiceNode> nodes = new ArrayList<ServiceNode>(); public String getServiceName() { return serviceName; @@ -79,17 +91,7 @@ public class ServiceRegisterEntity { this.nodes = nodes; } - private String serviceName; - - private String version; - - private String url; - - private String protocol; - - private String visualRange; - - private List<ServiceNode> nodes = new ArrayList<ServiceNode>(); + public void setSingleNode(String ip, String port, int ttl) { ServiceNode node = new ServiceNode(); diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/resource/CommonManager.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/resource/CommonManager.java index 6dc161c..5d36aa4 100644 --- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/resource/CommonManager.java +++ b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/resource/CommonManager.java @@ -80,7 +80,7 @@ public class CommonManager { FileUtil.unzip(filePath, tempDir); LOGGER.info("File path=" + filePath); - String directories[] = FileUtil.getDirectory(tempDir); + String[] directories = FileUtil.getDirectory(tempDir); if(null != directories) { filePath = tempDir + File.separator + directories[0]; } diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java index 0ab292c..94773b3 100644 --- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java +++ b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java @@ -92,7 +92,7 @@ public class ZipCompressor { } try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file))) { - byte data[] = new byte[BUFFER]; + byte[] data = new byte[BUFFER]; ZipEntry entry = new ZipEntry(basedir + file.getName()); out.putNextEntry(entry); |