From 527a9c7f48d571d06e5e300e64681ad5d952f398 Mon Sep 17 00:00:00 2001 From: David Pilato Date: Thu, 30 Jun 2016 14:39:23 +0200 Subject: [PATCH] Deprecate discovery-azure and rename it to discovery-azure-classic As discussed at https://github.com/elastic/elasticsearch-cloud-azure/issues/91#issuecomment-229113595, we know that the current `discovery-azure` plugin only works with Azure Classic VMs / Services (which is somehow Legacy now). The proposal here is to rename `discovery-azure` to `discovery-azure-classic` in case some users are using it. And deprecate it for 5.0. Closes #19144. --- .../resources/checkstyle_suppressions.xml | 8 ++--- dev-tools/smoke_test_rc.py | 2 +- docs/plugins/discovery-azure.asciidoc | 32 +++++++++---------- docs/plugins/discovery.asciidoc | 6 ++-- docs/plugins/redirects.asciidoc | 2 +- .../migration/migrate_5_0/plugins.asciidoc | 2 +- .../modules/discovery/azure.asciidoc | 8 ++--- .../LICENSE.txt | 0 .../build.gradle | 2 +- .../licenses/azure-LICENSE.txt | 0 .../licenses/azure-NOTICE.txt | 0 .../licenses/azure-core-0.9.3.jar.sha1 | 0 .../azure-svc-mgmt-compute-0.9.3.jar.sha1 | 0 .../licenses/commons-codec-1.10.jar.sha1 | 0 .../licenses/commons-codec-LICENSE.txt | 0 .../licenses/commons-codec-NOTICE.txt | 0 .../licenses/commons-io-2.4.jar.sha1 | 0 .../licenses/commons-io-LICENSE.txt | 0 .../licenses/commons-io-NOTICE.txt | 0 .../licenses/commons-lang-2.6.jar.sha1 | 0 .../licenses/commons-lang-LICENSE.txt | 0 .../licenses/commons-lang-NOTICE.txt | 0 .../licenses/commons-logging-1.1.3.jar.sha1 | 0 .../licenses/commons-logging-LICENSE.txt | 0 .../licenses/commons-logging-NOTICE.txt | 0 .../licenses/httpclient-4.5.2.jar.sha1 | 0 .../licenses/httpclient-LICENSE.txt | 0 .../licenses/httpclient-NOTICE.txt | 0 .../licenses/httpcore-4.4.4.jar.sha1 | 0 .../licenses/httpcore-LICENSE.txt | 0 .../licenses/httpcore-NOTICE.txt | 0 .../licenses/jackson-LICENSE | 0 .../licenses/jackson-NOTICE | 0 .../licenses/jackson-core-asl-1.9.2.jar.sha1 | 0 .../licenses/jackson-jaxrs-1.9.2.jar.sha1 | 0 .../jackson-mapper-asl-1.9.2.jar.sha1 | 0 .../licenses/jackson-xc-1.9.2.jar.sha1 | 0 .../licenses/javax.inject-1.jar.sha1 | 0 .../licenses/javax.inject-LICENSE.txt | 0 .../licenses/javax.inject-NOTICE.txt | 0 .../licenses/jaxb-LICENSE.txt | 0 .../licenses/jaxb-NOTICE.txt | 0 .../licenses/jaxb-api-2.2.2.jar.sha1 | 0 .../licenses/jaxb-impl-2.2.3-1.jar.sha1 | 0 .../licenses/jersey-LICENSE.txt | 0 .../licenses/jersey-NOTICE.txt | 0 .../licenses/jersey-client-1.13.jar.sha1 | 0 .../licenses/jersey-core-1.13.jar.sha1 | 0 .../licenses/jersey-json-1.13.jar.sha1 | 0 .../licenses/jettison-1.1.jar.sha1 | 0 .../licenses/jettison-LICENSE.txt | 0 .../licenses/jettison-NOTICE.txt | 0 .../licenses/mail-1.4.5.jar.sha1 | 0 .../licenses/mail-LICENSE.txt | 0 .../licenses/mail-NOTICE.txt | 0 .../azure/classic}/AzureDiscoveryModule.java | 27 ++++++++-------- .../AzureServiceDisableException.java | 2 +- .../classic}/AzureServiceRemoteException.java | 2 +- .../management/AzureComputeService.java | 6 ++-- .../management/AzureComputeServiceImpl.java | 4 +-- .../classic}/AzureUnicastHostsProvider.java | 10 +++--- .../azure/classic}/AzureDiscoveryPlugin.java | 14 ++++---- .../AbstractAzureComputeServiceTestCase.java | 8 ++--- .../AzureComputeServiceSimpleMock.java | 4 +-- .../AzureComputeServiceTwoNodesMock.java | 4 +-- .../AzureComputeServiceAbstractMock.java | 2 +- .../AzureDiscoveryClusterFormationTests.java | 6 ++-- .../azure/classic}/AzureDiscoveryRestIT.java | 2 +- .../AzureMinimumMasterNodesTests.java | 6 ++-- .../azure/classic}/AzureSimpleTests.java | 10 +++--- .../classic}/AzureTwoStartedNodesTests.java | 10 +++--- .../discovery_azure_classic/10_basic.yaml | 13 ++++++++ .../test/discovery_azure/10_basic.yaml | 13 -------- .../scripts/module_and_plugin_test_cases.bash | 6 ++-- settings.gradle | 2 +- 75 files changed, 107 insertions(+), 106 deletions(-) rename plugins/{discovery-azure => discovery-azure-classic}/LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/build.gradle (99%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/azure-LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/azure-NOTICE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/azure-core-0.9.3.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/azure-svc-mgmt-compute-0.9.3.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/commons-codec-1.10.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/commons-codec-LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/commons-codec-NOTICE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/commons-io-2.4.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/commons-io-LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/commons-io-NOTICE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/commons-lang-2.6.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/commons-lang-LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/commons-lang-NOTICE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/commons-logging-1.1.3.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/commons-logging-LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/commons-logging-NOTICE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/httpclient-4.5.2.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/httpclient-LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/httpclient-NOTICE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/httpcore-4.4.4.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/httpcore-LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/httpcore-NOTICE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jackson-LICENSE (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jackson-NOTICE (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jackson-core-asl-1.9.2.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jackson-jaxrs-1.9.2.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jackson-mapper-asl-1.9.2.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jackson-xc-1.9.2.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/javax.inject-1.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/javax.inject-LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/javax.inject-NOTICE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jaxb-LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jaxb-NOTICE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jaxb-api-2.2.2.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jaxb-impl-2.2.3-1.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jersey-LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jersey-NOTICE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jersey-client-1.13.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jersey-core-1.13.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jersey-json-1.13.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jettison-1.1.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jettison-LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/jettison-NOTICE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/mail-1.4.5.jar.sha1 (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/mail-LICENSE.txt (100%) rename plugins/{discovery-azure => discovery-azure-classic}/licenses/mail-NOTICE.txt (100%) rename plugins/{discovery-azure/src/main/java/org/elasticsearch/cloud/azure => discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic}/AzureDiscoveryModule.java (76%) rename plugins/{discovery-azure/src/main/java/org/elasticsearch/cloud/azure => discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic}/AzureServiceDisableException.java (95%) rename plugins/{discovery-azure/src/main/java/org/elasticsearch/cloud/azure => discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic}/AzureServiceRemoteException.java (95%) rename plugins/{discovery-azure/src/main/java/org/elasticsearch/cloud/azure => discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic}/management/AzureComputeService.java (94%) rename plugins/{discovery-azure/src/main/java/org/elasticsearch/cloud/azure => discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic}/management/AzureComputeServiceImpl.java (97%) rename plugins/{discovery-azure/src/main/java/org/elasticsearch/discovery/azure => discovery-azure-classic/src/main/java/org/elasticsearch/discovery/azure/classic}/AzureUnicastHostsProvider.java (96%) rename plugins/{discovery-azure/src/main/java/org/elasticsearch/plugin/discovery/azure => discovery-azure-classic/src/main/java/org/elasticsearch/plugin/discovery/azure/classic}/AzureDiscoveryPlugin.java (82%) rename plugins/{discovery-azure/src/test/java/org/elasticsearch/cloud/azure => discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic}/AbstractAzureComputeServiceTestCase.java (89%) rename plugins/{discovery-azure/src/test/java/org/elasticsearch/cloud/azure => discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic}/AzureComputeServiceSimpleMock.java (95%) rename plugins/{discovery-azure/src/test/java/org/elasticsearch/cloud/azure => discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic}/AzureComputeServiceTwoNodesMock.java (96%) rename plugins/{discovery-azure/src/test/java/org/elasticsearch/cloud/azure => discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic}/management/AzureComputeServiceAbstractMock.java (96%) rename plugins/{discovery-azure/src/test/java/org/elasticsearch/discovery/azure => discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic}/AzureDiscoveryClusterFormationTests.java (98%) rename plugins/{discovery-azure/src/test/java/org/elasticsearch/discovery/azure => discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic}/AzureDiscoveryRestIT.java (96%) rename plugins/{discovery-azure/src/test/java/org/elasticsearch/discovery/azure => discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic}/AzureMinimumMasterNodesTests.java (94%) rename plugins/{discovery-azure/src/test/java/org/elasticsearch/discovery/azure => discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic}/AzureSimpleTests.java (89%) rename plugins/{discovery-azure/src/test/java/org/elasticsearch/discovery/azure => discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic}/AzureTwoStartedNodesTests.java (89%) create mode 100644 plugins/discovery-azure-classic/src/test/resources/rest-api-spec/test/discovery_azure_classic/10_basic.yaml delete mode 100644 plugins/discovery-azure/src/test/resources/rest-api-spec/test/discovery_azure/10_basic.yaml diff --git a/buildSrc/src/main/resources/checkstyle_suppressions.xml b/buildSrc/src/main/resources/checkstyle_suppressions.xml index 5a08a834c3c..94f962be19d 100644 --- a/buildSrc/src/main/resources/checkstyle_suppressions.xml +++ b/buildSrc/src/main/resources/checkstyle_suppressions.xml @@ -1180,10 +1180,10 @@ - - - - + + + + diff --git a/dev-tools/smoke_test_rc.py b/dev-tools/smoke_test_rc.py index 259081ddc10..33abbf96345 100644 --- a/dev-tools/smoke_test_rc.py +++ b/dev-tools/smoke_test_rc.py @@ -63,7 +63,7 @@ DEFAULT_PLUGINS = ["analysis-icu", "analysis-phonetic", "analysis-smartcn", "analysis-stempel", - "discovery-azure", + "discovery-azure-classic", "discovery-ec2", "discovery-gce", "ingest-attachment", diff --git a/docs/plugins/discovery-azure.asciidoc b/docs/plugins/discovery-azure.asciidoc index f49f1568cab..022c453e148 100644 --- a/docs/plugins/discovery-azure.asciidoc +++ b/docs/plugins/discovery-azure.asciidoc @@ -1,9 +1,9 @@ -[[discovery-azure]] +[[discovery-azure-classic]] === Azure Discovery Plugin -The Azure Discovery plugin uses the Azure API for unicast discovery. +The Azure Classic Discovery plugin uses the Azure Classic API for unicast discovery. -[[discovery-azure-install]] +[[discovery-azure-classic-install]] [float] ==== Installation @@ -11,13 +11,13 @@ This plugin can be installed using the plugin manager: [source,sh] ---------------------------------------------------------------- -sudo bin/elasticsearch-plugin install discovery-azure +sudo bin/elasticsearch-plugin install discovery-azure-classic ---------------------------------------------------------------- The plugin must be installed on every node in the cluster, and each node must be restarted after installation. -[[discovery-azure-remove]] +[[discovery-azure-classic-remove]] [float] ==== Removal @@ -25,12 +25,12 @@ The plugin can be removed with the following command: [source,sh] ---------------------------------------------------------------- -sudo bin/elasticsearch-plugin remove discovery-azure +sudo bin/elasticsearch-plugin remove discovery-azure-classic ---------------------------------------------------------------- The node must be stopped before removing the plugin. -[[discovery-azure-usage]] +[[discovery-azure-classic-usage]] ==== Azure Virtual Machine Discovery Azure VM discovery allows to use the azure APIs to perform automatic discovery (similar to multicast in non hostile @@ -64,7 +64,7 @@ You can use {ref}/modules-network.html[core network host settings]. For example ============================================== -[[discovery-azure-short]] +[[discovery-azure-classic-short]] ===== How to start (short story) * Create Azure instances @@ -73,7 +73,7 @@ You can use {ref}/modules-network.html[core network host settings]. For example * Modify `elasticsearch.yml` file * Start Elasticsearch -[[discovery-azure-settings]] +[[discovery-azure-classic-settings]] ===== Azure credential API settings The following are a list of settings that can further control the credential API: @@ -100,7 +100,7 @@ The following are a list of settings that can further control the credential API your_azure_cloud_service_name -[[discovery-azure-settings-advanced]] +[[discovery-azure-classic-settings-advanced]] ===== Advanced settings The following are a list of settings that can further control the discovery: @@ -143,7 +143,7 @@ discovery: slot: production ---- -[[discovery-azure-long]] +[[discovery-azure-classic-long]] ==== Setup process for Azure Discovery We will expose here one strategy which is to hide our Elasticsearch cluster from outside. @@ -153,7 +153,7 @@ other. That means that with this mode, you can use elasticsearch unicast discovery to build a cluster, using the Azure API to retrieve information about your nodes. -[[discovery-azure-long-prerequisites]] +[[discovery-azure-classic-long-prerequisites]] ===== Prerequisites Before starting, you need to have: @@ -243,7 +243,7 @@ azure account download azure account import /tmp/azure.publishsettings ---- -[[discovery-azure-long-instance]] +[[discovery-azure-classic-long-instance]] ===== Creating your first instance You need to have a storage account available. Check http://www.windowsazure.com/en-us/develop/net/how-to-guides/blob-storage/#create-account[Azure Blob Storage documentation] @@ -396,7 +396,7 @@ This command should give you a JSON result: } ---- -[[discovery-azure-long-plugin]] +[[discovery-azure-classic-long-plugin]] ===== Install elasticsearch cloud azure plugin [source,sh] @@ -405,7 +405,7 @@ This command should give you a JSON result: sudo service elasticsearch stop # Install the plugin -sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install discovery-azure +sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install discovery-azure-classic # Configure it sudo vi /etc/elasticsearch/elasticsearch.yml @@ -441,7 +441,7 @@ sudo service elasticsearch start If anything goes wrong, check your logs in `/var/log/elasticsearch`. -[[discovery-azure-scale]] +[[discovery-azure-classic-scale]] ==== Scaling Out! You need first to create an image of your previous machine. diff --git a/docs/plugins/discovery.asciidoc b/docs/plugins/discovery.asciidoc index 62c5b4551ac..ed9cfc0ed3d 100644 --- a/docs/plugins/discovery.asciidoc +++ b/docs/plugins/discovery.asciidoc @@ -13,9 +13,9 @@ The core discovery plugins are: The EC2 discovery plugin uses the https://github.com/aws/aws-sdk-java[AWS API] for unicast discovery. -<>:: +<>:: -The Azure discovery plugin uses the Azure API for unicast discovery. +The Azure Classic discovery plugin uses the Azure Classic API for unicast discovery. <>:: @@ -33,7 +33,7 @@ A number of discovery plugins have been contributed by our community: include::discovery-ec2.asciidoc[] -include::discovery-azure.asciidoc[] +include::discovery-azure-classic.asciidoc[] include::discovery-gce.asciidoc[] diff --git a/docs/plugins/redirects.asciidoc b/docs/plugins/redirects.asciidoc index c8cf10c6319..0f9c0b40f2c 100644 --- a/docs/plugins/redirects.asciidoc +++ b/docs/plugins/redirects.asciidoc @@ -24,7 +24,7 @@ The `cloud-aws` plugin has been split into two separate plugins: The `cloud-azure` plugin has been split into two separate plugins: -* <> (`discovery-azure`) +* <> (`discovery-azure-classic`) * <> (`repository-azure`) diff --git a/docs/reference/migration/migrate_5_0/plugins.asciidoc b/docs/reference/migration/migrate_5_0/plugins.asciidoc index 2826c822d15..e1ff497a8f3 100644 --- a/docs/reference/migration/migrate_5_0/plugins.asciidoc +++ b/docs/reference/migration/migrate_5_0/plugins.asciidoc @@ -63,7 +63,7 @@ Proxy settings for both plugins have been renamed: Cloud Azure plugin has been split in three plugins: -* {plugins}/discovery-azure.html[Discovery Azure plugin] +* {plugins}/discovery-azure-classic.html[Discovery Azure plugin] * {plugins}/repository-azure.html[Repository Azure plugin] * {plugins}/store-smb.html[Store SMB plugin] diff --git a/docs/reference/modules/discovery/azure.asciidoc b/docs/reference/modules/discovery/azure.asciidoc index 87d072564b3..1343819b02a 100644 --- a/docs/reference/modules/discovery/azure.asciidoc +++ b/docs/reference/modules/discovery/azure.asciidoc @@ -1,5 +1,5 @@ -[[modules-discovery-azure]] -=== Azure Discovery +[[modules-discovery-azure-classic]] +=== Azure Classic Discovery -Azure discovery allows to use the Azure APIs to perform automatic discovery (similar to multicast). -It is available as a plugin. See {plugins}/discovery-azure.html[discovery-azure] for more information. +Azure classic discovery allows to use the Azure Classic APIs to perform automatic discovery (similar to multicast). +It is available as a plugin. See {plugins}/discovery-azure-classic.html[discovery-azure-classic] for more information. diff --git a/plugins/discovery-azure/LICENSE.txt b/plugins/discovery-azure-classic/LICENSE.txt similarity index 100% rename from plugins/discovery-azure/LICENSE.txt rename to plugins/discovery-azure-classic/LICENSE.txt diff --git a/plugins/discovery-azure/build.gradle b/plugins/discovery-azure-classic/build.gradle similarity index 99% rename from plugins/discovery-azure/build.gradle rename to plugins/discovery-azure-classic/build.gradle index 8f0c641e150..42f6fd29106 100644 --- a/plugins/discovery-azure/build.gradle +++ b/plugins/discovery-azure-classic/build.gradle @@ -21,7 +21,7 @@ import org.elasticsearch.gradle.LoggedExec esplugin { description 'The Azure Discovery plugin allows to use Azure API for the unicast discovery mechanism' - classname 'org.elasticsearch.plugin.discovery.azure.AzureDiscoveryPlugin' + classname 'AzureDiscoveryPlugin' } versions << [ diff --git a/plugins/discovery-azure/licenses/azure-LICENSE.txt b/plugins/discovery-azure-classic/licenses/azure-LICENSE.txt similarity index 100% rename from plugins/discovery-azure/licenses/azure-LICENSE.txt rename to plugins/discovery-azure-classic/licenses/azure-LICENSE.txt diff --git a/plugins/discovery-azure/licenses/azure-NOTICE.txt b/plugins/discovery-azure-classic/licenses/azure-NOTICE.txt similarity index 100% rename from plugins/discovery-azure/licenses/azure-NOTICE.txt rename to plugins/discovery-azure-classic/licenses/azure-NOTICE.txt diff --git a/plugins/discovery-azure/licenses/azure-core-0.9.3.jar.sha1 b/plugins/discovery-azure-classic/licenses/azure-core-0.9.3.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/azure-core-0.9.3.jar.sha1 rename to plugins/discovery-azure-classic/licenses/azure-core-0.9.3.jar.sha1 diff --git a/plugins/discovery-azure/licenses/azure-svc-mgmt-compute-0.9.3.jar.sha1 b/plugins/discovery-azure-classic/licenses/azure-svc-mgmt-compute-0.9.3.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/azure-svc-mgmt-compute-0.9.3.jar.sha1 rename to plugins/discovery-azure-classic/licenses/azure-svc-mgmt-compute-0.9.3.jar.sha1 diff --git a/plugins/discovery-azure/licenses/commons-codec-1.10.jar.sha1 b/plugins/discovery-azure-classic/licenses/commons-codec-1.10.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/commons-codec-1.10.jar.sha1 rename to plugins/discovery-azure-classic/licenses/commons-codec-1.10.jar.sha1 diff --git a/plugins/discovery-azure/licenses/commons-codec-LICENSE.txt b/plugins/discovery-azure-classic/licenses/commons-codec-LICENSE.txt similarity index 100% rename from plugins/discovery-azure/licenses/commons-codec-LICENSE.txt rename to plugins/discovery-azure-classic/licenses/commons-codec-LICENSE.txt diff --git a/plugins/discovery-azure/licenses/commons-codec-NOTICE.txt b/plugins/discovery-azure-classic/licenses/commons-codec-NOTICE.txt similarity index 100% rename from plugins/discovery-azure/licenses/commons-codec-NOTICE.txt rename to plugins/discovery-azure-classic/licenses/commons-codec-NOTICE.txt diff --git a/plugins/discovery-azure/licenses/commons-io-2.4.jar.sha1 b/plugins/discovery-azure-classic/licenses/commons-io-2.4.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/commons-io-2.4.jar.sha1 rename to plugins/discovery-azure-classic/licenses/commons-io-2.4.jar.sha1 diff --git a/plugins/discovery-azure/licenses/commons-io-LICENSE.txt b/plugins/discovery-azure-classic/licenses/commons-io-LICENSE.txt similarity index 100% rename from plugins/discovery-azure/licenses/commons-io-LICENSE.txt rename to plugins/discovery-azure-classic/licenses/commons-io-LICENSE.txt diff --git a/plugins/discovery-azure/licenses/commons-io-NOTICE.txt b/plugins/discovery-azure-classic/licenses/commons-io-NOTICE.txt similarity index 100% rename from plugins/discovery-azure/licenses/commons-io-NOTICE.txt rename to plugins/discovery-azure-classic/licenses/commons-io-NOTICE.txt diff --git a/plugins/discovery-azure/licenses/commons-lang-2.6.jar.sha1 b/plugins/discovery-azure-classic/licenses/commons-lang-2.6.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/commons-lang-2.6.jar.sha1 rename to plugins/discovery-azure-classic/licenses/commons-lang-2.6.jar.sha1 diff --git a/plugins/discovery-azure/licenses/commons-lang-LICENSE.txt b/plugins/discovery-azure-classic/licenses/commons-lang-LICENSE.txt similarity index 100% rename from plugins/discovery-azure/licenses/commons-lang-LICENSE.txt rename to plugins/discovery-azure-classic/licenses/commons-lang-LICENSE.txt diff --git a/plugins/discovery-azure/licenses/commons-lang-NOTICE.txt b/plugins/discovery-azure-classic/licenses/commons-lang-NOTICE.txt similarity index 100% rename from plugins/discovery-azure/licenses/commons-lang-NOTICE.txt rename to plugins/discovery-azure-classic/licenses/commons-lang-NOTICE.txt diff --git a/plugins/discovery-azure/licenses/commons-logging-1.1.3.jar.sha1 b/plugins/discovery-azure-classic/licenses/commons-logging-1.1.3.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/commons-logging-1.1.3.jar.sha1 rename to plugins/discovery-azure-classic/licenses/commons-logging-1.1.3.jar.sha1 diff --git a/plugins/discovery-azure/licenses/commons-logging-LICENSE.txt b/plugins/discovery-azure-classic/licenses/commons-logging-LICENSE.txt similarity index 100% rename from plugins/discovery-azure/licenses/commons-logging-LICENSE.txt rename to plugins/discovery-azure-classic/licenses/commons-logging-LICENSE.txt diff --git a/plugins/discovery-azure/licenses/commons-logging-NOTICE.txt b/plugins/discovery-azure-classic/licenses/commons-logging-NOTICE.txt similarity index 100% rename from plugins/discovery-azure/licenses/commons-logging-NOTICE.txt rename to plugins/discovery-azure-classic/licenses/commons-logging-NOTICE.txt diff --git a/plugins/discovery-azure/licenses/httpclient-4.5.2.jar.sha1 b/plugins/discovery-azure-classic/licenses/httpclient-4.5.2.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/httpclient-4.5.2.jar.sha1 rename to plugins/discovery-azure-classic/licenses/httpclient-4.5.2.jar.sha1 diff --git a/plugins/discovery-azure/licenses/httpclient-LICENSE.txt b/plugins/discovery-azure-classic/licenses/httpclient-LICENSE.txt similarity index 100% rename from plugins/discovery-azure/licenses/httpclient-LICENSE.txt rename to plugins/discovery-azure-classic/licenses/httpclient-LICENSE.txt diff --git a/plugins/discovery-azure/licenses/httpclient-NOTICE.txt b/plugins/discovery-azure-classic/licenses/httpclient-NOTICE.txt similarity index 100% rename from plugins/discovery-azure/licenses/httpclient-NOTICE.txt rename to plugins/discovery-azure-classic/licenses/httpclient-NOTICE.txt diff --git a/plugins/discovery-azure/licenses/httpcore-4.4.4.jar.sha1 b/plugins/discovery-azure-classic/licenses/httpcore-4.4.4.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/httpcore-4.4.4.jar.sha1 rename to plugins/discovery-azure-classic/licenses/httpcore-4.4.4.jar.sha1 diff --git a/plugins/discovery-azure/licenses/httpcore-LICENSE.txt b/plugins/discovery-azure-classic/licenses/httpcore-LICENSE.txt similarity index 100% rename from plugins/discovery-azure/licenses/httpcore-LICENSE.txt rename to plugins/discovery-azure-classic/licenses/httpcore-LICENSE.txt diff --git a/plugins/discovery-azure/licenses/httpcore-NOTICE.txt b/plugins/discovery-azure-classic/licenses/httpcore-NOTICE.txt similarity index 100% rename from plugins/discovery-azure/licenses/httpcore-NOTICE.txt rename to plugins/discovery-azure-classic/licenses/httpcore-NOTICE.txt diff --git a/plugins/discovery-azure/licenses/jackson-LICENSE b/plugins/discovery-azure-classic/licenses/jackson-LICENSE similarity index 100% rename from plugins/discovery-azure/licenses/jackson-LICENSE rename to plugins/discovery-azure-classic/licenses/jackson-LICENSE diff --git a/plugins/discovery-azure/licenses/jackson-NOTICE b/plugins/discovery-azure-classic/licenses/jackson-NOTICE similarity index 100% rename from plugins/discovery-azure/licenses/jackson-NOTICE rename to plugins/discovery-azure-classic/licenses/jackson-NOTICE diff --git a/plugins/discovery-azure/licenses/jackson-core-asl-1.9.2.jar.sha1 b/plugins/discovery-azure-classic/licenses/jackson-core-asl-1.9.2.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/jackson-core-asl-1.9.2.jar.sha1 rename to plugins/discovery-azure-classic/licenses/jackson-core-asl-1.9.2.jar.sha1 diff --git a/plugins/discovery-azure/licenses/jackson-jaxrs-1.9.2.jar.sha1 b/plugins/discovery-azure-classic/licenses/jackson-jaxrs-1.9.2.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/jackson-jaxrs-1.9.2.jar.sha1 rename to plugins/discovery-azure-classic/licenses/jackson-jaxrs-1.9.2.jar.sha1 diff --git a/plugins/discovery-azure/licenses/jackson-mapper-asl-1.9.2.jar.sha1 b/plugins/discovery-azure-classic/licenses/jackson-mapper-asl-1.9.2.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/jackson-mapper-asl-1.9.2.jar.sha1 rename to plugins/discovery-azure-classic/licenses/jackson-mapper-asl-1.9.2.jar.sha1 diff --git a/plugins/discovery-azure/licenses/jackson-xc-1.9.2.jar.sha1 b/plugins/discovery-azure-classic/licenses/jackson-xc-1.9.2.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/jackson-xc-1.9.2.jar.sha1 rename to plugins/discovery-azure-classic/licenses/jackson-xc-1.9.2.jar.sha1 diff --git a/plugins/discovery-azure/licenses/javax.inject-1.jar.sha1 b/plugins/discovery-azure-classic/licenses/javax.inject-1.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/javax.inject-1.jar.sha1 rename to plugins/discovery-azure-classic/licenses/javax.inject-1.jar.sha1 diff --git a/plugins/discovery-azure/licenses/javax.inject-LICENSE.txt b/plugins/discovery-azure-classic/licenses/javax.inject-LICENSE.txt similarity index 100% rename from plugins/discovery-azure/licenses/javax.inject-LICENSE.txt rename to plugins/discovery-azure-classic/licenses/javax.inject-LICENSE.txt diff --git a/plugins/discovery-azure/licenses/javax.inject-NOTICE.txt b/plugins/discovery-azure-classic/licenses/javax.inject-NOTICE.txt similarity index 100% rename from plugins/discovery-azure/licenses/javax.inject-NOTICE.txt rename to plugins/discovery-azure-classic/licenses/javax.inject-NOTICE.txt diff --git a/plugins/discovery-azure/licenses/jaxb-LICENSE.txt b/plugins/discovery-azure-classic/licenses/jaxb-LICENSE.txt similarity index 100% rename from plugins/discovery-azure/licenses/jaxb-LICENSE.txt rename to plugins/discovery-azure-classic/licenses/jaxb-LICENSE.txt diff --git a/plugins/discovery-azure/licenses/jaxb-NOTICE.txt b/plugins/discovery-azure-classic/licenses/jaxb-NOTICE.txt similarity index 100% rename from plugins/discovery-azure/licenses/jaxb-NOTICE.txt rename to plugins/discovery-azure-classic/licenses/jaxb-NOTICE.txt diff --git a/plugins/discovery-azure/licenses/jaxb-api-2.2.2.jar.sha1 b/plugins/discovery-azure-classic/licenses/jaxb-api-2.2.2.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/jaxb-api-2.2.2.jar.sha1 rename to plugins/discovery-azure-classic/licenses/jaxb-api-2.2.2.jar.sha1 diff --git a/plugins/discovery-azure/licenses/jaxb-impl-2.2.3-1.jar.sha1 b/plugins/discovery-azure-classic/licenses/jaxb-impl-2.2.3-1.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/jaxb-impl-2.2.3-1.jar.sha1 rename to plugins/discovery-azure-classic/licenses/jaxb-impl-2.2.3-1.jar.sha1 diff --git a/plugins/discovery-azure/licenses/jersey-LICENSE.txt b/plugins/discovery-azure-classic/licenses/jersey-LICENSE.txt similarity index 100% rename from plugins/discovery-azure/licenses/jersey-LICENSE.txt rename to plugins/discovery-azure-classic/licenses/jersey-LICENSE.txt diff --git a/plugins/discovery-azure/licenses/jersey-NOTICE.txt b/plugins/discovery-azure-classic/licenses/jersey-NOTICE.txt similarity index 100% rename from plugins/discovery-azure/licenses/jersey-NOTICE.txt rename to plugins/discovery-azure-classic/licenses/jersey-NOTICE.txt diff --git a/plugins/discovery-azure/licenses/jersey-client-1.13.jar.sha1 b/plugins/discovery-azure-classic/licenses/jersey-client-1.13.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/jersey-client-1.13.jar.sha1 rename to plugins/discovery-azure-classic/licenses/jersey-client-1.13.jar.sha1 diff --git a/plugins/discovery-azure/licenses/jersey-core-1.13.jar.sha1 b/plugins/discovery-azure-classic/licenses/jersey-core-1.13.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/jersey-core-1.13.jar.sha1 rename to plugins/discovery-azure-classic/licenses/jersey-core-1.13.jar.sha1 diff --git a/plugins/discovery-azure/licenses/jersey-json-1.13.jar.sha1 b/plugins/discovery-azure-classic/licenses/jersey-json-1.13.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/jersey-json-1.13.jar.sha1 rename to plugins/discovery-azure-classic/licenses/jersey-json-1.13.jar.sha1 diff --git a/plugins/discovery-azure/licenses/jettison-1.1.jar.sha1 b/plugins/discovery-azure-classic/licenses/jettison-1.1.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/jettison-1.1.jar.sha1 rename to plugins/discovery-azure-classic/licenses/jettison-1.1.jar.sha1 diff --git a/plugins/discovery-azure/licenses/jettison-LICENSE.txt b/plugins/discovery-azure-classic/licenses/jettison-LICENSE.txt similarity index 100% rename from plugins/discovery-azure/licenses/jettison-LICENSE.txt rename to plugins/discovery-azure-classic/licenses/jettison-LICENSE.txt diff --git a/plugins/discovery-azure/licenses/jettison-NOTICE.txt b/plugins/discovery-azure-classic/licenses/jettison-NOTICE.txt similarity index 100% rename from plugins/discovery-azure/licenses/jettison-NOTICE.txt rename to plugins/discovery-azure-classic/licenses/jettison-NOTICE.txt diff --git a/plugins/discovery-azure/licenses/mail-1.4.5.jar.sha1 b/plugins/discovery-azure-classic/licenses/mail-1.4.5.jar.sha1 similarity index 100% rename from plugins/discovery-azure/licenses/mail-1.4.5.jar.sha1 rename to plugins/discovery-azure-classic/licenses/mail-1.4.5.jar.sha1 diff --git a/plugins/discovery-azure/licenses/mail-LICENSE.txt b/plugins/discovery-azure-classic/licenses/mail-LICENSE.txt similarity index 100% rename from plugins/discovery-azure/licenses/mail-LICENSE.txt rename to plugins/discovery-azure-classic/licenses/mail-LICENSE.txt diff --git a/plugins/discovery-azure/licenses/mail-NOTICE.txt b/plugins/discovery-azure-classic/licenses/mail-NOTICE.txt similarity index 100% rename from plugins/discovery-azure/licenses/mail-NOTICE.txt rename to plugins/discovery-azure-classic/licenses/mail-NOTICE.txt diff --git a/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/AzureDiscoveryModule.java b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/AzureDiscoveryModule.java similarity index 76% rename from plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/AzureDiscoveryModule.java rename to plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/AzureDiscoveryModule.java index 2c9c6e0a486..da684fd824d 100644 --- a/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/AzureDiscoveryModule.java +++ b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/AzureDiscoveryModule.java @@ -17,12 +17,11 @@ * under the License. */ -package org.elasticsearch.cloud.azure; +package org.elasticsearch.cloud.azure.classic; import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.cloud.azure.management.AzureComputeService; -import org.elasticsearch.cloud.azure.management.AzureComputeService.Management; -import org.elasticsearch.cloud.azure.management.AzureComputeServiceImpl; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeService; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeServiceImpl; import org.elasticsearch.common.Strings; import org.elasticsearch.common.inject.AbstractModule; import org.elasticsearch.common.inject.Inject; @@ -31,7 +30,7 @@ import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.discovery.DiscoveryModule; -import org.elasticsearch.plugin.discovery.azure.AzureDiscoveryPlugin; +import org.elasticsearch.plugin.discovery.azure.classic.AzureDiscoveryPlugin; /** * Azure Module @@ -41,7 +40,7 @@ import org.elasticsearch.plugin.discovery.azure.AzureDiscoveryPlugin; * to AzureComputeServiceImpl. * * - * @see org.elasticsearch.cloud.azure.management.AzureComputeServiceImpl + * @see AzureComputeServiceImpl */ public class AzureDiscoveryModule extends AbstractModule { protected final ESLogger logger; @@ -77,19 +76,19 @@ public class AzureDiscoveryModule extends AbstractModule { return false; } - if (isDefined(settings, Management.SUBSCRIPTION_ID_SETTING) && - isDefined(settings, Management.SERVICE_NAME_SETTING) && - isDefined(settings, Management.KEYSTORE_PATH_SETTING) && - isDefined(settings, Management.KEYSTORE_PASSWORD_SETTING)) { + if (isDefined(settings, AzureComputeService.Management.SUBSCRIPTION_ID_SETTING) && + isDefined(settings, AzureComputeService.Management.SERVICE_NAME_SETTING) && + isDefined(settings, AzureComputeService.Management.KEYSTORE_PATH_SETTING) && + isDefined(settings, AzureComputeService.Management.KEYSTORE_PASSWORD_SETTING)) { logger.trace("All required properties for Azure discovery are set!"); return true; } else { logger.debug("One or more Azure discovery settings are missing. " + "Check elasticsearch.yml file. Should have [{}], [{}], [{}] and [{}].", - Management.SUBSCRIPTION_ID_SETTING.getKey(), - Management.SERVICE_NAME_SETTING.getKey(), - Management.KEYSTORE_PATH_SETTING.getKey(), - Management.KEYSTORE_PASSWORD_SETTING.getKey()); + AzureComputeService.Management.SUBSCRIPTION_ID_SETTING.getKey(), + AzureComputeService.Management.SERVICE_NAME_SETTING.getKey(), + AzureComputeService.Management.KEYSTORE_PATH_SETTING.getKey(), + AzureComputeService.Management.KEYSTORE_PASSWORD_SETTING.getKey()); return false; } } diff --git a/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/AzureServiceDisableException.java b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/AzureServiceDisableException.java similarity index 95% rename from plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/AzureServiceDisableException.java rename to plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/AzureServiceDisableException.java index 487997d71b6..66488f90c31 100644 --- a/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/AzureServiceDisableException.java +++ b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/AzureServiceDisableException.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cloud.azure; +package org.elasticsearch.cloud.azure.classic; public class AzureServiceDisableException extends IllegalStateException { public AzureServiceDisableException(String msg) { diff --git a/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/AzureServiceRemoteException.java b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/AzureServiceRemoteException.java similarity index 95% rename from plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/AzureServiceRemoteException.java rename to plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/AzureServiceRemoteException.java index 4bd4f1d67f1..c961c03ba71 100644 --- a/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/AzureServiceRemoteException.java +++ b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/AzureServiceRemoteException.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cloud.azure; +package org.elasticsearch.cloud.azure.classic; public class AzureServiceRemoteException extends IllegalStateException { public AzureServiceRemoteException(String msg) { diff --git a/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/management/AzureComputeService.java b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/management/AzureComputeService.java similarity index 94% rename from plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/management/AzureComputeService.java rename to plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/management/AzureComputeService.java index 526f98025b7..49e609aad80 100644 --- a/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/management/AzureComputeService.java +++ b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/management/AzureComputeService.java @@ -17,15 +17,15 @@ * under the License. */ -package org.elasticsearch.cloud.azure.management; +package org.elasticsearch.cloud.azure.classic.management; import com.microsoft.windowsazure.core.utils.KeyStoreType; import com.microsoft.windowsazure.management.compute.models.HostedServiceGetDetailedResponse; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Setting.Property; import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.discovery.azure.AzureUnicastHostsProvider; -import org.elasticsearch.discovery.azure.AzureUnicastHostsProvider.Deployment; +import org.elasticsearch.discovery.azure.classic.AzureUnicastHostsProvider; +import org.elasticsearch.discovery.azure.classic.AzureUnicastHostsProvider.Deployment; import java.net.URI; import java.net.URISyntaxException; diff --git a/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/management/AzureComputeServiceImpl.java b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/management/AzureComputeServiceImpl.java similarity index 97% rename from plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/management/AzureComputeServiceImpl.java rename to plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/management/AzureComputeServiceImpl.java index 076ce52ff80..7d6f81ad0b6 100644 --- a/plugins/discovery-azure/src/main/java/org/elasticsearch/cloud/azure/management/AzureComputeServiceImpl.java +++ b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/cloud/azure/classic/management/AzureComputeServiceImpl.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cloud.azure.management; +package org.elasticsearch.cloud.azure.classic.management; import com.microsoft.windowsazure.Configuration; import com.microsoft.windowsazure.core.Builder; @@ -28,7 +28,7 @@ import com.microsoft.windowsazure.management.compute.ComputeManagementService; import com.microsoft.windowsazure.management.compute.models.HostedServiceGetDetailedResponse; import com.microsoft.windowsazure.management.configuration.ManagementConfiguration; import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.cloud.azure.AzureServiceRemoteException; +import org.elasticsearch.cloud.azure.classic.AzureServiceRemoteException; import org.elasticsearch.common.component.AbstractLifecycleComponent; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; diff --git a/plugins/discovery-azure/src/main/java/org/elasticsearch/discovery/azure/AzureUnicastHostsProvider.java b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/discovery/azure/classic/AzureUnicastHostsProvider.java similarity index 96% rename from plugins/discovery-azure/src/main/java/org/elasticsearch/discovery/azure/AzureUnicastHostsProvider.java rename to plugins/discovery-azure-classic/src/main/java/org/elasticsearch/discovery/azure/classic/AzureUnicastHostsProvider.java index cb6c8238bf5..ed327a3a727 100644 --- a/plugins/discovery-azure/src/main/java/org/elasticsearch/discovery/azure/AzureUnicastHostsProvider.java +++ b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/discovery/azure/classic/AzureUnicastHostsProvider.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.discovery.azure; +package org.elasticsearch.discovery.azure.classic; import com.microsoft.windowsazure.management.compute.models.DeploymentSlot; import com.microsoft.windowsazure.management.compute.models.DeploymentStatus; @@ -25,10 +25,10 @@ import com.microsoft.windowsazure.management.compute.models.HostedServiceGetDeta import com.microsoft.windowsazure.management.compute.models.InstanceEndpoint; import com.microsoft.windowsazure.management.compute.models.RoleInstance; import org.elasticsearch.Version; -import org.elasticsearch.cloud.azure.AzureServiceDisableException; -import org.elasticsearch.cloud.azure.AzureServiceRemoteException; -import org.elasticsearch.cloud.azure.management.AzureComputeService; -import org.elasticsearch.cloud.azure.management.AzureComputeService.Discovery; +import org.elasticsearch.cloud.azure.classic.AzureServiceDisableException; +import org.elasticsearch.cloud.azure.classic.AzureServiceRemoteException; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeService; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeService.Discovery; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.Strings; import org.elasticsearch.common.component.AbstractComponent; diff --git a/plugins/discovery-azure/src/main/java/org/elasticsearch/plugin/discovery/azure/AzureDiscoveryPlugin.java b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/plugin/discovery/azure/classic/AzureDiscoveryPlugin.java similarity index 82% rename from plugins/discovery-azure/src/main/java/org/elasticsearch/plugin/discovery/azure/AzureDiscoveryPlugin.java rename to plugins/discovery-azure-classic/src/main/java/org/elasticsearch/plugin/discovery/azure/classic/AzureDiscoveryPlugin.java index 9c1df5b4c8d..a7e1816fff0 100644 --- a/plugins/discovery-azure/src/main/java/org/elasticsearch/plugin/discovery/azure/AzureDiscoveryPlugin.java +++ b/plugins/discovery-azure-classic/src/main/java/org/elasticsearch/plugin/discovery/azure/classic/AzureDiscoveryPlugin.java @@ -17,18 +17,18 @@ * under the License. */ -package org.elasticsearch.plugin.discovery.azure; +package org.elasticsearch.plugin.discovery.azure.classic; -import org.elasticsearch.cloud.azure.AzureDiscoveryModule; -import org.elasticsearch.cloud.azure.management.AzureComputeService; +import org.elasticsearch.cloud.azure.classic.AzureDiscoveryModule; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeService; import org.elasticsearch.common.inject.Module; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.settings.SettingsModule; import org.elasticsearch.discovery.DiscoveryModule; -import org.elasticsearch.discovery.azure.AzureUnicastHostsProvider; +import org.elasticsearch.discovery.azure.classic.AzureUnicastHostsProvider; import org.elasticsearch.discovery.zen.ZenDiscovery; import org.elasticsearch.plugins.Plugin; @@ -45,7 +45,9 @@ public class AzureDiscoveryPlugin extends Plugin { public AzureDiscoveryPlugin(Settings settings) { this.settings = settings; - logger.trace("starting azure discovery plugin..."); + DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + deprecationLogger.deprecated("azure classic discovery plugin is deprecated. Use azure arm discovery plugin instead"); + logger.trace("starting azure classic discovery plugin..."); } @Override diff --git a/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureComputeServiceTestCase.java b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/AbstractAzureComputeServiceTestCase.java similarity index 89% rename from plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureComputeServiceTestCase.java rename to plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/AbstractAzureComputeServiceTestCase.java index 0c57ec3f16e..e9d16408537 100644 --- a/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureComputeServiceTestCase.java +++ b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/AbstractAzureComputeServiceTestCase.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.cloud.azure; +package org.elasticsearch.cloud.azure.classic; import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse; -import org.elasticsearch.cloud.azure.management.AzureComputeService.Discovery; -import org.elasticsearch.cloud.azure.management.AzureComputeService.Management; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeService.Discovery; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeService.Management; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.node.Node; -import org.elasticsearch.plugin.discovery.azure.AzureDiscoveryPlugin; +import org.elasticsearch.plugin.discovery.azure.classic.AzureDiscoveryPlugin; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; diff --git a/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceSimpleMock.java b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/AzureComputeServiceSimpleMock.java similarity index 95% rename from plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceSimpleMock.java rename to plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/AzureComputeServiceSimpleMock.java index 26843eba532..66e853b5953 100644 --- a/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceSimpleMock.java +++ b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/AzureComputeServiceSimpleMock.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.cloud.azure; +package org.elasticsearch.cloud.azure.classic; import com.microsoft.windowsazure.management.compute.models.DeploymentSlot; import com.microsoft.windowsazure.management.compute.models.DeploymentStatus; import com.microsoft.windowsazure.management.compute.models.HostedServiceGetDetailedResponse; import com.microsoft.windowsazure.management.compute.models.InstanceEndpoint; import com.microsoft.windowsazure.management.compute.models.RoleInstance; -import org.elasticsearch.cloud.azure.management.AzureComputeServiceAbstractMock; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeServiceAbstractMock; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.CollectionUtils; diff --git a/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceTwoNodesMock.java b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/AzureComputeServiceTwoNodesMock.java similarity index 96% rename from plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceTwoNodesMock.java rename to plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/AzureComputeServiceTwoNodesMock.java index bf7589c8836..d75ce22d55c 100644 --- a/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/AzureComputeServiceTwoNodesMock.java +++ b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/AzureComputeServiceTwoNodesMock.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.cloud.azure; +package org.elasticsearch.cloud.azure.classic; import com.microsoft.windowsazure.management.compute.models.DeploymentSlot; import com.microsoft.windowsazure.management.compute.models.DeploymentStatus; import com.microsoft.windowsazure.management.compute.models.HostedServiceGetDetailedResponse; import com.microsoft.windowsazure.management.compute.models.InstanceEndpoint; import com.microsoft.windowsazure.management.compute.models.RoleInstance; -import org.elasticsearch.cloud.azure.management.AzureComputeServiceAbstractMock; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeServiceAbstractMock; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.network.NetworkService; import org.elasticsearch.common.settings.Settings; diff --git a/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/management/AzureComputeServiceAbstractMock.java b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/management/AzureComputeServiceAbstractMock.java similarity index 96% rename from plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/management/AzureComputeServiceAbstractMock.java rename to plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/management/AzureComputeServiceAbstractMock.java index c11060a84a9..33f40a9159a 100644 --- a/plugins/discovery-azure/src/test/java/org/elasticsearch/cloud/azure/management/AzureComputeServiceAbstractMock.java +++ b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/cloud/azure/classic/management/AzureComputeServiceAbstractMock.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.cloud.azure.management; +package org.elasticsearch.cloud.azure.classic.management; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.component.AbstractLifecycleComponent; diff --git a/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureDiscoveryClusterFormationTests.java b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureDiscoveryClusterFormationTests.java similarity index 98% rename from plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureDiscoveryClusterFormationTests.java rename to plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureDiscoveryClusterFormationTests.java index 0d1de07ed64..505f2d8b0db 100644 --- a/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureDiscoveryClusterFormationTests.java +++ b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureDiscoveryClusterFormationTests.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.discovery.azure; +package org.elasticsearch.discovery.azure.classic; import com.microsoft.windowsazure.management.compute.models.DeploymentSlot; import com.microsoft.windowsazure.management.compute.models.DeploymentStatus; import com.sun.net.httpserver.Headers; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import org.elasticsearch.cloud.azure.management.AzureComputeService; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeService; import org.elasticsearch.common.SuppressForbidden; import org.elasticsearch.common.io.FileSystemUtils; import org.elasticsearch.common.logging.Loggers; @@ -33,7 +33,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.discovery.DiscoveryModule; import org.elasticsearch.env.Environment; import org.elasticsearch.node.Node; -import org.elasticsearch.plugin.discovery.azure.AzureDiscoveryPlugin; +import org.elasticsearch.plugin.discovery.azure.classic.AzureDiscoveryPlugin; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.transport.TransportSettings; diff --git a/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureDiscoveryRestIT.java b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureDiscoveryRestIT.java similarity index 96% rename from plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureDiscoveryRestIT.java rename to plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureDiscoveryRestIT.java index 131f73d1ca9..cb04842cb4a 100644 --- a/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureDiscoveryRestIT.java +++ b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureDiscoveryRestIT.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.discovery.azure; +package org.elasticsearch.discovery.azure.classic; import com.carrotsearch.randomizedtesting.annotations.Name; import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; diff --git a/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureMinimumMasterNodesTests.java b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureMinimumMasterNodesTests.java similarity index 94% rename from plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureMinimumMasterNodesTests.java rename to plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureMinimumMasterNodesTests.java index 46c3f8af7c2..3acec43f7da 100644 --- a/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureMinimumMasterNodesTests.java +++ b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureMinimumMasterNodesTests.java @@ -17,11 +17,11 @@ * under the License. */ -package org.elasticsearch.discovery.azure; +package org.elasticsearch.discovery.azure.classic; import org.apache.lucene.util.LuceneTestCase.AwaitsFix; -import org.elasticsearch.cloud.azure.AbstractAzureComputeServiceTestCase; -import org.elasticsearch.cloud.azure.AzureComputeServiceTwoNodesMock; +import org.elasticsearch.cloud.azure.classic.AbstractAzureComputeServiceTestCase; +import org.elasticsearch.cloud.azure.classic.AzureComputeServiceTwoNodesMock; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.discovery.MasterNotDiscoveredException; import org.elasticsearch.discovery.zen.ZenDiscovery; diff --git a/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureSimpleTests.java b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureSimpleTests.java similarity index 89% rename from plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureSimpleTests.java rename to plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureSimpleTests.java index 7a85909a13e..05bed1cefb1 100644 --- a/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureSimpleTests.java +++ b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureSimpleTests.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.discovery.azure; +package org.elasticsearch.discovery.azure.classic; -import org.elasticsearch.cloud.azure.AbstractAzureComputeServiceTestCase; -import org.elasticsearch.cloud.azure.AzureComputeServiceSimpleMock; -import org.elasticsearch.cloud.azure.management.AzureComputeService.Discovery; -import org.elasticsearch.cloud.azure.management.AzureComputeService.Management; +import org.elasticsearch.cloud.azure.classic.AbstractAzureComputeServiceTestCase; +import org.elasticsearch.cloud.azure.classic.AzureComputeServiceSimpleMock; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeService.Discovery; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeService.Management; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESIntegTestCase; diff --git a/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureTwoStartedNodesTests.java b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureTwoStartedNodesTests.java similarity index 89% rename from plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureTwoStartedNodesTests.java rename to plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureTwoStartedNodesTests.java index 6431696c2eb..89c918769dc 100644 --- a/plugins/discovery-azure/src/test/java/org/elasticsearch/discovery/azure/AzureTwoStartedNodesTests.java +++ b/plugins/discovery-azure-classic/src/test/java/org/elasticsearch/discovery/azure/classic/AzureTwoStartedNodesTests.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.discovery.azure; +package org.elasticsearch.discovery.azure.classic; -import org.elasticsearch.cloud.azure.AbstractAzureComputeServiceTestCase; -import org.elasticsearch.cloud.azure.AzureComputeServiceTwoNodesMock; -import org.elasticsearch.cloud.azure.management.AzureComputeService.Discovery; -import org.elasticsearch.cloud.azure.management.AzureComputeService.Management; +import org.elasticsearch.cloud.azure.classic.AbstractAzureComputeServiceTestCase; +import org.elasticsearch.cloud.azure.classic.AzureComputeServiceTwoNodesMock; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeService.Discovery; +import org.elasticsearch.cloud.azure.classic.management.AzureComputeService.Management; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.ESIntegTestCase; diff --git a/plugins/discovery-azure-classic/src/test/resources/rest-api-spec/test/discovery_azure_classic/10_basic.yaml b/plugins/discovery-azure-classic/src/test/resources/rest-api-spec/test/discovery_azure_classic/10_basic.yaml new file mode 100644 index 00000000000..ea042d8a52d --- /dev/null +++ b/plugins/discovery-azure-classic/src/test/resources/rest-api-spec/test/discovery_azure_classic/10_basic.yaml @@ -0,0 +1,13 @@ +# Integration tests for Azure Classic Discovery component +# +"Discovery Azure Classic loaded": + - do: + cluster.state: {} + + # Get master node id + - set: { master_node: master } + + - do: + nodes.info: {} + + - match: { nodes.$master.plugins.0.name: discovery-azure-classic } diff --git a/plugins/discovery-azure/src/test/resources/rest-api-spec/test/discovery_azure/10_basic.yaml b/plugins/discovery-azure/src/test/resources/rest-api-spec/test/discovery_azure/10_basic.yaml deleted file mode 100644 index 7a5acd1f001..00000000000 --- a/plugins/discovery-azure/src/test/resources/rest-api-spec/test/discovery_azure/10_basic.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Integration tests for Azure Discovery component -# -"Discovery Azure loaded": - - do: - cluster.state: {} - - # Get master node id - - set: { master_node: master } - - - do: - nodes.info: {} - - - match: { nodes.$master.plugins.0.name: discovery-azure } diff --git a/qa/vagrant/src/test/resources/packaging/scripts/module_and_plugin_test_cases.bash b/qa/vagrant/src/test/resources/packaging/scripts/module_and_plugin_test_cases.bash index 336fa3ee305..c17df96937a 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/module_and_plugin_test_cases.bash +++ b/qa/vagrant/src/test/resources/packaging/scripts/module_and_plugin_test_cases.bash @@ -209,7 +209,7 @@ fi install_and_check_plugin discovery gce google-api-client-*.jar } -@test "[$GROUP] install discovery-azure plugin" { +@test "[$GROUP] install discovery-azure-classic plugin" { install_and_check_plugin discovery azure azure-core-*.jar } @@ -341,8 +341,8 @@ fi remove_plugin discovery-gce } -@test "[$GROUP] remove discovery-azure plugin" { - remove_plugin discovery-azure +@test "[$GROUP] remove discovery-azure-classic plugin" { + remove_plugin discovery-azure-classic } @test "[$GROUP] remove discovery-ec2 plugin" { diff --git a/settings.gradle b/settings.gradle index c0d7a72b2a5..6588b605a9d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -31,7 +31,7 @@ List projects = [ 'plugins:analysis-phonetic', 'plugins:analysis-smartcn', 'plugins:analysis-stempel', - 'plugins:discovery-azure', + 'plugins:discovery-azure-classic', 'plugins:discovery-ec2', 'plugins:discovery-gce', 'plugins:ingest-geoip',