Fix incorrect operational state of device configuration
Initialization of clientConfig in NetconfNodeHandler can throw
a RuntimeException, leaving no handler to clean up
the operational datastore. This results in garbage
data upon node deletion.
Made clientConfig nullable and wrapped its initialization in
a try/catch block to handle exceptions. Moved input validation
for host/port from AbstractNetconfTopology#setupConnection()
to DefaultNetconfClientConfigurationBuilderFactory
and included relevant unit tests.
JIRA: NETCONF-1114
Change-Id: Ieb74ee3c1a4e0cbab7f0e01c942d1e8c1d6e20e4
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>