services.gluster.GlusterBrickService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of model Show documentation
Show all versions of model Show documentation
Model management tools for the oVirt Engine API.
/*
Copyright (c) 2015 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package services.gluster;
import mixins.Follow;
import org.ovirt.api.metamodel.annotations.In;
import org.ovirt.api.metamodel.annotations.Out;
import org.ovirt.api.metamodel.annotations.Service;
import annotations.Area;
import services.MeasurableService;
import types.GlusterBrick;
/**
* This service manages a single gluster brick.
*
* @author Sahina Bose
* @date 12 Dec 2016
* @status added
*/
@Service
@Area("Gluster")
public interface GlusterBrickService extends MeasurableService {
/**
* Get details of a brick.
*
* Retrieves status details of brick from underlying gluster volume with header `All-Content` set to `true`. This is
* the equivalent of running `gluster volume status detail`.
*
* For example, to get the details of brick `234` of gluster volume `123`, send a request like this:
*
* [source]
* ----
* GET /ovirt-engine/api/clusters/567/glustervolumes/123/glusterbricks/234
* ----
*
* Which will return a response body like this:
*
* [source,xml]
* ----
*
* host1:/rhgs/data/brick1
* /rhgs/data/brick1
* 111
* up
* /dev/mapper/RHGS_vg1-lv_vmaddldisks
* xfs
*
*
* 2818417648
* 1384694844
* 1011
* client2
*
*
*
*
* data-server:fd_t
* 1626348
* 1020
* 4
* 23
* 0
* 140
* 0
*
*
* rw,seclabel,noatime,nodiratime,attr2,inode64,sunit=512,swidth=2048,noquota
* 25589
* 49155
*
* ----
*
* @author Sahina Bose
* @date 12 Dec 2016
* @status added
*/
interface Get extends Follow {
@Out GlusterBrick brick();
}
/**
* Removes a brick.
*
* Removes a brick from the underlying gluster volume and deletes entries from database. This can be used only when
* removing a single brick without data migration. To remove multiple bricks and with data migration, use
* <> instead.
*
* For example, to delete brick `234` from gluster volume `123`, send a request like this:
*
* [source]
* ----
* DELETE /ovirt-engine/api/clusters/567/glustervolumes/123/glusterbricks/234
* ----
*
* @author Sahina Bose
* @date 12 Dec 2016
* @status added
*/
interface Remove {
/**
* Indicates if the remove should be performed asynchronously.
*/
@In Boolean async();
}
/**
* Replaces this brick with a new one.
*
* IMPORTANT: This operation has been deprecated since version 3.5 of the engine and will be removed in the future.
* Use <> and
* <> instead.
*
* @author Sahina Bose
* @date 12 Dec 2016
* @status added
*/
@Deprecated
interface Replace {
@In Boolean force();
/**
* Indicates if the replacement should be performed asynchronously.
*/
@In Boolean async();
}
}