Package com.cloud.network.nicira

Examples of com.cloud.network.nicira.Match


             
              // Setup the source nat rule
              SourceNatRule snr = new SourceNatRule();
              snr.setToSourceIpAddressMin(publicNetworkIpAddress.split("/")[0]);
              snr.setToSourceIpAddressMax(publicNetworkIpAddress.split("/")[0]);
              Match match = new Match();
              match.setSourceIpAddresses(internalNetworkAddress);
              snr.setMatch(match);
              snr.setOrder(200);
              _niciraNvpApi.createLogicalRouterNatRule(lrc.getUuid(), snr);
          } catch (NiciraNvpApiException e) {
            // We need to destroy the router if we already created it
View Full Code Here


    natRuleStr.append("Rule ");
    natRuleStr.append(rule.getUuid());
    natRuleStr.append(" (");
    natRuleStr.append(rule.getType());
    natRuleStr.append(") :");
    Match m = rule.getMatch();
    natRuleStr.append("match (");
    natRuleStr.append(m.getProtocol());
    natRuleStr.append(" ");
    natRuleStr.append(m.getSourceIpAddresses());
    natRuleStr.append(" [");
    natRuleStr.append(m.getSourcePort());
    natRuleStr.append(" ] -> ");
    natRuleStr.append(m.getDestinationIpAddresses());
    natRuleStr.append(" [");
    natRuleStr.append(m.getDestinationPort());
    natRuleStr.append(" ]) -->");
    if ("SourceNatRule".equals(rule.getType())) {
      natRuleStr.append(((SourceNatRule)rule).getToSourceIpAddressMin());
      natRuleStr.append("-");
      natRuleStr.append(((SourceNatRule)rule).getToSourceIpAddressMax());
View Full Code Here

      rulepair[0].setOrder(100);
      rulepair[1] = new SourceNatRule();
      rulepair[1].setType("SourceNatRule");
      rulepair[1].setOrder(100);
     
    Match m = new Match();
    m.setDestinationIpAddresses(outsideIp);
    rulepair[0].setMatch(m);
    ((DestinationNatRule)rulepair[0]).setToDestinationIpAddress(insideIp);

    // create matching snat rule
    m = new Match();
    m.setSourceIpAddresses(insideIp);
    rulepair[1].setMatch(m);
    ((SourceNatRule)rulepair[1]).setToSourceIpAddressMin(outsideIp);
    ((SourceNatRule)rulepair[1]).setToSourceIpAddressMax(outsideIp);
     
      return rulepair;
View Full Code Here

                // Setup the source nat rule
                SourceNatRule snr = new SourceNatRule();
                snr.setToSourceIpAddressMin(publicNetworkIpAddress.split("/")[0]);
                snr.setToSourceIpAddressMax(publicNetworkIpAddress.split("/")[0]);
                Match match = new Match();
                match.setSourceIpAddresses(internalNetworkAddress);
                snr.setMatch(match);
                snr.setOrder(200);
                niciraNvpApi.createLogicalRouterNatRule(lrc.getUuid(), snr);
            } catch (NiciraNvpApiException e) {
                // We need to destroy the router if we already created it
View Full Code Here

        natRuleStr.append("Rule ");
        natRuleStr.append(rule.getUuid());
        natRuleStr.append(" (");
        natRuleStr.append(rule.getType());
        natRuleStr.append(") :");
        Match m = rule.getMatch();
        natRuleStr.append("match (");
        natRuleStr.append(m.getProtocol());
        natRuleStr.append(" ");
        natRuleStr.append(m.getSourceIpAddresses());
        natRuleStr.append(" [");
        natRuleStr.append(m.getSourcePort());
        natRuleStr.append(" ] -> ");
        natRuleStr.append(m.getDestinationIpAddresses());
        natRuleStr.append(" [");
        natRuleStr.append(m.getDestinationPort());
        natRuleStr.append(" ]) -->");
        if ("SourceNatRule".equals(rule.getType())) {
            natRuleStr.append(((SourceNatRule)rule).getToSourceIpAddressMin());
            natRuleStr.append("-");
            natRuleStr.append(((SourceNatRule)rule).getToSourceIpAddressMax());
View Full Code Here

        rulepair[0].setOrder(100);
        rulepair[1] = new SourceNatRule();
        rulepair[1].setType("SourceNatRule");
        rulepair[1].setOrder(100);

        Match m = new Match();
        m.setDestinationIpAddresses(outsideIp);
        rulepair[0].setMatch(m);
        ((DestinationNatRule)rulepair[0]).setToDestinationIpAddress(insideIp);

        // create matching snat rule
        m = new Match();
        m.setSourceIpAddresses(insideIp);
        rulepair[1].setMatch(m);
        ((SourceNatRule)rulepair[1]).setToSourceIpAddressMin(outsideIp);
        ((SourceNatRule)rulepair[1]).setToSourceIpAddressMax(outsideIp);

        return rulepair;
View Full Code Here

                // Setup the source nat rule
                SourceNatRule snr = new SourceNatRule();
                snr.setToSourceIpAddressMin(publicNetworkIpAddress.split("/")[0]);
                snr.setToSourceIpAddressMax(publicNetworkIpAddress.split("/")[0]);
                Match match = new Match();
                match.setSourceIpAddresses(internalNetworkAddress);
                snr.setMatch(match);
                snr.setOrder(200);
                _niciraNvpApi.createLogicalRouterNatRule(lrc.getUuid(), snr);
            } catch (NiciraNvpApiException e) {
                // We need to destroy the router if we already created it
View Full Code Here

        natRuleStr.append("Rule ");
        natRuleStr.append(rule.getUuid());
        natRuleStr.append(" (");
        natRuleStr.append(rule.getType());
        natRuleStr.append(") :");
        Match m = rule.getMatch();
        natRuleStr.append("match (");
        natRuleStr.append(m.getProtocol());
        natRuleStr.append(" ");
        natRuleStr.append(m.getSourceIpAddresses());
        natRuleStr.append(" [");
        natRuleStr.append(m.getSourcePort());
        natRuleStr.append(" ] -> ");
        natRuleStr.append(m.getDestinationIpAddresses());
        natRuleStr.append(" [");
        natRuleStr.append(m.getDestinationPort());
        natRuleStr.append(" ]) -->");
        if ("SourceNatRule".equals(rule.getType())) {
            natRuleStr.append(((SourceNatRule)rule).getToSourceIpAddressMin());
            natRuleStr.append("-");
            natRuleStr.append(((SourceNatRule)rule).getToSourceIpAddressMax());
View Full Code Here

        rulepair[0].setOrder(100);
        rulepair[1] = new SourceNatRule();
        rulepair[1].setType("SourceNatRule");
        rulepair[1].setOrder(100);

        Match m = new Match();
        m.setDestinationIpAddresses(outsideIp);
        rulepair[0].setMatch(m);
        ((DestinationNatRule)rulepair[0]).setToDestinationIpAddress(insideIp);

        // create matching snat rule
        m = new Match();
        m.setSourceIpAddresses(insideIp);
        rulepair[1].setMatch(m);
        ((SourceNatRule)rulepair[1]).setToSourceIpAddressMin(outsideIp);
        ((SourceNatRule)rulepair[1]).setToSourceIpAddressMax(outsideIp);

        return rulepair;
View Full Code Here

TOP

Related Classes of com.cloud.network.nicira.Match

Copyright © 2018 www.massapicom. 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.