> + return new Predicate<Firewall>() {
> + @Override
> + public boolean apply(Firewall input) {
> + return Iterables.elementsEqual(permission.getGroupIds(),
> input.getSourceTags())
> + && Iterables.elementsEqual(permission.getCidrBlocks(),
> input.getSourceRanges())
> + && (input.getAllowed().size() == 1
> + &&
> ruleEqualsIpPermission(permission).apply(Iterables.getOnlyElement(input.getAllowed())));
> + }
> + };
> + }
> +
> + public static Predicate<Firewall> providesIpPermission(final IpPermission
> permission) {
> + return new Predicate<Firewall>() {
> + @Override
> + public boolean apply(Firewall input) {
> + return ((permission.getGroupIds().size() == 0 &&
> input.getSourceTags().size() == 0)
(permission.getGroupIds().isEmpty() && input.getSourceTags().isEmpty())
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/5/files#r7381169