@@ -29,29 +29,6 @@ The configuration file can contain multiple settings blocks. Only one,
2929blocks by simply providing the name of the block as the ``config ``
3030parameter (see below).
3131
32- The client can also be configured manually via Python. The following example
33- shows how to create the ``ProxyKmipClient `` in Python code, directly
34- specifying the different configuration values:
35-
36- .. code-block :: python
37-
38- >> > import ssl
39- >> > from kmip.pie.client import ProxyKmipClient
40- >> > client = ProxyKmipClient(
41- ... hostname = ' 127.0.0.1' ,
42- ... port = 5696 ,
43- ... cert = ' /path/to/certificate/file' ,
44- ... key = ' /path/to/certificate/key/file' ,
45- ... ca = ' /path/to/ca/certificate/file' ,
46- ... ssl_version = ssl.PROTOCOL_SSLv23 ,
47- ... username = ' example_username' ,
48- ... password = ' example_password'
49- ... config = ' client'
50- ... )
51-
52- Settings specified at runtime, as in the above example, will take precedence
53- over the default values found in the configuration file.
54-
5532The different configuration options are defined below:
5633
5734* ``host ``
@@ -109,6 +86,31 @@ The different configuration options are defined below:
10986 A string representing the password to use for KMIP requests. Optional
11087 depending on server access policies. Leave blank if not needed.
11188
89+ The client can also be configured manually via Python. The following example
90+ shows how to create the ``ProxyKmipClient `` in Python code, directly
91+ specifying the different configuration values:
92+
93+ .. code-block :: python
94+
95+ >> > import ssl
96+ >> > from kmip.pie.client import ProxyKmipClient
97+ >> > client = ProxyKmipClient(
98+ ... hostname = ' 127.0.0.1' ,
99+ ... port = 5696 ,
100+ ... cert = ' /path/to/certificate/file' ,
101+ ... key = ' /path/to/certificate/key/file' ,
102+ ... ca = ' /path/to/ca/certificate/file' ,
103+ ... ssl_version = ssl.PROTOCOL_SSLv23 ,
104+ ... username = ' example_username' ,
105+ ... password = ' example_password'
106+ ... config = ' client' ,
107+ ... config_file = ' /etc/pykmip/pykmip.conf' ,
108+ ... kmip_version = enums.KMIPVersion.KMIP_1_2
109+ ... )
110+
111+ Settings specified at runtime, as in the above example, will take precedence
112+ over the default values found in the configuration file.
113+
112114Usage
113115-----
114116
@@ -120,7 +122,7 @@ Class Documentation
120122-------------------
121123.. py :module :: kmip.pie.client
122124
123- .. py :class :: ProxyKmipClient(hostname = None , port = None , cert = None , key = None , ca = None , ssl_version = None , username = None , password = None , config = ' client' )
125+ .. py :class :: ProxyKmipClient(hostname = None , port = None , cert = None , key = None , ca = None , ssl_version = None , username = None , password = None , config = ' client' , config_file = None , kmip_version = None )
124126
125127 A simplified KMIP client for conducting KMIP operations.
126128
@@ -153,6 +155,18 @@ Class Documentation
153155 file. Use to load a specific set of configuration settings from the
154156 configuration file, instead of specifying them manually. Optional,
155157 defaults to the default client section, 'client'.
158+ :param string config_file: The path to the PyKMIP client configuration
159+ file. Optional, defaults to None.
160+ :param enum kmip_version: A KMIPVersion enumeration specifying which KMIP
161+ version should be used to encode/decode request/response messages.
162+ Optional, defaults to None. If no value is specified, at request
163+ encoding time the client will default to KMIP 1.2.
164+
165+ .. py :attribute :: kmip_version
166+
167+ The KMIP version that should be used to encode/decode request/response
168+ messages. Must be a KMIPVersion enumeration. Can be accessed and
169+ modified at any time.
156170
157171 .. py :method :: open ()
158172
0 commit comments