Skip to content

Commit

Permalink
Update ldmsd_communicator strgp_add decomp attribute
Browse files Browse the repository at this point in the history
Change strgp_add attribute decomp to decomposition to match ldmsd_controller vernacular
Change default perm to 0o600 from 0o777
  • Loading branch information
nick-enoent authored and tom95858 committed Jul 19, 2023
1 parent 7589ac5 commit d93902a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions ldms/python/ldmsd/ldmsd_communicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2749,7 +2749,7 @@ def usage(self, name=None):
return errno.ENOTCONN, str(e)

def strgp_add(self, name, plugin, container, schema=None,
regex=None, perm=0o777, flush=None, decomp=None):
regex=None, perm=0o600, flush=None, decomposition=None):
"""
Add a Storage Policy that will store metric set data when
updates complete on a metric set.
Expand All @@ -2760,14 +2760,14 @@ def strgp_add(self, name, plugin, container, schema=None,
container - The storage backend container name.
Keyword Parameters:
schema - The schema name of the metric set to store. If 'schema' is given, 'regex' is ignored.
regex A regular expression matching set schemas. This must be
used with decomposition. Either 'schema' or 'regex' must be given.
perm - The permission required to modify the storage policy,
default perm=0o600
flush - Interval between calls to the storage plugin flush method.
By default, the flush method is not called.
decomp - The path to a decomposition configuration file
schema - The schema name of the metric set to store. If 'schema' is given, 'regex' is ignored.
regex - A regular expression matching set schemas. This must be
used with decomposition. Either 'schema' or 'regex' must be given.
perm - The permission required to modify the storage policy,
default perm=0o600
flush - Interval between calls to the storage plugin flush method.
By default, the flush method is not called.
decomposition - The path to a decomposition configuration file
Returns:
A tuple of status, data
- status is an errno from the errno module
Expand All @@ -2784,8 +2784,8 @@ def strgp_add(self, name, plugin, container, schema=None,
attrs.append(LDMSD_Req_Attr(attr_id = LDMSD_Req_Attr.SCHEMA, value = schema))
if regex is not None:
attrs.append(LDMSD_Req_Attr(attr_id = LDMSD_Req_Attr.REGEX, value = regex))
if decomp is not None:
attrs.append(LDMSD_Req_Attr(attr_id = LDMSD_Req_Attr.DECOMPOSITION, value = decomp))
if decomposition is not None:
attrs.append(LDMSD_Req_Attr(attr_id = LDMSD_Req_Attr.DECOMPOSITION, value = decomposition))
if flush is not None:
attrs.append(LDMSD_Req_Attr(attr_name='flush', value=flush))
req = LDMSD_Request(command_id=LDMSD_Request.STRGP_ADD, attrs=attrs)
Expand Down

0 comments on commit d93902a

Please sign in to comment.