[
https://issues.apache.org/jira/browse/CLOUDSTACK-8832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14953793#comment-14953793
]
ASF GitHub Bot commented on CLOUDSTACK-8832:
--------------------------------------------
Github user jburwell commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/801#discussion_r41804441
--- Diff:
plugins/network-elements/nuage-vsp/src/com/cloud/network/manager/NuageVspManagerImpl.java
---
@@ -247,6 +467,26 @@ public boolean
deleteNuageVspDevice(DeleteNuageVspDeviceCmd cmd) {
}
}
+ ConfigurationVO cmsIdConfig =
_configDao.findByName("nuagevsp.cms.id");
+ HostVO host = findNuageVspHost(nuageVspDevice.getHostId());
+ if (!auditDomainsOnVsp(host, false, true)) {
+ return false;
+ }
+
+ String nuageVspCmsId =
findNuageVspCmsIdForDevice(nuageVspDevice.getId(), cmsIdConfig);
+ SyncNuageVspCmsIdCommand syncCmd = new
SyncNuageVspCmsIdCommand(SyncType.UNREGISTER, nuageVspCmsId);
+ SyncNuageVspCmsIdAnswer answer = (SyncNuageVspCmsIdAnswer)
_agentMgr.easySend(nuageVspDevice.getHostId(), syncCmd);
+ if (answer != null && answer.getSuccess()) {
+ String currentValue = cmsIdConfig.getValue();
+ String newValue = currentValue.replace(nuageVspDevice.getId()
+ ":" + answer.getNuageVspCmsId(), "");
+ if (newValue.startsWith(";")) {
--- End diff --
Check that ``newValue`` with ``Strings.isNullOrEmpty()`` to avoid a
potential ``NullPointerException``.
> 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)