[
https://issues.apache.org/jira/browse/WHIRR-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042294#comment-13042294
]
Adrian Cole commented on WHIRR-315:
-----------------------------------
I think changing the public cli interface to workaround a trivial bug is a bad
idea. Why don't we just paste in a correct predicate instead of changing the
public interfaces to whirr? If we change the public interface to whirr, it
will establish incorrect behaviour which is hard to have users change
back/forth from.
The predicate that was failing can be pasted into whirr somewhere and deprecate
saying that this is fixed in beta-10.
Here's an example, which is already in beta-10:
/**
* temporary override Providers#withIds until jclouds beta-10 is out
*/
@Deprecated
public static <T extends ComputeMetadata> Predicate<T> withIds(String...
ids) {
final Set<String> search = ImmutableSet.copyOf(checkNotNull(ids, "ids
must be defined"));
return new Predicate<T>() {
@Override
public boolean apply(T nodeMetadata) {
return search.contains(nodeMetadata.getId());
}
@Override
public String toString() {
return "withIds(" + search + ")";
}
};
}
> Use AWSUtils to handle instance IDs
> ------------------------------------
>
> Key: WHIRR-315
> URL: https://issues.apache.org/jira/browse/WHIRR-315
> Project: Whirr
> Issue Type: Bug
> Reporter: Andrei Savu
> Assignee: Andrei Savu
> Fix For: 0.6.0
>
> Attachments: WHIRR-315.patch, WHIRR-315.patch
>
>
> I realized that I have to use AWSUtills in order to handle instances IDs
> correctly. It looks like inconsistent behavior in jclouds.
> From the documentation I would expect to be able to call:
> {code}
> computeService.destroyNode(metadata.getId())
> {code}
> but I have to do the following call in order to get the expected behavior:
> {code}
> computeService.destroyNode(AWSUtils.parseHandle(metadata.getId())[1]);
> {code}
> Adrian, am I missing something about how jclouds handles instance IDs?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira