(self, ctx, fs_config={}, fscid=None, name=None, create=False, cluster_name='ceph',
**kwargs)
| 973 | |
| 974 | class 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): |
nothing calls this directly
no test coverage detected