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

Fixed list networks in projects after setting network permissions #6546

Merged

Conversation

harikrishna-patnala
Copy link
Contributor

@harikrishna-patnala harikrishna-patnala commented Jul 12, 2022

Description

This PR fixes #6544 where it could not list networks in a project even after network permissions are set.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

  1. Created multiple networks N1, N2
  2. Created a project P1
  3. Created a user U1
  4. Under network permissions in N1, added the project P1
  5. Under network permissions in N2, added the user account U1
  6. When switched to project view P1, I see only network N1
  7. When logged in as U1, I see only N2

@harikrishna-patnala
Copy link
Contributor Author

harikrishna-patnala commented Jul 12, 2022

@blueorangutan package

@blueorangutan
Copy link

@harikrishna-patnala a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3752

@boring-cyborg boring-cyborg bot added component:integration-test Python Warning... Python code Ahead! labels Jul 12, 2022
@harikrishna-patnala harikrishna-patnala marked this pull request as ready for review July 12, 2022 09:36
Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

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

code LGTM, needs testing.

@harikrishna-patnala
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@harikrishna-patnala a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3753

@harikrishna-patnala
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian test result (tid-4499)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 41401 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6546-t4499-kvm-centos7.zip
Smoke tests completed. 99 look OK, 1 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Failure 461.68 test_vpc_redundant.py

@attr(tags=["advanced"], required_hardware="false")
def test_06_list_networks_under_account(self):
""" Testing list networks under an account """
self.create_network_permission(self.apiclient, self.user_network, self.domain_admin, None, expected=True)
Copy link
Member

Choose a reason for hiding this comment

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

@harikrishna-patnala
would it be good to create network permission to otheruser (not domain_admin) as well ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added few more checks in the same test case @weizhouapache

@harikrishna-patnala
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@harikrishna-patnala a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@acs-robot
Copy link
Collaborator

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan
Copy link

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6546 (SL-JID-1986)

@blueorangutan
Copy link

Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 3792

@blueorangutan
Copy link

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

@sonarcloud
Copy link

sonarcloud bot commented Jul 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@blueorangutan
Copy link

