2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.so.bpmn.servicedecomposition.bbobjects;
23 import java.io.Serializable;
25 import com.fasterxml.jackson.annotation.JsonProperty;
26 import com.fasterxml.jackson.annotation.JsonRootName;
27 import org.apache.commons.lang3.builder.EqualsBuilder;
28 import org.apache.commons.lang3.builder.HashCodeBuilder;
29 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
31 import javax.persistence.Id;
33 @JsonRootName("sriov-vf")
34 public class SriovVf implements Serializable, ShallowCopy<SriovVf>{
36 private static final long serialVersionUID = -7790331637399859914L;
39 @JsonProperty("pci-id")
41 @JsonProperty("vf-vlan-filter")
42 private String vfVlanFilter;
43 @JsonProperty("vf-mac-filter")
44 private String vfMacFilter;
45 @JsonProperty("vf-vlan-strip")
46 private Boolean vfVlanStrip;
47 @JsonProperty("vf-vlan-anti-spoof-check")
48 private Boolean vfVlanAntiSpoofCheck;
49 @JsonProperty("vf-mac-anti-spoof-check")
50 private Boolean vfMacAntiSpoofCheck;
51 @JsonProperty("vf-mirrors")
52 private String vfMirrors;
53 @JsonProperty("vf-broadcast-allow")
54 private Boolean vfBroadcastAllow;
55 @JsonProperty("vf-unknown-multicast-allow")
56 private Boolean vfUnknownMulticastAllow;
57 @JsonProperty("vf-unknown-unicast-allow")
58 private Boolean vfUnknownUnicastAllow;
59 @JsonProperty("vf-insert-stag")
60 private Boolean vfInsertStag;
61 @JsonProperty("vf-link-status")
62 private String vfLinkStatus;
63 @JsonProperty("neutron-network-id")
64 private String neutronNetworkId;
66 public String getPciId() {
69 public void setPciId(String pciId) {
72 public String getVfVlanFilter() {
75 public void setVfVlanFilter(String vfVlanFilter) {
76 this.vfVlanFilter = vfVlanFilter;
78 public String getVfMacFilter() {
81 public void setVfMacFilter(String vfMacFilter) {
82 this.vfMacFilter = vfMacFilter;
84 public Boolean getVfVlanStrip() {
87 public void setVfVlanStrip(Boolean vfVlanStrip) {
88 this.vfVlanStrip = vfVlanStrip;
90 public Boolean getVfVlanAntiSpoofCheck() {
91 return vfVlanAntiSpoofCheck;
93 public void setVfVlanAntiSpoofCheck(Boolean vfVlanAntiSpoofCheck) {
94 this.vfVlanAntiSpoofCheck = vfVlanAntiSpoofCheck;
96 public Boolean getVfMacAntiSpoofCheck() {
97 return vfMacAntiSpoofCheck;
99 public void setVfMacAntiSpoofCheck(Boolean vfMacAntiSpoofCheck) {
100 this.vfMacAntiSpoofCheck = vfMacAntiSpoofCheck;
102 public String getVfMirrors() {
105 public void setVfMirrors(String vfMirrors) {
106 this.vfMirrors = vfMirrors;
108 public Boolean getVfBroadcastAllow() {
109 return vfBroadcastAllow;
111 public void setVfBroadcastAllow(Boolean vfBroadcastAllow) {
112 this.vfBroadcastAllow = vfBroadcastAllow;
114 public Boolean getVfUnknownMulticastAllow() {
115 return vfUnknownMulticastAllow;
117 public void setVfUnknownMulticastAllow(Boolean vfUnknownMulticastAllow) {
118 this.vfUnknownMulticastAllow = vfUnknownMulticastAllow;
120 public Boolean getVfUnknownUnicastAllow() {
121 return vfUnknownUnicastAllow;
123 public void setVfUnknownUnicastAllow(Boolean vfUnknownUnicastAllow) {
124 this.vfUnknownUnicastAllow = vfUnknownUnicastAllow;
126 public Boolean getVfInsertStag() {
129 public void setVfInsertStag(Boolean vfInsertStag) {
130 this.vfInsertStag = vfInsertStag;
132 public String getVfLinkStatus() {
135 public void setVfLinkStatus(String vfLinkStatus) {
136 this.vfLinkStatus = vfLinkStatus;
138 public String getNeutronNetworkId() {
139 return neutronNetworkId;
141 public void setNeutronNetworkId(String neutronNetworkId) {
142 this.neutronNetworkId = neutronNetworkId;
145 public boolean equals(final Object other) {
146 if (!(other instanceof SriovVf)) {
149 SriovVf castOther = (SriovVf) other;
150 return new EqualsBuilder().append(pciId, castOther.pciId).isEquals();
153 public int hashCode() {
154 return new HashCodeBuilder().append(pciId).toHashCode();