c/s/e/cli: add equinix api cli tooling
This is a fairly simple and hacked together cli but it does its job for basic maintenance tasks
Change-Id: I043c12b930546f9405b9f8190326724122f1c0aa
Reviewed-on: https://review.monogon.dev/c/monogon/+/1704
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/cloud/shepherd/equinix/cli/BUILD.bazel b/cloud/shepherd/equinix/cli/BUILD.bazel
new file mode 100644
index 0000000..8ac689a
--- /dev/null
+++ b/cloud/shepherd/equinix/cli/BUILD.bazel
@@ -0,0 +1,28 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
+
+go_library(
+ name = "cli_lib",
+ srcs = [
+ "cmd_delete.go",
+ "cmd_move.go",
+ "cmd_reboot.go",
+ "cmd_yoink.go",
+ "main.go",
+ ],
+ importpath = "source.monogon.dev/cloud/shepherd/equinix/cli",
+ visibility = ["//visibility:private"],
+ deps = [
+ "//cloud/shepherd/equinix/wrapngo",
+ "//metropolis/cli/pkg/context",
+ "@com_github_packethost_packngo//:packngo",
+ "@com_github_spf13_cobra//:cobra",
+ "@io_k8s_klog//:klog",
+ "@io_k8s_klog_v2//:klog",
+ ],
+)
+
+go_binary(
+ name = "cli",
+ embed = [":cli_lib"],
+ visibility = ["//visibility:public"],
+)