Search in sources :

Example 6 with CustomConfigurationProperty

use of com.sequenceiq.cloudbreak.domain.CustomConfigurationProperty in project cloudbreak by hortonworks.

the class CustomConfigurationsValidatorTest method testValidateServiceNames.

@Test
void testValidateServiceNames() {
    CustomConfigurationProperty invalidProperty = new CustomConfigurationProperty("property1", "value1", "role1", "invalidServiceName");
    customConfigurations.setConfigurations(Set.of(invalidProperty));
    assertThrows(CustomConfigurationsServiceTypeNotFoundException.class, () -> underTest.validateServiceNames(customConfigurations));
}
Also used : CustomConfigurationProperty(com.sequenceiq.cloudbreak.domain.CustomConfigurationProperty) Test(org.junit.jupiter.api.Test)

Example 7 with CustomConfigurationProperty

use of com.sequenceiq.cloudbreak.domain.CustomConfigurationProperty in project cloudbreak by hortonworks.

the class CustomConfigurationPropertyConverter method convertFromRequestJson.

public CustomConfigurationProperty convertFromRequestJson(CustomConfigurationPropertyParameters source) {
    CustomConfigurationProperty customConfigurationProperty = new CustomConfigurationProperty();
    customConfigurationProperty.setName(source.getName());
    customConfigurationProperty.setSecretValue(source.getValue());
    customConfigurationProperty.setRoleType(source.getRoleType());
    customConfigurationProperty.setServiceType(source.getServiceType());
    return customConfigurationProperty;
}
Also used : CustomConfigurationProperty(com.sequenceiq.cloudbreak.domain.CustomConfigurationProperty)

Aggregations

CustomConfigurationProperty (com.sequenceiq.cloudbreak.domain.CustomConfigurationProperty)7 Test (org.junit.jupiter.api.Test)5 CustomConfigurationPropertyParameters (com.sequenceiq.cloudbreak.api.model.CustomConfigurationPropertyParameters)3 CustomConfigurations (com.sequenceiq.cloudbreak.domain.CustomConfigurations)3 AuthorizationResourceType (com.sequenceiq.authorization.resource.AuthorizationResourceType)1 CompositeAuthResourcePropertyProvider (com.sequenceiq.authorization.service.CompositeAuthResourcePropertyProvider)1 OwnerAssignmentService (com.sequenceiq.authorization.service.OwnerAssignmentService)1 NameOrCrn (com.sequenceiq.cloudbreak.api.endpoint.v4.dto.NameOrCrn)1 ThreadBasedUserCrnProvider (com.sequenceiq.cloudbreak.auth.ThreadBasedUserCrnProvider)1 Crn (com.sequenceiq.cloudbreak.auth.crn.Crn)1 CrnResourceDescriptor (com.sequenceiq.cloudbreak.auth.crn.CrnResourceDescriptor)1 RegionAwareCrnGenerator (com.sequenceiq.cloudbreak.auth.crn.RegionAwareCrnGenerator)1 BadRequestException (com.sequenceiq.cloudbreak.common.exception.BadRequestException)1 NotFoundException (com.sequenceiq.cloudbreak.common.exception.NotFoundException)1 Cluster (com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster)1 CustomConfigurationsCreationException (com.sequenceiq.cloudbreak.exception.CustomConfigurationsCreationException)1 MDCUtils (com.sequenceiq.cloudbreak.logger.MDCUtils)1 CustomConfigurationPropertyRepository (com.sequenceiq.cloudbreak.repository.CustomConfigurationPropertyRepository)1 CustomConfigurationsRepository (com.sequenceiq.cloudbreak.repository.CustomConfigurationsRepository)1 ClusterService (com.sequenceiq.cloudbreak.service.cluster.ClusterService)1