2 * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.neutron.spi;
10 import java.util.List;
12 import javax.xml.bind.annotation.XmlAccessType;
13 import javax.xml.bind.annotation.XmlAccessorType;
14 import javax.xml.bind.annotation.XmlElement;
15 import javax.xml.bind.annotation.XmlRootElement;
16 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
19 @XmlAccessorType(XmlAccessType.NONE)
20 public final class NeutronSFCPortChain extends NeutronBaseAttributes<NeutronSFCPortChain> {
21 private static final long serialVersionUID = 1L;
23 // See OpenStack Networking SFC (networking-sfc) Port Chain API v1.0 Reference
24 // for description of annotated attributes
26 @XmlElement(name = "port_pair_groups")
27 List<String> portPairGroupsUUID;
29 @XmlElement(name = "flow_classifiers")
30 List<String> flowClassifiersUUID;
32 @XmlElement(name = "chain_parameters")
33 @XmlJavaTypeAdapter(NeutronResourceMapPropertyAdapter.class)
34 Map<String, String> chainParameters;
36 public NeutronSFCPortChain() {
39 public List<String> getPortPairGroupsUUID() {
40 return portPairGroupsUUID;
43 public void setPortPairGroupsUUID(List<String> portPairGroupsUUID) {
44 this.portPairGroupsUUID = portPairGroupsUUID;
47 public List<String> getFlowClassifiersUUID() {
48 return flowClassifiersUUID;
51 public void setFlowClassifiersUUID(List<String> flowClassifiersUUID) {
52 this.flowClassifiersUUID = flowClassifiersUUID;
55 public Map<String, String> getChainParameters() {
56 return chainParameters;
59 public void setChainParameters(Map<String, String> chainParameters) {
60 this.chainParameters = chainParameters;
64 protected boolean extractField(String field, NeutronSFCPortChain ans) {
66 case "port_pair_groups":
67 ans.setPortPairGroupsUUID(this.getPortPairGroupsUUID());
69 case "flow_classifiers":
70 ans.setFlowClassifiersUUID(this.getFlowClassifiersUUID());
72 case "chain_parameters":
73 ans.setChainParameters(this.getChainParameters());
76 return super.extractField(field, ans);
82 public String toString() {
83 return "NeutronSFCPortChain[" + "tenantID='" + getTenantID() + '\'' + ", name='" + name + '\''
84 + ", portPairGroupsUUID=" + portPairGroupsUUID + ", flowClassifiersUUID='" + flowClassifiersUUID + '\''
85 + ", chainParameters=" + chainParameters + ']';