2 * Copyright © 2017-2018 AT&T Intellectual Property.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.interfaces
20 data class DeviceInfo (
21 var name: String? = null,
22 var pass: String? = null,
23 var ipAddress: String? = null,
25 var key: String? = null,
26 // private var sshClientLib: NetconfSshClientLib = NetconfSshClientLib,
28 var connectTimeoutSec: Long = 30,
29 var replyTimeout: Int = 60,
30 var idleTimeout: Int = 45,
31 var deviceId: String? = null
34 * Information for contacting the controller.
36 * @param name the connection type
37 * @param pass the pass for the device
38 * @param ipAddress the ip address
39 * @param port the tcp port
41 fun DeviceInfo(name: String, pass: String, ipAddress: String, port: Int, connectTimeoutSec: Long){
42 //checkArgument(name != "", "Empty device username")
43 // checkArgument(port > 0, "Negative port")
44 //checkNotNull(ipAddress, "Null ip address")
47 this.ipAddress = ipAddress
49 //this.sshClientLib = Optional.ofNullable(NetconfSshClientLib)
50 this.connectTimeoutSec = connectTimeoutSec
51 this. deviceId = "$ipAddress:$port"