ctx: CephadmContext, ident: 'DaemonIdentity'
) -> List[List[str]]:
binds: List[List[str]] = list()
-
- if ident.daemon_type == CephIscsi.daemon_type:
- iscsi = CephIscsi.create(ctx, ident)
- iscsi.customize_container_binds(ctx, binds)
- if ident.daemon_type == CephNvmeof.daemon_type:
- nvmeof = CephNvmeof.create(ctx, ident)
- nvmeof.customize_container_binds(ctx, binds)
- elif ident.daemon_type == CustomContainer.daemon_type:
- cc = CustomContainer.create(ctx, ident)
- cc.customize_container_binds(ctx, binds)
-
+ daemon = daemon_form_create(ctx, ident)
+ assert isinstance(daemon, ContainerDaemonForm)
+ daemon.customize_container_binds(ctx, binds)
return binds
retval = _cephadm.command_shell(ctx)
assert retval == 0
- cmd = ['shell', '--name', 'foo.bar']
+ cmd = ['shell', '--name', 'mgr.bar']
with with_cephadm_ctx(cmd) as ctx:
err = r'must pass --fsid'
with pytest.raises(_cephadm.Error, match=err):
assert retval == 1
fsid = '00000000-0000-0000-0000-0000deadbeef'
- cmd = ['shell', '--name', 'foo.bar', '--fsid', fsid]
+ cmd = ['shell', '--name', 'mgr.bar', '--fsid', fsid]
with with_cephadm_ctx(cmd) as ctx:
retval = _cephadm.command_shell(ctx)
assert retval == 0