Skip to content
This repository was archived by the owner on Sep 8, 2023. It is now read-only.

Commit bd28534

Browse files
committed
Update to support latest cluster config
1 parent a26694f commit bd28534

1 file changed

Lines changed: 67 additions & 1 deletion

File tree

marklogic/models/cluster.py

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
class LocalCluster(Model):
3737
"""
3838
The LocalCluster class encapsulates the local cluster.
39+
40+
For reasons that don't seem obvious today, it's not handled using the same
41+
marshal and unmarshal approach as other resources. That's probably a bug.
3942
"""
4043
def __init__(self,connection=None, save_connection=True):
4144
"""
@@ -297,6 +300,70 @@ def set_cluster_name(self, value):
297300
self._validate(value, 'string')
298301
return self._set_config_property('cluster-name', value)
299302

303+
def xdqp_ssl_certificate(self):
304+
return self._get_config_property('xdqp-ssl-certificate')
305+
306+
def xdqp_ssl_private_key(self):
307+
return self._get_config_property('xdqp-ssl-private-key')
308+
309+
def language_baseline(self):
310+
return self._get_config_property('language-baseline')
311+
312+
def opsdirector_log_level(self):
313+
"""
314+
The OpsDirector log level.
315+
316+
:return: The log level.
317+
"""
318+
return self._get_config_property("opsdirector-log-level")
319+
320+
def set_opsdirector_log_level(self, value):
321+
"""
322+
Set the OpsDirector log level.
323+
324+
:param value: The log level.
325+
:return: The object with the mutated property value.
326+
"""
327+
self._validate(value, ['disabled', 'finest', 'finer', 'fine',
328+
'debug', 'config', 'info', 'notice',
329+
'warning', 'error', 'critical', 'alert', 'emergency'])
330+
return self._set_config_property("opsdirector-log-level", value)
331+
332+
def opsdirector_metering(self):
333+
"""
334+
The OpsDirector metering level.
335+
336+
:return: The metering level.
337+
"""
338+
return self._get_config_property("opsdirector_metering")
339+
340+
def set_opsdirector_metering(self, value):
341+
"""
342+
Set the OpsDirector metering level.
343+
344+
:param value: The metering level.
345+
:return: The object with the mutated property value.
346+
"""
347+
self._validate(value, ['disabled', 'full', 'aggregates', 'usage-only'])
348+
return self._set_config_property("opsdirector-metering", value)
349+
350+
def opsdirector_session_endpoint(self):
351+
"""
352+
The OpsDirector session endpoint.
353+
354+
:return: The endpoint.
355+
"""
356+
return self._get_config_property("opsdirector-session-endpoint")
357+
358+
def set_opsdirector_session_endpoint(self, value):
359+
"""
360+
Set the OpsDirector session endpoint.
361+
362+
:param value: The endpoint.
363+
:return: The object with the mutated property value.
364+
"""
365+
# FIXME: Should I test that this is a reasonable http(s) URI?
366+
return self._set_config_property("opsdirector-session-endpoint", value)
300367

301368
class ForeignCluster(Model):
302369
"""
@@ -560,7 +627,6 @@ def set_xdqp_ssl_ciphers(self, value):
560627
self._validate(value, 'string')
561628
return self._set_config_property('xdqp-ssl-ciphers', value)
562629

563-
564630
class BootstrapHost(Model):
565631
"""
566632
The BootstrapHost class encapsulates a MarkLogic cluster bootstrap host.

0 commit comments

Comments
 (0)