brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [07/27] brooklyn-server git commit: Merge branch 'master' into version-id
Date Fri, 30 Jun 2017 14:02:55 GMT
Merge branch 'master' into version-id


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/dc4942a3
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/dc4942a3
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/dc4942a3

Branch: refs/heads/master
Commit: dc4942a345dc2fbd5125a34131addb632e634fe8
Parents: db77f4e e25832b
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Tue Jun 20 09:51:42 2017 +0100
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Tue Jun 20 09:51:42 2017 +0100

----------------------------------------------------------------------
 .../brooklyn/api/typereg/RegisteredType.java    |  10 +
 .../creation/BrooklynYamlTypeInstantiator.java  |   9 +
 .../ConfigLocationInheritanceYamlTest.java      |   5 +-
 .../CatalogOsgiVersionMoreEntityRebindTest.java |  76 ++++
 .../camp/brooklyn/catalog/CatalogScanTest.java  |   9 +-
 .../brooklyn/camp/server/dto/ApiErrorDto.java   |   3 +-
 .../catalog/internal/BasicBrooklynCatalog.java  |   3 +-
 .../core/catalog/internal/CatalogBundleDto.java |   3 +-
 .../catalog/internal/CatalogClasspathDo.java    |   7 +-
 .../core/catalog/internal/CatalogDto.java       |   4 +-
 .../brooklyn/core/config/BasicConfigKey.java    |  14 +-
 .../apache/brooklyn/core/config/ConfigKeys.java |  11 +-
 .../brooklyn/core/config/ListConfigKey.java     |  53 ++-
 .../brooklyn/core/config/MapConfigKey.java      |  34 +-
 .../brooklyn/core/config/SetConfigKey.java      |  55 ++-
 .../external/UrlsExternalConfigSupplier.java    |   4 +-
 .../internal/AbstractCollectionConfigKey.java   |   7 +-
 .../internal/AbstractStructuredConfigKey.java   |   5 +
 .../core/effector/BasicParameterType.java       |   3 +-
 .../apache/brooklyn/core/entity/Entities.java   |   4 +-
 .../core/entity/EntityAndAttribute.java         |   3 +-
 .../downloads/BasicDownloadRequirement.java     |   4 +-
 .../downloads/BasicDownloadResolver.java        |   4 +-
 .../drivers/downloads/BasicDownloadTargets.java |   4 +-
 .../drivers/downloads/DownloadSubstituters.java |   4 +-
 .../core/entity/factory/ApplicationBuilder.java | 250 ------------
 .../core/entity/lifecycle/PolicyDescriptor.java |   3 +-
 .../entity/lifecycle/ServiceStateLogic.java     |   1 -
 .../org/apache/brooklyn/core/feed/Poller.java   |   4 +-
 .../core/internal/BrooklynProperties.java       |   4 +-
 .../core/internal/BrooklynPropertiesImpl.java   |   4 +-
 .../AggregatingMachineProvisioningLocation.java |   4 +-
 .../core/location/BasicHardwareDetails.java     |   6 +-
 .../core/location/BasicMachineDetails.java      |   4 +-
 .../core/location/BasicMachineMetadata.java     |   7 +-
 .../brooklyn/core/location/BasicOsDetails.java  |   6 +-
 .../location/access/PortForwardManager.java     |   4 +-
 .../core/location/access/PortMapping.java       |   3 +-
 .../BrooklynClassLoadingContextSequential.java  |   2 -
 ...rFromStackOfBrooklynClassLoadingContext.java | 145 +++++++
 .../BasicEntitlementClassDefinition.java        |   4 +-
 .../brooklyn/core/mgmt/ha/OsgiManager.java      |   2 +-
 .../ha/dto/BasicManagementNodeSyncRecord.java   |   6 +-
 .../ha/dto/ManagementPlaneSyncRecordImpl.java   |   4 +-
 .../NonDeploymentManagementContext.java         |   4 +-
 .../core/mgmt/persist/FileBasedObjectStore.java |   4 +-
 .../core/mgmt/persist/OsgiClassPrefixer.java    |  82 ----
 .../core/mgmt/persist/XmlMementoSerializer.java | 170 +-------
 .../core/mgmt/rebind/dto/AbstractMemento.java   |   5 +-
 .../mgmt/rebind/dto/MementosGenerators.java     |   2 +-
 .../core/mgmt/usage/ApplicationUsage.java       |   3 +-
 .../core/objs/AbstractEntityAdjunct.java        |   4 +-
 .../apache/brooklyn/core/objs/AdjunctType.java  |   3 +-
 .../stock/AbstractAggregatingEnricher.java      | 175 --------
 .../stock/AbstractTransformingEnricher.java     |   4 +-
 .../stock/AbstractTypeTransformingEnricher.java |   6 +-
 .../brooklyn/enricher/stock/AddingEnricher.java | 109 -----
 .../stock/CustomAggregatingEnricher.java        | 352 ----------------
 .../brooklyn/enricher/stock/Enrichers.java      |  15 +-
 .../stock/SensorPropagatingEnricher.java        | 186 ---------
 .../stock/SensorTransformingEnricher.java       | 115 ------
 .../brooklyn/enricher/stock/UpdatingMap.java    |   6 -
 .../group/AbstractMembershipTrackingPolicy.java |   4 -
 .../ProportionalZoneFailureDetector.java        |   4 +-
 .../FixedListMachineProvisioningLocation.java   |   4 +-
 .../location/ssh/SshMachineLocation.java        |   4 +-
 .../brooklyn/util/core/flags/FlagUtils.java     |   3 +-
 .../internal/ssh/sshj/SshjClientConnection.java |   3 +-
 .../brooklyn/util/core/task/TaskInternal.java   |   4 +-
 .../util/core/xstream/ClassRenamingMapper.java  |  22 +-
 .../util/core/xstream/OsgiClassPrefixer.java    |  82 ++++
 .../util/core/xstream/OsgiClassnameMapper.java  |  85 ++++
 .../util/core/xstream/XmlSerializer.java        |  67 ++-
 .../core/catalog/internal/MyCatalogItems.java   |   7 -
 .../config/MapConfigKeyAndFriendsMoreTest.java  |  76 ++++
 .../core/enricher/BasicEnricherTest.java        |  16 +-
 .../core/enricher/EnricherConfigTest.java       |  28 +-
 .../core/entity/EntityAutomanagedTest.java      |   3 +-
 .../brooklyn/core/entity/EntityNameTest.java    |  10 +-
 .../core/entity/EntitySetFromFlagTest.java      | 171 --------
 .../core/entity/PolicyRegistrationTest.java     |  39 +-
 .../core/entity/PolicySetFromFlagTest.java      | 211 ++++++++++
 .../downloads/BasicDownloadsRegistryTest.java   |  39 +-
 .../DownloadProducerFromLocalRepoTest.java      |  26 +-
 .../DownloadProducerFromPropertiesTest.java     |  33 +-
 .../ApplicationBuilderOverridingTest.java       | 249 ------------
 .../core/entity/proxying/EntityManagerTest.java |   3 +-
 .../core/entity/proxying/EntityProxyTest.java   |  20 -
 .../location/cloud/CloudMachineNamerTest.java   |  31 +-
 .../location/cloud/CustomMachineNamerTest.java  |  20 +-
 ...mStackOfBrooklynClassLoadingContextTest.java | 143 +++++++
 .../AcmeEntitlementManagerTestFixture.java      |   6 +-
 .../core/mgmt/entitlement/EntitlementsTest.java |  31 +-
 .../mgmt/entitlement/EntityEntitlementTest.java |   5 +-
 .../HighAvailabilityManagerSplitBrainTest.java  |  11 +-
 .../brooklyn/core/mgmt/ha/HotStandbyTest.java   |   9 +-
 .../core/mgmt/internal/AccessManagerTest.java   |  62 +--
 .../internal/EntityExecutionManagerTest.java    |   4 +-
 .../core/mgmt/osgi/OsgiStandaloneTest.java      |  21 -
 .../BrooklynMementoPersisterTestFixture.java    |   3 +-
 .../mgmt/persist/OsgiClassPrefixerTest.java     | 111 -----
 ...entoSerializerDelegatingClassLoaderTest.java | 143 -------
 .../mgmt/rebind/AbstractRebindHistoricTest.java |  66 +++
 .../mgmt/rebind/ActivePartialRebindTest.java    |   5 +-
 .../rebind/RebindAbstractCommandFeedTest.java   |  61 ---
 .../mgmt/rebind/RebindHistoricSshFeedTest.java  |   2 +-
 .../core/policy/basic/BasicPolicyTest.java      |  20 +
 .../core/policy/basic/EnricherTypeTest.java     |   8 +-
 .../core/policy/basic/PolicyConfigTest.java     |  68 ++--
 .../policy/basic/PolicySubscriptionTest.java    |   9 +-
 .../core/policy/basic/PolicyTypeTest.java       |  16 +-
 .../core/server/entity/BrooklynMetricsTest.java |  28 +-
 .../core/test/entity/TestApplication.java       |   3 +-
 .../brooklyn/core/test/policy/TestPolicy.java   |   5 -
 .../EntityCleanupLongevityTestFixture.java      |   5 +-
 .../qa/performance/AbstractPerformanceTest.java |  34 +-
 ...CustomAggregatingEnricherDeprecatedTest.java | 405 -------------------
 ...SensorPropagatingEnricherDeprecatedTest.java | 107 -----
 .../TransformingEnricherDeprecatedTest.java     |  92 -----
 .../group/MembershipTrackingPolicyTest.java     |  14 +-
 .../brooklyn/entity/stock/DataEntityTest.java   |  21 +-
 ...stMachineProvisioningLocationRebindTest.java |  32 +-
 .../location/multi/MultiLocationRebindTest.java |  50 +--
 .../util/core/internal/FlagUtilsTest.java       |   3 +-
 .../core/internal/ssh/RecordingSshTool.java     |   5 +-
 .../brooklyn/util/core/osgi/OsgiTestBase.java   |  23 ++
 .../core/xstream/OsgiClassPrefixerTest.java     | 111 +++++
 .../core/xstream/XmlSerializerOsgiTest.java     | 111 +++++
 core/src/test/resources/catalog.bom             |  20 +
 .../command/support/CloudExplorerSupport.java   |   8 +-
 .../brooklyn/launcher/common/BasicLauncher.java |  36 +-
 .../BrooklynEntityMirrorIntegrationTest.java    |   3 +-
 .../brooklynnode/BrooklynNodeRestTest.java      |   3 +-
 .../brooklyn/launcher/BrooklynLauncherTest.java |  13 -
 .../JcloudsBlobStoreBasedObjectStore.java       |   4 +-
 .../jclouds/AbstractComputeServiceRegistry.java | 151 +++++++
 ...wsEc2SessionAwareComputeServiceRegistry.java | 115 ++++++
 .../AwsEc2SessionAwareLocationConfig.java       |  28 ++
 .../jclouds/BasicJcloudsLocationCustomizer.java |  14 +-
 .../jclouds/ComputeServiceRegistryImpl.java     | 202 +--------
 .../jclouds/JCloudsPropertiesBuilder.java       | 166 ++++++++
 .../location/jclouds/JcloudsLocation.java       | 144 +++----
 .../jclouds/JcloudsLocationCustomizer.java      |  18 +
 .../jclouds/JcloudsWinRmMachineLocation.java    |   4 +-
 .../jclouds/LocationCustomizerDelegate.java     | 239 +++++++++++
 .../jclouds/RebindToMachinePredicate.java       |   4 +-
 .../BlobStorePersistencePerformanceTest.java    |   4 +
 .../jclouds/BailOutJcloudsLocation.java         |   8 +-
 .../JcloudsSshMachineLocationStubbedTest.java   |  87 ++++
 .../policy/autoscaling/AutoScalerPolicy.java    |  11 +-
 .../autoscaling/MaxPoolSizeReachedEvent.java    |   4 +-
 .../policy/autoscaling/SizeHistory.java         |   4 +-
 .../brooklyn/policy/enricher/DeltaEnricher.java |   7 +-
 .../policy/enricher/HttpLatencyDetector.java    |  34 +-
 .../policy/enricher/RollingMeanEnricher.java    |  15 +-
 .../enricher/RollingTimeWindowMeanEnricher.java |  22 +-
 .../enricher/TimeFractionDeltaEnricher.java     |  56 ++-
 .../enricher/TimeWeightedDeltaEnricher.java     |  36 +-
 .../apache/brooklyn/policy/ha/HASensors.java    |   4 +-
 .../policy/ha/ServiceFailureDetector.java       |  15 +-
 .../brooklyn/policy/ha/ServiceReplacer.java     |  20 +-
 .../brooklyn/policy/ha/ServiceRestarter.java    |  23 +-
 .../autoscaling/AutoScalerPolicyMetricTest.java |  79 ++--
 .../AutoScalerPolicyReconfigurationTest.java    |  61 +--
 .../autoscaling/AutoScalerPolicyTest.java       |  52 +--
 .../policy/enricher/DeltaEnrichersTests.java    |  38 +-
 .../enricher/HttpLatencyDetectorTest.java       |   8 +-
 .../policy/enricher/RebindEnricherTest.java     |  32 +-
 .../enricher/RollingMeanEnricherTest.java       |  22 +-
 .../RollingTimeWindowMeanEnricherTest.java      |  15 +-
 .../enricher/TimeFractionDeltaEnricherTest.java |  52 +--
 .../ha/ConnectionFailureDetectorTest.java       |  42 +-
 ...ServiceFailureDetectorStabilizationTest.java |  23 +-
 .../policy/ha/ServiceFailureDetectorTest.java   |  23 +-
 .../brooklyn/policy/ha/ServiceReplacerTest.java |  43 +-
 .../policy/ha/ServiceRestarterTest.java         |  15 +-
 .../BalanceableWorkerPoolTest.java              |  27 +-
 .../ItemsInContainersGroupTest.java             |  17 +-
 .../brooklyn/rest/domain/EffectorSummary.java   |   3 +-
 .../rest/util/BrooklynRestResourceUtils.java    |  23 +-
 .../rest/resources/ApplicationResourceTest.java |  25 --
 .../rest/testing/mocks/RestMockAppBuilder.java  |  41 --
 .../testing/mocks/RestMockSimplePolicy.java     |   7 -
 .../util/BrooklynRestResourceUtilsTest.java     |   6 +-
 .../main/java/org/apache/brooklyn/cli/Main.java |  66 ++-
 .../java/org/apache/brooklyn/cli/CliTest.java   |  53 +--
 .../brooklyn/entity/java/JavaAppUtils.java      |  16 +-
 .../dynamic/clocker/StubContainerLocation.java  |   5 +-
 .../entity/AbstractGoogleComputeLiveTest.java   |  45 +--
 .../entity/AbstractSoftlayerLiveTest.java       |  42 +-
 .../brooklyn/entity/chef/ChefConfigsTest.java   |  16 +-
 .../chef/ChefServerTasksIntegrationTest.java    |  25 +-
 .../entity/java/VanillaJavaAppRebindTest.java   |  16 +-
 .../software/base/AbstractDockerLiveTest.java   |  46 +--
 .../SoftwareProcessEntityFeedRebindTest.java    |   5 +-
 ...twareProcessOpenIptablesStreamsLiveTest.java |  13 +-
 ...SoftwareProcessSshDriverIntegrationTest.java |  31 +-
 ...laWindowsProcessWinrmExitStatusLiveTest.java |   3 +-
 ...nillaWindowsProcessWinrmStreamsLiveTest.java |   3 +-
 .../SoftwareProcessDriverCopyResourcesTest.java |  37 +-
 .../performance/ScalabilityPerformanceTest.java | 262 ++++++++++++
 .../WindowsPerformanceCounterSensors.java       |   4 +-
 .../windows/WindowsPerformanceCounterFeed.java  |  14 +-
 ...RebindWindowsPerformanceCounterFeedTest.java |  38 ++
 .../feed/windows/RebindWinrmCmdFeedTest.java    |   8 +-
 .../core/internal/winrm/RecordingWinRmTool.java |   4 +-
 ...-counter-feed-no-bundle-prefixies-ueauyeu41d |  61 +++
 .../windows-performance-counter-feed-tu4kk0xvf8 |  61 +++
 .../test/performance/PerformanceMeasurer.java   | 165 +++++---
 .../performance/PerformanceTestDescriptor.java  |  49 ++-
 .../test/performance/PerformanceTestResult.java |   4 +-
 .../brooklyn/util/http/HttpToolResponse.java    |   4 +-
 .../apache/brooklyn/util/pool/BasicPool.java    |   4 +-
 .../org/apache/brooklyn/util/time/Duration.java |   5 +
 .../util/javalang/MemoryUsageTrackerTest.java   |   4 +-
 .../brooklyn/util/osgi/OsgiTestResources.java   |   3 +-
 216 files changed, 3911 insertions(+), 4540 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dc4942a3/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dc4942a3/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/util/BrooklynRestResourceUtils.java
