Class GlusterBricksServiceImpl
- java.lang.Object
-
- org.ovirt.engine.sdk4.internal.services.ServiceImpl
-
- org.ovirt.engine.sdk4.internal.services.GlusterBricksServiceImpl
-
- All Implemented Interfaces:
Service
,GlusterBricksService
public class GlusterBricksServiceImpl extends ServiceImpl implements GlusterBricksService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ovirt.engine.sdk4.services.GlusterBricksService
GlusterBricksService.ActivateRequest, GlusterBricksService.ActivateResponse, GlusterBricksService.AddRequest, GlusterBricksService.AddResponse, GlusterBricksService.ListRequest, GlusterBricksService.ListResponse, GlusterBricksService.MigrateRequest, GlusterBricksService.MigrateResponse, GlusterBricksService.RemoveRequest, GlusterBricksService.RemoveResponse, GlusterBricksService.StopMigrateRequest, GlusterBricksService.StopMigrateResponse
-
-
Constructor Summary
Constructors Constructor Description GlusterBricksServiceImpl(HttpConnection connection, String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GlusterBricksService.ActivateRequest
activate()
Activate the bricks post data migration of remove brick operation.GlusterBricksService.AddRequest
add()
Adds a list of bricks to gluster volume.GlusterBrickService
brickService(String id)
Returns a reference to the service managing a single gluster brick.GlusterBricksService.ListRequest
list()
Lists the bricks of a gluster volume.GlusterBricksService.MigrateRequest
migrate()
Start migration of data prior to removing bricks.GlusterBricksService.RemoveRequest
remove()
Removes bricks from gluster volume.Service
service(String path)
Service locator method, returns individual service on which the URI is dispatched.GlusterBricksService.StopMigrateRequest
stopMigrate()
Stops migration of data from bricks for a remove brick operation.String
toString()
-
Methods inherited from class org.ovirt.engine.sdk4.internal.services.ServiceImpl
checkAction, checkFault, getConnection, getPath, throwError
-
-
-
-
Constructor Detail
-
GlusterBricksServiceImpl
public GlusterBricksServiceImpl(HttpConnection connection, String path)
-
-
Method Detail
-
activate
public GlusterBricksService.ActivateRequest activate()
Description copied from interface:GlusterBricksService
Activate the bricks post data migration of remove brick operation. Used to activate brick(s) once the data migration from bricks is complete but user no longer wishes to remove bricks. The bricks that were previously marked for removal will now be used as normal bricks. For example, to retain the bricks that on glustervolume `123` from which data was migrated, send a request like this: [source] ---- POST /ovirt-engine/api/clusters/567/glustervolumes/123/glusterbricks/activate ---- With a request body like this: [source,xml] ----host1:/rhgs/brick1 - Specified by:
activate
in interfaceGlusterBricksService
-
add
public GlusterBricksService.AddRequest add()
Description copied from interface:GlusterBricksService
Adds a list of bricks to gluster volume. Used to expand a gluster volume by adding bricks. For replicated volume types, the parameter `replica_count` needs to be passed. In case the replica count is being increased, then the number of bricks needs to be equivalent to the number of replica sets. For example, to add bricks to gluster volume `123`, send a request like this: [source] ---- POST /ovirt-engine/api/clusters/567/glustervolumes/123/glusterbricks ---- With a request body like this: [source,xml] ----111 /export/data/brick3 - Specified by:
add
in interfaceGlusterBricksService
-
list
public GlusterBricksService.ListRequest list()
Description copied from interface:GlusterBricksService
Lists the bricks of a gluster volume. For example, to list bricks of gluster volume `123`, send a request like this: [source] ---- GET /ovirt-engine/api/clusters/567/glustervolumes/123/glusterbricks ---- Provides an output as below: [source,xml] ----host1:/rhgs/data/brick1 /rhgs/data/brick1 111 up host2:/rhgs/data/brick1 /rhgs/data/brick1 222 up - Specified by:
list
in interfaceGlusterBricksService
-
migrate
public GlusterBricksService.MigrateRequest migrate()
Description copied from interface:GlusterBricksService
Start migration of data prior to removing bricks. Removing bricks is a two-step process, where the data on bricks to be removed, is first migrated to remaining bricks. Once migration is completed the removal of bricks is confirmed via the API <>. If at any point, the action needs to be cancelled < > has to be called. For instance, to delete a brick from a gluster volume with id `123`, send a request: [source] ---- POST /ovirt-engine/api/clusters/567/glustervolumes/123/glusterbricks/migrate ---- With a request body like this: [source,xml] ---- host1:/rhgs/brick1 > and steps in job using < > - Specified by:
migrate
in interfaceGlusterBricksService
-
remove
public GlusterBricksService.RemoveRequest remove()
Description copied from interface:GlusterBricksService
Removes bricks from gluster volume. The recommended way to remove bricks without data loss is to first migrate the data using <> and then removing them. If migrate was not called on bricks prior to remove, the bricks are removed without data migration which may lead to data loss. For example, to delete the bricks from gluster volume `123`, send a request like this: [source] ---- DELETE /ovirt-engine/api/clusters/567/glustervolumes/123/glusterbricks ---- With a request body like this: [source,xml] ---- host:brick_directory - Specified by:
remove
in interfaceGlusterBricksService
-
stopMigrate
public GlusterBricksService.StopMigrateRequest stopMigrate()
Description copied from interface:GlusterBricksService
Stops migration of data from bricks for a remove brick operation. To cancel data migration that was started as part of the 2-step remove brick process in case the user wishes to continue using the bricks. The bricks that were marked for removal will function as normal bricks post this operation. For example, to stop migration of data from the bricks of gluster volume `123`, send a request like this: [source] ---- POST /ovirt-engine/api/clusters/567/glustervolumes/123/glusterbricks/stopmigrate ---- With a request body like this: [source,xml] ----host:brick_directory - Specified by:
stopMigrate
in interfaceGlusterBricksService
-
brickService
public GlusterBrickService brickService(String id)
Description copied from interface:GlusterBricksService
Returns a reference to the service managing a single gluster brick.- Specified by:
brickService
in interfaceGlusterBricksService
-
service
public Service service(String path)
Description copied from interface:GlusterBricksService
Service locator method, returns individual service on which the URI is dispatched.- Specified by:
service
in interfaceGlusterBricksService
-
-