2 * Copyright (C) 2014 Cisco Systems, Inc.
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 * Authors : Thomas Bachman
10 package org.opendaylight.groupbasedpolicy.renderer.opflex.lib.messages;
12 import java.util.ArrayList;
13 import java.util.List;
15 import org.opendaylight.groupbasedpolicy.renderer.opflex.jsonrpc.RpcMessage;
17 import com.fasterxml.jackson.annotation.JsonIgnore;
18 import com.fasterxml.jackson.databind.JsonNode;
19 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
20 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
24 public class IdentityResponse extends RpcMessage {
26 public static final String IDENTITY_MESSAGE_RESPONSE = "send_identity_response";
28 static public class Peer {
30 private List<String> role;
31 private String connectivity_info;
33 public List<String> getRole() {
37 public void setRole(List<String> role) {
41 public String getConnectivity_info() {
42 return connectivity_info;
45 public void setConnectivity_info(String connectivity_info) {
46 this.connectivity_info = connectivity_info;
52 static public class Result {
55 private String domain;
56 private List<String> my_role;
57 private List<Peer> peers;
59 public String getName() {
63 public void setName(String name) {
68 my_role = new ArrayList<String>();
71 public String getDomain() {
75 public void setDomain(String domain) {
79 public List<String> getMy_role() {
83 public void setMy_role(List<String> my_role) {
84 this.my_role = my_role;
87 public List<Peer> getPeers() {
91 public void setPeers(List<Peer> peers) {
98 private Result result;
99 private OpflexError error;
104 private String method;
107 public JsonNode getId() {
112 public void setId(JsonNode id) {
116 public OpflexError getError() {
120 public void setError(OpflexError error) {
125 public String getMethod() {
130 public void setMethod(String method) {}
132 public Result getResult() {
136 public void setResult(Result result) {
137 this.result = result;
140 public IdentityResponse(String name) {
144 public IdentityResponse() {
145 this.name = IDENTITY_MESSAGE_RESPONSE;
149 public String getName() {
154 public void setName(String name) {
160 public boolean valid() {