[
https://issues.apache.org/jira/browse/CLOUDSTACK-8832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14953867#comment-14953867
]
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_r41807611
--- Diff:
plugins/network-elements/nuage-vsp/src/net/nuage/vsp/acs/NuageVspPluginClientLoader.java
---
@@ -19,28 +19,86 @@
package net.nuage.vsp.acs;
+import net.nuage.vsp.acs.client.NuageVspApiClient;
+import net.nuage.vsp.acs.client.NuageVspElementClient;
+import net.nuage.vsp.acs.client.NuageVspGuruClient;
+import net.nuage.vsp.acs.client.NuageVspManagerClient;
+import net.nuage.vsp.acs.client.NuageVspSyncClient;
+
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
public class NuageVspPluginClientLoader {
- private static NuageVspPluginClientLoader
nuageVspPluginClientClassloader;
- private ClassLoader loader = null;
+ private ClassLoader _loader = null;
+
+ private NuageVspApiClient _nuageVspApiClient;
+ private NuageVspElementClient _nuageVspElementClient;
+ private NuageVspGuruClient _nuageVspGuruClient;
+ private NuageVspManagerClient _nuageVspManagerClient;
+ private NuageVspSyncClient _nuageVspSyncClient;
+
+ public static final String NUAGE_PLUGIN_CLIENT_JAR_FILE =
"/usr/share/nuagevsp/lib/nuage-vsp-acs-client.jar";
+ private static final String NUAGE_VSP_API_CLIENT_IMPL =
"net.nuage.vsp.acs.client.impl.NuageVspApiClientImpl";
+ private static final String NUAGE_VSP_SYNC_CLIENT_IMPL =
"net.nuage.vsp.acs.client.impl.NuageVspSyncClientImpl";
+ private static final String NUAGE_VSP_ELEMENT_CLIENT_IMPL =
"net.nuage.vsp.acs.client.impl.NuageVspElementClientImpl";
+ private static final String NUAGE_VSP_GURU_CLIENT_IMPL =
"net.nuage.vsp.acs.client.impl.NuageVspGuruClientImpl";
+ private static final String NUAGE_VSP_MANAGER_CLIENT_IMPL =
"net.nuage.vsp.acs.client.impl.NuageVspManagerClientImpl";
private NuageVspPluginClientLoader(String
nuagePluginClientJarLocation) {
try {
- loader = URLClassLoader.newInstance(new URL[] {new
URL("jar:file:" + nuagePluginClientJarLocation + "!/")},
+ _loader = URLClassLoader.newInstance(new URL[] {new
URL("jar:file:" + nuagePluginClientJarLocation + "!/")},
getClass().getClassLoader());
} catch (MalformedURLException e) {
- e.printStackTrace();
+ throw new IllegalArgumentException(e);
}
}
- public static ClassLoader getClassLoader(String
nuagePluginClientJarLocation) {
- if (nuageVspPluginClientClassloader == null) {
- nuageVspPluginClientClassloader = new
NuageVspPluginClientLoader(nuagePluginClientJarLocation);
- }
- return nuageVspPluginClientClassloader.loader;
+ public static NuageVspPluginClientLoader getClientLoader(String
relativePath, String[] cmsUserInfo, int numRetries, int retryInterval,
+ String nuageVspCmsId) throws Exception {
+ NuageVspPluginClientLoader nuageVspPluginClientClassloader = new
NuageVspPluginClientLoader(NUAGE_PLUGIN_CLIENT_JAR_FILE);
+ nuageVspPluginClientClassloader.loadClasses(relativePath,
cmsUserInfo, numRetries, retryInterval, nuageVspCmsId);
+ return nuageVspPluginClientClassloader;
+ }
+
+ private void loadClasses(String relativePath, String[] cmsUserInfo,
int numRetries, int retryInterval, String nuageVspCmsId) throws Exception {
--- End diff --
This ``throws`` is too broad. Please enumerate the expected checked
exceptions to be thrown.
> 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)