{"action":"closed","issue":{"url":"https://api.github.com/repos/OpenKMIP/PyKMIP/issues/556","repository_url":"https://api.github.com/repos/OpenKMIP/PyKMIP","labels_url":"https://api.github.com/repos/OpenKMIP/PyKMIP/issues/556/labels{/name}","comments_url":"https://api.github.com/repos/OpenKMIP/PyKMIP/issues/556/comments","events_url":"https://api.github.com/repos/OpenKMIP/PyKMIP/issues/556/events","html_url":"https://github.com/OpenKMIP/PyKMIP/issues/556","id":459177960,"node_id":"MDU6SXNzdWU0NTkxNzc5NjA=","number":556,"title":"Locate function behavior change","user":{"login":"KBassford","id":31860128,"node_id":"MDQ6VXNlcjMxODYwMTI4","avatar_url":"https://avatars0.githubusercontent.com/u/31860128?v=4","gravatar_id":"","url":"https://api.github.com/users/KBassford","html_url":"https://github.com/KBassford","followers_url":"https://api.github.com/users/KBassford/followers","following_url":"https://api.github.com/users/KBassford/following{/other_user}","gists_url":"https://api.github.com/users/KBassford/gists{/gist_id}","starred_url":"https://api.github.com/users/KBassford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KBassford/subscriptions","organizations_url":"https://api.github.com/users/KBassford/orgs","repos_url":"https://api.github.com/users/KBassford/repos","events_url":"https://api.github.com/users/KBassford/events{/privacy}","received_events_url":"https://api.github.com/users/KBassford/received_events","type":"User","site_admin":false},"labels":[{"id":119370281,"node_id":"MDU6TGFiZWwxMTkzNzAyODE=","url":"https://api.github.com/repos/OpenKMIP/PyKMIP/labels/bug","name":"bug","color":"fc2929","default":true},{"id":429819606,"node_id":"MDU6TGFiZWw0Mjk4MTk2MDY=","url":"https://api.github.com/repos/OpenKMIP/PyKMIP/labels/client","name":"client","color":"d93f0b","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-06-21T12:41:20Z","updated_at":"2019-06-21T19:36:37Z","closed_at":"2019-06-21T19:36:37Z","author_association":"NONE","body":"Hi Peter,\r\n\r\nPrior to implementation of KMIP 2.0, an empty _locate_ function could be used to get a list of all the object uid's stored on the server.  If one however sets their query to `kmip_version=enums.KMIPVersion.KMIP_2_0`, the following error results when attempting the same operation ...\r\n\r\n```\r\nlocate(\r\n    maximum_items=None,\r\n    storage_status_mask=None,\r\n    object_group_member=None,\r\n    attributes=[]\r\n)\r\n\r\nTraceback (most recent call last):\r\n  File \"src/local-gitlab.com/gkbassf/go-pykmip-wrapper/kmiplocate/kmip_locate.py\", line 128, in <module>\r\n    main(args)\r\n  File \"src/local-gitlab.com/gkbassf/go-pykmip-wrapper/kmiplocate/kmip_locate.py\", line 110, in main\r\n    attributes=[]\r\n  File \"/usr/local/lib/python3.7/dist-packages/kmip/pie/client.py\", line 39, in wrapper\r\n    return function(self, *args, **kwargs)\r\n  File \"/usr/local/lib/python3.7/dist-packages/kmip/pie/client.py\", line 709, in locate\r\n    object_group_member, attributes)\r\n  File \"/usr/local/lib/python3.7/dist-packages/kmip/services/kmip_client.py\", line 701, in locate\r\n    attributes=attributes, credential=credential)\r\n  File \"/usr/local/lib/python3.7/dist-packages/kmip/services/kmip_client.py\", line 1496, in _locate\r\n    self._send_message(message)\r\n  File \"/usr/local/lib/python3.7/dist-packages/kmip/services/kmip_client.py\", line 1604, in _send_message\r\n    message.write(stream, self.kmip_version)\r\n  File \"/usr/local/lib/python3.7/dist-packages/kmip/core/messages/messages.py\", line 494, in write\r\n    batch_item.write(tstream, kmip_version=kmip_version)\r\n  File \"/usr/local/lib/python3.7/dist-packages/kmip/core/messages/messages.py\", line 331, in write\r\n    self.request_payload.write(tstream, kmip_version=kmip_version)\r\n  File \"/usr/local/lib/python3.7/dist-packages/kmip/core/messages/payloads/locate.py\", line 321, in write\r\n    \"The Locate request payload is missing the attributes \"\r\nkmip.core.exceptions.InvalidField: The Locate request payload is missing the attributes list.\r\n```\r\nSame result if one sets `attributes=None`.  Setting the version back to KMIP_1_4 restores prior (proper) behavior.\r\n\r\n**According to KMIP 2.0, Table 229: Locate Request Payload**\r\n***Item=***  Attributes\r\n***Required=***  Yes\r\n***Description=***  Specifies an attribute and its value(s) that are REQUIRED to match those in a candidate object (according to the matching rules defined above). Note: the Attributes structure MAY be empty indicating all objects should match.\r\n\r\nAdditional side note: Function should also allow the specification of an offset_items (optional)  An Integer object that indicates the number of object identifiers to skip that satisfy the identification criteria specified in the request."}}
{"actor":{"display_login":"PeterHamilton"}}