---
title: Charmhub | Deploy Filesystem Client using Charmhub - The Open Operator Collection
description: Deploy the latest version of Filesystem Client on any cloud.
url: https://charmhub.io/filesystem-client/libraries/filesystem_info
---

# Filesystem Client

[José Julián Espina Del Ángel](https://charmhub.io/publisher/jedel "View all packages from José Julián Espina Del Ángel")

* [José Julián Espina Del Ángel](https://charmhub.io/publisher/jedel "View all packages from José Julián Espina Del Ángel")

Platform:

26.04

24.04

beta 1e5e5b8

```
juju deploy filesystem-client --channel beta
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

[Toggle side navigation](https://charmhub.io/filesystem-client/libraries/filesystem_info#drawer)

## charms.filesystem\_client.v0.filesystem\_info

* [*Docstrings*Docstrings](https://charmhub.io/filesystem-client/libraries/filesystem_info)
  [*Code*Source code](https://charmhub.io/filesystem-client/libraries/filesystem_info/source-code)
* + Download

    Fetch library

    ```
    charmcraft fetch-lib charms.filesystem_client.v0.filesystem_info
    ```

    [Download filesystem\_info.py](https://charmhub.io/filesystem-client/libraries/filesystem_info/download)
  + *Last updated* 26 Aug 2026
  + *Revision* Library version 0.4

Library to manage integrations between filesystem providers and consumers.

This library contains the FilesystemProvides and FilesystemRequires classes for managing an
integration between a filesystem server operator and a filesystem client operator.

##### FilesystemInfo (filesystem mount information)

This abstract class defines the methods that a filesystem type must expose for providers and
consumers. Any subclass of this class will be compatible with the other methods exposed
by the interface library, but the server and the client are the ones responsible for deciding which
filesystems to support.

##### FilesystemRequires (filesystem client)

This class provides a uniform interface for charms that need to mount or unmount filesystems,
and convenience methods for consuming data sent by a filesystem server charm.

###### Defined events

* `mount_filesystem`: Event emitted when the filesystem is ready to be mounted.
* `umount_filesystem`: Event emitted when the filesystem needs to be unmounted.

###### Example

``python
import ops
from charms.filesystem\_client.v0.filesystem\_info import (
FilesystemRequires,
MountFilesystemEvent,
)

class StorageClientCharm(ops.CharmBase):
# Application charm that needs to mount filesystems.

```
def __init__(self, *args, **kwargs) -> None:
    super().__init__(*args, **kwargs)

    # Charm events defined in the FilesystemRequires class.
    self._fs = FilesystemRequires(self, "filesystem")
    self.framework.observe(
        self._fs.on.mount_filesystem,
        self._on_mount_filesystem,
    )

def _on_mount_filesystem(self, event: MountFilesystemEvent) -> None:
    # Handle when new filesystem server is connected.

    endpoint = event.endpoint

    self.mount("/mnt", endpoint.info)

    self.unit.status = ops.ActiveStatus("Mounted filesystem at `/mnt`.")
```

```
## FilesystemProvides (filesystem server)

This library provides a uniform interface for charms that expose filesystems.

> __Note:__ It is the responsibility of the provider charm to have
> the implementation for creating a new filesystem share. FilesystemProvides just exposes
> the interface for the integration.

### Example

```python
import ops
from charms.filesystem_client.v0.filesystem_info import (
    FilesystemProvides,
    NfsInfo,
)

class StorageServerCharm(ops.CharmBase):
    def __init__(self, framework: ops.Framework) -> None:
        super().__init__(framework)
        self._filesystem = FilesystemProvides(self, "filesystem", "server-peers")
        framework.observe(self.on.start, self._on_start)

    def _on_start(self, event: ops.StartEvent) -> None:
        # Handle start event.
        self._filesystem.set_info(NfsInfo("192.168.1.254", 65535, "/srv"))
        self.unit.status = ops.ActiveStatus()
```

---

Index

* [class FilesystemInfoError](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesysteminfoerror)
* [class ParseUriError](https://charmhub.io/filesystem-client/libraries/filesystem_info#parseurierror)
* [class FilesystemInfo](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesysteminfo)
* + [def from\_uri(
    cls,
    uri,
    model)](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesysteminfo-from_uri)
* + [def to\_uri(
    self,
    model)](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesysteminfo-to_uri)
* + [def grant(
    self,
    model,
    relation)](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesysteminfo-grant)
* + [def filesystem\_type(
    cls)](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesysteminfo-filesystem_type)
* [class NfsInfo](https://charmhub.io/filesystem-client/libraries/filesystem_info#nfsinfo)
* + [def from\_uri(
    cls,
    uri,
    \_model)](https://charmhub.io/filesystem-client/libraries/filesystem_info#nfsinfo-from_uri)
* + [def to\_uri(
    self,
    \_model)](https://charmhub.io/filesystem-client/libraries/filesystem_info#nfsinfo-to_uri)
* + [def filesystem\_type(
    cls)](https://charmhub.io/filesystem-client/libraries/filesystem_info#nfsinfo-filesystem_type)
* [class CephfsInfo](https://charmhub.io/filesystem-client/libraries/filesystem_info#cephfsinfo)
* + [def from\_uri(
    cls,
    uri,
    model)](https://charmhub.io/filesystem-client/libraries/filesystem_info#cephfsinfo-from_uri)
* + [def to\_uri(
    self,
    model)](https://charmhub.io/filesystem-client/libraries/filesystem_info#cephfsinfo-to_uri)
* + [def grant(
    self,
    model,
    relation)](https://charmhub.io/filesystem-client/libraries/filesystem_info#cephfsinfo-grant)
* + [def filesystem\_type(
    cls)](https://charmhub.io/filesystem-client/libraries/filesystem_info#cephfsinfo-filesystem_type)
* [class LustreInfo](https://charmhub.io/filesystem-client/libraries/filesystem_info#lustreinfo)
* + [def from\_uri(
    cls,
    uri,
    \_model)](https://charmhub.io/filesystem-client/libraries/filesystem_info#lustreinfo-from_uri)
* + [def to\_uri(
    self,
    \_model)](https://charmhub.io/filesystem-client/libraries/filesystem_info#lustreinfo-to_uri)
* + [def filesystem\_type(
    cls)](https://charmhub.io/filesystem-client/libraries/filesystem_info#lustreinfo-filesystem_type)
* [class Endpoint](https://charmhub.io/filesystem-client/libraries/filesystem_info#endpoint)
* [class FilesystemEvent](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesystemevent)
* + [def endpoint(
    self)](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesystemevent-endpoint)
* [class MountFilesystemEvent](https://charmhub.io/filesystem-client/libraries/filesystem_info#mountfilesystemevent)
* [class UmountFilesystemEvent](https://charmhub.io/filesystem-client/libraries/filesystem_info#umountfilesystemevent)
* [class FilesystemRequiresEvents](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesystemrequiresevents)
* [class FilesystemRequires](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesystemrequires)
* + [def \_\_init\_\_(
    self,
    charm,
    relation\_name)](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesystemrequires-__init__)
* + [def endpoints(
    self)](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesystemrequires-endpoints)
* [class FilesystemProvides](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesystemprovides)
* + [def \_\_init\_\_(
    self,
    charm,
    relation\_name,
    peer\_relation\_name)](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesystemprovides-__init__)
* + [def set\_info(
    self,
    info)](https://charmhub.io/filesystem-client/libraries/filesystem_info#filesystemprovides-set_info)

#### class FilesystemInfoError

Description

Exception raised when an operation failed. None

#### class ParseUriError

Description

Exception raised when a parse operation from an URI failed. None

#### class FilesystemInfo

Information to mount a filesystem.

Description

This is an abstract class that exposes a set of required methods. All filesystems that
can be handled by this library must derive this abstract class.

Methods

FilesystemInfo.
from\_uri(

cls

,
uri: str

,
model: Model
)

Description

Convert an URI string into a `FilesystemInfo` object. None

FilesystemInfo.
to\_uri(

*self*

,
model: Model
)

Description

Convert this `FilesystemInfo` object into an URI string. None

FilesystemInfo.
grant(

*self*

,
model: Model

,
relation
)

Grant permissions for a certain relation to any secrets that this `FilesystemInfo` has.

Description

This is an optional method because not all filesystems will require secrets to
be mounted on the client.

FilesystemInfo.
filesystem\_type(

cls
)

Description

Get the string identifier of this filesystem type. None

#### class NfsInfo

Description

Information required to mount an NFS share. None

Methods

NfsInfo.
from\_uri(

cls

,
uri: str

,
\_model: Model
)

Description

See :py:meth:`FilesystemInfo.from_uri` for documentation on this method. None

NfsInfo.
to\_uri(

*self*

,
\_model: Model
)

Description

See :py:meth:`FilesystemInfo.to_uri` for documentation on this method. None

NfsInfo.
filesystem\_type(

cls
)

Description

See :py:meth:`FilesystemInfo.fs_type` for documentation on this method. None

#### class CephfsInfo

Description

Information required to mount a CephFS share. None

Methods

CephfsInfo.
from\_uri(

cls

,
uri: str

,
model: Model
)

Description

See :py:meth:`FilesystemInfo.from_uri` for documentation on this method. None

CephfsInfo.
to\_uri(

*self*

,
model: Model
)

Description

See :py:meth:`FilesystemInfo.to_uri` for documentation on this method. None

CephfsInfo.
grant(

*self*

,
model: Model

,
relation: Relation
)

Description

See :py:meth:`FilesystemInfo.grant` for documentation on this method. None

CephfsInfo.
filesystem\_type(

cls
)

Description

See :py:meth:`FilesystemInfo.fs_type` for documentation on this method. None

#### class LustreInfo

Description

Information required to mount a Luste share. None

Methods

LustreInfo.
from\_uri(

cls

,
uri: str

,
\_model: Model
)

Description

See :py:meth:`FilesystemInfo.from_uri` for documentation on this method. None

LustreInfo.
to\_uri(

*self*

,
\_model: Model
)

Description

See :py:meth:`FilesystemInfo.to_uri` for documentation on this method. None

LustreInfo.
filesystem\_type(

cls
)

Description

See :py:meth:`FilesystemInfo.fs_type` for documentation on this method. None

#### class Endpoint

Description

Endpoint data exposed by a filesystem server. None

#### class FilesystemEvent

Description

Base event for filesystem-related events. None

Methods

FilesystemEvent.
endpoint(

*self*
)

Description

Get endpoint info. None

#### class MountFilesystemEvent

Description

Emit when a filesystem is ready to be mounted. None

#### class UmountFilesystemEvent

Description

Emit when a filesystem needs to be unmounted. None

#### class FilesystemRequiresEvents

Description

Events that FS servers can emit. None

#### class FilesystemRequires

Description

Consumer-side interface of filesystem integrations. None

Methods

FilesystemRequires.
\_\_init\_\_(

*self*

,
charm: CharmBase

,
relation\_name: str
)

FilesystemRequires.
endpoints(

*self*
)

Description

List of endpoints exposed by all the relations of this charm. None

#### class FilesystemProvides

Description

Provider-side interface of filesystem integrations. None

Methods

FilesystemProvides.
\_\_init\_\_(

*self*

,
charm: CharmBase

,
relation\_name: str

,
peer\_relation\_name: str
)

FilesystemProvides.
set\_info(

*self*

,
info: FilesystemInfo
)

Set information to mount a filesystem.

Arguments

info

Information required to mount the filesystem.
