Skip to content

Commit

Permalink
Delay load winrm since it's 15 MB+ and slow
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafanie committed Dec 16, 2022
1 parent b8c46b7 commit 738b44a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/gems/pending/util/miq_winrm.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
require 'winrm'
require 'winrm-elevated'

class MiqWinRM
WMI_RETRIES = 2
attr_reader :uri, :username, :password, :hostname, :port, :connection
Expand All @@ -10,6 +7,10 @@ def initialize
@shell = nil
@elevated_runner = nil
require 'uri'

# These are slow/bulky (15 MB+) requires so delay them until they're needed
require 'winrm'
require 'winrm-elevated'
end

def build_uri
Expand Down

0 comments on commit 738b44a

Please sign in to comment.