From 114345035f95a2154fbea29356e33f1b2397fb39 Mon Sep 17 00:00:00 2001 From: Shiwei Tian Date: Mon, 25 Sep 2017 10:33:49 +0800 Subject: [PATCH] add vm data entity and vnf data entity Issue-ID: HOLMES-44 Change-Id: I51656e408f9da56bc2141d45c132861fdfcb3c39 Signed-off-by: Shiwei Tian --- .../holmes/common/aai/entity/RelationshipList.java | 52 ++++++++++++++++++++++ .../onap/holmes/common/aai/entity/VmEntity.java | 34 ++++++++++++++ .../holmes/common/aai/entity/VmResourceLink.java | 26 +++++++++++ .../onap/holmes/common/aai/entity/VnfEntity.java | 35 +++++++++++++++ 4 files changed, 147 insertions(+) create mode 100644 holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/RelationshipList.java create mode 100644 holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/VmEntity.java create mode 100644 holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/VmResourceLink.java create mode 100644 holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/VnfEntity.java diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/RelationshipList.java b/holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/RelationshipList.java new file mode 100644 index 0000000..8711e2c --- /dev/null +++ b/holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/RelationshipList.java @@ -0,0 +1,52 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.holmes.common.aai.entity; + +import java.util.List; +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +public class RelationshipList { + + private List relationships; + + @Setter + @Getter + public static class Relationship { + private String relatedLink; + private String relatedTo; + private List relatedToPropertyList; + private List relationshipDataList; + } + + @Setter + @Getter + public static class RelationshipData { + private String relationshipKey; + private String relationshipValue; + } + + @Getter + @Setter + public static class RelatedToProperty { + private String propertyKey; + private String propertyValue; + } + +} diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/VmEntity.java b/holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/VmEntity.java new file mode 100644 index 0000000..2a2f14e --- /dev/null +++ b/holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/VmEntity.java @@ -0,0 +1,34 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.holmes.common.aai.entity; + +import java.util.List; +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +public class VmEntity { + private Boolean inMaint; + private Boolean closedLoopDisable; + private String provStatus; + private String resourceVersion; + private String vserverId; + private String vserverName; + private String vserverName2; + private String vserverSelflink; + private RelationshipList relationshipList = new RelationshipList(); +} diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/VmResourceLink.java b/holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/VmResourceLink.java new file mode 100644 index 0000000..ee592d3 --- /dev/null +++ b/holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/VmResourceLink.java @@ -0,0 +1,26 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.holmes.common.aai.entity; + +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +public class VmResourceLink { + private String resourceLink; + private String resourceType; +} diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/VnfEntity.java b/holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/VnfEntity.java new file mode 100644 index 0000000..4f72a30 --- /dev/null +++ b/holmes-actions/src/main/java/org/onap/holmes/common/aai/entity/VnfEntity.java @@ -0,0 +1,35 @@ +/** + * Copyright 2017 ZTE Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.holmes.common.aai.entity; + +import java.util.List; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class VnfEntity { + private Boolean inMaint; + private Boolean closedLoopDisabled; + private String orchestrationStatus; + private String provStatus; + private String resourceVersion; + private String serviceId; + private String vnfId; + private String vnfName; + private String vnfType; + private RelationshipList relationshipList = new RelationshipList(); +} -- 2.16.6