605 Commits

Author SHA1 Message Date
Daan Hoogland
4bc6bcfa9a PR1102 regression fix; half the annotation was removed at several locations 2015-11-23 19:18:35 +01:00
Remi Bergsma
a2a72887d2 Merge pull request #1021 from koushik-das/CLOUDSTACK-8485
CLOUDSTACK-8485: listAPIs are taking too long to return results- Removed regex. based search/replace of sensitive data on API response introduced as part of commit b0c6d4734724358df97b6fa4d8c5beb0f447745e
- Added new response serializer to skip sensitive data from getting logged based on annotation present in resposne object fields
- Added annotation (@LogLevel(Log4jLevel.Off)) to sensitive response object fields

Ran the following tests on simulator:

test_vm_life_cycle.py

Test advanced zone virtual router ... === TestName: test_advZoneVirtualRouter | Status : SUCCESS ===
ok
Test Deploy Virtual Machine ... === TestName: test_deploy_vm | Status : SUCCESS ===
ok
Test Multiple Deploy Virtual Machine ... === TestName: test_deploy_vm_multiple | Status : SUCCESS ===
ok
Test Stop Virtual Machine ... === TestName: test_01_stop_vm | Status : SUCCESS ===
ok
Test Start Virtual Machine ... === TestName: test_02_start_vm | Status : SUCCESS ===
ok
Test Reboot Virtual Machine ... === TestName: test_03_reboot_vm | Status : SUCCESS ===
ok
Test destroy Virtual Machine ... === TestName: test_06_destroy_vm | Status : SUCCESS ===
ok
Test recover Virtual Machine ... === TestName: test_07_restore_vm | Status : SUCCESS ===
ok
Test migrate VM ... === TestName: test_08_migrate_vm | Status : SUCCESS ===
ok
Test destroy(expunge) Virtual Machine ... === TestName: test_09_expunge_vm | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 10 tests in 306.429s

OK

test_volumes.py

Download a Volume attached to a VM ... === TestName: test_03_download_attached_volume | Status : SUCCESS ===
ok
Delete a Volume attached to a VM ... === TestName: test_04_delete_attached_volume | Status : SUCCESS ===
ok
Detach a Volume attached to a VM ... === TestName: test_05_detach_volume | Status : SUCCESS ===
ok
Delete a Volume unattached to an VM ... === TestName: test_09_delete_detached_volume | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 4 tests in 184.132s

OK

test_network.py

Test for delete account ... === TestName: test_delete_account | Status : SUCCESS ===
ok
Test for Associate/Disassociate public IP address for admin account ... === TestName: test_public_ip_admin_account | Status : SUCCESS ===
ok
Test for Associate/Disassociate public IP address for user account ... === TestName: test_public_ip_user_account | Status : SUCCESS ===
ok
Test for release public IP address ... === TestName: test_releaseIP | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 4 tests in 783.726s

OK

test_routers.py

Test router internal advanced zone ... SKIP: Marvin configuration has no host credentials                            to check router services
Test restart network ... === TestName: test_03_restart_network_cleanup | Status : SUCCESS ===
ok
Test router basic setup ... === TestName: test_05_router_basic | Status : SUCCESS ===
ok
Test router advanced setup ... === TestName: test_06_router_advanced | Status : SUCCESS ===
ok
Test stop router ... === TestName: test_07_stop_router | Status : SUCCESS ===
ok
Test start router ... === TestName: test_08_start_router | Status : SUCCESS ===
ok
Test reboot router ... === TestName: test_09_reboot_router | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 7 tests in 42.958s

OK (SKIP=1)

test_global_settings.py

test update configuration setting at zone level scope ... === TestName: test_UpdateConfigParamWithScope | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 1 test in 0.127s

OK

test_resource_detail.py

Test volume detail ... === TestName: test_01_updatevolumedetail | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 1 test in 11.492s

OK

