Search in sources :

Example 26 with ResourceOperationSpec

use of com.vmware.photon.controller.model.adapters.registry.operations.ResourceOperationSpecService.ResourceOperationSpec in project photon-model by vmware.

the class AzureLifecycleOperationService method getResourceOperationSpec.

private static ResourceOperationSpec getResourceOperationSpec(ResourceOperation operationType, String targetCriteria) {
    ResourceOperationSpec spec = new ResourceOperationSpec();
    spec.endpointType = EndpointType.azure.name();
    spec.resourceType = ResourceType.COMPUTE;
    spec.operation = operationType.operation;
    spec.name = operationType.displayName;
    spec.description = operationType.description;
    spec.targetCriteria = targetCriteria;
    return spec;
}
Also used : ResourceOperationSpec(com.vmware.photon.controller.model.adapters.registry.operations.ResourceOperationSpecService.ResourceOperationSpec)

Aggregations

ResourceOperationSpec (com.vmware.photon.controller.model.adapters.registry.operations.ResourceOperationSpecService.ResourceOperationSpec)26 Test (org.junit.Test)14 ComputeState (com.vmware.photon.controller.model.resources.ComputeService.ComputeState)10 BaseResourceOperationTest.createResourceOperationSpec (com.vmware.photon.controller.model.adapters.registry.operations.BaseResourceOperationTest.createResourceOperationSpec)7 BaseResourceOperationTest.createComputeState (com.vmware.photon.controller.model.adapters.registry.operations.BaseResourceOperationTest.createComputeState)6 Operation (com.vmware.xenon.common.Operation)4 List (java.util.List)3 QueryTop (com.vmware.photon.controller.model.query.QueryUtils.QueryTop)2 EndpointState (com.vmware.photon.controller.model.resources.EndpointService.EndpointState)2 Query (com.vmware.xenon.services.common.QueryTask.Query)2 URI (java.net.URI)2 TypeToken (com.google.gson.reflect.TypeToken)1 ResourceType (com.vmware.photon.controller.model.adapters.registry.operations.ResourceOperationSpecService.ResourceType)1 Schema (com.vmware.photon.controller.model.data.Schema)1 SchemaBuilder (com.vmware.photon.controller.model.data.SchemaBuilder)1 NetworkState (com.vmware.photon.controller.model.resources.NetworkService.NetworkState)1 ResourceState (com.vmware.photon.controller.model.resources.ResourceState)1 AssertUtil (com.vmware.photon.controller.model.util.AssertUtil)1 ClusterUtil (com.vmware.photon.controller.model.util.ClusterUtil)1 SELF_SERVICE (com.vmware.photon.controller.model.util.ClusterUtil.ServiceTypeCluster.SELF_SERVICE)1