Package io.fabric8.service.jclouds.firewall

Examples of io.fabric8.service.jclouds.firewall.FirewallManager.addRule()


                }
                //We do add the target node public address to the firewall rules, as a way to make things easier in cases
                //where firewall configuration is shared among nodes of the same groups, e.g. EC2.
                if (!Strings.isNullOrEmpty(publicAddress)) {
                    Rule zookeeperFromTargetRule = Rule.create().source(publicAddress + "/32").destination(nodeMetadata).port(2181);
                    firewallManager.addRule(zookeeperFromTargetRule);
                }
            } else {
                listener.onStateChange(String.format("Skipping firewall configuration. Not supported for provider %s", options.getProviderName()));
            }
        } catch (FirewallNotSupportedOnProviderException e) {
View Full Code Here


            if (node == null) {
                System.err.println("Could not find target node. Make sure you specified either --target-node-id or --target-container using a valid cloud container.");
                return null;
            }
            if (flush) {
                firewallManager.addRule(Rule.create().destination(node).flush());
                return null;
            }
            for (String cidr : sourceCidrs) {
                Rule rule = Rule.create().destination(node).source(cidr);
View Full Code Here

                if (port != null && port.length > 0) {
                    rule = rule.ports(port);
                }
                if (revoke) {
                    firewallManager.addRule(rule.revoke());
                } else {
                    firewallManager.addRule(rule);
                }
            }
        }
View Full Code Here

                    rule = rule.ports(port);
                }
                if (revoke) {
                    firewallManager.addRule(rule.revoke());
                } else {
                    firewallManager.addRule(rule);
                }
            }
        }
        return null;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.