Return-Path: X-Original-To: apmail-brooklyn-commits-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D3EF618402 for ; Mon, 1 Feb 2016 17:50:33 +0000 (UTC) Received: (qmail 65681 invoked by uid 500); 1 Feb 2016 17:50:18 -0000 Delivered-To: apmail-brooklyn-commits-archive@brooklyn.apache.org Received: (qmail 65644 invoked by uid 500); 1 Feb 2016 17:50:18 -0000 Mailing-List: contact commits-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list commits@brooklyn.apache.org Received: (qmail 65618 invoked by uid 99); 1 Feb 2016 17:50:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Feb 2016 17:50:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D3B40DFF85; Mon, 1 Feb 2016 17:50:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: heneveld@apache.org To: commits@brooklyn.apache.org Date: Mon, 01 Feb 2016 17:50:18 -0000 Message-Id: <9cbd930f013248909cb09c22331701ab@git.apache.org> In-Reply-To: <8781df0581964fafb7b576126737e06f@git.apache.org> References: <8781df0581964fafb7b576126737e06f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/50] [abbrv] brooklyn-server git commit: Deprecate JcloudsLocation#rebindMachine in favour of registerMachine Deprecate JcloudsLocation#rebindMachine in favour of registerMachine Return type now MachineLocation instead of JcloudsSshMachineLocation. Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/8ef103ec Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/8ef103ec Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/8ef103ec Branch: refs/heads/0.8.0-incubating Commit: 8ef103ec6f7f9e95ec4b1106b0689924445a1a85 Parents: af4eee3 Author: Sam Corbett Authored: Tue Aug 18 18:27:51 2015 +0100 Committer: Sam Corbett Committed: Fri Aug 21 10:16:43 2015 +0100 ---------------------------------------------------------------------- .../location/jclouds/JcloudsLocation.java | 45 +++++++++++++++++--- 1 file changed, 39 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/8ef103ec/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java ---------------------------------------------------------------------- diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java index 9167587..867d349 100644 --- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java +++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java @@ -1861,16 +1861,41 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im } - // ----------------- rebinding to existing machine ------------------------ + // ----------------- registering existing machines ------------------------ + /** + * @deprecated since 0.8.0 use {@link #registerMachine(NodeMetadata)} instead. + */ + @Deprecated public JcloudsSshMachineLocation rebindMachine(NodeMetadata metadata) throws NoMachinesAvailableException { - return rebindMachine(MutableMap.of(), metadata); + return (JcloudsSshMachineLocation) registerMachine(metadata); } + + public MachineLocation registerMachine(NodeMetadata metadata) throws NoMachinesAvailableException { + return registerMachine(MutableMap.of(), metadata); + } + + /** + * @deprecated since 0.8.0 use {@link #registerMachine(Map, NodeMetadata)} instead. + */ + @Deprecated public JcloudsSshMachineLocation rebindMachine(Map flags, NodeMetadata metadata) throws NoMachinesAvailableException { + return (JcloudsSshMachineLocation) registerMachine(flags, metadata); + } + + public MachineLocation registerMachine(Map flags, NodeMetadata metadata) throws NoMachinesAvailableException { ConfigBag setup = ConfigBag.newInstanceExtending(config().getBag(), flags); if (!setup.containsKey("id")) setup.putStringKey("id", metadata.getId()); setHostnameUpdatingCredentials(setup, metadata); - return rebindMachine(setup); + return registerMachine(setup); + } + + /** + * @deprecated since 0.8.0 use {@link #registerMachine(ConfigBag)} instead. + */ + @Deprecated + public JcloudsSshMachineLocation rebindMachine(ConfigBag setup) throws NoMachinesAvailableException { + return (JcloudsSshMachineLocation) registerMachine(setup); } /** @@ -1883,7 +1908,7 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im *
  • userName: the username for ssh'ing into the machine *
      */ - public JcloudsSshMachineLocation rebindMachine(ConfigBag setup) throws NoMachinesAvailableException { + public MachineLocation registerMachine(ConfigBag setup) throws NoMachinesAvailableException { try { if (setup.getDescription() == null) setCreationString(setup); String user = checkNotNull(getUser(setup), "user"); @@ -1923,9 +1948,17 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im } } - public JcloudsSshMachineLocation rebindMachine(Map flags) throws NoMachinesAvailableException { + /** + * @deprecated since 0.8.0 use {@link #registerMachine(Map)} instead. + */ + @Deprecated + public JcloudsSshMachineLocation rebindMachine(Map flags) throws NoMachinesAvailableException { + return (JcloudsSshMachineLocation) registerMachine(flags); + } + + public MachineLocation registerMachine(Map flags) throws NoMachinesAvailableException { ConfigBag setup = ConfigBag.newInstanceExtending(config().getBag(), flags); - return rebindMachine(setup); + return registerMachine(setup); } /**