* pr/1021:
  CLOUDSTACK-8485: listAPIs are taking too long to return results - Removed regex. based search/replace of sensitive data on API response introduced as part of commit b0c6d4734724358df97b6fa4d8c5beb0f447745e - Added new response serializer to skip sensitive data from getting logged based on annotation present in resposne object fields - Added new parameter 'isSensitive' to @Param for marking a field as sensitive in response objects

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-23 12:56:25 +01:00
Remi Bergsma
a6b6f4104d Merge pull request #1102 from rafaelweingartner/master-lrg-cs-hackday-006
Removed unnecessary @Local annotations and their respective importsFollowing @rafaelweingartner 's findings in PR #714 that many spring beans contained an @Local annotation, we've decided to remove said annotations and their imports from the ComponentLifecycleBase class and its subclasses seeking a reduction of a few hundred lines of useless code.

I had already opened a pull request for this (#853) but at some point my commit disappeared from the PR entirely, showing no new changes in code, which caused it to be merged automatically (with no changes).

* pr/1102:
  Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses.

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-23 11:25:43 +01:00
Remi Bergsma
a3234349b9 Merge pull request #1019 from DaanHoogland/PMD
findbugs: ! equals instead of !=simple pmd warning fixed

* pr/1019:
  use equals instead of comparison operators on strings
  findbugs: instead of !=, use string utils

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-22 13:20:53 +01:00
cirstofolini
1a64c247ad Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses. 2015-11-21 18:31:11 -02:00
Koushik Das
e13df96348 CLOUDSTACK-8485: listAPIs are taking too long to return results
- Removed regex. based search/replace of sensitive data on API response introduced as part of commit b0c6d4734724358df97b6fa4d8c5beb0f447745e
- Added new response serializer to skip sensitive data from getting logged based on annotation present in resposne object fields
- Added new parameter 'isSensitive' to @Param for marking a field as sensitive in response objects
2015-11-20 16:40:53 +05:30
Remi Bergsma
219da64027 Merge pull request #935 from nvazquez/from4.5.1
CLOUDSTACK-8956: NSX/Nicira Plugin does not support NSX v4.2.1JIRA Ticket: https://issues.apache.org/jira/browse/CLOUDSTACK-8956

### Description of the problem:
Prior to version 4.2. Nicira/VmWare NSX used a variation of Open vSwitch as means of integrating SDN into hypervisor layer. Cloudstack NiciraNVP plugin was written to support OVS as a bridge to NSX.
In version 4.2 VMware introduced NSX vSwitch as a replacement for OVS in ESX hypervisors. It is a fork of distributed vSwitch leveraging one of the recent features of ESX called opaque networks. Because of that change the current version of NiciraNVP plugin doesnt support versions of NSX-MH above 4.2 specifically in Vsphere environment. Proposed fix will analyze a version of NVP/NSX API and use proper support for ESX hypervisors.

vSphere hypervisor mode operations when NV is deployed onto NSX managed network changes:
* Current mode. A portgroup = UUID of CS VM NIC is created on a local standard switch of the Hypervisor where VM is starting. VM nic is attached to that port group.
* New mode. No additional port group is created on a HW. No port group cleanup is needed after VM/NIC is destroyed. VM is attached to 1st port group having the following attributes:
** opaqueNetworkId string "br-int
** opaqueNetworkType string "nsx.network"

If portgroup with such attributes is not found a deployment should fail with exception.

### VMware vSphere API version from 5.1 to 5.5:
Since vSphere API version 5.5, [OpaqueNetworks](https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.OpaqueNetwork.html) are introduced.
Its description says:
> This interface defines an opaque network, in the sense that the detail and configuration of the network is unknown to vShpere and is managed by a management plane outside of vSphere. However, the identifier and name of these networks is made available to vSphere so that host and virtual machine virtual ethernet device can connect to them.

In order to connect a vm's virtual ethernet device to the proper opaque network when deploying a vm into a NSX managed network, we first need to look for a particular opaque network on hosts. This opaque network's id has to be **"br-int"** and its type **"nsx.network"**.

Since vSphere API version 5.5 [HostNetworkInfo](https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.host.NetworkInfo.html#opaqueNetwork) introduces a list of available opaque networks for each host.
If NSX API version >= 4.2 we look for a [OpaqueNetworkInfo](https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.host.OpaqueNetworkInfo.html) which satisfies:
* opaqueNetworkId = "br-int"
* opaqueNetworkType = "nsx.netork"

If that opaque network is found, then we need to attach vm's NIC to a virtual ethernet device which support this, so we use [VirtualEthernetCardOpaqueNetworkBackingInfo](https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.vm.device.VirtualEthernetCard.OpaqueNetworkBackingInfo.html) setting:
* opaqueNetworkId = "br-int"
* opaqueNetworkType = "nsx.netork"

* pr/935:
  CLOUDSTACK-8956: Remove assert(false) on opaque network and ping method on NiciraNvpApiVersion
  CLOUDSTACK-8956: Deploy VM on NSX managed network changes if NSX Api Version >= 4.2: has to connect to "br-int" of "nsx.network" type
  CLOUDSTACK-8956: Log NSX Api Version
  CLOUDSTACK-8956: Add VMware Api v5.5 and change pom.xml to use VMware Api v5.5

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-18 13:11:25 +01:00
Remi Bergsma
95ae7963d5 Merge pull request #801 from nlivens/updated-nuage-vsp-plugin
CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2

* pr/801:
  CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-18 12:09:09 +01:00
nvazquez
b20c5be1ce CLOUDSTACK-8956: Remove assert(false) on opaque network and ping method on NiciraNvpApiVersion 2015-11-16 11:29:31 -08:00
nvazquez
2386ae5e5a CLOUDSTACK-8956: Log NSX Api Version 2015-11-16 11:29:30 -08:00
Daan Hoogland
3d5f09357b use equals instead of comparison operators on strings 2015-11-16 18:30:36 +01:00
Daan Hoogland
9a798c537e findbugs: instead of !=, use string utils 2015-11-16 18:30:36 +01:00
Remi Bergsma
1f53f2a93e Updating pom.xml version numbers for release 4.7.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-15 18:54:13 +01:00
Nick Livens
645f8758df CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2 2015-10-27 14:56:57 +01:00
Boris Schrijver
80cb3adad0 Added isEmpty() check to prevent nullPointerException. 2015-09-23 15:07:16 +02:00
wilderrodrigues
6e426fa46d Revert "Merge pull request #825 from borisroman/charset"
This reverts commit a44e2bff7ec0c1548d89722c40488746454adce1, reversing
changes made to 06cefaf493423c953a95ee92482a2d0a20a21095.

We are reverting the PR #825 because it breaks Master.
2015-09-15 14:58:18 +02:00
Boris Schrijver
71929fdedd Replaced all occurences of Charset.forName(UTF-8) with StringUtils.getPreferredCharset(). 2015-09-15 12:00:33 +02:00
Rajani Karuturi
8bc0294014 Revert "Merge pull request #714 from rafaelweingartner/master-lrg-cs-hackday-003"
This reverts commit cd7218e241a8ac93df7a73f938320487aa526de6, reversing
changes made to f5a7395cc2ec37364a2e210eac60720e9b327451.

Reason for Revert:

noredist build failed with the below error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project cloud-plugin-hypervisor-vmware: Compilation failure
[ERROR] /home/jenkins/acs/workspace/build-master-noredist/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java:[484,12] error: non-static variable logger cannot be referenced from a static context
[ERROR] -> [Help 1]

even the normal build is broken as reported by @koushik-das on dev list
http://markmail.org/message/nngimssuzkj5gpbz
2015-08-31 11:27:57 +05:30
Rafael Weingartner
3818257a68 Solved jira ticket: CLOUDSTACK-8750 2015-08-28 22:35:08 -03:00
Miguel Ferreira
09f7153378 Use NSX specific RestClient in API implementation (NiciraNvpApi)
- Simplify public API to return Lists instead of NiciraNvpLists
2015-08-25 17:36:17 +02:00
Miguel Ferreira
c6602ee151 Refactor NSX api implementation (NiciraNvpApi)
- Make internal method private
- Remove unused methods
- Refactor type deserialization adapter classes out
2015-08-25 17:36:16 +02:00
Miguel Ferreira
18e6b9ba78 Add NSX specific RestClient implementation
- Add -noverify JVM arg to surefire plugin, to allow Powermockito to
  de-encapsulate private methods
- Add dependency on cloud-utils test-jar to use custom HttpRequest
  matchers
2015-08-25 17:36:15 +02:00
Miguel Ferreira
6e74ef8e40 Code clean up in cloud-plugin-network-nvp project
- Code formatting
- Declare final where possible
- Remove unused methods
- Remove throws declarations where not needed
- Remove generated comments (e.g. "TODO Auto-generated method stub")
2015-08-25 17:36:12 +02:00
Miguel Ferreira
93b0989dea Refactor cloud-plugin-network-nvp project into Maven default structure 2015-08-25 17:36:10 +02:00
Boris Schrijver
4b88eabef1 Fix for the NicVO.java regression.
Renamed set*() methods to correct naming.
2015-08-21 14:03:00 +02:00
Boris Schrijver
c30ba1df0b Refactored Nic.java for readability.
Changed methodnames according to Nic.java refactor.

Fixed NicVO.java due to regression from Nic.java refactor.

Fixed VmWareGuru.java after Nic.java refactor.

See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.
2015-08-18 14:04:48 +02:00
Boris Schrijver
5db3371840 Refactored NicProfile.java for readability.
See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.
2015-08-17 14:12:10 +02:00
Daan Hoogland
87fb09997d CLOUDSTACK-8656: return false from equals if not the same class
why ignore the exception and then return false anyway?
2015-08-04 14:38:48 +02:00
Daan Hoogland
21fd2b9b8e CLOUDSTACK-8656: config file closing should not throw an exception
but log it if it does anyway
2015-08-04 14:37:07 +02:00
Daan Hoogland
e2b6237464 CLOUDSTACK-8656: debug messages on interupted exceptions 2015-07-30 16:03:10 +02:00
Daan Hoogland
85e002b230 CLOUDSTACK-8656: filling empty catch block with info messages
using regexp "catch\s*\(\s*(Exception|Throwable)\s*\w*\)\s*\{\s*\}"
2015-07-30 15:51:52 +02:00
Sten Spans
e63a56d650 Update NiciraNvpGuestNetworkGuruTest.java
add partial vxlan tests
2015-07-30 12:47:49 +02:00
Sten Spans
d03505acc2 Update NiciraNvpGuestNetworkGuru.java
Add support for VXLAN as isolation method
2015-07-29 15:45:41 +02:00
wilderrodrigues
96ad6f6ccd CLOUDSTACK-8590 - Refactoring NiciraNVP resource
- Change the retry() method to return Answer.createUnsupportedCommandAnswer(command) instead of throwing an exception

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #546
2015-07-01 15:04:58 +02:00
wilderrodrigues
c6013303e9 CLOUDSTACK-8590 - Refactoring NiciraNVP resource
- Increasing test coverage
     - resource package: 86.7%
     - utils package: 95.1%
     - wrapper package: 97.5%

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-07-01 15:04:58 +02:00
wilderrodrigues
644458f5ac CLOUDSTACK-8590 - Refactoring NiciraNVP resource
- Adding remaining command wrappers

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-07-01 15:04:58 +02:00
wilderrodrigues
b54126918b CLOUDSTACK-8590 - Refactoring NiciraNVP resource
- Adding NiciraNvpCreateLogicalRouterCommandWrapper
   - Adding NiciraNvpDeleteLogicalSwitchPortCommandWrapper
   - Adding NiciraNvpFindLogicalSwitchPortCommandWrapper
   - Adding NiciraNvpUpdateLogicalSwitchPortCommandWrapper
   - Decoupling private methods from NiciraNvpResource

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-07-01 15:04:57 +02:00
wilderrodrigues
b4ce81ab6c CLOUDSTACK-8590 - Refactoring NiciraNVP resource
- Adding NiciraNvpDeleteLogicalSwitchPortCommandWrapper

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-07-01 15:04:57 +02:00
wilderrodrigues
361ab5ddbd CLOUDSTACK-8590 - Refactoring NiciraNVP resource
- Adding NiciraNvpCreateLogicalSwitchPortCommandWrapper
   - Removing unsued field from NiciraNvpResourceTest

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-07-01 15:04:57 +02:00
wilderrodrigues
28c1da969d CLOUDSTACK-8590 - Refactoring NiciraNVP resource
- Adding command wrappers NiciraNvpCreateLogicalSwitchCommandWrapper and NiciraNvpDeleteLogicalSwitchCommandWrapper
   - Refactoring the retry mechanism
   - Applying the new retry mechanism to current wrappers and old methods in NiciraNvpResource
   - Adding 2 tests
   - Fixing the testRetries() in NiciraNvpResourceTest class

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-07-01 15:04:57 +02:00
wilderrodrigues
27c9651b32 CLOUDSTACK-8590 - Refactoring NiciraNVP resource
- Refactoring NiciraNvpResource
   - Added NiciraNvpUtilities and NiciraNvpCreateLogicalSwitchCommandWrapper
   - Removing 1 execute methods form NiciraNvpResource
   - Added 1 unit test

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-07-01 15:04:56 +02:00
wilderrodrigues
6a51294d19 CLOUDSTACK-8590 - Refactoring NiciraNVP resource
- Refactoring NiciraNvpResource
   - Added NiciraNvpMaintainCommandWrapper
   - Removing 1 execute methods form NiciraNvpResource
   - Added 1 unit test

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-07-01 15:04:56 +02:00
wilderrodrigues
0d943d5426 CLOUDSTACK-8590 - Refactoring NiciraNVP resource
- Refactoring NiciraNvpResource
   - Added NiciraNvpRequestWrapper
   - Removing 1 execute methods form NiciraNvpResource
   - Added 1 unit test

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-07-01 15:04:56 +02:00
wilderrodrigues
fc478604e8 CLOUDSTACK-8590 - Refactoring NiciraNVP resource
- Adding the NiciraNvpWrapper
  - This class will keep track of all Wrappers of the Nicira NVP Plugin

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-07-01 15:04:56 +02:00
Rafael da Fonseca
34d097f349 Fix 4 findbugs warnings in JuniperSrxResource Data should be read and written in UTF-8 to the SRX Buffers were being used for reading but not for writing, PrintWriter was auto-flushing and code was explicitly flushing again, causing unnecessary operation to be performed.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #399
2015-06-15 21:49:43 +03:00
Rafael da Fonseca
6f330f7ab6 Fix findbugs warning in PaloAltoResource.java Unnecessary boxing/unboxing of primitive value
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #427
2015-06-15 12:09:43 +03:00
Rafael da Fonseca
1494487f72 Fix findbugs warning in NetscalerResource.java Unnecessary boxing/unboxing of primitive value
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #426
2015-06-15 12:09:41 +03:00
Rafael da Fonseca
980d858c34 Add import statements, remove unused FileReader import
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #393
2015-06-15 12:07:49 +03:00
Rafael da Fonseca
9ad8c70baa Fix findbugs encoding warning, all .xml files contain only utf-8/us-ascii compatible characters
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-15 12:07:49 +03:00
Rafael da Fonseca
509c83bc74 Fix findbugs encoding warning in JuniperSrxResource All .xml files contain only utf-8/us-ascii compatible characters. If special characters are added to these files in the future, UTF-8 should be used for cross platform compatibility
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #398
2015-06-15 12:03:56 +03:00