Trillian test result (tid-4544)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 40144 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6546-t4544-kvm-centos7.zip
Smoke tests completed. 83 look OK, 18 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_ISO_usage Error 1.07 test_usage.py
test_01_lb_usage Error 3.17 test_usage.py
test_01_nat_usage Error 6.21 test_usage.py
test_01_public_ip_usage Error 1.06 test_usage.py
test_01_snapshot_usage Error 20.52 test_usage.py
test_01_template_usage Error 9.34 test_usage.py
test_01_vm_usage Error 133.50 test_usage.py
test_01_volume_usage Error 125.85 test_usage.py
test_01_vpn_usage Error 8.36 test_usage.py
test_01_deployVMInSharedNetwork Error 63.81 test_network.py
test_03_destroySharedNetwork Failure 1.05 test_network.py
ContextSuite context=TestSharedNetwork>:teardown Error 2.13 test_network.py
test_01_snapshot_root_disk Error 4.25 test_snapshots.py
test_query_async_job_result Error 82.78 test_async_job.py
test_revoke_certificate Error 0.01 test_certauthority_root.py
login_test_saml_user Error 2.46 test_login.py
test_01_positive_tests_usage Error 7.87 test_usage_events.py
test_role_account_acls_multiple_mgmt_servers Error 1.91 test_dynamicroles.py
test_02_edit_primary_storage_tags Error 0.02 test_primary_storage.py
test_01_vpc_privategw_acl Error 101.84 test_privategw_acl.py
test_02_vpc_privategw_static_routes Error 302.01 test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup Error 297.46 test_privategw_acl.py
test_04_rvpc_privategw_static_routes Error 528.51 test_privategw_acl.py
test_01_vpc_privategw_acl Error 0.02 test_privategw_acl_ovs_gre.py
test_03_vpc_privategw_restart_vpc_cleanup Error 0.02 test_privategw_acl_ovs_gre.py
test_05_vpc_privategw_check_interface Error 0.01 test_privategw_acl_ovs_gre.py
test_oobm_background_powerstate_sync Failure 21.47 test_outofbandmanagement.py
test_oobm_background_powerstate_sync Error 21.47 test_outofbandmanagement.py
test_oobm_configure_default_driver Error 0.04 test_outofbandmanagement.py
test_oobm_configure_invalid_driver Error 0.04 test_outofbandmanagement.py
test_oobm_disable_feature_invalid Error 0.05 test_outofbandmanagement.py
test_oobm_disable_feature_valid Error 1.11 test_outofbandmanagement.py
test_oobm_enable_feature_invalid Error 0.05 test_outofbandmanagement.py
test_oobm_enable_feature_valid Error 1.09 test_outofbandmanagement.py
test_oobm_enabledisable_across_clusterzones Error 5.53 test_outofbandmanagement.py
test_oobm_enabledisable_across_clusterzones Error 5.53 test_outofbandmanagement.py
test_oobm_issue_power_cycle Error 2.22 test_outofbandmanagement.py
test_oobm_issue_power_cycle Error 2.22 test_outofbandmanagement.py
test_oobm_issue_power_off Error 4.25 test_outofbandmanagement.py
test_oobm_issue_power_off Error 4.25 test_outofbandmanagement.py
test_oobm_issue_power_on Error 4.24 test_outofbandmanagement.py
test_oobm_issue_power_on Error 4.24 test_outofbandmanagement.py
test_oobm_issue_power_reset Error 4.24 test_outofbandmanagement.py
test_oobm_issue_power_reset Error 4.24 test_outofbandmanagement.py
test_oobm_issue_power_soft Error 4.25 test_outofbandmanagement.py
test_oobm_issue_power_soft Error 4.25 test_outofbandmanagement.py
test_oobm_issue_power_status Error 4.24 test_outofbandmanagement.py
test_oobm_issue_power_status Error 4.25 test_outofbandmanagement.py
test_oobm_multiple_mgmt_server_ownership Error 1.11 test_outofbandmanagement.py
test_oobm_multiple_mgmt_server_ownership Error 1.11 test_outofbandmanagement.py
test_oobm_zchange_password Error 1.14 test_outofbandmanagement.py
test_oobm_zchange_password Error 1.14 test_outofbandmanagement.py
test_oobm_issue_power_cycle Error 1.16 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_cycle Error 1.16 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_off Error 2.16 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_off Error 2.16 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_on Error 2.18 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_on Error 2.18 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_reset Error 2.17 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_reset Error 2.17 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_soft Error 2.17 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_soft Error 2.17 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_status Error 1.17 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_status Error 1.18 test_outofbandmanagement_nestedplugin.py
test_01_invalid_upgrade_kubernetes_cluster Failure 204.09 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 225.89 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 0.05 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.03 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.03 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.03 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.03 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 84.78 test_kubernetes_clusters.py
test_01_add_delete_kubernetes_supported_version Error 0.21 test_kubernetes_supported_versions.py
test_configure_ha_provider_invalid Error 0.01 test_hostha_simulator.py
test_configure_ha_provider_valid Error 0.01 test_hostha_simulator.py
test_ha_configure_enabledisable_across_clusterzones Error 0.01 test_hostha_simulator.py
test_ha_disable_feature_invalid Error 0.01 test_hostha_simulator.py
test_ha_enable_feature_invalid Error 0.01 test_hostha_simulator.py
test_ha_list_providers Error 0.01 test_hostha_simulator.py
test_ha_multiple_mgmt_server_ownership Error 0.01 test_hostha_simulator.py
test_ha_verify_fsm_available Error 0.01 test_hostha_simulator.py
test_ha_verify_fsm_degraded Error 0.01 test_hostha_simulator.py
test_ha_verify_fsm_fenced Error 0.01 test_hostha_simulator.py
test_ha_verify_fsm_recovering Error 0.01 test_hostha_simulator.py
test_hostha_configure_default_driver Error 0.01 test_hostha_simulator.py
test_hostha_configure_invalid_provider Error 0.01 test_hostha_simulator.py
test_hostha_disable_feature_valid Error 0.01 test_hostha_simulator.py
test_hostha_enable_feature_valid Error 0.01 test_hostha_simulator.py
test_hostha_enable_feature_without_setting_provider Error 0.01 test_hostha_simulator.py
test_list_ha_for_host Error 0.01 test_hostha_simulator.py
test_list_ha_for_host_invalid Error 0.01 test_hostha_simulator.py
test_list_ha_for_host_valid Error 0.01 test_hostha_simulator.py
test_CreateTemplateWithDuplicateName Error 19.61 test_templates.py
test_01_register_template_direct_download_flag Error 0.13 test_templates.py
test_disable_oobm_ha_state_ineligible Error 0.05 test_hostha_kvm.py
test_hostha_configure_default_driver Error 0.04 test_hostha_kvm.py
test_hostha_enable_ha_when_host_disabled Error 0.05 test_hostha_kvm.py
test_hostha_enable_ha_when_host_disconected Error 0.04 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 0.04 test_hostha_kvm.py
test_hostha_kvm_host_degraded Error 0.04 test_hostha_kvm.py
test_hostha_kvm_host_fencing Error 0.04 test_hostha_kvm.py
test_hostha_kvm_host_recovering Error 0.04 test_hostha_kvm.py
test_remove_ha_provider_not_possible Error 0.03 test_hostha_kvm.py

