diff options
Diffstat (limited to 'vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model')
-rw-r--r-- | vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/VnfOperation.java (renamed from vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/VnfJob.java) | 45 | ||||
-rw-r--r-- | vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/Vnfds.java | 97 |
2 files changed, 123 insertions, 19 deletions
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/VnfJob.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/VnfOperation.java index 575223c700..c37f433668 100644 --- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/VnfJob.java +++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/VnfOperation.java @@ -21,30 +21,37 @@ package org.onap.svnfm.simulator.model; import javax.persistence.Column; import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; import javax.persistence.Id; import javax.persistence.Table; +import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse200; /** - * + * * @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech) * @author Ronan Kenny (ronan.kenny@est.tech) */ @Entity -@Table(name = "VNF_JOB") -public class VnfJob { +@Table(name = "VNF_OPERATION") +public class VnfOperation { @Id - @Column(name = "jobId", nullable = false) - private String jobId; + @Column(name = "operationId", nullable = false) + private String id; private String vnfInstanceId; - private String vnfId; - private String status; - public String getJobId() { - return jobId; + @Enumerated(EnumType.STRING) + private InlineResponse200.OperationEnum operation; + + @Enumerated(EnumType.STRING) + private InlineResponse200.OperationStateEnum operationState; + + public String getId() { + return id; } - public void setJobId(final String jobId) { - this.jobId = jobId; + public void setId(final String id) { + this.id = id; } public String getVnfInstanceId() { @@ -55,19 +62,19 @@ public class VnfJob { this.vnfInstanceId = vnfInstanceId; } - public String getVnfId() { - return vnfId; + public InlineResponse200.OperationEnum getOperation() { + return operation; } - public void setVnfId(final String vnfId) { - this.vnfId = vnfId; + public void setOperation(final InlineResponse200.OperationEnum operation) { + this.operation = operation; } - public String getStatus() { - return status; + public InlineResponse200.OperationStateEnum getOperationState() { + return operationState; } - public void setStatus(final String status) { - this.status = status; + public void setOperationState(final InlineResponse200.OperationStateEnum operationState) { + this.operationState = operationState; } } diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/Vnfds.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/Vnfds.java new file mode 100644 index 0000000000..ea171f0fce --- /dev/null +++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/Vnfds.java @@ -0,0 +1,97 @@ +package org.onap.svnfm.simulator.model; + +import java.util.List; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@ConfigurationProperties(prefix = "vnfds") +@Component +public class Vnfds { + + private List<Vnfd> vnfdList; + + public static class Vnfd { + + private String vnfdId; + private List<Vnfc> vnfclist; + + + public String getVnfdId() { + return vnfdId; + } + + public void setVnfdId(final String vnfdId) { + this.vnfdId = vnfdId; + } + + public List<Vnfc> getVnfcList() { + return vnfclist; + } + + public void setVnfcList(final List<Vnfc> vnfclist) { + this.vnfclist = vnfclist; + } + } + + + public static class Vnfc { + + private String vnfcId; + private String type; + private String vduId; + private String resourceTemplateId; + private String grantResourceId; + + public String getVnfcId() { + return vnfcId; + } + + public void setVnfcId(final String vnfcId) { + this.vnfcId = vnfcId; + } + + public String getVduId() { + return vduId; + } + + public void setVduId(final String vduId) { + this.vduId = vduId; + } + + public String getType() { + return type; + } + + public void setType(final String type) { + this.type = type; + } + + public String getResourceTemplateId() { + return resourceTemplateId; + } + + public void setResourceTemplateId(final String resourceTemplateId) { + this.resourceTemplateId = resourceTemplateId; + } + + public String getGrantResourceId() { + return grantResourceId; + } + + public void setGrantResourceId(final String grantResourceId) { + this.grantResourceId = grantResourceId; + } + + } + + + public List<Vnfd> getVnfdList() { + return vnfdList; + } + + + public void setVnfdList(final List<Vnfd> vnfdList) { + this.vnfdList = vnfdList; + } + +} |