Add an "App(s) only" distribution set (#614)

Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
This commit is contained in:
Cedric Hombourger
2017-12-16 11:31:46 +01:00
committed by Kai Zimmermann
parent 5175fc9521
commit c3035231e2
5 changed files with 33 additions and 14 deletions

View File

@@ -70,6 +70,20 @@ public final class Constants {
*/
public static final String DST_DEFAULT_OS_ONLY_NAME = "OS only";
/**
* {@link DistributionSetType#getKey()} of a {@link DistributionSetType}
* generated by repository for every new account that includes only
* {@link #SMT_DEFAULT_APP_KEY} as mandatory module.
*/
public static final String DST_DEFAULT_APP_ONLY_KEY = "app";
/**
* {@link DistributionSetType#getName()} of a {@link DistributionSetType}
* generated by repository for every new account that includes only
* {@link #SMT_DEFAULT_APP_KEY} as mandatory module.
*/
public static final String DST_DEFAULT_APP_ONLY_NAME = "App(s) only";
private Constants() {
// Utility class.
}

View File

@@ -28,7 +28,7 @@ public final class RepositoryConstants {
* Number of {@link DistributionSetType}s that are generated as part of
* default tenant setup.
*/
public static final int DEFAULT_DS_TYPES_IN_TENANT = 2;
public static final int DEFAULT_DS_TYPES_IN_TENANT = 3;
/**
* Maximum number of messages that can be retrieved by a controller for an

View File

@@ -302,6 +302,11 @@ public class JpaSystemManagement implements CurrentTenantCacheKeyGenerator, Syst
org.eclipse.hawkbit.repository.Constants.DST_DEFAULT_OS_ONLY_NAME,
"Default type with Firmware/OS only.").addMandatoryModuleType(os));
distributionSetTypeRepository
.save(new JpaDistributionSetType(org.eclipse.hawkbit.repository.Constants.DST_DEFAULT_APP_ONLY_KEY,
org.eclipse.hawkbit.repository.Constants.DST_DEFAULT_APP_ONLY_NAME,
"Default type with app(s) only.").addMandatoryModuleType(app));
return distributionSetTypeRepository
.save(new JpaDistributionSetType(org.eclipse.hawkbit.repository.Constants.DST_DEFAULT_OS_WITH_APPS_KEY,
org.eclipse.hawkbit.repository.Constants.DST_DEFAULT_OS_WITH_APPS_NAME,

View File

@@ -114,7 +114,7 @@ public abstract class AbstractIntegrationTest {
/**
* Number of {@link DistributionSetType}s that exist in every test case. One
* generated by using
* {@link TestdataFactory#findOrCreateDefaultTestDsType()} and two
* {@link TestdataFactory#findOrCreateDefaultTestDsType()} and three
* {@link SystemManagement#getTenantMetadata()};
*/
protected static final int DEFAULT_DS_TYPES = RepositoryConstants.DEFAULT_DS_TYPES_IN_TENANT + 1;