----------------------------------------------------------------------
diff --cc rest/rest-resources/src/main/java/org/apache/brooklyn/rest/util/BrooklynRestResourceUtils.java
index 4792069,600c90f..66467a1
--- a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/util/BrooklynRestResourceUtils.java
+++ b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/util/BrooklynRestResourceUtils.java
@@@ -21,8 -21,8 +21,7 @@@ package org.apache.brooklyn.rest.util
  import static com.google.common.collect.Iterables.transform;
  import static org.apache.brooklyn.rest.util.WebResourceUtils.notFound;
  
- import java.lang.reflect.Constructor;
  import java.util.ArrayList;
 -import java.util.Collection;
  import java.util.LinkedHashMap;
  import java.util.List;
  import java.util.Map;
@@@ -232,9 -253,52 +231,8 @@@ public class BrooklynRestResourceUtils 
              this.catalogItemId = catalogItemId;
              return this;
          }
 -        
 -        @Deprecated // see caller
 -        private RegisteredType getCatalogItemForType(String typeName) {
 -            final RegisteredType resultI;
 -            if (CatalogUtils.looksLikeVersionedId(typeName)) {
 -                //All catalog identifiers of the form aaaa:bbbb are composed of symbolicName+version.
 -                //No javaType is allowed as part of the identifier.
 -                resultI = mgmt.getTypeRegistry().get(typeName);
 -            } else {
 -                //Usually for catalog items with javaType (that is items from catalog.xml)
 -                //the symbolicName and javaType match because symbolicName (was ID)
 -                //is not specified explicitly. But could be the case that there is an item
 -                //whose symbolicName is explicitly set to be different from the javaType.
 -                //Note that in the XML the attribute is called registeredTypeName.
 -                Iterable<CatalogItem<Object,Object>> resultL = mgmt.getCatalog().getCatalogItems(CatalogPredicates.javaType(Predicates.equalTo(typeName)));
 -                if (!Iterables.isEmpty(resultL)) {
 -                    //Push newer versions in front of the list (not that there should
 -                    //be more than one considering the items are coming from catalog.xml).
 -                    resultI = RegisteredTypes.of(sortVersionsDesc(resultL).iterator().next());
 -                    if (log.isDebugEnabled() && Iterables.size(resultL)>1) {
 -                        log.debug("Found "+Iterables.size(resultL)+" matches in catalog
for type "+typeName+"; returning the result with preferred version, "+resultI);
 -                    }
 -                } else {
 -                    //As a last resort try searching for items with the same symbolicName
supposedly
 -                    //different from the javaType.
 -                    resultI = mgmt.getTypeRegistry().get(typeName, BrooklynCatalog.DEFAULT_VERSION);
 -                    if (resultI != null) {
 -                        if (resultI.getSuperTypes().isEmpty()) {
 -                            //Catalog items scanned from the classpath (using reflection
and annotations) now
 -                            //get yaml spec rather than a java type. Can't use those when
creating apps from
 -                            //the legacy app spec format.
 -                            log.warn("Unable to find catalog item for type "+typeName +
 -                                    ". There is an existing catalog item with ID " + resultI.getId()
+
 -                                    " but it doesn't define a class type.");
 -                            return null;
 -                        }
 -                    }
 -                }
 -            }
 -            return resultI;
 -        }
 -        private <T,SpecT> Collection<CatalogItem<T,SpecT>> sortVersionsDesc(Iterable<CatalogItem<T,SpecT>>
versions) {
 -            return ImmutableSortedSet.orderedBy(CatalogItemComparator.<T,SpecT>getInstance()).addAll(versions).build();
 -        }
      }
      
-     @SuppressWarnings({ "deprecation" })
      public Application create(ApplicationSpec spec) {
          log.warn("Using deprecated functionality (as of 0.9.0), ApplicationSpec style (pre
CAMP plans). " +
                      "Transition to actively supported spec plans.");

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dc4942a3/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/util/BrooklynRestResourceUtilsTest.java
----------------------------------------------------------------------


Mime
View raw message