c/s/e/wrapngo: add more api wrappers
Change-Id: I826a799cccc609d95b1ea3bd933b019558690c59
Reviewed-on: https://review.monogon.dev/c/monogon/+/1556
Reviewed-by: Serge Bazanski <serge@monogon.tech>
Tested-by: Jenkins CI
diff --git a/cloud/shepherd/equinix/manager/fakequinix_test.go b/cloud/shepherd/equinix/manager/fakequinix_test.go
index f18b435..e3a04d5 100644
--- a/cloud/shepherd/equinix/manager/fakequinix_test.go
+++ b/cloud/shepherd/equinix/manager/fakequinix_test.go
@@ -78,6 +78,28 @@
return res, nil
}
+// MoveReservation is not implemented in fakequinix
+func (f *fakequinix) MoveReservation(_ context.Context, hardwareReservationDID, projectID string) (*packngo.HardwareReservation, error) {
+ return nil, &packngo.ErrorResponse{
+ Response: &http.Response{
+ StatusCode: http.StatusNotImplemented,
+ },
+ }
+}
+
+func (f *fakequinix) DeleteDevice(_ context.Context, id string) error {
+ f.mu.Lock()
+ defer f.mu.Unlock()
+
+ if _, ok := f.devices[id]; !ok {
+ return f.notFound()
+ }
+
+ delete(f.devices, id)
+
+ return nil
+}
+
func (f *fakequinix) CreateDevice(_ context.Context, request *packngo.DeviceCreateRequest) (*packngo.Device, error) {
f.mu.Lock()
defer f.mu.Unlock()