public class FirewallManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FirewallManager.Rule |
static class |
FirewallManager.StoredRule |
| Constructor and Description |
|---|
FirewallManager(org.jclouds.compute.ComputeServiceContext computeServiceContext,
ClusterSpec clusterSpec,
Cluster cluster) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRule(FirewallManager.Rule rule)
Rules are additive.
|
void |
addRules(FirewallManager.Rule... rules) |
void |
addRules(Set<FirewallManager.Rule> rules) |
void |
authorizeAllRules()
Authorizes all rules via jclouds security groups interface.
|
static void |
authorizeIngress(org.jclouds.compute.ComputeServiceContext computeServiceContext,
Set<Cluster.Instance> instances,
ClusterSpec clusterSpec,
List<String> cidrs,
int... ports) |
List<org.jclouds.scriptbuilder.domain.Statement> |
getRulesAsStatements()
Returns a list of Statements for executing iptables for the stored rules.
|
public FirewallManager(org.jclouds.compute.ComputeServiceContext computeServiceContext,
ClusterSpec clusterSpec,
Cluster cluster)
public void addRules(FirewallManager.Rule... rules) throws IOException
IOExceptionpublic void addRules(Set<FirewallManager.Rule> rules) throws IOException
IOExceptionpublic void addRule(FirewallManager.Rule rule) throws IOException
ClusterSpec.getClientCidrs(), or, if that is not set,
to the client's originating IP. If no destinations or ports
are set then the rule has not effect.rule - The rule to add to the firewall.IOExceptionpublic void authorizeAllRules()
public List<org.jclouds.scriptbuilder.domain.Statement> getRulesAsStatements()
public static void authorizeIngress(org.jclouds.compute.ComputeServiceContext computeServiceContext,
Set<Cluster.Instance> instances,
ClusterSpec clusterSpec,
List<String> cidrs,
int... ports)
Copyright © 2010–2016 Cloudera. All rights reserved.