Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOUDSTACK-10057: listNetworkOfferings now returns the correct number of offerings. #2250

Merged
merged 1 commit into from
Oct 31, 2017

Conversation

sgoeminn
Copy link
Contributor

@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1057

@rohityadavcloud
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-1475)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 40440 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2250-t1475-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_deploy_virtio_scsi_vm.py
Intermitten failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Intermitten failure detected: /marvin/tests/smoke/test_iso.py
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Test completed. 57 look OK, 5 have error(s)

Test Result Time (s) Test File
test_01_vpc_remote_access_vpn Failure 65.74 test_vpc_vpn.py
test_04_rvpc_privategw_static_routes Failure 359.40 test_privategw_acl.py
test_05_iso_permissions Failure 0.04 test_iso.py
test_02_edit_iso Failure 0.04 test_iso.py
test_hostha_enable_ha_when_host_disabled Failure 5.44 test_hostha_kvm.py
test_ha_kvm_host_degraded Error 26.89 test_hostha_kvm.py
ContextSuite context=TestDeployVirtioSCSIVM>:teardown Error 38.66 test_deploy_virtio_scsi_vm.py
test_change_service_offering_for_vm_with_snapshots Skipped 0.00 test_vm_snapshots.py
test_09_copy_delete_template Skipped 0.01 test_templates.py
test_06_copy_template Skipped 0.00 test_templates.py
test_static_role_account_acls Skipped 0.02 test_staticroles.py
test_11_ss_nfs_version_on_ssvm Skipped 0.02 test_ssvm.py
test_01_scale_vm Skipped 0.00 test_scale_vm.py
test_01_primary_storage_iscsi Skipped 0.02 test_primary_storage.py
test_vm_nic_adapter_vmxnet3 Skipped 0.00 test_nic_adapter_type.py
test_nested_virtualization_vmware Skipped 0.00 test_nested_virtualization.py
test_06_copy_iso Skipped 0.00 test_iso.py
test_list_ha_for_host_valid Skipped 0.01 test_hostha_simulator.py
test_list_ha_for_host_invalid Skipped 0.01 test_hostha_simulator.py
test_list_ha_for_host Skipped 0.01 test_hostha_simulator.py
test_hostha_enable_feature_without_setting_provider Skipped 0.01 test_hostha_simulator.py
test_hostha_enable_feature_valid Skipped 0.01 test_hostha_simulator.py
test_hostha_disable_feature_valid Skipped 0.02 test_hostha_simulator.py
test_hostha_configure_invalid_provider Skipped 0.01 test_hostha_simulator.py
test_hostha_configure_default_driver Skipped 0.01 test_hostha_simulator.py
test_ha_verify_fsm_recovering Skipped 0.01 test_hostha_simulator.py
test_ha_verify_fsm_fenced Skipped 0.01 test_hostha_simulator.py
test_ha_verify_fsm_degraded Skipped 0.01 test_hostha_simulator.py
test_ha_verify_fsm_available Skipped 0.01 test_hostha_simulator.py
test_ha_multiple_mgmt_server_ownership Skipped 0.01 test_hostha_simulator.py
test_ha_list_providers Skipped 0.01 test_hostha_simulator.py
test_ha_enable_feature_invalid Skipped 0.01 test_hostha_simulator.py
test_ha_disable_feature_invalid Skipped 0.01 test_hostha_simulator.py
test_ha_configure_enabledisable_across_clusterzones Skipped 0.01 test_hostha_simulator.py
test_configure_ha_provider_valid Skipped 0.01 test_hostha_simulator.py
test_configure_ha_provider_invalid Skipped 0.02 test_hostha_simulator.py
test_deploy_vgpu_enabled_vm Skipped 0.02 test_deploy_vgpu_enabled_vm.py
test_3d_gpu_support Skipped 0.02 test_deploy_vgpu_enabled_vm.py

