MCPcopy Create free account
hub / github.com/ceph/ceph / __init__

Method __init__

qa/tasks/vstart_runner.py:975–1014  ·  view source on GitHub ↗
(self, ctx, fs_config={}, fscid=None, name=None, create=False, cluster_name='ceph',
                 **kwargs)

Source from the content-addressed store, hash-verified

973
974class LocalFilesystem(LocalMDSCluster, tasks.cephfs.filesystem.FilesystemBase):
975 def __init__(self, ctx, fs_config={}, fscid=None, name=None, create=False, cluster_name='ceph',
976 **kwargs):
977 # Deliberately skip calling Filesystem constructor
978 LocalMDSCluster.__init__(self, ctx, cluster_name=cluster_name)
979
980 self.id = None
981 self.name = name
982 self.metadata_pool_name = None
983 self.metadata_overlay = False
984 self.data_pool_name = None
985 self.data_pools = None
986 self.fs_config = fs_config
987 self.ec_profile = fs_config.get('ec_profile')
988
989 self.mon_manager = LocalCephManager(ctx=self._ctx, cluster_name=cluster_name)
990
991 self.client_remote = LocalRemote()
992
993 self._conf = defaultdict(dict)
994
995 if name is not None:
996 if fscid is not None:
997 raise RuntimeError("cannot specify fscid when creating fs")
998 if create and not self.legacy_configured():
999 self.create(recover=kwargs.pop("fs_recover", False),
1000 metadata_overlay=kwargs.pop("fs_metadata_overlay",
1001 False),
1002 fs_ops=kwargs.pop("fs_ops", None),
1003 yes_i_really_really_mean_it=kwargs.pop(
1004 "yes_i_really_really_mean_it", False))
1005 else:
1006 if fscid is not None:
1007 self.id = fscid
1008 self.getinfo(refresh=True)
1009
1010 # Stash a reference to the first created filesystem on ctx, so
1011 # that if someone drops to the interactive shell they can easily
1012 # poke our methods.
1013 if not hasattr(self._ctx, "filesystem"):
1014 self._ctx.filesystem = self
1015
1016 @property
1017 def _prefix(self):

Callers

nothing calls this directly

Calls 8

LocalCephManagerClass · 0.85
LocalRemoteClass · 0.85
legacy_configuredMethod · 0.80
getinfoMethod · 0.80
__init__Method · 0.45
getMethod · 0.45
createMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected