Search in sources :

Example 6 with ViPRCatalogClient2

use of com.emc.vipr.client.ViPRCatalogClient2 in project coprhd-controller by CoprHD.

the class ExecutionWindowUtils method getExecutionWindows.

public static List<ExecutionWindowRestRep> getExecutionWindows() {
    ViPRCatalogClient2 catalog = getCatalogClient();
    List<NamedRelatedResourceRep> reps = catalog.executionWindows().listByUserTenant();
    return catalog.executionWindows().getByRefs(reps);
}
Also used : ViPRCatalogClient2(com.emc.vipr.client.ViPRCatalogClient2) NamedRelatedResourceRep(com.emc.storageos.model.NamedRelatedResourceRep)

Example 7 with ViPRCatalogClient2

use of com.emc.vipr.client.ViPRCatalogClient2 in project coprhd-controller by CoprHD.

the class ExecutionWindowUtils method deleteExecutionWindow.

public static void deleteExecutionWindow(ExecutionWindowRestRep executionWindow) {
    if (executionWindow != null) {
        ViPRCatalogClient2 catalog = getCatalogClient();
        catalog.executionWindows().deactivate(executionWindow.getId());
    }
}
Also used : ViPRCatalogClient2(com.emc.vipr.client.ViPRCatalogClient2)

Example 8 with ViPRCatalogClient2

use of com.emc.vipr.client.ViPRCatalogClient2 in project coprhd-controller by CoprHD.

the class ExecutionWindowUtils method getExecutionWindow.

public static ExecutionWindowRestRep getExecutionWindow(String name, URI tenantId) {
    ViPRCatalogClient2 catalog = getCatalogClient();
    List<ExecutionWindowRestRep> executionWindows = catalog.executionWindows().getByTenant(tenantId);
    for (ExecutionWindowRestRep executionWindow : executionWindows) {
        if (name.equals(executionWindow.getName())) {
            return executionWindow;
        }
    }
    return null;
}
Also used : ExecutionWindowRestRep(com.emc.vipr.model.catalog.ExecutionWindowRestRep) ViPRCatalogClient2(com.emc.vipr.client.ViPRCatalogClient2)

Example 9 with ViPRCatalogClient2

use of com.emc.vipr.client.ViPRCatalogClient2 in project coprhd-controller by CoprHD.

the class CatalogCategoryUtils method moveUpCategory.

public static void moveUpCategory(URI catalogCategoryId) {
    ViPRCatalogClient2 catalog = getCatalogClient();
    catalog.categories().moveUp(catalogCategoryId);
}
Also used : ViPRCatalogClient2(com.emc.vipr.client.ViPRCatalogClient2)

Example 10 with ViPRCatalogClient2

use of com.emc.vipr.client.ViPRCatalogClient2 in project coprhd-controller by CoprHD.

the class CatalogCategoryUtils method moveDownCategory.

public static void moveDownCategory(URI catalogCategoryId) {
    ViPRCatalogClient2 catalog = getCatalogClient();
    catalog.categories().moveDown(catalogCategoryId);
}
Also used : ViPRCatalogClient2(com.emc.vipr.client.ViPRCatalogClient2)

Aggregations

ViPRCatalogClient2 (com.emc.vipr.client.ViPRCatalogClient2)32 OrderRestRep (com.emc.vipr.model.catalog.OrderRestRep)7 ApprovalRestRep (com.emc.vipr.model.catalog.ApprovalRestRep)4 CatalogServiceRestRep (com.emc.vipr.model.catalog.CatalogServiceRestRep)4 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)2 ViPRHttpException (com.emc.vipr.client.exceptions.ViPRHttpException)2 URI (java.net.URI)2 Date (java.util.Date)2 OrderTextCreator (com.emc.storageos.db.client.util.OrderTextCreator)1 AssetDependencyRequest (com.emc.vipr.model.catalog.AssetDependencyRequest)1 AssetOptionsRequest (com.emc.vipr.model.catalog.AssetOptionsRequest)1 ExecutionLogRestRep (com.emc.vipr.model.catalog.ExecutionLogRestRep)1 ExecutionStateRestRep (com.emc.vipr.model.catalog.ExecutionStateRestRep)1 ExecutionWindowRestRep (com.emc.vipr.model.catalog.ExecutionWindowRestRep)1 OrderLogRestRep (com.emc.vipr.model.catalog.OrderLogRestRep)1 Reference (com.emc.vipr.model.catalog.Reference)1 ScheduledEventRestRep (com.emc.vipr.model.catalog.ScheduledEventRestRep)1 ApprovalRequestInfo (models.datatable.ApprovalsDataTable.ApprovalRequestInfo)1 DateTime (org.joda.time.DateTime)1 Util (play.mvc.Util)1