cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-8832) Update Nuage VSP plugin to work with Nuage VSP release 3.2
Date Wed, 14 Oct 2015 11:07:05 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-8832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14956706#comment-14956706
] 

ASF GitHub Bot commented on CLOUDSTACK-8832:
--------------------------------------------

Github user nlivens commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/801#discussion_r41980395
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/network/element/NuageVspElement.java
---
    @@ -205,9 +254,79 @@ public boolean implement(Network network, NetworkOffering offering,
DeployDestin
                 return false;
             }
     
    +        final boolean egressDefaultPolicy = offering.getEgressDefaultPolicy();
    +        Domain networkDomain = _domainDao.findById(network.getDomainId());
    +        boolean isFirewallServiceSupported = _networkModel.areServicesSupportedByNetworkOffering(offering.getId(),
Service.Firewall);
    +        List<String> dnsServers = _nuageVspManager.getDnsDetails(network);
    +
    +        boolean isL2Network = false, isL3Network = false, isShared = false;
    +        String subnetUuid = network.getUuid();
    +        if (offering.getGuestType() == Network.GuestType.Shared) {
    +            isShared = true;
    +            subnetUuid = networkDomain.getUuid();
    +        } else if (_ntwkOfferingSrvcDao.areServicesSupportedByNetworkOffering(offering.getId(),
Service.SourceNat)
    +                || _ntwkOfferingSrvcDao.areServicesSupportedByNetworkOffering(offering.getId(),
Service.StaticNat)
    +                || _ntwkOfferingSrvcDao.areServicesSupportedByNetworkOffering(offering.getId(),
Service.Connectivity)) {
    +            isL3Network = true;
    +        } else {
    +            isL2Network = true;
    +        }
    +
    +        String preConfiguredDomainTemplateName = NuageVspUtil.getPreConfiguredDomainTemplateName(_configDao,
network, offering);
    +        List<FirewallRuleVO> firewallIngressRulesToApply = getFirewallRulesToApply(network.getId(),
FirewallRule.TrafficType.Ingress);
    +        List<FirewallRuleVO> firewallEgressRulesToApply = getFirewallRulesToApply(network.getId(),
FirewallRule.TrafficType.Egress);
    +
    +        List<Map<String, Object>> ingressFirewallRules = Lists.transform(firewallIngressRulesToApply,
new Function<FirewallRuleVO, Map<String, Object>>() {
    +            @Override
    +            public Map<String, Object> apply(FirewallRuleVO firewallRuleVO) {
    +                return getACLRuleDetails(firewallRuleVO, egressDefaultPolicy);
    +            }
    +        });
    +
    +        List<Map<String, Object>> egressFirewallRules = Lists.transform(firewallEgressRulesToApply,
new Function<FirewallRuleVO, Map<String, Object>>() {
    +            @Override
    +            public Map<String, Object> apply(FirewallRuleVO firewallRuleVO) {
    +                return getACLRuleDetails(firewallRuleVO, egressDefaultPolicy);
    +            }
    +        });
    +
    +        List<IPAddressVO> ips = _ipAddressDao.listStaticNatPublicIps(network.getId());
    +        List<String> acsFipUuid = new ArrayList<String>();
    +        for (IPAddressVO ip : ips) {
    +            acsFipUuid.add(ip.getUuid());
    +        }
    +
    +        try {
    +            HostVO nuageVspHost = getNuageVspHost(network.getPhysicalNetworkId());
    +            ImplementVspCommand.Builder cmdBuilder = new ImplementVspCommand.Builder().networkId(network.getId()).networkDomainUuid(networkDomain.getUuid())
    +                    .networkUuid(network.getUuid()).networkName(network.getName()).vpcOrSubnetUuid(subnetUuid).isL2Network(isL2Network).isL3Network(isL3Network)
    +                    .isVpc(false).isShared(isShared).domainTemplateName(preConfiguredDomainTemplateName).isFirewallServiceSupported(isFirewallServiceSupported)
    +                    .dnsServers(dnsServers).ingressFirewallRules(ingressFirewallRules).egressFirewallRules(egressFirewallRules).acsFipUuid(acsFipUuid)
    +                    .egressDefaultPolicy(egressDefaultPolicy);
    +            ImplementVspAnswer answer = (ImplementVspAnswer) _agentMgr.easySend(nuageVspHost.getId(),
cmdBuilder.build());
    +            if (answer == null || !answer.getResult()) {
    +                s_logger.error("ImplementVspCommand for network " + network.getUuid()
+ " failed");
    +                if ((null != answer) && (null != answer.getDetails())) {
    +                    throw new ResourceUnavailableException(answer.getDetails(), Network.class,
network.getId());
    +                }
    +            }
    +        } catch (Exception e) {
    --- End diff --
    
    Removed the <code>try {} catch () {}</code> block since it didn't add any
value


> Update Nuage VSP plugin to work with Nuage VSP release 3.2
> ----------------------------------------------------------
>
>                 Key: CLOUDSTACK-8832
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8832
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>    Affects Versions: 4.6.0
>            Reporter: Nick Livens
>            Assignee: Nick Livens
>         Attachments: nuageVspMarvinLogs.tar.gz
>
>
> Nuage VSP 3.2 is being released, we want to bring the plugin up to date for this release



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message