@shwstppr
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian test result (tid-4549)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 42128 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6546-t4549-kvm-centos7.zip
Smoke tests completed. 81 look OK, 20 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_ISO_usage Error 1.07 test_usage.py
test_01_lb_usage Error 3.17 test_usage.py
test_01_nat_usage Error 6.23 test_usage.py
test_01_public_ip_usage Error 1.06 test_usage.py
test_01_snapshot_usage Error 19.58 test_usage.py
test_01_template_usage Error 18.53 test_usage.py
test_01_vm_usage Error 131.68 test_usage.py
test_01_volume_usage Error 126.86 test_usage.py
test_01_vpn_usage Error 8.37 test_usage.py
test_01_deployVMInSharedNetwork Error 65.81 test_network.py
test_03_destroySharedNetwork Failure 1.06 test_network.py
ContextSuite context=TestSharedNetwork>:teardown Error 2.13 test_network.py
test_01_snapshot_root_disk Error 3.22 test_snapshots.py
test_query_async_job_result Error 82.75 test_async_job.py
test_01_deploy_vm_from_direct_download_template_nfs_storage Error 1.23 test_direct_download.py
ContextSuite context=TestDirectDownloadTemplates>:teardown Error 1.06 test_direct_download.py
test_revoke_certificate Error 0.02 test_certauthority_root.py
login_test_saml_user Error 2.50 test_login.py
test_01_positive_tests_usage Error 7.84 test_usage_events.py
test_role_account_acls_multiple_mgmt_servers Error 1.97 test_dynamicroles.py
test_01_deploy_vms_storage_tags Error 13.67 test_primary_storage.py
test_01_deploy_vms_storage_tags Error 13.68 test_primary_storage.py
test_02_edit_primary_storage_tags Error 0.01 test_primary_storage.py
ContextSuite context=TestStorageTags>:teardown Error 272.76 test_primary_storage.py
test_01_vpc_privategw_acl Error 103.92 test_privategw_acl.py
test_02_vpc_privategw_static_routes Error 302.70 test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup Error 291.21 test_privategw_acl.py
test_04_rvpc_privategw_static_routes Error 525.74 test_privategw_acl.py
test_01_vpc_privategw_acl Error 0.02 test_privategw_acl_ovs_gre.py
test_03_vpc_privategw_restart_vpc_cleanup Error 0.01 test_privategw_acl_ovs_gre.py
test_05_vpc_privategw_check_interface Error 0.01 test_privategw_acl_ovs_gre.py
test_oobm_background_powerstate_sync Failure 20.53 test_outofbandmanagement.py
test_oobm_background_powerstate_sync Error 20.54 test_outofbandmanagement.py
test_oobm_configure_default_driver Error 0.04 test_outofbandmanagement.py
test_oobm_configure_invalid_driver Error 0.04 test_outofbandmanagement.py
test_oobm_disable_feature_invalid Error 0.06 test_outofbandmanagement.py
test_oobm_disable_feature_valid Error 1.12 test_outofbandmanagement.py
test_oobm_enable_feature_invalid Error 0.07 test_outofbandmanagement.py
test_oobm_enable_feature_valid Error 1.10 test_outofbandmanagement.py
test_oobm_enabledisable_across_clusterzones Error 8.62 test_outofbandmanagement.py
test_oobm_enabledisable_across_clusterzones Error 8.62 test_outofbandmanagement.py
test_oobm_issue_power_cycle Error 4.37 test_outofbandmanagement.py
test_oobm_issue_power_cycle Error 4.37 test_outofbandmanagement.py
test_oobm_issue_power_off Error 4.25 test_outofbandmanagement.py
test_oobm_issue_power_off Error 4.25 test_outofbandmanagement.py
test_oobm_issue_power_on Error 2.24 test_outofbandmanagement.py
test_oobm_issue_power_on Error 2.24 test_outofbandmanagement.py
test_oobm_issue_power_reset Error 1.24 test_outofbandmanagement.py
test_oobm_issue_power_reset Error 1.24 test_outofbandmanagement.py
test_oobm_issue_power_soft Error 2.26 test_outofbandmanagement.py
test_oobm_issue_power_soft Error 2.26 test_outofbandmanagement.py
test_oobm_issue_power_status Error 3.27 test_outofbandmanagement.py
test_oobm_issue_power_status Error 3.27 test_outofbandmanagement.py
test_oobm_multiple_mgmt_server_ownership Error 1.11 test_outofbandmanagement.py
test_oobm_multiple_mgmt_server_ownership Error 1.11 test_outofbandmanagement.py
test_oobm_zchange_password Error 1.16 test_outofbandmanagement.py
test_oobm_zchange_password Error 1.16 test_outofbandmanagement.py
test_oobm_issue_power_cycle Error 1.18 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_cycle Error 1.18 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_off Error 2.19 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_off Error 2.19 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_on Error 1.17 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_on Error 1.17 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_reset Error 1.18 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_reset Error 1.18 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_soft Error 1.16 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_soft Error 1.16 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_status Error 0.14 test_outofbandmanagement_nestedplugin.py
test_oobm_issue_power_status Error 0.14 test_outofbandmanagement_nestedplugin.py
test_01_invalid_upgrade_kubernetes_cluster Failure 194.92 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 199.56 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.05 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 82.69 test_kubernetes_clusters.py
test_01_add_delete_kubernetes_supported_version Error 0.23 test_kubernetes_supported_versions.py
test_configure_ha_provider_invalid Error 0.01 test_hostha_simulator.py
test_configure_ha_provider_valid Error 0.01 test_hostha_simulator.py
test_ha_configure_enabledisable_across_clusterzones Error 0.01 test_hostha_simulator.py
test_ha_disable_feature_invalid Error 0.01 test_hostha_simulator.py
test_ha_enable_feature_invalid Error 0.01 test_hostha_simulator.py
test_ha_list_providers Error 0.01 test_hostha_simulator.py
test_ha_multiple_mgmt_server_ownership Error 0.01 test_hostha_simulator.py
test_ha_verify_fsm_available Error 0.01 test_hostha_simulator.py
test_ha_verify_fsm_degraded Error 0.01 test_hostha_simulator.py
test_ha_verify_fsm_fenced Error 0.01 test_hostha_simulator.py
test_ha_verify_fsm_recovering Error 0.01 test_hostha_simulator.py
test_hostha_configure_default_driver Error 0.01 test_hostha_simulator.py
test_hostha_configure_invalid_provider Error 0.01 test_hostha_simulator.py
test_hostha_disable_feature_valid Error 0.01 test_hostha_simulator.py
test_hostha_enable_feature_valid Error 0.01 test_hostha_simulator.py
test_hostha_enable_feature_without_setting_provider Error 0.01 test_hostha_simulator.py
test_list_ha_for_host Error 0.01 test_hostha_simulator.py
test_list_ha_for_host_invalid Error 0.01 test_hostha_simulator.py
test_list_ha_for_host_valid Error 0.01 test_hostha_simulator.py
test_CreateTemplateWithDuplicateName Error 20.65 test_templates.py
test_01_register_template_direct_download_flag Error 0.19 test_templates.py
test_01_redundant_vpc_site2site_vpn Failure 622.14 test_vpc_vpn.py
test_disable_oobm_ha_state_ineligible Error 0.04 test_hostha_kvm.py
test_hostha_configure_default_driver Error 0.03 test_hostha_kvm.py
test_hostha_enable_ha_when_host_disabled Error 0.03 test_hostha_kvm.py
test_hostha_enable_ha_when_host_disconected Error 0.03 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 0.03 test_hostha_kvm.py
test_hostha_kvm_host_degraded Error 0.03 test_hostha_kvm.py
test_hostha_kvm_host_fencing Error 0.03 test_hostha_kvm.py
test_hostha_kvm_host_recovering Error 0.03 test_hostha_kvm.py
test_remove_ha_provider_not_possible Error 0.04 test_hostha_kvm.py

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

