Skip to content

Getting a single LUN mapping #40

@tacerus

Description

@tacerus

Hi,

I am trying to retrieve a a LUN mapping resource for a single specific LUN.

get() on a LunMap with a filter which should only match a single entry results in an error:

mapresource = LunMap({'igroup.name': 'myig', 'lun.uuid': '8f27a86c-8c79-4d94-ab22-e86868954d5c'})
mrs = mapresource.get()
NetAppRestError: Received more than one record in the response LunMap.

And get_collection() results in a large amount of unrelated mappings:

mapresource = LunMap({'igroup.name': my'ig', 'lun.uuid': '8f27a86c-8c79-4d94-ab22-e86868954d5c'})
mrs = mapresource.get_collection()
print(len(list(mrs)))
41

Same results if using lun.name or even logical_unit_number:

mapresource = LunMap({'igroup.name': 'myig', 'lun.name': '/vol/lun_kvm_system/lun901'})
mrs = mapresource.get_collection()
print(len(list(mrs)))
41

mapresource = LunMap({'igroup.name': 'myig', 'logical_unit_number': '901'})
mrs = mapresource.get_collection()
print(len(list(mrs)))
41

I would expect to retrieve only one mapping result if a distinct filter is specified. Am I missing something?

Edit: this is against ONTAP 9.9 with the libraries netapp-lib 2021.6.25 and netapp-ontap 9.13.1.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions