Repository: nifi Updated Branches: refs/heads/master 8a12307d1 -> 7df537aec
NIFI-5850: Replaced custom AWS regions enum with the one from AWS Java SDK Signed-off-by: Pierre Villard <[email protected]> This closes #3190. This closes #3187. Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/7df537ae Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/7df537ae Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/7df537ae Branch: refs/heads/master Commit: 7df537aecaf48b533da5cb6a2e1c26979b82e965 Parents: 8a12307 Author: zenfenan <[email protected]> Authored: Thu Nov 29 14:59:23 2018 +0530 Committer: Pierre Villard <[email protected]> Committed: Sun Dec 2 13:09:21 2018 +0100 ---------------------------------------------------------------------- .../processors/aws/AbstractAWSProcessor.java | 3 +- .../nifi/processors/aws/regions/AWSRegions.java | 58 -------------------- nifi-nar-bundles/nifi-aws-bundle/pom.xml | 2 +- 3 files changed, 2 insertions(+), 61 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/7df537ae/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java index 00f443f..fe5ce62 100644 --- a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java +++ b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/AbstractAWSProcessor.java @@ -53,7 +53,6 @@ import org.apache.nifi.processor.Relationship; import org.apache.nifi.processor.exception.ProcessException; import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.processors.aws.credentials.provider.factory.CredentialPropertyDescriptors; -import org.apache.nifi.processors.aws.regions.AWSRegions; import org.apache.nifi.proxy.ProxyConfiguration; import org.apache.nifi.proxy.ProxySpec; import org.apache.nifi.ssl.SSLContextService; @@ -157,7 +156,7 @@ public abstract class AbstractAWSProcessor<ClientType extends AmazonWebServiceCl public static final PropertyDescriptor PROXY_CONFIGURATION_SERVICE = ProxyConfiguration.createProxyConfigPropertyDescriptor(true, PROXY_SPECS); protected static AllowableValue createAllowableValue(final Regions region) { - return new AllowableValue(region.getName(), AWSRegions.getRegionDisplayName(region.getName())); + return new AllowableValue(region.getName(), region.getDescription(), "AWS Region Code : " + region.getName()); } protected static AllowableValue[] getAvailableRegions() { http://git-wip-us.apache.org/repos/asf/nifi/blob/7df537ae/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/regions/AWSRegions.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/regions/AWSRegions.java b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/regions/AWSRegions.java deleted file mode 100644 index f2d01a8..0000000 --- a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/regions/AWSRegions.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.nifi.processors.aws.regions; - -public enum AWSRegions { - - GovCloud("us-gov-west-1", "AWS GovCloud (US)"), - US_EAST_1("us-east-1", "US East (N. Virginia)"), - US_EAST_2("us-east-2", "US East (Ohio)"), - US_WEST_1("us-west-1", "US West (N. California)"), - US_WEST_2("us-west-2", "US West (Oregon)"), - EU_WEST_1("eu-west-1", "EU (Ireland)"), - EU_WEST_2("eu-west-2", "EU (London)"), - EU_WEST_3("eu-west-3", "EU (Paris)"), - EU_CENTRAL_1("eu-central-1", "EU (Frankfurt)"), - AP_SOUTH_1("ap-south-1", "Asia Pacific (Mumbai)"), - AP_SOUTHEAST_1("ap-southeast-1", "Asia Pacific (Singapore)"), - AP_SOUTHEAST_2("ap-southeast-2", "Asia Pacific (Sydney)"), - AP_NORTHEAST_1("ap-northeast-1", "Asia Pacific (Tokyo)"), - AP_NORTHEAST_2("ap-northeast-2", "Asia Pacific (Seoul)"), - SA_EAST_1("sa-east-1", "South America (Sao Paulo)"), - CN_NORTH_1("cn-north-1", "China (Beijing)"), - CN_NORTHWEST_1("cn-northwest-1", "China (Ningxia)"), - CA_CENTRAL_1("ca-central-1", "Canada (Central)"); - - private final String regionCode; - private final String regionDisplayName; - - AWSRegions(String regionCode, String regionDisplayName) { - this.regionCode = regionCode; - this.regionDisplayName = regionDisplayName; - } - - public static String getRegionDisplayName(String regionCode) { - for (AWSRegions regions : AWSRegions.values()) { - if (regions.regionCode.equalsIgnoreCase(regionCode)) { - return regions.regionDisplayName; - } - } - - return regionCode; - } - -} http://git-wip-us.apache.org/repos/asf/nifi/blob/7df537ae/nifi-nar-bundles/nifi-aws-bundle/pom.xml ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-aws-bundle/pom.xml b/nifi-nar-bundles/nifi-aws-bundle/pom.xml index 857abbb..85d33d4 100644 --- a/nifi-nar-bundles/nifi-aws-bundle/pom.xml +++ b/nifi-nar-bundles/nifi-aws-bundle/pom.xml @@ -26,7 +26,7 @@ <packaging>pom</packaging> <properties> - <aws-java-sdk-version>1.11.412</aws-java-sdk-version> + <aws-java-sdk-version>1.11.461</aws-java-sdk-version> </properties> <dependencyManagement>
