From e12fcd804efec0dec28dae37e102a5d74f6c14ff Mon Sep 17 00:00:00 2001 From: Kai Zimmermann Date: Thu, 2 Jun 2016 14:08:37 +0200 Subject: [PATCH] Fixed default ds gen. Signed-off-by: Kai Zimmermann --- .../rest/resource/MgmtDistributionSetResourceTest.java | 2 +- .../hawkbit/repository/jpa/JpaSystemManagement.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDistributionSetResourceTest.java b/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDistributionSetResourceTest.java index 8c15e0a8c..ad72aa55d 100644 --- a/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDistributionSetResourceTest.java +++ b/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDistributionSetResourceTest.java @@ -789,7 +789,7 @@ public class MgmtDistributionSetResourceTest extends AbstractRestIntegrationTest final int amount = 10; testdataFactory.createDistributionSets(amount); distributionSetManagement.createDistributionSet(entityFactory.generateDistributionSet("incomplete", "2", - "incomplete", distributionSetManagement.findDistributionSetTypeByKey("ecl_os"), null)); + "incomplete", distributionSetManagement.findDistributionSetTypeByKey("os"), null)); final String rsqlFindLikeDs1OrDs2 = "complete==" + Boolean.TRUE; diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaSystemManagement.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaSystemManagement.java index 8f9e8c5f9..ab5fc1b41 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaSystemManagement.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaSystemManagement.java @@ -288,11 +288,11 @@ public class JpaSystemManagement implements CurrentTenantCacheKeyGenerator, Syst final SoftwareModuleType os = softwareModuleTypeRepository .save(new JpaSoftwareModuleType("os", "Firmware", "Core firmware or operationg system", 1)); - distributionSetTypeRepository.save((JpaDistributionSetType) new JpaDistributionSetType("os_app", "With app(s)", - "Default type with Firmware/OS and optional app(s).").addMandatoryModuleType(os) - .addOptionalModuleType(app)); - - return distributionSetTypeRepository.save((JpaDistributionSetType) new JpaDistributionSetType("os", "OS only", + distributionSetTypeRepository.save((JpaDistributionSetType) new JpaDistributionSetType("os", "OS only", "Default type with Firmware/OS only.").addMandatoryModuleType(os)); + + return distributionSetTypeRepository.save((JpaDistributionSetType) new JpaDistributionSetType("os_app", + "OS with app(s)", "Default type with Firmware/OS and optional app(s).").addMandatoryModuleType(os) + .addOptionalModuleType(app)); } }