services.ClusterService 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-2016 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;
import annotations.Area;
import mixins.Follow;
import org.ovirt.api.metamodel.annotations.In;
import org.ovirt.api.metamodel.annotations.InputDetail;
import org.ovirt.api.metamodel.annotations.Out;
import org.ovirt.api.metamodel.annotations.Service;
import services.gluster.GlusterHooksService;
import services.gluster.GlusterVolumesService;
import types.Cluster;
import types.ClusterUpgradeAction;
import static org.ovirt.api.metamodel.language.ApiLanguage.optional;
import static org.ovirt.api.metamodel.language.ApiLanguage.or;
/**
* A service to manage a specific cluster.
*
* @author Yaniv Bronheim
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
@Service
@Area("Virtualization")
public interface ClusterService {
/**
* Gets information about the cluster.
*
* An example of getting a cluster:
*
* [source]
* ----
* GET /ovirt-engine/api/clusters/123
* ----
*
* [source,xml]
* ----
*
*
*
*
* Default
* The default server cluster
*
*
*
*
*
*
* false
*
* x86_64
* Intel Nehalem Family
*
*
* migrate
*
*
* true
*
* false
* 50
*
*
* false
*
*
* false
* false
*
* true
* true
*
*
*
* 100
*
*
* true
*
*
*
* inherit
*
* auto
*
* inherit
*
*
* random
*
*
* false
* false
* false
*
* 4
* 0
*
* true
*
*
* ----
*
* @author Yaniv Bronhaim
* @author Tahlia Richardson
* @author Steve Goodman
* @date 04 Oct 2018
* @status updated_by_docs
*/
interface Get extends Follow {
@Out Cluster cluster();
/**
* Indicates if the results should be filtered according to the permissions of the user.
*
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
@In Boolean filter();
}
/**
* Updates information about the cluster.
*
* Only the specified fields are updated; others remain unchanged.
*
* For example, to update the cluster's CPU:
*
* [source]
* ----
* PUT /ovirt-engine/api/clusters/123
* ----
*
* With a request body like this:
*
* [source,xml]
* ----
*
*
* Intel Haswell-noTSX Family
*
*
* ----
*
* @author Jakub Niedermertl
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
interface Update {
@InputDetail
default void inputDetail() {
optional(cluster().ballooningEnabled());
optional(cluster().cpu().architecture());
optional(cluster().cpu().type());
optional(cluster().description());
optional(cluster().display().proxy());
optional(cluster().errorHandling().onError());
optional(cluster().glusterService());
optional(cluster().haReservation());
optional(cluster().ksm().enabled());
optional(cluster().memoryPolicy().overCommit().percent());
optional(cluster().memoryPolicy().transparentHugePages().enabled());
optional(cluster().name());
optional(cluster().threadsAsCores());
optional(cluster().trustedService());
optional(cluster().tunnelMigration());
optional(cluster().version().major());
optional(cluster().version().minor());
optional(cluster().virtService());
or(optional(cluster().schedulingPolicy().id()), optional(cluster().schedulingPolicy().name()));
optional(cluster().fipsMode());
}
@In @Out Cluster cluster();
/**
* Indicates if the update should be performed asynchronously.
*
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
@In Boolean async();
}
/**
* Removes the cluster from the system.
*
* [source]
* ----
* DELETE /ovirt-engine/api/clusters/00000000-0000-0000-0000-000000000000
* ----
*
* @author Jakub Niedermertl
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
interface Remove {
/**
* Indicates if the remove should be performed asynchronously.
*
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
@In Boolean async();
}
interface ResetEmulatedMachine {
/**
* Indicates if the reset should be performed asynchronously.
*
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
@In Boolean async();
}
/**
* Synchronizes all networks on the cluster.
*
* [source]
* ----
* POST /ovirt-engine/api/clusters/123/syncallnetworks
* ----
*
* With a request body like this:
*
* [source,xml]
* ----
*
* ----
*
* @author Eitan Raviv
* @author Avital Pinnick
* @date 17 April 2018
* @since 4.2.6
* @status updated_by_docs
*/
interface SyncAllNetworks {
/**
* Indicates if the action should be performed asynchronously.
*
* @author Eitan Raviv
* @author Avital Pinnick
* @date 17 April 2018
* @status updated_by_docs
*/
@In Boolean async();
}
/**
* Start or finish upgrade process for the cluster based on the action value. This action marks the cluster for
* upgrade or clears the upgrade running flag on the cluster based on the action value which takes values of
* start or stop.
*
* [source]
* ----
* POST /ovirt-engine/api/clusters/123/upgrade
* ----
*
* With a request body like this to mark the cluster for upgrade:
*
* [source,xml]
* ----
*
*
* start
*
*
* ----
*
* @author Ravi Nori
* @date 13 March 2019
* @since 4.3.2
* @status added
*/
interface Upgrade {
/**
* The action to be performed.
*
* @author Ravi Nori
* @date 14 March 2019
* @status added
*/
@In ClusterUpgradeAction upgradeAction();
/**
* Indicates if the action should be performed asynchronously.
*
* @author Ravi Nori
* @date 13 March 2019
* @status added
*/
@In Boolean async();
}
/**
* A reference to the service that manages affinity groups.
*
* @author Yaniv Bronheim
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
@Service AffinityGroupsService affinityGroups();
/**
* A reference to the service that manages assigned CPU profiles for the cluster.
*
* @author Yaniv Bronheim
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
@Service AssignedCpuProfilesService cpuProfiles();
/**
* A reference to the service that manages assigned networks for the cluster.
*
* @author Yaniv Bronheim
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
@Service ClusterNetworksService networks();
/**
* A reference to permissions.
*
* @author Yaniv Bronheim
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
@Service AssignedPermissionsService permissions();
/**
* A reference to the service that manages the Gluster hooks for the cluster.
*
* @author Yaniv Bronheim
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
@Service GlusterHooksService glusterHooks();
/**
* A reference to the service that manages Gluster volumes for the cluster.
*
* @author Yaniv Bronheim
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
@Service GlusterVolumesService glusterVolumes();
/**
* A sub-collection with all the supported network filters for the cluster.
*
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
*/
@Service NetworkFiltersService networkFilters();
/**
* A reference to the service that manages the collection of enabled features for the cluster.
*
* @author Sahina Bose
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
* @since 4.1.6
*/
@Service ClusterEnabledFeaturesService enabledFeatures();
/**
* A reference to the service that manages the collection of external network providers.
*
* @author Dominik Holler
* @author Tahlia Richardson
* @date 06 Oct 2017
* @status updated_by_docs
* @since 4.2
*/
@Service
ClusterExternalProvidersService externalNetworkProviders();
/**
* Refresh the Gluster heal info for all volumes in cluster.
*
* For example, Cluster `123`, send a request like
* this:
*
* [source]
* ----
* POST /ovirt-engine/api/clusters/123/refreshglusterhealstatus
* ----
*
*
* @author Ritesh Chikatwar
* @date 3 Feb 2020
* @status added
*/
interface refreshGlusterHealStatus {
}
}