Search in sources :

Example 1 with ScalingPolicyStatus

use of com.netflix.titus.grpc.protogen.ScalingPolicyStatus in project titus-control-plane by Netflix.

the class GrpcModelConverters method toScalingPolicyResult.

public static ScalingPolicyResult toScalingPolicyResult(AutoScalingPolicy autoScalingPolicy) {
    ScalingPolicy scalingPolicy = toScalingPolicy(autoScalingPolicy);
    ScalingPolicyStatus scalingPolicyStatus = toScalingPolicyStatus(autoScalingPolicy.getStatus(), autoScalingPolicy.getStatusMessage());
    return ScalingPolicyResult.newBuilder().setJobId(autoScalingPolicy.getJobId()).setId(ScalingPolicyID.newBuilder().setId(autoScalingPolicy.getRefId()).build()).setPolicyState(scalingPolicyStatus).setScalingPolicy(scalingPolicy).build();
}
Also used : ScalingPolicy(com.netflix.titus.grpc.protogen.ScalingPolicy) AutoScalingPolicy(com.netflix.titus.api.appscale.model.AutoScalingPolicy) StepScalingPolicy(com.netflix.titus.grpc.protogen.StepScalingPolicy) ScalingPolicyStatus(com.netflix.titus.grpc.protogen.ScalingPolicyStatus)

Aggregations

AutoScalingPolicy (com.netflix.titus.api.appscale.model.AutoScalingPolicy)1 ScalingPolicy (com.netflix.titus.grpc.protogen.ScalingPolicy)1 ScalingPolicyStatus (com.netflix.titus.grpc.protogen.ScalingPolicyStatus)1 StepScalingPolicy (com.netflix.titus.grpc.protogen.StepScalingPolicy)1