dell / ansible-powermax

Ansible Modules for Dell PowerMax
GNU General Public License v3.0
36 stars 35 forks source link

[BUG]: Info Module is looping on all masking views to filter for lun addresses #30

Closed rawstorage closed 8 months ago

rawstorage commented 1 year ago

Describe the bug Info Module is looping on all masking views to filter for lun addresses

To Reproduce Steps to reproduce the behavior:

... n. Step n See error Code is def get_mv_connections_list(self, filters_dict=None): """Get the list of masking view connections of a given PowerMax or VMAX storage system"""

    try:
        LOG.info('Getting Masking View Connections List')
        array_serial_no = self.module.params['serial_no']
        masking_view_list = self.get_masking_view_list()
        mv_connections_list = []
        for masking_view_id in masking_view_list:
            connections = self.provisioning.get_masking_view_connections(masking_view_id, filters=filters_dict)
            if connections:
                mv_connections_list.append(
                    {
                        'masking_view_id': masking_view_id,
                        'masking_view_connections': connections
                    }
                )
        LOG.info('Got %d Getting Masking Views Connections from array %s',
                 len(mv_connections_list), array_serial_no)
        return mv_connections_list

Expected behavior Customer should be able to filter on masking view, to correct a new optional paramter for masking view name should be allowed which would avoid the loop

System Information (please complete the following information):

Additional context Masking view connections REST API is intensive on API server so running this the way it is is potentially going to slow down unisphere server for customer with large number of masking views.

anupamaloke commented 8 months ago

Closed by #35