cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jburwell <...@git.apache.org>
Subject [GitHub] cloudstack pull request: CLOUDSTACK-8832 : Update Nuage VSP plugin...
Date Mon, 12 Oct 2015 22:03:50 GMT
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/801#discussion_r41806320
  
    --- Diff: plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/NuageVspResource.java
---
    @@ -437,31 +463,79 @@ private Answer executeRequest(SyncVspCommand cmd) {
                 _nuageVspSyncClient.syncWithNuageVsp(cmd.getNuageVspEntity());
                 return new SyncVspAnswer(cmd, true, "Synced " + cmd.getNuageVspEntity() +
" in VSP");
             } catch (Exception e) {
    +            s_logger.error("Failure during " + cmd, e);
                 return new SyncVspAnswer(cmd, e);
             }
         }
     
    +    private Answer executeRequest(SyncNuageVspCmsIdCommand cmd) {
    +        try {
    +            isNuageVspManagerLoaded();
    +            if (cmd.getSyncType() == SyncType.AUDIT || cmd.getSyncType() == SyncType.AUDIT_ONLY)
{
    +                Pair<Boolean, String> answer = _nuageVspManagerClient.auditNuageVspCmsId(cmd.getNuageVspCmsId(),
cmd.getSyncType() == SyncType.AUDIT_ONLY);
    +                return new SyncNuageVspCmsIdAnswer(answer.getLeft(), answer.getRight(),
cmd.getSyncType());
    +            } else if (cmd.getSyncType() == SyncType.REGISTER) {
    +                String registeredNuageVspCmsId = _nuageVspManagerClient.registerNuageVspCmsId();
    +                return new SyncNuageVspCmsIdAnswer(StringUtils.isNotBlank(registeredNuageVspCmsId),
registeredNuageVspCmsId, cmd.getSyncType());
    +            } else {
    +                boolean success = _nuageVspManagerClient.unregisterNuageVspCmsId(cmd.getNuageVspCmsId());
    +                return new SyncNuageVspCmsIdAnswer(success, cmd.getNuageVspCmsId(), cmd.getSyncType());
    +            }
    +        } catch (Exception e) {
    +            s_logger.error("Failure during " + cmd, e);
    +            return new SyncNuageVspCmsIdAnswer(false, null, cmd.getSyncType());
    +        }
    +    }
    +
    +    private Answer executeRequest(SyncDomainCommand cmd) {
    +        try {
    +            isNuageVspManagerLoaded();
    +            boolean success = _nuageVspManagerClient.syncDomainWithNuageVsp(cmd.getDomainUuid(),
cmd.getDomainName(), cmd.getDomainPath(), cmd.isToAdd(), cmd.isToRemove());
    +            return new SyncDomainAnswer(success);
    +        } catch (Exception e) {
    +            s_logger.error("Failure during " + cmd, e);
    --- End diff --
    
    Please add identifying information about Nuage VSP device to assist operational debugging.


---
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