- cmd: ceph nfs export apply nfs-ganesha-test -i /dev/stdin
stdin: |
{
- "export_id": 1,
- "path": "/",
- "cluster_id": "nfs-ganesha-test",
- "pseudo": "/nfsganesha",
- "access_type": "RW",
- "squash": "none",
- "security_label": true,
- "protocols": [
- 4
- ],
- "transports": [
- "TCP"
- ],
- "fsal": {
- "name": "CEPH",
- "user_id": "nfs.nfs-ganesha-test.cephfs.a4cd9f65",
- "fs_name": "cephfs",
- "cmount_path": "/"
+ "export": {
+ "export_id": 1,
+ "path": "/",
+ "cluster_id": "nfs-ganesha-test",
+ "pseudo": "/nfsganesha",
+ "access_type": "RW",
+ "squash": "none",
+ "security_label": true,
+ "protocols": [
+ 4
+ ],
+ "transports": [
+ "TCP"
+ ],
+ "fsal": {
+ "name": "CEPH",
+ "user_id": "nfs.nfs-ganesha-test.cephfs.a4cd9f65",
+ "fs_name": "cephfs",
+ "cmount_path": "/"
+ },
+ "clients": []
},
- "clients": []
+ "log": {
+ "default_log_level": "WARN",
+ "components": {
+ "fsal": "debug",
+ "nfs4": "debug"
+ },
+ "facility": {
+ "name": "file",
+ "destination": "/var/log/ceph/ganesha.log",
+ "enable": "active"
+ }
+ }
}
# for debug
- cmd: ceph nfs export info nfs-ganesha-test --pseudo_path=/nfsganesha
return self.to_dict() == other.to_dict()
class Facility:
- def __init(self,
- name: str,
- destination: str,
- enable: str):
+ def __init__(self,
+ name: str,
+ destination: str,
+ enable: str):
self.name = name
self.destination = destination
self.enable = enable
return self.to_dict() == other.to_dict()
class Components:
- def __init(self,
- fsal: str,
- nfsv4: str):
+ def __init__(self,
+ fsal: str,
+ nfs4: str):
self.fsal = fsal
- self.nfsv4 = nfsv4
+ self.nfs4 = nfs4
@classmethod
def from_components_block(cls, components: RawBlock) -> 'Components':
- return cls(components.values['fsal'], components.values['nfsv4'])
+ return cls(components.values['fsal'], components.values['nfs4'])
def to_components_block(self) -> RawBlock:
- result = RawBlock("COMPONENTS", values={'fsal': self.fsal, 'nfsv4': self.nfsv4})
+ result = RawBlock("COMPONENTS", values={'fsal': self.fsal, 'nfs4': self.nfs4})
return result
@classmethod
def from_dict(cls, ex_dict: Dict[str, Any]) -> 'Components':
- return cls(ex_dict['fsal'], ex_dict['nfsv4'])
+ return cls(ex_dict['fsal'], ex_dict['nfs4'])
def to_dict(self) -> Dict[str, Any]:
values = {
'fsal': self.fsal,
- 'nfsv4': self.nfsv4
+ 'nfs4': self.nfs4
}
return values