4b71770e1f433a7ae68fef0bae2496e11e12ed89
[ccsdk/cds.git] /
1 /*
2  * Copyright © 2017-2018 AT&T Intellectual Property.
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
17 package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.interfaces
18
19
20 data class DeviceInfo (
21         var name: String? = null,
22         var pass: String? = null,
23         var ipAddress: String? = null,
24         var port: Int = 0,
25         var key: String? = null,
26    // private var sshClientLib: NetconfSshClientLib = NetconfSshClientLib,
27
28         var connectTimeoutSec: Long = 30,
29         var replyTimeout: Int = 60,
30         var idleTimeout: Int = 45,
31         var deviceId: String? = null
32 ){
33     /**
34      * Information for contacting the controller.
35      *
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
40      */
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")
45         this.name = name
46         this.pass = pass
47         this.ipAddress = ipAddress
48         this.port = port
49         //this.sshClientLib = Optional.ofNullable(NetconfSshClientLib)
50         this.connectTimeoutSec = connectTimeoutSec
51         this. deviceId = "$ipAddress:$port"
52     }
53 }