Test using cmk

As user ACSUser create a project and create a network outside this project

(sblab) 🐕 > create project name=shareproject displaytext=shareproject
{
  "project": {
    "cpuavailable": "40",
    "cpulimit": "40",
    "cputotal": 0,
    "created": "2022-07-27T08:15:58+0000",
    "displaytext": "shareproject",
    "domain": "ROOT",
    "domainid": "2e8b5f3a-f71a-11ec-87b5-1e0057000461",
    "id": "1ad3e648-c9d2-4b7f-b87a-2a713477762e",
    "ipavailable": "18",
    "iplimit": "20",
    "iptotal": 0,
    "memoryavailable": "40960",
    "memorylimit": "40960",
    "memorytotal": 0,
    "name": "shareproject",
    "networkavailable": "20",
    "networklimit": "20",
    "networktotal": 0,
    "owner": [
      {
        "account": "ACSUser"
      }
    ],
    "primarystorageavailable": "200",
    "primarystoragelimit": "200",
    "primarystoragetotal": 0,
    "projectaccountname": "PrjAcct-shareproject-1",
    "secondarystorageavailable": "400.0",
    "secondarystoragelimit": "400",
    "secondarystoragetotal": 0,
    "snapshotavailable": "20",
    "snapshotlimit": "20",
    "snapshottotal": 0,
    "state": "Active",
    "tags": [],
    "templateavailable": "20",
    "templatelimit": "20",
    "templatetotal": 0,
    "vmavailable": "20",
    "vmlimit": "20",
    "vmrunning": 0,
    "vmstopped": 0,
    "vmtotal": 0,
    "volumeavailable": "20",
    "volumelimit": "20",
    "volumetotal": 0,
    "vpcavailable": "20",
    "vpclimit": "20",
    "vpctotal": 0
  }
}
(sblab) 🐓 > create network zoneid=2e44d4bc-63a5-4510-885d-f5ee182a46a3 networkofferingid=6004bac4-624d-4ed5-85b7-939fcf08bdbf name=testshare displaytext=testshare
{
  "network": {
    "account": "ACSUser",
    "acltype": "Account",
    "broadcastdomaintype": "Vlan",
    "canusefordeploy": true,
    "created": "2022-07-27T08:16:46+0000",
    "displaytext": "testshare",
    "dns1": "10.0.32.1",
    "dns2": "8.8.8.8",
    "domain": "ROOT",
    "domainid": "2e8b5f3a-f71a-11ec-87b5-1e0057000461",
    "hasannotations": false,
    "id": "9e4f4ddc-cef9-4edb-adf5-c0fb8ca53eff",
    "ispersistent": false,
    "issystem": false,
    "name": "testshare",
    "networkofferingavailability": "Optional",
    "networkofferingconservemode": true,
    "networkofferingdisplaytext": "Offering for L2 networks",
    "networkofferingid": "6004bac4-624d-4ed5-85b7-939fcf08bdbf",
    "networkofferingname": "DefaultL2NetworkOffering",
    "physicalnetworkid": "c70efc52-66d9-4287-b404-56234aff5a69",
    "receivedbytes": 0,
    "redundantrouter": false,
    "related": "9e4f4ddc-cef9-4edb-adf5-c0fb8ca53eff",
    "restartrequired": false,
    "sentbytes": 0,
    "service": [],
    "specifyipranges": false,
    "state": "Allocated",
    "strechedl2subnet": false,
    "tags": [],
    "traffictype": "Guest",
    "type": "L2",
    "zoneid": "2e44d4bc-63a5-4510-885d-f5ee182a46a3",
    "zonename": "ref-trl-3339-v-M7-abhishek-kumar"
  }
}

