blob: f8660afe3746036a87852d091e04fe2e8390d6ad [file] [log] [blame]
Andrea Campanella241896c2017-05-10 13:11:04 -07001/*
2 * Copyright 2017-present Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.provider.general.device.api;
18
19import com.google.common.annotations.Beta;
20
21import java.util.Map;
22
23/**
24 * Protocol specific configuration for the general device provider.
25 */
26@Beta
27public final class DeviceInfoConfig {
28
29 private final Map<String, String> configValues;
30 private final String deviceKeyId;
31
32
33 public DeviceInfoConfig(Map<String, String> configValues, String deviceKeyId) {
34 this.configValues = configValues;
35 this.deviceKeyId = deviceKeyId;
36 }
37
38 /**
39 * Gets the configValues contained in the json sent via net-cfg.
40 *
41 * @return configValues in key-value pairs.
42 */
43 public Map<String, String> configValues() {
44 return configValues;
45 }
46
47 /**
48 * Gets the device key id of the device.
49 * This key should be pre-existing in ONOS.
50 *
51 * @return device key id
52 */
53 public String deviceKeyId() {
54 return deviceKeyId;
55 }
56
57}