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 <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a2a72887
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a2a72887
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a2a72887

Branch: refs/heads/master
Commit: a2a72887d205f9ed51c0b31014ab3bd6e571ea4d
Parents: 36d0bfd e13df96
Author: Remi Bergsma <[email protected]>
Authored: Mon Nov 23 12:56:24 2015 +0100
Committer: Remi Bergsma <[email protected]>
Committed: Mon Nov 23 12:56:25 2015 +0100

----------------------------------------------------------------------
 api/src/com/cloud/serializer/Param.java         |   2 +
 .../api/response/CreateSSHKeyPairResponse.java  |   3 +-
 .../api/response/GetVMPasswordResponse.java     |   2 +-
 .../api/response/LoginCmdResponse.java          |   2 +-
 .../api/response/RegisterResponse.java          |   4 +-
 .../api/response/RemoteAccessVpnResponse.java   |   2 +-
 .../Site2SiteCustomerGatewayResponse.java       |   2 +-
 .../Site2SiteVpnConnectionResponse.java         |   2 +-
 .../cloudstack/api/response/UserResponse.java   |   4 +-
 .../cloudstack/api/response/UserVmResponse.java |   2 +-
 .../response/BigSwitchBcfDeviceResponse.java    |   2 +-
 .../api/response/LDAPConfigResponse.java        |   2 +-
 .../com/cloud/api/ApiResponseGsonHelper.java    |  33 ++++-
 server/src/com/cloud/api/ApiServer.java         |  15 +-
 server/src/com/cloud/api/ApiServlet.java        |   5 +-
 .../api/response/ApiResponseSerializer.java     | 148 +++++++++++++------
 16 files changed, 153 insertions(+), 77 deletions(-)
----------------------------------------------------------------------


Reply via email to