cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nlivens <...@git.apache.org>
Subject [GitHub] cloudstack pull request: CLOUDSTACK-8832 : Update Nuage VSP plugin...
Date Wed, 14 Oct 2015 13:02:47 GMT
Github user nlivens commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/801#discussion_r41989708
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/NuageVspResource.java
---
    @@ -360,32 +375,25 @@ private Answer executeRequest(ImplementNetworkVspCommand cmd) {
         private Answer executeRequest(ReserveVmInterfaceVspCommand cmd) {
             try {
                 isNuageVspGuruLoaded();
    -            List<Map<String, String>> vmInterfaceInfo = _nuageVspGuruClient.reserve(cmd.getNicUuid(),
cmd.getNicMacAddress(), cmd.getNetworkUuid(), cmd.isL3Network(),
    -                    cmd.getVpcUuid(), cmd.getNetworkDomainUuid(), cmd.getNetworksAccountUuid(),
cmd.isDomainRouter(), cmd._getDomainRouterIp(), cmd._getVmInstanceName(),
    -                    cmd._getVmUuid());
    -            return new ReserveVmInterfaceVspAnswer(cmd, vmInterfaceInfo, "Created NIC
in VSP that maps to nicUuid" + cmd.getNicUuid());
    +            _nuageVspGuruClient.reserve(cmd.getNicUuid(), cmd.getNicMacAddress(), cmd.getNetworkUuid(),
cmd.isL3Network(),
    +                    cmd.isSharedNetwork(), cmd.getVpcUuid(), cmd.getNetworkDomainUuid(),
cmd.getNetworksAccountUuid(), cmd.isDomainRouter(), cmd.getDomainRouterIp(),
    +                    cmd.getVmInstanceName(), cmd.getVmUuid(), cmd.useStaticIp(), cmd.getStaticIp(),
cmd.getStaticNatIpUuid(), cmd.getStaticNatIpAddress(), cmd.isStaticNatIpAllocated(),
    +                    cmd.isOneToOneNat(), cmd.getStaticNatVlanUuid(), cmd.getStaticNatVlanGateway(),
cmd.getStaticNatVlanNetmask());
    +            return new ReserveVmInterfaceVspAnswer(cmd, "Created NIC in VSP that maps
to nicUuid" + cmd.getNicUuid());
             } catch (Exception e) {
    +            s_logger.error("Failure during " + cmd, e);
                 return new ReserveVmInterfaceVspAnswer(cmd, e);
             }
         }
     
    -    private Answer executeRequest(ReleaseVmVspCommand cmd) {
    -        try {
    -            isNuageVspGuruLoaded();
    -            _nuageVspGuruClient.release(cmd.getNetworkUuid(), cmd.getVmUuid(), cmd.getVmInstanceName());
    -            return new ReleaseVmVspAnswer(cmd, true, "VM has been deleted from VSP.");
    -        } catch (Exception e) {
    -            return new ReleaseVmVspAnswer(cmd, e);
    -        }
    -    }
    -
         private Answer executeRequest(DeallocateVmVspCommand cmd) {
             try {
                 isNuageVspGuruLoaded();
    -            _nuageVspGuruClient.deallocate(cmd.getNetworkUuid(), cmd.getNicFrmDdUuid(),
cmd.getNicMacAddress(), cmd.getNicIp4Address(), cmd.isL3Network(), cmd.getVpcUuid(),
    -                    cmd.getNetworksDomainUuid(), cmd.getVmInstanceName(), cmd.getVmUuid());
    +            _nuageVspGuruClient.deallocate(cmd.getNetworkUuid(), cmd.getNicFromDdUuid(),
cmd.getNicMacAddress(), cmd.getNicIp4Address(), cmd.isL3Network(), cmd.isSharedNetwork(),
    +                    cmd.getVpcUuid(), cmd.getNetworksDomainUuid(), cmd.getVmInstanceName(),
cmd.getVmUuid(), cmd.isExpungingState());
                 return new DeallocateVmVspAnswer(cmd, true, "Deallocated VM from Nuage VSP.");
             } catch (Exception e) {
    --- End diff --
    
    Our client is using internal exceptions, which are not available in ACS, and which translated
to <code>Exception</code> before we return from the client. Therefore we need
to catch on <code>Exception</code>


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message