Search in sources :

Example 11 with PeriscopeUser

use of com.sequenceiq.periscope.domain.PeriscopeUser in project cloudbreak by hortonworks.

the class AutoScaleClusterCommonService method setState.

public AutoscaleClusterResponse setState(Long clusterId, StateJson stateJson) {
    PeriscopeUser user = authenticatedUserService.getPeriscopeUser();
    MDCBuilder.buildMdcContext(user, clusterId);
    Cluster cluster = clusterService.setState(clusterId, stateJson.getState());
    createHistoryAndNotification(cluster);
    return createClusterJsonResponse(cluster);
}
Also used : PeriscopeUser(com.sequenceiq.periscope.domain.PeriscopeUser) Cluster(com.sequenceiq.periscope.domain.Cluster)

Example 12 with PeriscopeUser

use of com.sequenceiq.periscope.domain.PeriscopeUser in project cloudbreak by hortonworks.

the class AutoScaleClusterCommonService method setAutoscaleState.

public AutoscaleClusterResponse setAutoscaleState(Long clusterId, AutoscaleClusterState autoscaleState) {
    PeriscopeUser user = authenticatedUserService.getPeriscopeUser();
    MDCBuilder.buildMdcContext(user, clusterId);
    Cluster cluster = clusterService.setAutoscaleState(clusterId, autoscaleState.isEnableAutoscaling());
    createHistoryAndNotification(cluster);
    return createClusterJsonResponse(cluster);
}
Also used : PeriscopeUser(com.sequenceiq.periscope.domain.PeriscopeUser) Cluster(com.sequenceiq.periscope.domain.Cluster)

Aggregations

PeriscopeUser (com.sequenceiq.periscope.domain.PeriscopeUser)12 Cluster (com.sequenceiq.periscope.domain.Cluster)4 UserFilterField (com.sequenceiq.cloudbreak.common.service.user.UserFilterField)1 History (com.sequenceiq.periscope.domain.History)1 SecurityConfig (com.sequenceiq.periscope.domain.SecurityConfig)1 AmbariStack (com.sequenceiq.periscope.model.AmbariStack)1 Field (java.lang.reflect.Field)1 Before (org.aspectj.lang.annotation.Before)1 CodeSignature (org.aspectj.lang.reflect.CodeSignature)1