Forum Discussion
- amazouzNovice IAre you using the *pypureclient* package or *purestorage* This is my testing snippets `from pypureclient import flasharray` `client = flasharray.Client('10.21.xx.xx',` `private_key_file='/Users/amazouz/.ssh/adam.pem',` `private_key_password='xxx',` `username='pureuser',` `client_id='3xxxxx',` `key_id='xxxxxxx',` `issuer='python')` `pgname = client.get_protection_groups_volumes(member_names='VOL_NAME')` `print(pgname.items.next())`
- amazouzNovice Ihi dinesh.v You can use this `client.get_protection_groups_volumes(member_names='VOL_NAME')` Respond `{'group': {'name': 'PGROUP_NAME'}, 'member': {'name': 'VOL_NAME'}}`
- dinesh_vNovice IThanks for the response Adam... I tried and seeing the following error, ```AttributeError: 'FlashArray' object has no attribute 'get_protection_groups_volumes'``` I tired with get_pgroups_volumes as well and the same is the error.
- amazouzNovice Idinesh.v can you iterate through the object `pgname = client.get_protection_groups_volumes(member_names='VOL_NAME')` `print(pgname.items.next())`
- dinesh_vNovice IHi Adam, Looks like the get_protection_groups_volumes itself is not an available function in the flasharray module. I am getting the same error . ```AttributeError: 'FlashArray' object has no attribute 'get_protection_groups_volumes'```
- dinesh_vNovice IGreat and thanks a lot for your help amazouz. It worked and i was able to fulfill the requirement.
- amazouzNovice IGlad to hear that : )