Class SecurityGroupPredicates
java.lang.Object
org.jclouds.openstack.nova.v2_0.predicates.SecurityGroupPredicates
Predicates handy when working with SecurityGroups
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.base.Predicate<SecurityGroup> nameEquals(String name) matches name of the given security groupstatic com.google.common.base.Predicate<SecurityGroup> matches name of the given security group against a liststatic com.google.common.base.Predicate<SecurityGroup> nameMatches(com.google.common.base.Predicate<String> name) matches name of the given security groupstatic com.google.common.base.Predicate<SecurityGroupRule> matches a security group rule by its cidrstatic com.google.common.base.Predicate<SecurityGroupRule> ruleEndPort(int endPort) matches a security group rule by the end portstatic com.google.common.base.Predicate<SecurityGroupRule> matches a security group rule by the security group it allowsstatic com.google.common.base.Predicate<SecurityGroupRule> ruleProtocol(IpProtocol protocol) matches a security group rule by the protocolstatic com.google.common.base.Predicate<SecurityGroupRule> ruleStartPort(int startPort) matches a security group rule by the start port
-
Constructor Details
-
SecurityGroupPredicates
public SecurityGroupPredicates()
-
-
Method Details
-
nameEquals
matches name of the given security group- Parameters:
name-- Returns:
- predicate that matches name
-
nameIn
matches name of the given security group against a list- Parameters:
names-- Returns:
- predicate that matches one of the names
-
nameMatches
public static com.google.common.base.Predicate<SecurityGroup> nameMatches(com.google.common.base.Predicate<String> name) matches name of the given security group- Parameters:
name-- Returns:
- predicate that matches name
-
ruleCidr
matches a security group rule by its cidr- Parameters:
cidr-- Returns:
- predicate that matches cidr
-
ruleGroup
matches a security group rule by the security group it allows- Parameters:
groupName-- Returns:
- predicate that matches group
-
ruleProtocol
matches a security group rule by the protocol- Parameters:
protocol-- Returns:
- predicate that matches protocol
-
ruleStartPort
matches a security group rule by the start port- Parameters:
startPort-- Returns:
- predicate that matches startPort
-
ruleEndPort
matches a security group rule by the end port- Parameters:
endPort-- Returns:
- predicate that matches endPort
-