cloud/shepherd/equinix/wrapngo: init
This adds a wrapper extending packngo for use with the upcoming
Shepherd implementation.
Supersedes: https://review.monogon.dev/c/monogon/+/989
Change-Id: I55d1a609a8b5241704c5fe4ce8c2294122cfa0c8
Reviewed-on: https://review.monogon.dev/c/monogon/+/1128
Reviewed-by: Leopold Schabel <leo@monogon.tech>
Tested-by: Jenkins CI
Reviewed-by: Mateusz Zalega <mateusz@monogon.tech>
diff --git a/cloud/shepherd/equinix/wrapngo/BUILD.bazel b/cloud/shepherd/equinix/wrapngo/BUILD.bazel
new file mode 100644
index 0000000..3694fe1
--- /dev/null
+++ b/cloud/shepherd/equinix/wrapngo/BUILD.bazel
@@ -0,0 +1,29 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+go_library(
+ name = "wrapngo",
+ srcs = [
+ "duct_tape.go",
+ "wrapn.go",
+ ],
+ importpath = "source.monogon.dev/cloud/shepherd/equinix/wrapngo",
+ visibility = ["//visibility:public"],
+ deps = [
+ "@com_github_cenkalti_backoff_v4//:backoff",
+ "@com_github_google_uuid//:uuid",
+ "@com_github_packethost_packngo//:packngo",
+ "@io_k8s_klog_v2//:klog",
+ ],
+)
+
+go_test(
+ name = "wrapngo_test",
+ timeout = "eternal",
+ srcs = ["wrapngo_test.go"],
+ args = ["-test.v"],
+ embed = [":wrapngo"],
+ deps = [
+ "@com_github_packethost_packngo//:packngo",
+ "@org_golang_x_crypto//ssh",
+ ],
+)