Skip to content

gufo.thor.migrate.mongo

MongoDB migration utilities for Gufo Thor.

iter_intermediate_fcv()

Iterate over FCV values required to reach the target version.

The current FCV is excluded and the target FCV is included. Only FCV values with a corresponding MongoDB image in :data:FCV_IMAGES are returned.

Returns:

Type Description
Iterable[str]

An iterator over intermediate FCV values in ascending order.

migrate_fcv(target_fcv)

Migrate MongoDB to the requested FCV using its matching image.

Parameters:

Name Type Description Default
target_fcv str

FCV to set. It must have a matching image in :data:FCV_IMAGES.

required

Raises:

Type Description
RuntimeError

If the FCV is unsupported or MongoDB migration fails.