From e7e125740e7e2ba9f2e00a347745811f4a388f51 Mon Sep 17 00:00:00 2001 From: Ivan Krutov Date: Tue, 14 Feb 2017 19:01:53 +0300 Subject: [PATCH] Added WorkerMetadata (related to #191, #215, #216) --- .../org/meridor/perspective/aws/WorkerMetadata.java | 13 +++++++++++++ perspective-beans/src/xsd/config.xsd | 2 ++ .../perspective/googlecloud/WorkerMetadata.java | 13 +++++++++++++ .../perspective/microsoftazure/WorkerMetadata.java | 13 +++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 perspective-aws/src/main/java/org/meridor/perspective/aws/WorkerMetadata.java create mode 100644 perspective-google-cloud/src/main/java/org/meridor/perspective/googlecloud/WorkerMetadata.java create mode 100644 perspective-microsoft-azure/src/main/java/org/meridor/perspective/microsoftazure/WorkerMetadata.java diff --git a/perspective-aws/src/main/java/org/meridor/perspective/aws/WorkerMetadata.java b/perspective-aws/src/main/java/org/meridor/perspective/aws/WorkerMetadata.java new file mode 100644 index 00000000..2e459643 --- /dev/null +++ b/perspective-aws/src/main/java/org/meridor/perspective/aws/WorkerMetadata.java @@ -0,0 +1,13 @@ +package org.meridor.perspective.aws; + +import org.meridor.perspective.config.CloudType; +import org.meridor.perspective.worker.misc.impl.AbstractWorkerMetadata; +import org.springframework.stereotype.Component; + +@Component +public class WorkerMetadata extends AbstractWorkerMetadata { + @Override + public CloudType getCloudType() { + return CloudType.AWS; + } +} diff --git a/perspective-beans/src/xsd/config.xsd b/perspective-beans/src/xsd/config.xsd index 487b08ec..c0350de9 100644 --- a/perspective-beans/src/xsd/config.xsd +++ b/perspective-beans/src/xsd/config.xsd @@ -10,6 +10,8 @@ + + diff --git a/perspective-google-cloud/src/main/java/org/meridor/perspective/googlecloud/WorkerMetadata.java b/perspective-google-cloud/src/main/java/org/meridor/perspective/googlecloud/WorkerMetadata.java new file mode 100644 index 00000000..d942876a --- /dev/null +++ b/perspective-google-cloud/src/main/java/org/meridor/perspective/googlecloud/WorkerMetadata.java @@ -0,0 +1,13 @@ +package org.meridor.perspective.googlecloud; + +import org.meridor.perspective.config.CloudType; +import org.meridor.perspective.worker.misc.impl.AbstractWorkerMetadata; +import org.springframework.stereotype.Component; + +@Component +public class WorkerMetadata extends AbstractWorkerMetadata { + @Override + public CloudType getCloudType() { + return CloudType.GOOGLE_CLOUD; + } +} diff --git a/perspective-microsoft-azure/src/main/java/org/meridor/perspective/microsoftazure/WorkerMetadata.java b/perspective-microsoft-azure/src/main/java/org/meridor/perspective/microsoftazure/WorkerMetadata.java new file mode 100644 index 00000000..cdd77439 --- /dev/null +++ b/perspective-microsoft-azure/src/main/java/org/meridor/perspective/microsoftazure/WorkerMetadata.java @@ -0,0 +1,13 @@ +package org.meridor.perspective.microsoftazure; + +import org.meridor.perspective.config.CloudType; +import org.meridor.perspective.worker.misc.impl.AbstractWorkerMetadata; +import org.springframework.stereotype.Component; + +@Component +public class WorkerMetadata extends AbstractWorkerMetadata { + @Override + public CloudType getCloudType() { + return CloudType.MICROSOFT_AZURE; + } +}