@Override protected String getInstallLabelExtraSalt() { String downloadUrl = entity.getConfig(BrooklynNode.DOWNLOAD_URL); String uploadUrl = entity.getConfig(BrooklynNode.DISTRO_UPLOAD_URL); if (Objects.equal(downloadUrl, BrooklynNode.DOWNLOAD_URL.getConfigKey().getDefaultValue()) && Objects.equal(uploadUrl, BrooklynNode.DISTRO_UPLOAD_URL.getDefaultValue())) { // if both are at the default value, then no salt return null; } return Identifiers.makeIdFromHash(Objects.hashCode(downloadUrl, uploadUrl)); }
interface UpgradeClusterEffector { ConfigKey<String> DOWNLOAD_URL = BrooklynNode.DOWNLOAD_URL.getConfigKey(); ConfigKey<Map<String, Object>> EXTRA_CONFIG = BrooklynNodeUpgradeEffectorBody.EXTRA_CONFIG; Effector<Void> UPGRADE_CLUSTER = Effectors.effector(Void.class, "upgradeCluster") .description( "Upgrade the cluster with new distribution version, " + "by provisioning new nodes with the new version, failing over, " + "and then deprovisioning the original nodes") .parameter(BrooklynNode.SUGGESTED_VERSION) .parameter(DOWNLOAD_URL) .parameter(EXTRA_CONFIG) .buildAbstract(); }