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

    https://github.com/apache/cloudstack/pull/801#discussion_r43104632
  
    --- Diff: 
plugins/network-elements/nuage-vsp/src/com/cloud/network/resource/NuageVspResource.java
 ---
    @@ -191,36 +188,26 @@ public boolean configure(String name, Map<String, 
Object> params) throws Configu
             return true;
         }
     
    -    protected void login() throws Exception {
    +    protected void login() throws ConfigurationException, 
ExecutionException {
             isNuageVspApiLoaded();
             _nuageVspApiClient.login();
         }
     
    -    protected <A extends NuageVspApiClient, B extends 
NuageVspElementClient, C extends NuageVspSyncClient, D extends 
NuageVspGuruClient> void loadNuageClient() throws Exception {
    +    protected <A extends NuageVspApiClient, B extends 
NuageVspElementClient, C extends NuageVspSyncClient, D extends 
NuageVspGuruClient> void loadNuageClient() {
     
             try {
    -            ClassLoader loader = 
NuageVspPluginClientLoader.getClassLoader(NUAGE_PLUGIN_CLIENT_JAR_FILE);
    -
    -            Class<?> nuageVspApiClientClass = 
Class.forName(NUAGE_VSP_API_CLIENT_IMPL, true, loader);
    -            Class<?> nuageVspSyncClientClass = 
Class.forName(NUAGE_VSP_SYNC_CLIENT_IMPL, true, loader);
    -            Class<?> nuageVspGuruClientClass = 
Class.forName(NUAGE_VSP_GURU_CLIENT_IMPL, true, loader);
    -            Class<?> nuageVspElementClientClass = 
Class.forName(NUAGE_VSP_ELEMENT_CLIENT_IMPL, true, loader);
    -
    -            //Instantiate the instances
    -            _nuageVspApiClient = 
(NuageVspApiClient)nuageVspApiClientClass.newInstance();
    -            _nuageVspApiClient.setNuageVspHost(_relativePath, 
_cmsUserInfo, _numRetries, _retryInterval);
    -            _nuageVspSyncClient = 
(NuageVspSyncClient)nuageVspSyncClientClass.newInstance();
    -            _nuageVspSyncClient.setNuageVspApiClient(_nuageVspApiClient);
    -            _nuageVspGuruClient = 
(NuageVspGuruClient)nuageVspGuruClientClass.newInstance();
    -            _nuageVspGuruClient.setNuageVspApiClient(_nuageVspApiClient);
    -            _nuageVspElementClient = 
(NuageVspElementClient)nuageVspElementClientClass.newInstance();
    -            
_nuageVspElementClient.setNuageVspApiClient(_nuageVspApiClient);
    +            NuageVspPluginClientLoader clientLoader = 
NuageVspPluginClientLoader.getClientLoader(_relativePath, _cmsUserInfo, 
_numRetries, _retryInterval, _nuageVspCmsId);
    +            _nuageVspApiClient = clientLoader.getNuageVspApiClient();
    +            _nuageVspSyncClient = clientLoader.getNuageVspSyncClient();
    +            _nuageVspGuruClient = clientLoader.getNuageVspGuruClient();
    +            _nuageVspElementClient = 
clientLoader.getNuageVspElementClient();
    +            _nuageVspManagerClient = 
clientLoader.getNuageVspManagerClient();
                 _isNuageVspClientLoaded = true;
    -        } catch (Exception e) {
    +        } catch (ConfigurationException e) {
                 _isNuageVspClientLoaded = false;
                 String errorMessage = "Nuage Vsp Plugin client is not yet 
installed. Please install NuageVsp plugin client to use NuageVsp plugin in 
Cloudstack. ";
                 s_logger.warn(errorMessage + e.getMessage());
    --- End diff --
    
    Done and done.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to