Skip to content

Commit 5ddea6f

Browse files
author
rsmekala
committed
Updated ruby syntax to work with ruby 1.8
1 parent 148e27f commit 5ddea6f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/facter/productmodel.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
if is_docker
2020
require 'net/netconf/jnpr'
2121
# NETCONF_USER refers to the login username configured for puppet operations
22-
login = { target: 'localhost', username: ENV['NETCONF_USER'] }
22+
login = { :target => 'localhost', :username => ENV['NETCONF_USER'],
23+
:port => ENV['NETCONF_PORT'] ? ENV['NETCONF_PORT'].to_i : 22 }
2324
@netconf = Netconf::SSH.new(login)
2425
# Else, open an IOProc session
2526
else

lib/puppet/provider/junos/junos_netdev_device.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def initialize( catalog_version )
2323

2424
if is_docker
2525
# NETCONF_USER refers to the login username configured for puppet operations
26-
login = { target: 'localhost', username: ENV['NETCONF_USER'] }
26+
login = { :target => 'localhost', :username => ENV['NETCONF_USER'],
27+
:port => ENV['NETCONF_PORT'] ? ENV['NETCONF_PORT'].to_i : 22 }
2728
@netconf = Netconf::SSH.new(login)
2829
NetdevJunos::Log.debug "Opening a SSH connection from docker container: #{is_docker}"
2930
else

0 commit comments

Comments
 (0)