From df9febef1bcd5e3857fb5e608f03503151262b91 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Wed, 11 Nov 2020 10:07:49 -0800 Subject: [PATCH] move communicators into sdk-internals directory --- builder/vmware/common/driver_esx5.go | 2 +- helper/communicator/config.go | 2 +- helper/communicator/step_connect.go | 2 +- helper/communicator/step_connect_ssh.go | 2 +- helper/communicator/step_connect_winrm.go | 2 +- helper/ssh/tunnel.go | 2 +- helper/ssh/tunnel_test.go | 2 +- .../communicator}/none/communicator.go | 0 .../communicator}/none/communicator_test.go | 0 .../communicator}/ssh/communicator.go | 0 .../communicator}/ssh/communicator_test.go | 0 {communicator => sdk-internals/communicator}/ssh/connect.go | 0 .../communicator}/ssh/connect_test.go | 0 {communicator => sdk-internals/communicator}/ssh/connection.go | 0 .../communicator}/ssh/keyboard_interactive.go | 0 .../communicator}/ssh/keyboard_interactive_test.go | 0 {communicator => sdk-internals/communicator}/ssh/password.go | 0 .../communicator}/ssh/password_test.go | 0 {communicator => sdk-internals/communicator}/ssh/tunnel.go | 0 .../communicator}/winrm/communicator.go | 0 .../communicator}/winrm/communicator_test.go | 0 {communicator => sdk-internals/communicator}/winrm/config.go | 0 {communicator => sdk-internals/communicator}/winrm/time.go | 0 {communicator => sdk-internals/communicator}/winrm/time_test.go | 0 24 files changed, 7 insertions(+), 7 deletions(-) rename {communicator => sdk-internals/communicator}/none/communicator.go (100%) rename {communicator => sdk-internals/communicator}/none/communicator_test.go (100%) rename {communicator => sdk-internals/communicator}/ssh/communicator.go (100%) rename {communicator => sdk-internals/communicator}/ssh/communicator_test.go (100%) rename {communicator => sdk-internals/communicator}/ssh/connect.go (100%) rename {communicator => sdk-internals/communicator}/ssh/connect_test.go (100%) rename {communicator => sdk-internals/communicator}/ssh/connection.go (100%) rename {communicator => sdk-internals/communicator}/ssh/keyboard_interactive.go (100%) rename {communicator => sdk-internals/communicator}/ssh/keyboard_interactive_test.go (100%) rename {communicator => sdk-internals/communicator}/ssh/password.go (100%) rename {communicator => sdk-internals/communicator}/ssh/password_test.go (100%) rename {communicator => sdk-internals/communicator}/ssh/tunnel.go (100%) rename {communicator => sdk-internals/communicator}/winrm/communicator.go (100%) rename {communicator => sdk-internals/communicator}/winrm/communicator_test.go (100%) rename {communicator => sdk-internals/communicator}/winrm/config.go (100%) rename {communicator => sdk-internals/communicator}/winrm/time.go (100%) rename {communicator => sdk-internals/communicator}/winrm/time_test.go (100%) diff --git a/builder/vmware/common/driver_esx5.go b/builder/vmware/common/driver_esx5.go index bdfa86e70..9b2ceff90 100644 --- a/builder/vmware/common/driver_esx5.go +++ b/builder/vmware/common/driver_esx5.go @@ -28,11 +28,11 @@ import ( "github.com/vmware/govmomi/vim25/types" "github.com/hashicorp/go-getter/v2" - "github.com/hashicorp/packer/communicator/ssh" "github.com/hashicorp/packer/helper/communicator" "github.com/hashicorp/packer/helper/multistep" helperssh "github.com/hashicorp/packer/helper/ssh" "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/sdk-internals/communicator/ssh" gossh "golang.org/x/crypto/ssh" ) diff --git a/helper/communicator/config.go b/helper/communicator/config.go index f27cd2a76..e6a346db7 100644 --- a/helper/communicator/config.go +++ b/helper/communicator/config.go @@ -12,11 +12,11 @@ import ( "time" "github.com/hashicorp/hcl/v2/hcldec" - packerssh "github.com/hashicorp/packer/communicator/ssh" "github.com/hashicorp/packer/helper/config" "github.com/hashicorp/packer/helper/multistep" helperssh "github.com/hashicorp/packer/helper/ssh" "github.com/hashicorp/packer/packer" + packerssh "github.com/hashicorp/packer/sdk-internals/communicator/ssh" "github.com/hashicorp/packer/template/interpolate" "github.com/masterzen/winrm" "golang.org/x/crypto/ssh" diff --git a/helper/communicator/step_connect.go b/helper/communicator/step_connect.go index 1eaf48bf8..a8dc18dd0 100644 --- a/helper/communicator/step_connect.go +++ b/helper/communicator/step_connect.go @@ -6,9 +6,9 @@ import ( "log" "time" - "github.com/hashicorp/packer/communicator/none" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/sdk-internals/communicator/none" gossh "golang.org/x/crypto/ssh" ) diff --git a/helper/communicator/step_connect_ssh.go b/helper/communicator/step_connect_ssh.go index 3ddaed115..4f00000df 100644 --- a/helper/communicator/step_connect_ssh.go +++ b/helper/communicator/step_connect_ssh.go @@ -13,10 +13,10 @@ import ( "golang.org/x/crypto/ssh/terminal" - "github.com/hashicorp/packer/communicator/ssh" "github.com/hashicorp/packer/helper/multistep" helperssh "github.com/hashicorp/packer/helper/ssh" "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/sdk-internals/communicator/ssh" gossh "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/agent" "golang.org/x/net/proxy" diff --git a/helper/communicator/step_connect_winrm.go b/helper/communicator/step_connect_winrm.go index 2600440ee..81ec99a2f 100644 --- a/helper/communicator/step_connect_winrm.go +++ b/helper/communicator/step_connect_winrm.go @@ -13,9 +13,9 @@ import ( "strings" "time" - "github.com/hashicorp/packer/communicator/winrm" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" + "github.com/hashicorp/packer/sdk-internals/communicator/winrm" winrmcmd "github.com/masterzen/winrm" "golang.org/x/net/http/httpproxy" ) diff --git a/helper/ssh/tunnel.go b/helper/ssh/tunnel.go index eeb45b51e..ea73a57f7 100644 --- a/helper/ssh/tunnel.go +++ b/helper/ssh/tunnel.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/hashicorp/packer/communicator/ssh" + "github.com/hashicorp/packer/sdk-internals/communicator/ssh" ) // ParseTunnelArgument parses an SSH tunneling argument compatible with the openssh client form. diff --git a/helper/ssh/tunnel_test.go b/helper/ssh/tunnel_test.go index 447a71ef3..cc81de031 100644 --- a/helper/ssh/tunnel_test.go +++ b/helper/ssh/tunnel_test.go @@ -3,7 +3,7 @@ package ssh import ( "testing" - "github.com/hashicorp/packer/communicator/ssh" + "github.com/hashicorp/packer/sdk-internals/communicator/ssh" ) const ( diff --git a/communicator/none/communicator.go b/sdk-internals/communicator/none/communicator.go similarity index 100% rename from communicator/none/communicator.go rename to sdk-internals/communicator/none/communicator.go diff --git a/communicator/none/communicator_test.go b/sdk-internals/communicator/none/communicator_test.go similarity index 100% rename from communicator/none/communicator_test.go rename to sdk-internals/communicator/none/communicator_test.go diff --git a/communicator/ssh/communicator.go b/sdk-internals/communicator/ssh/communicator.go similarity index 100% rename from communicator/ssh/communicator.go rename to sdk-internals/communicator/ssh/communicator.go diff --git a/communicator/ssh/communicator_test.go b/sdk-internals/communicator/ssh/communicator_test.go similarity index 100% rename from communicator/ssh/communicator_test.go rename to sdk-internals/communicator/ssh/communicator_test.go diff --git a/communicator/ssh/connect.go b/sdk-internals/communicator/ssh/connect.go similarity index 100% rename from communicator/ssh/connect.go rename to sdk-internals/communicator/ssh/connect.go diff --git a/communicator/ssh/connect_test.go b/sdk-internals/communicator/ssh/connect_test.go similarity index 100% rename from communicator/ssh/connect_test.go rename to sdk-internals/communicator/ssh/connect_test.go diff --git a/communicator/ssh/connection.go b/sdk-internals/communicator/ssh/connection.go similarity index 100% rename from communicator/ssh/connection.go rename to sdk-internals/communicator/ssh/connection.go diff --git a/communicator/ssh/keyboard_interactive.go b/sdk-internals/communicator/ssh/keyboard_interactive.go similarity index 100% rename from communicator/ssh/keyboard_interactive.go rename to sdk-internals/communicator/ssh/keyboard_interactive.go diff --git a/communicator/ssh/keyboard_interactive_test.go b/sdk-internals/communicator/ssh/keyboard_interactive_test.go similarity index 100% rename from communicator/ssh/keyboard_interactive_test.go rename to sdk-internals/communicator/ssh/keyboard_interactive_test.go diff --git a/communicator/ssh/password.go b/sdk-internals/communicator/ssh/password.go similarity index 100% rename from communicator/ssh/password.go rename to sdk-internals/communicator/ssh/password.go diff --git a/communicator/ssh/password_test.go b/sdk-internals/communicator/ssh/password_test.go similarity index 100% rename from communicator/ssh/password_test.go rename to sdk-internals/communicator/ssh/password_test.go diff --git a/communicator/ssh/tunnel.go b/sdk-internals/communicator/ssh/tunnel.go similarity index 100% rename from communicator/ssh/tunnel.go rename to sdk-internals/communicator/ssh/tunnel.go diff --git a/communicator/winrm/communicator.go b/sdk-internals/communicator/winrm/communicator.go similarity index 100% rename from communicator/winrm/communicator.go rename to sdk-internals/communicator/winrm/communicator.go diff --git a/communicator/winrm/communicator_test.go b/sdk-internals/communicator/winrm/communicator_test.go similarity index 100% rename from communicator/winrm/communicator_test.go rename to sdk-internals/communicator/winrm/communicator_test.go diff --git a/communicator/winrm/config.go b/sdk-internals/communicator/winrm/config.go similarity index 100% rename from communicator/winrm/config.go rename to sdk-internals/communicator/winrm/config.go diff --git a/communicator/winrm/time.go b/sdk-internals/communicator/winrm/time.go similarity index 100% rename from communicator/winrm/time.go rename to sdk-internals/communicator/winrm/time.go diff --git a/communicator/winrm/time_test.go b/sdk-internals/communicator/winrm/time_test.go similarity index 100% rename from communicator/winrm/time_test.go rename to sdk-internals/communicator/winrm/time_test.go