All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ovirt.engine.sdk4.services.StorageDomainService Maven / Gradle / Ivy

There is a newer version: 4.5.1
Show newest version
/*
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 org.ovirt.engine.sdk4.services;

import java.io.IOException;
import java.lang.Boolean;
import java.util.List;
import org.ovirt.engine.sdk4.Request;
import org.ovirt.engine.sdk4.Response;
import org.ovirt.engine.sdk4.Service;
import org.ovirt.engine.sdk4.builders.HostBuilder;
import org.ovirt.engine.sdk4.builders.LogicalUnitBuilder;
import org.ovirt.engine.sdk4.builders.StorageDomainBuilder;
import org.ovirt.engine.sdk4.types.Host;
import org.ovirt.engine.sdk4.types.LogicalUnit;
import org.ovirt.engine.sdk4.types.StorageDomain;

public interface StorageDomainService extends Service {
    public interface GetRequest extends Request {
        /**
         * Indicates if the results should be filtered according to the permissions of the user.
         */
        GetRequest filter(Boolean filter);
    }
    
    public interface GetResponse extends Response {
        StorageDomain storageDomain();
    }
    
    GetRequest get();
    
    public interface IsAttachedRequest extends Request {
        /**
         * Indicates if the action should be performed asynchronously.
         */
        IsAttachedRequest async(Boolean async);
        IsAttachedRequest host(Host host);
        IsAttachedRequest host(HostBuilder host);
    }
    
    public interface IsAttachedResponse extends Response {
        Boolean isAttached();
    }
    
    IsAttachedRequest isAttached();
    
    public interface RefreshLunsRequest extends Request {
        /**
         * Indicates if the refresh should be performed asynchronously.
         */
        RefreshLunsRequest async(Boolean async);
        RefreshLunsRequest logicalUnits(List logicalUnits);
        RefreshLunsRequest logicalUnits(LogicalUnit... logicalUnits);
        RefreshLunsRequest logicalUnits(LogicalUnitBuilder... logicalUnits);
    }
    
    public interface RefreshLunsResponse extends Response {
    }
    
    RefreshLunsRequest refreshLuns();
    
    /**
     * Removes the storage domain.
     * 
     * Without any special parameters, the storage domain is detached from the system and removed from the database. The
     * storage domain can then be imported to the same or different setup, with all the data on it. If the storage isn't
     * accessible the operation will fail.
     * 
     * If the `destroy` parameter is `true` then the operation will always succeed, even if the storage isn't
     * accessible, the failure is just ignored and the storage domain is removed from the database anyway.
     * 
     * If the `format` parameter is `true` then the actual storage is formatted, and the metadata is removed from the
     * LUN or directory, so it can no longer be imported to the same or a different setup.
     */
    public interface RemoveRequest extends Request {
        /**
         * Indicates if the remove should be performed asynchronously.
         */
        RemoveRequest async(Boolean async);
        /**
         * Indicates if the operation should succeed, and the storage domain removed from the database, even if the
         * storage isn't accessible.
         * 
         * This parameter is optional, and the default value is `false`.
         */
        RemoveRequest destroy(Boolean destroy);
        /**
         * Indicates if the actual storage should be formatted, removing all the metadata from the underlying LUN or
         * directory.
         * 
         * This parameter is optional, and the default value is `false`.
         */
        RemoveRequest format(Boolean format);
        /**
         * Indicates what host should be used to remove the storage domain.
         * 
         * This parameter is mandatory, and it can contain the name or the identifier of the host. For example, to use
         * the host named `myhost` to remove the storage domain with identifier `123` send a request like this:
         * 
         * [source]
         * ----
         * DELETE /ovirt-engine/api/storagedomains/123?host=myhost
         * ----
         */
        RemoveRequest host(String host);
    }
    
    /**
     * Removes the storage domain.
     * 
     * Without any special parameters, the storage domain is detached from the system and removed from the database. The
     * storage domain can then be imported to the same or different setup, with all the data on it. If the storage isn't
     * accessible the operation will fail.
     * 
     * If the `destroy` parameter is `true` then the operation will always succeed, even if the storage isn't
     * accessible, the failure is just ignored and the storage domain is removed from the database anyway.
     * 
     * If the `format` parameter is `true` then the actual storage is formatted, and the metadata is removed from the
     * LUN or directory, so it can no longer be imported to the same or a different setup.
     */
    public interface RemoveResponse extends Response {
    }
    
    /**
     * Removes the storage domain.
     * 
     * Without any special parameters, the storage domain is detached from the system and removed from the database. The
     * storage domain can then be imported to the same or different setup, with all the data on it. If the storage isn't
     * accessible the operation will fail.
     * 
     * If the `destroy` parameter is `true` then the operation will always succeed, even if the storage isn't
     * accessible, the failure is just ignored and the storage domain is removed from the database anyway.
     * 
     * If the `format` parameter is `true` then the actual storage is formatted, and the metadata is removed from the
     * LUN or directory, so it can no longer be imported to the same or a different setup.
     */
    RemoveRequest remove();
    
    public interface UpdateRequest extends Request {
        /**
         * Indicates if the update should be performed asynchronously.
         */
        UpdateRequest async(Boolean async);
        UpdateRequest storageDomain(StorageDomain storageDomain);
        UpdateRequest storageDomain(StorageDomainBuilder storageDomain);
    }
    
    public interface UpdateResponse extends Response {
        StorageDomain storageDomain();
    }
    
    UpdateRequest update();
    
    /**
     * This operation forces the update of the `OVF_STORE`
     * of this storage domain.
     * 
     * The `OVF_STORE` is a disk image that contains the meta-data
     * of virtual machines and disks that reside in the
     * storage domain. This meta-data is used in case the
     * domain is imported or exported to or from a different
     * data center or a different installation.
     * 
     * By default the `OVF_STORE` is updated periodically
     * (set by default to 60 minutes) but users might want to force an
     * update after an important change, or when the they believe the
     * `OVF_STORE` is corrupt.
     * 
     * When initiated by the user, `OVF_STORE` update will be performed whether
     * an update is needed or not.
     */
    public interface UpdateOvfStoreRequest extends Request {
        /**
         * Indicates if the `OVF_STORE` update should be performed asynchronously.
         */
        UpdateOvfStoreRequest async(Boolean async);
    }
    
    /**
     * This operation forces the update of the `OVF_STORE`
     * of this storage domain.
     * 
     * The `OVF_STORE` is a disk image that contains the meta-data
     * of virtual machines and disks that reside in the
     * storage domain. This meta-data is used in case the
     * domain is imported or exported to or from a different
     * data center or a different installation.
     * 
     * By default the `OVF_STORE` is updated periodically
     * (set by default to 60 minutes) but users might want to force an
     * update after an important change, or when the they believe the
     * `OVF_STORE` is corrupt.
     * 
     * When initiated by the user, `OVF_STORE` update will be performed whether
     * an update is needed or not.
     */
    public interface UpdateOvfStoreResponse extends Response {
    }
    
    /**
     * This operation forces the update of the `OVF_STORE`
     * of this storage domain.
     * 
     * The `OVF_STORE` is a disk image that contains the meta-data
     * of virtual machines and disks that reside in the
     * storage domain. This meta-data is used in case the
     * domain is imported or exported to or from a different
     * data center or a different installation.
     * 
     * By default the `OVF_STORE` is updated periodically
     * (set by default to 60 minutes) but users might want to force an
     * update after an important change, or when the they believe the
     * `OVF_STORE` is corrupt.
     * 
     * When initiated by the user, `OVF_STORE` update will be performed whether
     * an update is needed or not.
     */
    UpdateOvfStoreRequest updateOvfStore();
    
    AssignedDiskProfilesService diskProfilesService();
    DiskSnapshotsService diskSnapshotsService();
    DisksService disksService();
    FilesService filesService();
    ImagesService imagesService();
    AssignedPermissionsService permissionsService();
    StorageDomainServerConnectionsService storageConnectionsService();
    StorageDomainTemplatesService templatesService();
    StorageDomainVmsService vmsService();
    /**
     * Service locator method, returns individual service on which the URI is dispatched.
     */
    Service service(String path);
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy