Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/tests/ftest/dfuse/container_attrs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
(C) Copyright 2020-2024 Intel Corporation.
(C) Copyright 2026 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent
"""
Expand Down Expand Up @@ -121,6 +122,12 @@

self.log_step("Creating DAOS container")
container = self.get_container(pool, namespace="/run/container_02/*")
try:
self.log.info("Getting container attributes for %s", container)
container.get_attr()
except Exception as error: # pylint: disable=broad-except
self.log.error(error)
pass

Check warning on line 130 in src/tests/ftest/dfuse/container_attrs.py

View workflow job for this annotation

GitHub Actions / Pylint check

unnecessary-pass, Unnecessary pass statement

self.log_step("Mounting DFuse mount point")
dfuse = get_dfuse(self, self.dfuse_hosts)
Expand All @@ -129,7 +136,13 @@

self.log_step("Creating DAOS subcontainer with DFuse attributes")
sub_dir = os.path.join(dfuse.mount_dir.value, "foo")
self.get_container(pool, namespace="/run/container_03/*", path=sub_dir)
sub_container = self.get_container(pool, namespace="/run/container_03/*", path=sub_dir)
try:
self.log.info("Getting container attributes for %s", sub_container)
sub_container.get_attr()
except Exception as error: # pylint: disable=broad-except
self.log.error(error)
pass

Check warning on line 145 in src/tests/ftest/dfuse/container_attrs.py

View workflow job for this annotation

GitHub Actions / Pylint check

unnecessary-pass, Unnecessary pass statement

self.log_step("Checking DFuse log file")
self._check_attrs(dfuse, namespace="/run/container_03/*")
Expand Down
5 changes: 3 additions & 2 deletions src/tests/ftest/util/daos_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,13 +695,14 @@ def container_set_attr(self, pool, cont, attrs, sys_name=None):
("container", "set-attr"), pool=pool, cont=cont,
attr=dict_to_str(attrs, ",", ":"), sys_name=sys_name)

def container_get_attr(self, pool, cont, attr, sys_name=None):
def container_get_attr(self, pool, cont, attr=None, sys_name=None):
"""Call daos container get-attr for a single attribute.

Args:
pool (str): pool UUID or label
cont (str): container UUID or label
attr (str/list): single attribute name or list of names
attr (str/list, optional): single attribute name or list of names.
Defaults to None.
sys_name (str, optional): DAOS system name context for servers.
Defaults to None.

Expand Down
Loading