Skip to content

Commit

Permalink
Merge pull request #2667 from rahullepakshi/max_ns
Browse files Browse the repository at this point in the history
Enhancement to specify maximum namespaces per subsystem
  • Loading branch information
mergify[bot] authored Jun 27, 2023
2 parents 234a5f9 + 4a9c239 commit 78c1faf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ceph/nvmeof/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ def delete_block_device(self, name):
args = {"bdev": name}
return run_control_cli(self.node, "delete_bdev", **args)

def create_subsystem(self, subnqn, serial_num):
def create_subsystem(self, subnqn, serial_num, max_ns):
"""Create subsystem."""
args = {"subnqn": subnqn, "serial": serial_num}
args = {"subnqn": subnqn, "serial": serial_num, "max-namespaces": max_ns}
return run_control_cli(self.node, "create_subsystem", **args)

def delete_subsystem(self, subnqn):
Expand Down
3 changes: 2 additions & 1 deletion tests/nvmeof/test_ceph_nvmeof_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
def configure_subsystems(rbd, pool, gw, config):
"""Configure Ceph-NVMEoF Subsystems."""
sub_nqn = config["nqn"]
gw.create_subsystem(sub_nqn, config["serial"])
max_ns = config.get("max_ns", 32)
gw.create_subsystem(sub_nqn, config["serial"], max_ns)
gw.create_listener(sub_nqn, config["listener_port"])
gw.add_host(sub_nqn, config["allow_host"])
if config.get("bdevs"):
Expand Down

0 comments on commit 78c1faf

Please sign in to comment.