mirror of
https://github.com/openkmip/pykmip
synced 2025-12-26 21:23:44 +00:00
Update the Query payloads
This change upgrades the Query payloads, fixing error messages, comments, local variables, and internal payload structure to bring Query support up to KMIP 1.4 standards, in addition to compliance with the current payload format. The corresponding unit test suite has been completely rewritten to reflect these changes. This change prepares the Query payloads for future updates to support KMIP 2.0.
This commit is contained in:
committed by
Peter Hamilton
parent
b968378eb8
commit
314dd8761e
@@ -32,7 +32,7 @@ from kmip.core.enums import OpaqueDataType
|
||||
from kmip.core.enums import SecretDataType
|
||||
from kmip.core.enums import ResultStatus
|
||||
from kmip.core.enums import ResultReason
|
||||
from kmip.core.enums import QueryFunction as QueryFunctionEnum
|
||||
from kmip.core.enums import QueryFunction
|
||||
|
||||
from kmip.core.factories.attributes import AttributeFactory
|
||||
from kmip.core.factories.credentials import CredentialFactory
|
||||
@@ -46,8 +46,6 @@ from kmip.core.objects import KeyMaterial
|
||||
from kmip.core.objects import KeyValue
|
||||
from kmip.core.objects import TemplateAttribute
|
||||
|
||||
from kmip.core.misc import QueryFunction
|
||||
|
||||
from kmip.core.secrets import SymmetricKey
|
||||
from kmip.core.secrets import PrivateKey
|
||||
from kmip.core.secrets import PublicKey
|
||||
@@ -314,19 +312,16 @@ class TestIntegration(TestCase):
|
||||
|
||||
def test_query(self):
|
||||
# Build query function list, asking for all server data.
|
||||
query_functions = list()
|
||||
query_functions.append(
|
||||
QueryFunction(QueryFunctionEnum.QUERY_OPERATIONS))
|
||||
query_functions.append(
|
||||
QueryFunction(QueryFunctionEnum.QUERY_OBJECTS))
|
||||
query_functions.append(
|
||||
QueryFunction(QueryFunctionEnum.QUERY_SERVER_INFORMATION))
|
||||
query_functions.append(
|
||||
QueryFunction(QueryFunctionEnum.QUERY_APPLICATION_NAMESPACES))
|
||||
query_functions.append(
|
||||
QueryFunction(QueryFunctionEnum.QUERY_EXTENSION_LIST))
|
||||
query_functions.append(
|
||||
QueryFunction(QueryFunctionEnum.QUERY_EXTENSION_MAP))
|
||||
query_functions = list(
|
||||
[
|
||||
QueryFunction.QUERY_OPERATIONS,
|
||||
QueryFunction.QUERY_OBJECTS,
|
||||
QueryFunction.QUERY_SERVER_INFORMATION,
|
||||
QueryFunction.QUERY_APPLICATION_NAMESPACES,
|
||||
QueryFunction.QUERY_EXTENSION_LIST,
|
||||
QueryFunction.QUERY_EXTENSION_MAP
|
||||
]
|
||||
)
|
||||
|
||||
result = self.client.query(query_functions=query_functions)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user