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 committed Jul 18, 2023
1 parent a0eed89 commit 7c367ab
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 @@ -2746,7 +2746,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 @@ -2757,14 +2757,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 @@ -2781,8 +2781,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 7c367ab

Please sign in to comment.