Merge pull request #1494 from nlivens/master_nuage Remodeling of Nuage VSP Plugin + CLOUDSTACK-9294Hi all,
We've remodeled the Nuage VSP plugin to use the same model as VMWare is using (non-OSS). Before, we had a runtime dependency to the Nuage Client, this has been changed to a compile-time dependency instead because of multiple reasons (build management, readability, maintainability, ...) We've adapted the code so it now uses model objects defined in the Nuage client instead of passing a list of parameters to the Nuage client. This is a lot more readable, and a lot more maintainable. I've had a chat with @DaanHoogland about this approach, and he told me that ACS is trying to move away from the whole non-OSS approach. We're looking into the Juniper approach, we would set up a custom maven repository which would host the required dependencies for the Nuage VSP plugin. Any remarks or suggestions are always welcome :) * pr/1494: Nuage VSP : Extending Marvin test coverage Nuage VSP : Fix for NPE while cleaning up account when there are still resources belonging to that account CLOUDSTACK-9294 : Make sure to remove VR from VSD when removing the VPC CLOUDSTACK-9242 : Remodel Nuage VSP plugin Signed-off-by: Will Stevens <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/05a7becc Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/05a7becc Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/05a7becc Branch: refs/heads/master Commit: 05a7beccfe9c2cd406908062b8833ff4c8a98431 Parents: 2d825dd 2ca0d9b Author: Will Stevens <[email protected]> Authored: Wed May 25 22:58:10 2016 -0400 Committer: Will Stevens <[email protected]> Committed: Wed May 25 22:58:10 2016 -0400 ---------------------------------------------------------------------- .../src/com/cloud/vm/dao/DomainRouterDao.java | 2 + .../com/cloud/vm/dao/DomainRouterDaoImpl.java | 8 + plugins/network-elements/nuage-vsp/pom.xml | 12 +- .../cloudstack/vsp/spring-vsp-context.xml | 2 +- .../com/cloud/agent/api/VspResourceAnswer.java | 60 --- .../com/cloud/agent/api/VspResourceCommand.java | 119 ------ .../api/element/ApplyAclRuleVspCommand.java | 184 +-------- .../api/element/ApplyStaticNatVspCommand.java | 101 +---- .../agent/api/element/ImplementVspCommand.java | 238 +---------- .../api/element/ShutDownVpcVspCommand.java | 36 +- .../agent/api/guru/DeallocateVmVspCommand.java | 187 +-------- .../api/guru/ImplementNetworkVspCommand.java | 304 +------------- .../api/guru/ReserveVmInterfaceVspCommand.java | 369 ++--------------- .../agent/api/guru/TrashNetworkVspCommand.java | 101 +---- .../agent/api/manager/GetApiDefaultsAnswer.java | 61 +++ .../api/manager/GetApiDefaultsCommand.java | 38 ++ .../api/manager/GetClientDefaultsAnswer.java | 81 ---- .../api/manager/GetClientDefaultsCommand.java | 38 -- .../cloud/agent/api/sync/SyncDomainCommand.java | 31 +- .../cloud/agent/api/sync/SyncVspCommand.java | 62 --- .../api/commands/AddNuageVspDeviceCmd.java | 24 +- .../api/commands/DeleteNuageVspDeviceCmd.java | 12 +- .../IssueNuageVspResourceRequestCmd.java | 213 ---------- .../api/commands/ListNuageVspDevicesCmd.java | 12 +- .../api/commands/UpdateNuageVspDeviceCmd.java | 12 +- .../cloud/network/element/NuageVspElement.java | 258 ++++-------- .../network/guru/NuageVspGuestNetworkGuru.java | 301 ++++---------- .../cloud/network/manager/NuageVspManager.java | 2 + .../network/manager/NuageVspManagerImpl.java | 130 +++--- .../network/resource/NuageVspResource.java | 154 +++---- .../com/cloud/network/sync/NuageVspSync.java | 26 -- .../cloud/network/sync/NuageVspSyncImpl.java | 65 --- .../com/cloud/util/NuageVspEntityBuilder.java | 370 +++++++++++++++++ .../src/com/cloud/util/NuageVspUtil.java | 9 +- .../vsp/acs/NuageVspPluginClientLoader.java | 91 ++-- .../nuage/vsp/acs/client/NuageVspApiClient.java | 32 -- .../vsp/acs/client/NuageVspElementClient.java | 42 -- .../vsp/acs/client/NuageVspGuruClient.java | 43 -- .../vsp/acs/client/NuageVspManagerClient.java | 42 -- .../vsp/acs/client/NuageVspSyncClient.java | 29 -- .../nuage-vsp/test/com/cloud/NuageTest.java | 157 +++++++ .../test/com/cloud/agent/api/CommandsTest.java | 63 +-- .../network/element/NuageVspElementTest.java | 202 +++++---- .../guru/NuageVspGuestNetworkGuruTest.java | 216 +++++----- .../network/manager/NuageVspManagerTest.java | 73 ++-- .../network/resource/NuageVspResourceTest.java | 124 +++--- .../cloud/network/sync/NuageVspSyncTest.java | 72 ---- .../cloud/util/NuageVspEntityBuilderTest.java | 412 +++++++++++++++++++ plugins/pom.xml | 12 +- .../plugins/nuagevsp/nuageTestCase.py | 8 +- .../plugins/nuagevsp/test_nuage_vpc_network.py | 28 +- tools/marvin/marvin/deployDataCenter.py | 17 +- ui/scripts/system.js | 4 +- 53 files changed, 1925 insertions(+), 3364 deletions(-) ----------------------------------------------------------------------
