Open Kilda Java Documentation
LinkPropsDto.java
Go to the documentation of this file.
1 /* Copyright 2018 Telstra Open Source
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package org.openkilda.northbound.dto.links;
17 
18 import com.fasterxml.jackson.annotation.JsonInclude;
19 import com.fasterxml.jackson.databind.PropertyNamingStrategy;
20 import com.fasterxml.jackson.databind.annotation.JsonNaming;
21 import lombok.AllArgsConstructor;
22 import lombok.Data;
23 import lombok.EqualsAndHashCode;
24 import lombok.NoArgsConstructor;
25 
26 import java.util.HashMap;
27 import java.util.Map;
28 
29 @Data
30 @NoArgsConstructor
31 @AllArgsConstructor
32 @EqualsAndHashCode(exclude = "props")
33 @JsonInclude(JsonInclude.Include.NON_NULL)
34 @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
35 public class LinkPropsDto {
36 
37  private String srcSwitch;
38  private Integer srcPort;
39  private String dstSwitch;
40  private Integer dstPort;
41  private Map<String, String> props = new HashMap<>();
42 
43  public String getProperty(String key) {
44  return props.get(key);
45  }
46 
47  public void setProperty(String key, String value) {
48  props.put(key, value);
49  }
50 }
value
Definition: nodes.py:62