@@ -4788,7 +4788,7 @@ protected void validateNtwkOffDetails(final Map<Detail, String> details, final M
// Now apply pagination
final List<? extends NetworkOffering> wPagination = StringUtils.applyPagination(supportedOfferings, cmd.getStartIndex(), cmd.getPageSizeVal());
if (wPagination != null) {
final Pair<List<? extends NetworkOffering>, Integer> listWPagination = new Pair<List<? extends NetworkOffering>, Integer>(wPagination, offerings.size());
final Pair<List<? extends NetworkOffering>, Integer> listWPagination = new Pair<List<? extends NetworkOffering>, Integer>(wPagination, supportedOfferings.size());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional review and testing requested, if we need to change this line, then 4798 may have similar code as well.

Copy link
Contributor Author

@sgoeminn sgoeminn Sep 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 4798 is correct. The supportedOfferings list is build/created within the if (parseOfferings) code block. In the else case we want to return the offerings list and the size of the offerings list (supportedOfferings is also not defined in that case).

Copy link
Member

@rohityadavcloud rohityadavcloud Oct 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgoeminn why not use wPagination.size(), or is it that you want to expose the count value equal to total found/supported offerings however only return the offerings in the current page?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhtyd we always want to return the number of total found offerings and not only the number of offerings in the page that is returned. This is the same behavior as all the other list cmds.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgoeminn thanks.

@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1138

@rohityadavcloud
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-1568)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 50271 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2250-t1568-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_deploy_virtio_scsi_vm.py
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_router_dhcphosts.py
Intermitten failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermitten failure detected: /marvin/tests/smoke/test_snapshots.py
Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Test completed. 56 look OK, 6 have error(s)

Test Result Time (s) Test File
test_01_vpc_site2site_vpn Failure 165.14 test_vpc_vpn.py
test_01_vpc_remote_access_vpn Failure 56.16 test_vpc_vpn.py
test_router_dhcphosts Failure 104.43 test_router_dhcphosts.py
test_04_rvpc_privategw_static_routes Failure 654.88 test_privategw_acl.py
ContextSuite context=TestRVPCSite2SiteVpn>:setup Error 0.00 test_vpc_vpn.py
ContextSuite context=TestSnapshotRootDisk>:setup Error 0.00 test_snapshots.py
ContextSuite context=TestRedundantIsolateNetworks>:setup Error 1848.34 test_routers_network_ops.py
ContextSuite context=TestRouterDHCPHosts>:teardown Error 144.90 test_router_dhcphosts.py
ContextSuite context=TestDeployVirtioSCSIVM>:setup Error 0.00 test_deploy_virtio_scsi_vm.py
test_change_service_offering_for_vm_with_snapshots Skipped 0.00 test_vm_snapshots.py
test_09_copy_delete_template Skipped 0.02 test_templates.py
test_06_copy_template Skipped 0.00 test_templates.py
test_static_role_account_acls Skipped 0.02 test_staticroles.py
test_11_ss_nfs_version_on_ssvm Skipped 0.03 test_ssvm.py
test_01_scale_vm Skipped 0.00 test_scale_vm.py
test_01_primary_storage_iscsi Skipped 0.10 test_primary_storage.py
test_vm_nic_adapter_vmxnet3 Skipped 0.00 test_nic_adapter_type.py
test_nested_virtualization_vmware Skipped 0.00 test_nested_virtualization.py
test_06_copy_iso Skipped 0.00 test_iso.py
test_list_ha_for_host_valid Skipped 0.04 test_hostha_simulator.py
test_list_ha_for_host_invalid Skipped 0.03 test_hostha_simulator.py
test_list_ha_for_host Skipped 0.03 test_hostha_simulator.py
test_hostha_enable_feature_without_setting_provider Skipped 0.03 test_hostha_simulator.py
test_hostha_enable_feature_valid Skipped 0.03 test_hostha_simulator.py
test_hostha_disable_feature_valid Skipped 0.03 test_hostha_simulator.py
test_hostha_configure_invalid_provider Skipped 0.04 test_hostha_simulator.py
test_hostha_configure_default_driver Skipped 0.03 test_hostha_simulator.py
test_ha_verify_fsm_recovering Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_fenced Skipped 0.03 test_hostha_simulator.py
test_ha_verify_fsm_degraded Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_available Skipped 0.03 test_hostha_simulator.py
test_ha_multiple_mgmt_server_ownership Skipped 0.03 test_hostha_simulator.py
test_ha_list_providers Skipped 0.03 test_hostha_simulator.py
test_ha_enable_feature_invalid Skipped 0.04 test_hostha_simulator.py
test_ha_disable_feature_invalid Skipped 0.03 test_hostha_simulator.py
test_ha_configure_enabledisable_across_clusterzones Skipped 0.04 test_hostha_simulator.py
test_configure_ha_provider_valid Skipped 0.03 test_hostha_simulator.py
test_configure_ha_provider_invalid Skipped 0.03 test_hostha_simulator.py
test_deploy_vgpu_enabled_vm Skipped 0.03 test_deploy_vgpu_enabled_vm.py
test_3d_gpu_support Skipped 0.04 test_deploy_vgpu_enabled_vm.py

@fmaximus
Copy link
Contributor

I've added an extra unit test for the changed code, to keep the history intact in relation to the Trillian Tests, I have not squashed yet. I will squash once we have approval.

@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1154

@@ -4788,7 +4788,7 @@ protected void validateNtwkOffDetails(final Map<Detail, String> details, final M
// Now apply pagination
final List<? extends NetworkOffering> wPagination = StringUtils.applyPagination(supportedOfferings, cmd.getStartIndex(), cmd.getPageSizeVal());
if (wPagination != null) {
final Pair<List<? extends NetworkOffering>, Integer> listWPagination = new Pair<List<? extends NetworkOffering>, Integer>(wPagination, offerings.size());
final Pair<List<? extends NetworkOffering>, Integer> listWPagination = new Pair<List<? extends NetworkOffering>, Integer>(wPagination, supportedOfferings.size());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fmaximus
Copy link
Contributor

@rhtyd Do you agree to merge this? I have squashed both commits, but somehow Jenkins fails to report back its state, and the build is gone (hooray for only keeping 5 PR builds).

@fmaximus fmaximus added this to the 4.11 milestone Oct 30, 2017
@krissterckx
Copy link
Contributor

@rhtyd @fmaximus Can this be merged in ? thanks

@rohityadavcloud
Copy link
Member

LGTM, sure @fmaximus @krissterckx we can merge this.

@rohityadavcloud rohityadavcloud merged commit 587b66d into apache:master Oct 31, 2017
@fmaximus fmaximus deleted the CLOUDSTACK-10057 branch November 2, 2017 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants