diff options
author | Martin Polden <mpolden@mpolden.no> | 2022-06-01 13:38:21 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2022-06-01 15:01:43 +0200 |
commit | a511192a098d94890fed014ae2aba59865b8ced2 (patch) | |
tree | 3328dc4cc13aae85fb58036b28513ef8360b7c5a /controller-api | |
parent | 8bf4fe891fa15414d441a29b02db98141847259e (diff) |
Remove CloudEventTracker
Diffstat (limited to 'controller-api')
4 files changed, 0 insertions, 77 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java index 52f687e5708..c0adb7389c8 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java @@ -7,7 +7,6 @@ import com.yahoo.vespa.hosted.controller.api.identifiers.ControllerVersion; import com.yahoo.vespa.hosted.controller.api.integration.archive.ArchiveService; import com.yahoo.vespa.hosted.controller.api.integration.artifact.ArtifactRegistry; import com.yahoo.vespa.hosted.controller.api.integration.athenz.AccessControlService; -import com.yahoo.vespa.hosted.controller.api.integration.aws.CloudEventFetcher; import com.yahoo.vespa.hosted.controller.api.integration.aws.ResourceTagger; import com.yahoo.vespa.hosted.controller.api.integration.aws.RoleService; import com.yahoo.vespa.hosted.controller.api.integration.billing.BillingController; @@ -77,8 +76,6 @@ public interface ServiceRegistry { CostReportConsumer costReportConsumer(); - CloudEventFetcher eventFetcherService(); - ArtifactRepository artifactRepository(); TesterCloud testerCloud(); diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/aws/CloudEvent.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/aws/CloudEvent.java deleted file mode 100644 index b5445791bf0..00000000000 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/aws/CloudEvent.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.hosted.controller.api.integration.aws; - -import java.util.Date; -import java.util.Optional; -import java.util.Set; - -/** - * A maintenance event in a cloud service. - * - * @author freva - */ -public class CloudEvent { - - public final String instanceEventId; - public final String code; - public final String description; - public final Optional<Date> notBefore; - public final Optional<Date> notBeforeDeadline; - public final Optional<Date> notAfter; - public final String awsRegionName; - public final Set<String> affectedInstances; - - public CloudEvent(String instanceEventId, String code, String description, Date notAfter, Date notBefore, - Date notBeforeDeadline, String awsRegionName, Set<String> affectedInstances) { - this.instanceEventId = instanceEventId; - this.code = code; - this.description = description; - this.notBefore = Optional.ofNullable(notBefore); - this.notBeforeDeadline = Optional.ofNullable(notBeforeDeadline); - this.notAfter = Optional.ofNullable(notAfter); - this.awsRegionName = awsRegionName; - this.affectedInstances = Set.copyOf(affectedInstances); - } - -} diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/aws/CloudEventFetcher.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/aws/CloudEventFetcher.java deleted file mode 100644 index 0d08a5a8cb6..00000000000 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/aws/CloudEventFetcher.java +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.hosted.controller.api.integration.aws; - -import java.util.List; - -/** - * @author freva - */ -public interface CloudEventFetcher { - - List<CloudEvent> getEvents(String regionName); - -} diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/aws/MockCloudEventFetcher.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/aws/MockCloudEventFetcher.java deleted file mode 100644 index 3300d8879ce..00000000000 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/aws/MockCloudEventFetcher.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.hosted.controller.api.integration.aws; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author freva - */ -public class MockCloudEventFetcher implements CloudEventFetcher { - - private final Map<String, List<CloudEvent>> mockedEvents = new HashMap<>(); - - @Override - public List<CloudEvent> getEvents(String regionName) { - return mockedEvents.getOrDefault(regionName, new ArrayList<>()); - } - - public void addEvent(String regionName, CloudEvent cloudEvent) { - mockedEvents.computeIfAbsent(regionName, i -> new ArrayList<>()).add(cloudEvent); - } - -} |