As root admin admin add user user1 to the project and share network in the project

(sblab) 🐧 > set username admin
(sblab) 🐄 > add accounttoproject projectid=1ad3e648-c9d2-4b7f-b87a-2a713477762e account=user1 
{
  "success": true
}
(sblab) 🕊 > create networkpermissions networkid=9e4f4ddc-cef9-4edb-adf5-c0fb8ca53eff projectids=1ad3e648-c9d2-4b7f-b87a-2a713477762e 
{
  "success": true
}

As user user1 list the network shared with the project and deploy vm using it

(sblab) 🐋 > set username user1
(sblab) 🐌 > sync
Discovered 287 APIs
(sblab) 🐥 > list networks projectid=1ad3e648-c9d2-4b7f-b87a-2a713477762e filter=id,name
{
  "count": 1,
  "network": [
    {
      "id": "9e4f4ddc-cef9-4edb-adf5-c0fb8ca53eff",
      "name": "testshare"
    }
(sblab) 🕊 > deploy virtualmachine zoneid=2e44d4bc-63a5-4510-885d-f5ee182a46a3 templateid=2e8ff6e7-f71a-11ec-87b5-1e0057000461 serviceofferingid=d3c5c723-cfda-4157-9944-276aebb9c7f8 projectid=1ad3e648-c9d2-4b7f-b87a-2a713477762e networkids=9e4f4ddc-cef9-4edb-adf5-c0fb8ca53eff
{
  "virtualmachine": {
    "affinitygroup": [],
    "cpunumber": 1,
    "cpuspeed": 500,
    "created": "2022-07-27T08:21:24+0000",
    "details": {
      "dataDiskController": "osdefault",
      "rootDiskController": "ide"
    },
    "displayname": "VM-1cbcbcf1-92e3-4daa-b58c-0a427450f4a0",
    "domain": "ROOT",
    "domainid": "2e8b5f3a-f71a-11ec-87b5-1e0057000461",
    "guestosid": "2e94757c-f71a-11ec-87b5-1e0057000461",
    "haenable": false,
    "hasannotations": false,
    "hypervisor": "VMware",
    "id": "1cbcbcf1-92e3-4daa-b58c-0a427450f4a0",
    "isdynamicallyscalable": false,
    "jobid": "ced60ad4-8142-4cec-9839-04179f53bc79",
    "jobstatus": 0,
    "lastupdated": "2022-07-27T08:22:14+0000",
    "memory": 512,
    "name": "VM-1cbcbcf1-92e3-4daa-b58c-0a427450f4a0",
    "nic": [
      {
        "broadcasturi": "vlan://1028",
        "deviceid": "0",
        "extradhcpoption": [],
        "id": "c6ded695-c1ea-4429-8d21-95e92a429fe0",
        "isdefault": true,
        "isolationuri": "vlan://1028",
        "macaddress": "02:00:14:57:00:01",
        "networkid": "9e4f4ddc-cef9-4edb-adf5-c0fb8ca53eff",
        "networkname": "testshare",
        "secondaryip": [],
        "traffictype": "Guest",
        "type": "L2"
      }
    ],
    "osdisplayname": "CentOS 5.3 (64-bit)",
    "ostypeid": "2e94757c-f71a-11ec-87b5-1e0057000461",
    "passwordenabled": false,
    "pooltype": "NetworkFilesystem",
    "project": "shareproject",
    "projectid": "1ad3e648-c9d2-4b7f-b87a-2a713477762e",
    "readonlydetails": "dataDiskController, rootDiskController",
    "receivedbytes": 0,
    "rootdeviceid": 0,
    "rootdevicetype": "ROOT",
    "securitygroup": [],
    "sentbytes": 0,
    "serviceofferingid": "d3c5c723-cfda-4157-9944-276aebb9c7f8",
    "serviceofferingname": "Small Instance",
    "state": "Running",
    "tags": [],
    "templatedisplaytext": "CentOS 5.3(64-bit) no GUI (vSphere)",
    "templateid": "2e8ff6e7-f71a-11ec-87b5-1e0057000461",
    "templatename": "CentOS 5.3(64-bit) no GUI (vSphere)",
    "userid": "3d668558-b1fe-4aad-bded-9cbc8515dedf",
    "username": "user1",
    "zoneid": "2e44d4bc-63a5-4510-885d-f5ee182a46a3",
    "zonename": "ref-trl-3339-v-M7-abhishek-kumar"
  }
}

@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@rohityadavcloud a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3835

@harikrishna-patnala
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian Build Failed (tid-4560)

@harikrishna-patnala
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian Build Failed (tid-4561)

Copy link
Contributor

@vladimirpetrov vladimirpetrov left a comment

Choose a reason for hiding this comment

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

LGTM based on manual testing (as admin and as a user, default or custom project)

@shwstppr
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3860

@apache apache deleted a comment from blueorangutan Jul 30, 2022
@apache apache deleted a comment from blueorangutan Jul 30, 2022
@shwstppr
Copy link
Contributor

@blueorangutan test centos7 vmware-67u3

@blueorangutan
Copy link

@shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-4577)
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 38148 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6546-t4577-vmware-67u3.zip
Smoke tests completed. 98 look OK, 3 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_DeployVmAntiAffinityGroup Error 41.48 test_affinity_groups.py
test_DeployVmAntiAffinityGroup_in_project Error 95.84 test_affinity_groups_projects.py
test_03_deploy_and_scale_kubernetes_cluster Failure 34.99 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.03 test_kubernetes_clusters.py

@shwstppr
Copy link
Contributor

@blueorangutan test centos7 vmware-67u3

@blueorangutan
Copy link

@shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-4579)
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 42930 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6546-t4579-vmware-67u3.zip
Smoke tests completed. 101 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@shwstppr shwstppr merged commit b62f59a into apache:4.17 Jul 31, 2022
neogismm pushed a commit to neogismm/cloudstack that referenced this pull request Aug 6, 2022
…ache#6546)

This PR fixes apache#6544 where it could not list networks in a project even after network permissions are set.

* Added test cases to existing component tests to test network permissions

* Moved test_network_permissions.py from component to smoke tests

* Added test_network_permissions to travis.yml under smoke tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants