|
|
@ -16,6 +16,7 @@ import net.hostsharing.hsadminng.hs.hosting.asset.validators.HostingAssetEntityV
|
|
|
|
import net.hostsharing.hsadminng.hs.hosting.asset.validators.HsDomainDnsSetupHostingAssetValidator;
|
|
|
|
import net.hostsharing.hsadminng.hs.hosting.asset.validators.HsDomainDnsSetupHostingAssetValidator;
|
|
|
|
import net.hostsharing.hsadminng.rbac.test.JpaAttempt;
|
|
|
|
import net.hostsharing.hsadminng.rbac.test.JpaAttempt;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
|
|
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
import org.junit.jupiter.api.MethodOrderer;
|
|
|
|
import org.junit.jupiter.api.MethodOrderer;
|
|
|
|
import org.junit.jupiter.api.Order;
|
|
|
|
import org.junit.jupiter.api.Order;
|
|
|
|
import org.junit.jupiter.api.Tag;
|
|
|
|
import org.junit.jupiter.api.Tag;
|
|
|
@ -35,6 +36,7 @@ import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.Objects;
|
|
|
|
import java.util.TreeMap;
|
|
|
|
import java.util.TreeMap;
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
@ -54,6 +56,7 @@ import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.DOMA
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.DOMAIN_MBOX_SETUP;
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.DOMAIN_MBOX_SETUP;
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.DOMAIN_SETUP;
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.DOMAIN_SETUP;
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.DOMAIN_SMTP_SETUP;
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.DOMAIN_SMTP_SETUP;
|
|
|
|
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.EMAIL_ADDRESS;
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.EMAIL_ALIAS;
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.EMAIL_ALIAS;
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.IPV4_NUMBER;
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.IPV4_NUMBER;
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.MANAGED_SERVER;
|
|
|
|
import static net.hostsharing.hsadminng.hs.hosting.asset.HsHostingAssetType.MANAGED_SERVER;
|
|
|
@ -118,19 +121,9 @@ import static org.assertj.core.api.Assumptions.assumeThat;
|
|
|
|
@ExtendWith(OrderedDependedTestsExtension.class)
|
|
|
|
@ExtendWith(OrderedDependedTestsExtension.class)
|
|
|
|
public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
|
|
|
|
|
|
|
|
static final Integer IP_NUMBER_ID_OFFSET = 1000000;
|
|
|
|
static final int BI_HIVE_ID_OFFSET = 2000000;
|
|
|
|
static final Integer HIVE_ID_OFFSET = 2000000;
|
|
|
|
static final int BI_PACKET_ID_OFFSET = 3000000;
|
|
|
|
static final Integer PACKET_ID_OFFSET = 3000000;
|
|
|
|
|
|
|
|
static final Integer UNIXUSER_ID_OFFSET = 4000000;
|
|
|
|
|
|
|
|
static final Integer EMAILALIAS_ID_OFFSET = 5000000;
|
|
|
|
|
|
|
|
static final Integer DBINSTANCE_ID_OFFSET = 6000000;
|
|
|
|
|
|
|
|
static final Integer DBUSER_ID_OFFSET = 7000000;
|
|
|
|
|
|
|
|
static final Integer DB_ID_OFFSET = 8000000;
|
|
|
|
|
|
|
|
static final Integer DOMAIN_SETUP_OFFSET = 10000000;
|
|
|
|
|
|
|
|
static final Integer DOMAIN_DNS_SETUP_OFFSET = 11000000;
|
|
|
|
|
|
|
|
static final Integer DOMAIN_HTTP_SETUP_OFFSET = 12000000;
|
|
|
|
|
|
|
|
static final Integer DOMAIN_MBOX_SETUP_OFFSET = 13000000;
|
|
|
|
|
|
|
|
static final Integer DOMAIN_SMTP_SETUP_OFFSET = 14000000;
|
|
|
|
|
|
|
|
static List<String> zonefileErrors = new ArrayList<>();
|
|
|
|
static List<String> zonefileErrors = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
record Hive(int hive_id, String hive_name, int inet_addr_id, AtomicReference<HsHostingAssetRealEntity> serverRef) {}
|
|
|
|
record Hive(int hive_id, String hive_name, int inet_addr_id, AtomicReference<HsHostingAssetRealEntity> serverRef) {}
|
|
|
@ -138,7 +131,21 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
static Map<Integer, HsBookingProjectEntity> bookingProjects = new WriteOnceMap<>();
|
|
|
|
static Map<Integer, HsBookingProjectEntity> bookingProjects = new WriteOnceMap<>();
|
|
|
|
static Map<Integer, HsBookingItemEntity> bookingItems = new WriteOnceMap<>();
|
|
|
|
static Map<Integer, HsBookingItemEntity> bookingItems = new WriteOnceMap<>();
|
|
|
|
static Map<Integer, Hive> hives = new WriteOnceMap<>();
|
|
|
|
static Map<Integer, Hive> hives = new WriteOnceMap<>();
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> hostingAssets = new WriteOnceMap<>(); // TODO.impl: separate maps for each type?
|
|
|
|
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> ipNumberAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> packetAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> unixUserAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> emailAliasAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> dbInstanceAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> dbUserAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> dbAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> domainSetupAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> domainDnsSetupAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> domainHttpSetupAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> domainMBoxSetupAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> domainSmtpSetupAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
static Map<Integer, HsHostingAssetRealEntity> emailAddressAssets = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
|
|
|
|
static Map<String, HsHostingAssetRealEntity> dbUsersByEngineAndName = new WriteOnceMap<>();
|
|
|
|
static Map<String, HsHostingAssetRealEntity> dbUsersByEngineAndName = new WriteOnceMap<>();
|
|
|
|
static Map<String, HsHostingAssetRealEntity> domainSetupsByName = new WriteOnceMap<>();
|
|
|
|
static Map<String, HsHostingAssetRealEntity> domainSetupsByName = new WriteOnceMap<>();
|
|
|
|
|
|
|
|
|
|
|
@ -171,13 +178,13 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
void verifyIpNumbers() {
|
|
|
|
void verifyIpNumbers() {
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(firstOfEachType(5, IPV4_NUMBER)).isEqualToIgnoringWhitespace("""
|
|
|
|
assertThat(firstOfEach(5, ipNumberAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
{
|
|
|
|
{
|
|
|
|
1000363=HsHostingAssetRealEntity(IPV4_NUMBER, 83.223.95.34),
|
|
|
|
363=HsHostingAssetRealEntity(IPV4_NUMBER, 83.223.95.34),
|
|
|
|
1000381=HsHostingAssetRealEntity(IPV4_NUMBER, 83.223.95.52),
|
|
|
|
381=HsHostingAssetRealEntity(IPV4_NUMBER, 83.223.95.52),
|
|
|
|
1000402=HsHostingAssetRealEntity(IPV4_NUMBER, 83.223.95.73),
|
|
|
|
402=HsHostingAssetRealEntity(IPV4_NUMBER, 83.223.95.73),
|
|
|
|
1000433=HsHostingAssetRealEntity(IPV4_NUMBER, 83.223.95.104),
|
|
|
|
433=HsHostingAssetRealEntity(IPV4_NUMBER, 83.223.95.104),
|
|
|
|
1000457=HsHostingAssetRealEntity(IPV4_NUMBER, 83.223.95.128)
|
|
|
|
457=HsHostingAssetRealEntity(IPV4_NUMBER, 83.223.95.128)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
""");
|
|
|
|
""");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -200,11 +207,11 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(toJsonFormattedString(first(5, hives))).isEqualToIgnoringWhitespace("""
|
|
|
|
assertThat(toJsonFormattedString(first(5, hives))).isEqualToIgnoringWhitespace("""
|
|
|
|
{
|
|
|
|
{
|
|
|
|
2000001=Hive[hive_id=1, hive_name=h00, inet_addr_id=358, serverRef=null],
|
|
|
|
1001=Hive[hive_id=1001, hive_name=h00, inet_addr_id=358, serverRef=null],
|
|
|
|
2000002=Hive[hive_id=2, hive_name=h01, inet_addr_id=359, serverRef=null],
|
|
|
|
1002=Hive[hive_id=1002, hive_name=h01, inet_addr_id=359, serverRef=null],
|
|
|
|
2000004=Hive[hive_id=4, hive_name=h02, inet_addr_id=360, serverRef=null],
|
|
|
|
1004=Hive[hive_id=1004, hive_name=h02, inet_addr_id=360, serverRef=null],
|
|
|
|
2000007=Hive[hive_id=7, hive_name=h03, inet_addr_id=361, serverRef=null],
|
|
|
|
1007=Hive[hive_id=1007, hive_name=h03, inet_addr_id=361, serverRef=null],
|
|
|
|
2000013=Hive[hive_id=13, hive_name=h04, inet_addr_id=430, serverRef=null]
|
|
|
|
1013=Hive[hive_id=1013, hive_name=h04, inet_addr_id=430, serverRef=null]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
""");
|
|
|
|
""");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -225,32 +232,34 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
void verifyPackets() {
|
|
|
|
void verifyPackets() {
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(firstOfEachType(3, CLOUD_SERVER, MANAGED_SERVER, MANAGED_WEBSPACE)).isEqualToIgnoringWhitespace("""
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
3000630=HsHostingAssetRealEntity(MANAGED_WEBSPACE, hsh00, HA hsh00, MANAGED_SERVER:vm1050, D-1000000:hsh default project:BI hsh00),
|
|
|
|
|
|
|
|
3000968=HsHostingAssetRealEntity(MANAGED_SERVER, vm1061, HA vm1061, D-1015200:rar default project:BI vm1061),
|
|
|
|
|
|
|
|
3000978=HsHostingAssetRealEntity(MANAGED_SERVER, vm1050, HA vm1050, D-1000000:hsh default project:BI vm1050),
|
|
|
|
|
|
|
|
3001061=HsHostingAssetRealEntity(MANAGED_SERVER, vm1068, HA vm1068, D-1000300:mim default project:BI vm1068),
|
|
|
|
|
|
|
|
3001094=HsHostingAssetRealEntity(MANAGED_WEBSPACE, lug00, HA lug00, MANAGED_SERVER:vm1068, D-1000300:mim default project:BI lug00),
|
|
|
|
|
|
|
|
3001112=HsHostingAssetRealEntity(MANAGED_WEBSPACE, mim00, HA mim00, MANAGED_SERVER:vm1068, D-1000300:mim default project:BI mim00),
|
|
|
|
|
|
|
|
3023611=HsHostingAssetRealEntity(CLOUD_SERVER, vm2097, HA vm2097, D-1101800:wws default project:BI vm2097)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
""");
|
|
|
|
|
|
|
|
assertThat(firstOfEachType(
|
|
|
|
assertThat(firstOfEachType(
|
|
|
|
3,
|
|
|
|
3,
|
|
|
|
HsBookingItemType.CLOUD_SERVER,
|
|
|
|
HsBookingItemType.CLOUD_SERVER,
|
|
|
|
HsBookingItemType.MANAGED_SERVER,
|
|
|
|
HsBookingItemType.MANAGED_SERVER,
|
|
|
|
HsBookingItemType.MANAGED_WEBSPACE)).isEqualToIgnoringWhitespace("""
|
|
|
|
HsBookingItemType.MANAGED_WEBSPACE)).isEqualToIgnoringWhitespace("""
|
|
|
|
{
|
|
|
|
{
|
|
|
|
3000630=HsBookingItemEntity(D-1000000:hsh default project, MANAGED_WEBSPACE, [2001-06-01,), BI hsh00),
|
|
|
|
3010630=HsBookingItemEntity(D-1000000:hsh default project, MANAGED_WEBSPACE, [2001-06-01,), BI hsh00),
|
|
|
|
3000968=HsBookingItemEntity(D-1015200:rar default project, MANAGED_SERVER, [2013-04-01,), BI vm1061),
|
|
|
|
3010968=HsBookingItemEntity(D-1015200:rar default project, MANAGED_SERVER, [2013-04-01,), BI vm1061),
|
|
|
|
3000978=HsBookingItemEntity(D-1000000:hsh default project, MANAGED_SERVER, [2013-04-01,), BI vm1050),
|
|
|
|
3010978=HsBookingItemEntity(D-1000000:hsh default project, MANAGED_SERVER, [2013-04-01,), BI vm1050),
|
|
|
|
3001061=HsBookingItemEntity(D-1000300:mim default project, MANAGED_SERVER, [2013-08-19,), BI vm1068),
|
|
|
|
3011061=HsBookingItemEntity(D-1000300:mim default project, MANAGED_SERVER, [2013-08-19,), BI vm1068),
|
|
|
|
3001094=HsBookingItemEntity(D-1000300:mim default project, MANAGED_WEBSPACE, [2013-09-10,), BI lug00),
|
|
|
|
3011094=HsBookingItemEntity(D-1000300:mim default project, MANAGED_WEBSPACE, [2013-09-10,), BI lug00),
|
|
|
|
3001112=HsBookingItemEntity(D-1000300:mim default project, MANAGED_WEBSPACE, [2013-09-17,), BI mim00),
|
|
|
|
3011112=HsBookingItemEntity(D-1000300:mim default project, MANAGED_WEBSPACE, [2013-09-17,), BI mim00),
|
|
|
|
3023611=HsBookingItemEntity(D-1101800:wws default project, CLOUD_SERVER, [2022-08-10,), BI vm2097)
|
|
|
|
3023611=HsBookingItemEntity(D-1101800:wws default project, CLOUD_SERVER, [2022-08-10,), BI vm2097)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
""");
|
|
|
|
""");
|
|
|
|
|
|
|
|
assertThat(firstOfEach(9, packetAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
10630=HsHostingAssetRealEntity(MANAGED_WEBSPACE, hsh00, HA hsh00, MANAGED_SERVER:vm1050, D-1000000:hsh default project:BI hsh00),
|
|
|
|
|
|
|
|
10968=HsHostingAssetRealEntity(MANAGED_SERVER, vm1061, HA vm1061, D-1015200:rar default project:BI vm1061),
|
|
|
|
|
|
|
|
10978=HsHostingAssetRealEntity(MANAGED_SERVER, vm1050, HA vm1050, D-1000000:hsh default project:BI vm1050),
|
|
|
|
|
|
|
|
11061=HsHostingAssetRealEntity(MANAGED_SERVER, vm1068, HA vm1068, D-1000300:mim default project:BI vm1068),
|
|
|
|
|
|
|
|
11094=HsHostingAssetRealEntity(MANAGED_WEBSPACE, lug00, HA lug00, MANAGED_SERVER:vm1068, D-1000300:mim default project:BI lug00),
|
|
|
|
|
|
|
|
11112=HsHostingAssetRealEntity(MANAGED_WEBSPACE, mim00, HA mim00, MANAGED_SERVER:vm1068, D-1000300:mim default project:BI mim00),
|
|
|
|
|
|
|
|
11447=HsHostingAssetRealEntity(MANAGED_SERVER, vm1093, HA vm1093, D-1000000:hsh default project:BI vm1093),
|
|
|
|
|
|
|
|
19959=HsHostingAssetRealEntity(MANAGED_WEBSPACE, dph00, HA dph00, MANAGED_SERVER:vm1093, D-1101900:dph default project:BI dph00),
|
|
|
|
|
|
|
|
23611=HsHostingAssetRealEntity(CLOUD_SERVER, vm2097, HA vm2097, D-1101800:wws default project:BI vm2097)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
""");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -269,18 +278,16 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
void verifyPacketComponents() {
|
|
|
|
void verifyPacketComponents() {
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(firstOfEachType(5, CLOUD_SERVER, MANAGED_SERVER, MANAGED_WEBSPACE))
|
|
|
|
assertThat(firstOfEach(7, packetAssets))
|
|
|
|
.isEqualToIgnoringWhitespace("""
|
|
|
|
.isEqualToIgnoringWhitespace("""
|
|
|
|
{
|
|
|
|
{
|
|
|
|
3000630=HsHostingAssetRealEntity(MANAGED_WEBSPACE, hsh00, HA hsh00, MANAGED_SERVER:vm1050, D-1000000:hsh default project:BI hsh00),
|
|
|
|
10630=HsHostingAssetRealEntity(MANAGED_WEBSPACE, hsh00, HA hsh00, MANAGED_SERVER:vm1050, D-1000000:hsh default project:BI hsh00),
|
|
|
|
3000968=HsHostingAssetRealEntity(MANAGED_SERVER, vm1061, HA vm1061, D-1015200:rar default project:BI vm1061),
|
|
|
|
10968=HsHostingAssetRealEntity(MANAGED_SERVER, vm1061, HA vm1061, D-1015200:rar default project:BI vm1061),
|
|
|
|
3000978=HsHostingAssetRealEntity(MANAGED_SERVER, vm1050, HA vm1050, D-1000000:hsh default project:BI vm1050),
|
|
|
|
10978=HsHostingAssetRealEntity(MANAGED_SERVER, vm1050, HA vm1050, D-1000000:hsh default project:BI vm1050),
|
|
|
|
3001061=HsHostingAssetRealEntity(MANAGED_SERVER, vm1068, HA vm1068, D-1000300:mim default project:BI vm1068),
|
|
|
|
11061=HsHostingAssetRealEntity(MANAGED_SERVER, vm1068, HA vm1068, D-1000300:mim default project:BI vm1068),
|
|
|
|
3001094=HsHostingAssetRealEntity(MANAGED_WEBSPACE, lug00, HA lug00, MANAGED_SERVER:vm1068, D-1000300:mim default project:BI lug00),
|
|
|
|
11094=HsHostingAssetRealEntity(MANAGED_WEBSPACE, lug00, HA lug00, MANAGED_SERVER:vm1068, D-1000300:mim default project:BI lug00),
|
|
|
|
3001112=HsHostingAssetRealEntity(MANAGED_WEBSPACE, mim00, HA mim00, MANAGED_SERVER:vm1068, D-1000300:mim default project:BI mim00),
|
|
|
|
11112=HsHostingAssetRealEntity(MANAGED_WEBSPACE, mim00, HA mim00, MANAGED_SERVER:vm1068, D-1000300:mim default project:BI mim00),
|
|
|
|
3001447=HsHostingAssetRealEntity(MANAGED_SERVER, vm1093, HA vm1093, D-1000000:hsh default project:BI vm1093),
|
|
|
|
11447=HsHostingAssetRealEntity(MANAGED_SERVER, vm1093, HA vm1093, D-1000000:hsh default project:BI vm1093)
|
|
|
|
3019959=HsHostingAssetRealEntity(MANAGED_WEBSPACE, dph00, HA dph00, MANAGED_SERVER:vm1093, D-1101900:dph default project:BI dph00),
|
|
|
|
|
|
|
|
3023611=HsHostingAssetRealEntity(CLOUD_SERVER, vm2097, HA vm2097, D-1101800:wws default project:BI vm2097)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
""");
|
|
|
|
""");
|
|
|
|
assertThat(firstOfEachType(
|
|
|
|
assertThat(firstOfEachType(
|
|
|
@ -290,13 +297,13 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
HsBookingItemType.MANAGED_WEBSPACE))
|
|
|
|
HsBookingItemType.MANAGED_WEBSPACE))
|
|
|
|
.isEqualToIgnoringWhitespace("""
|
|
|
|
.isEqualToIgnoringWhitespace("""
|
|
|
|
{
|
|
|
|
{
|
|
|
|
3000630=HsBookingItemEntity(D-1000000:hsh default project, MANAGED_WEBSPACE, [2001-06-01,), BI hsh00, {"HDD": 10, "Multi": 25, "SLA-Platform": "EXT24H", "SSD": 16, "Traffic": 50}),
|
|
|
|
3010630=HsBookingItemEntity(D-1000000:hsh default project, MANAGED_WEBSPACE, [2001-06-01,), BI hsh00, {"HDD": 10, "Multi": 25, "SLA-Platform": "EXT24H", "SSD": 16, "Traffic": 50}),
|
|
|
|
3000968=HsBookingItemEntity(D-1015200:rar default project, MANAGED_SERVER, [2013-04-01,), BI vm1061, {"CPU": 6, "HDD": 250, "RAM": 14, "SLA-EMail": true, "SLA-Maria": true, "SLA-Office": true, "SLA-PgSQL": true, "SLA-Platform": "EXT4H", "SLA-Web": true, "SSD": 375, "Traffic": 250}),
|
|
|
|
3010968=HsBookingItemEntity(D-1015200:rar default project, MANAGED_SERVER, [2013-04-01,), BI vm1061, {"CPU": 6, "HDD": 250, "RAM": 14, "SLA-EMail": true, "SLA-Maria": true, "SLA-Office": true, "SLA-PgSQL": true, "SLA-Platform": "EXT4H", "SLA-Web": true, "SSD": 375, "Traffic": 250}),
|
|
|
|
3000978=HsBookingItemEntity(D-1000000:hsh default project, MANAGED_SERVER, [2013-04-01,), BI vm1050, {"CPU": 4, "HDD": 250, "RAM": 32, "SLA-EMail": true, "SLA-Maria": true, "SLA-Office": true, "SLA-PgSQL": true, "SLA-Platform": "EXT4H", "SLA-Web": true, "SSD": 150, "Traffic": 250}),
|
|
|
|
3010978=HsBookingItemEntity(D-1000000:hsh default project, MANAGED_SERVER, [2013-04-01,), BI vm1050, {"CPU": 4, "HDD": 250, "RAM": 32, "SLA-EMail": true, "SLA-Maria": true, "SLA-Office": true, "SLA-PgSQL": true, "SLA-Platform": "EXT4H", "SLA-Web": true, "SSD": 150, "Traffic": 250}),
|
|
|
|
3001061=HsBookingItemEntity(D-1000300:mim default project, MANAGED_SERVER, [2013-08-19,), BI vm1068, {"CPU": 2, "HDD": 250, "RAM": 4, "SLA-EMail": true, "SLA-Maria": true, "SLA-Office": true, "SLA-PgSQL": true, "SLA-Platform": "EXT2H", "SLA-Web": true, "Traffic": 250}),
|
|
|
|
3011061=HsBookingItemEntity(D-1000300:mim default project, MANAGED_SERVER, [2013-08-19,), BI vm1068, {"CPU": 2, "HDD": 250, "RAM": 4, "SLA-EMail": true, "SLA-Maria": true, "SLA-Office": true, "SLA-PgSQL": true, "SLA-Platform": "EXT2H", "SLA-Web": true, "Traffic": 250}),
|
|
|
|
3001094=HsBookingItemEntity(D-1000300:mim default project, MANAGED_WEBSPACE, [2013-09-10,), BI lug00, {"Multi": 5, "SLA-Platform": "EXT24H", "SSD": 1, "Traffic": 10}),
|
|
|
|
3011094=HsBookingItemEntity(D-1000300:mim default project, MANAGED_WEBSPACE, [2013-09-10,), BI lug00, {"Multi": 5, "SLA-Platform": "EXT24H", "SSD": 1, "Traffic": 10}),
|
|
|
|
3001112=HsBookingItemEntity(D-1000300:mim default project, MANAGED_WEBSPACE, [2013-09-17,), BI mim00, {"Multi": 5, "SLA-Platform": "EXT24H", "SSD": 3, "Traffic": 20}),
|
|
|
|
3011112=HsBookingItemEntity(D-1000300:mim default project, MANAGED_WEBSPACE, [2013-09-17,), BI mim00, {"Multi": 5, "SLA-Platform": "EXT24H", "SSD": 3, "Traffic": 20}),
|
|
|
|
3001447=HsBookingItemEntity(D-1000000:hsh default project, MANAGED_SERVER, [2014-11-28,), BI vm1093, {"CPU": 6, "HDD": 500, "RAM": 16, "SLA-EMail": true, "SLA-Maria": true, "SLA-Office": true, "SLA-PgSQL": true, "SLA-Platform": "EXT4H", "SLA-Web": true, "SSD": 300, "Traffic": 250}),
|
|
|
|
3011447=HsBookingItemEntity(D-1000000:hsh default project, MANAGED_SERVER, [2014-11-28,), BI vm1093, {"CPU": 6, "HDD": 500, "RAM": 16, "SLA-EMail": true, "SLA-Maria": true, "SLA-Office": true, "SLA-PgSQL": true, "SLA-Platform": "EXT4H", "SLA-Web": true, "SSD": 300, "Traffic": 250}),
|
|
|
|
3019959=HsBookingItemEntity(D-1101900:dph default project, MANAGED_WEBSPACE, [2021-06-02,), BI dph00, {"Multi": 1, "SLA-Platform": "EXT24H", "SSD": 25, "Traffic": 20}),
|
|
|
|
3019959=HsBookingItemEntity(D-1101900:dph default project, MANAGED_WEBSPACE, [2021-06-02,), BI dph00, {"Multi": 1, "SLA-Platform": "EXT24H", "SSD": 25, "Traffic": 20}),
|
|
|
|
3023611=HsBookingItemEntity(D-1101800:wws default project, CLOUD_SERVER, [2022-08-10,), BI vm2097, {"CPU": 8, "RAM": 12, "SLA-Infrastructure": "EXT4H", "SSD": 25, "Traffic": 250})
|
|
|
|
3023611=HsBookingItemEntity(D-1101800:wws default project, CLOUD_SERVER, [2022-08-10,), BI vm2097, {"CPU": 8, "RAM": 12, "SLA-Infrastructure": "EXT4H", "SSD": 25, "Traffic": 250})
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -319,22 +326,22 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
void verifyUnixUsers() {
|
|
|
|
void verifyUnixUsers() {
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(firstOfEachType(15, UNIX_USER)).isEqualToIgnoringWhitespace("""
|
|
|
|
assertThat(firstOfEach(15, unixUserAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
{
|
|
|
|
{
|
|
|
|
4005803=HsHostingAssetRealEntity(UNIX_USER, lug00, LUGs, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 102090}),
|
|
|
|
100705=HsHostingAssetRealEntity(UNIX_USER, hsh00-mim, Michael Mellis, MANAGED_WEBSPACE:hsh00, {"HDD hard quota": 0, "HDD soft quota": 0, "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/false", "userid": 10003}),
|
|
|
|
4005805=HsHostingAssetRealEntity(UNIX_USER, lug00-wla.1, Paul Klemm, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 102091}),
|
|
|
|
100824=HsHostingAssetRealEntity(UNIX_USER, hsh00, Hostsharing Paket, MANAGED_WEBSPACE:hsh00, {"HDD hard quota": 0, "HDD soft quota": 0, "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 10000}),
|
|
|
|
4005809=HsHostingAssetRealEntity(UNIX_USER, lug00-wla.2, Walter Müller, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 8, "SSD soft quota": 4, "locked": false, "shell": "/bin/bash", "userid": 102093}),
|
|
|
|
167846=HsHostingAssetRealEntity(UNIX_USER, hsh00-dph, hsh00-uph, MANAGED_WEBSPACE:hsh00, {"HDD hard quota": 0, "HDD soft quota": 0, "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/false", "userid": 110568}),
|
|
|
|
4005811=HsHostingAssetRealEntity(UNIX_USER, lug00-ola.a, LUG OLA - POP a, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/usr/bin/passwd", "userid": 102094}),
|
|
|
|
169546=HsHostingAssetRealEntity(UNIX_USER, dph00, Reinhard Wiese, MANAGED_WEBSPACE:dph00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 110593}),
|
|
|
|
4005813=HsHostingAssetRealEntity(UNIX_USER, lug00-ola.b, LUG OLA - POP b, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/usr/bin/passwd", "userid": 102095}),
|
|
|
|
169596=HsHostingAssetRealEntity(UNIX_USER, dph00-dph, Domain admin, MANAGED_WEBSPACE:dph00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 110594}),
|
|
|
|
4005835=HsHostingAssetRealEntity(UNIX_USER, lug00-test, Test, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 1024, "SSD soft quota": 1024, "locked": false, "shell": "/usr/bin/passwd", "userid": 102106}),
|
|
|
|
5803=HsHostingAssetRealEntity(UNIX_USER, lug00, LUGs, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 102090}),
|
|
|
|
4005964=HsHostingAssetRealEntity(UNIX_USER, mim00, Michael Mellis, MANAGED_WEBSPACE:mim00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 102147}),
|
|
|
|
5805=HsHostingAssetRealEntity(UNIX_USER, lug00-wla.1, Paul Klemm, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 102091}),
|
|
|
|
4005966=HsHostingAssetRealEntity(UNIX_USER, mim00-1981, Jahrgangstreffen 1981, MANAGED_WEBSPACE:mim00, {"SSD hard quota": 256, "SSD soft quota": 128, "locked": false, "shell": "/bin/bash", "userid": 102148}),
|
|
|
|
5809=HsHostingAssetRealEntity(UNIX_USER, lug00-wla.2, Walter Müller, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 8, "SSD soft quota": 4, "locked": false, "shell": "/bin/bash", "userid": 102093}),
|
|
|
|
4005990=HsHostingAssetRealEntity(UNIX_USER, mim00-mail, Mailbox, MANAGED_WEBSPACE:mim00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 102160}),
|
|
|
|
5811=HsHostingAssetRealEntity(UNIX_USER, lug00-ola.a, LUG OLA - POP a, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/usr/bin/passwd", "userid": 102094}),
|
|
|
|
4100705=HsHostingAssetRealEntity(UNIX_USER, hsh00-mim, Michael Mellis, MANAGED_WEBSPACE:hsh00, {"HDD hard quota": 0, "HDD soft quota": 0, "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/false", "userid": 10003}),
|
|
|
|
5813=HsHostingAssetRealEntity(UNIX_USER, lug00-ola.b, LUG OLA - POP b, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/usr/bin/passwd", "userid": 102095}),
|
|
|
|
4100824=HsHostingAssetRealEntity(UNIX_USER, hsh00, Hostsharing Paket, MANAGED_WEBSPACE:hsh00, {"HDD hard quota": 0, "HDD soft quota": 0, "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 10000}),
|
|
|
|
5835=HsHostingAssetRealEntity(UNIX_USER, lug00-test, Test, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 1024, "SSD soft quota": 1024, "locked": false, "shell": "/usr/bin/passwd", "userid": 102106}),
|
|
|
|
4167846=HsHostingAssetRealEntity(UNIX_USER, hsh00-dph, hsh00-uph, MANAGED_WEBSPACE:hsh00, {"HDD hard quota": 0, "HDD soft quota": 0, "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/false", "userid": 110568}),
|
|
|
|
5964=HsHostingAssetRealEntity(UNIX_USER, mim00, Michael Mellis, MANAGED_WEBSPACE:mim00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 102147}),
|
|
|
|
4169546=HsHostingAssetRealEntity(UNIX_USER, dph00, Reinhard Wiese, MANAGED_WEBSPACE:dph00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 110593}),
|
|
|
|
5966=HsHostingAssetRealEntity(UNIX_USER, mim00-1981, Jahrgangstreffen 1981, MANAGED_WEBSPACE:mim00, {"SSD hard quota": 256, "SSD soft quota": 128, "locked": false, "shell": "/bin/bash", "userid": 102148}),
|
|
|
|
4169596=HsHostingAssetRealEntity(UNIX_USER, dph00-dph, Domain admin, MANAGED_WEBSPACE:dph00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 110594})
|
|
|
|
5990=HsHostingAssetRealEntity(UNIX_USER, mim00-mail, Mailbox, MANAGED_WEBSPACE:mim00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "shell": "/bin/bash", "userid": 102160})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
""");
|
|
|
|
""");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -355,17 +362,17 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
void verifyEmailAliases() {
|
|
|
|
void verifyEmailAliases() {
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(firstOfEachType(15, EMAIL_ALIAS)).isEqualToIgnoringWhitespace("""
|
|
|
|
assertThat(firstOfEach(15, emailAliasAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
{
|
|
|
|
{
|
|
|
|
5002403=HsHostingAssetRealEntity(EMAIL_ALIAS, lug00, lug00, MANAGED_WEBSPACE:lug00, {"target": [ "michael.mellis@example.com" ]}),
|
|
|
|
2403=HsHostingAssetRealEntity(EMAIL_ALIAS, lug00, lug00, MANAGED_WEBSPACE:lug00, {"target": [ "michael.mellis@example.com" ]}),
|
|
|
|
5002405=HsHostingAssetRealEntity(EMAIL_ALIAS, lug00-wla-listar, lug00-wla-listar, MANAGED_WEBSPACE:lug00, {"target": [ "|/home/pacs/lug00/users/in/mailinglist/listar" ]}),
|
|
|
|
2405=HsHostingAssetRealEntity(EMAIL_ALIAS, lug00-wla-listar, lug00-wla-listar, MANAGED_WEBSPACE:lug00, {"target": [ "|/home/pacs/lug00/users/in/mailinglist/listar" ]}),
|
|
|
|
5002429=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00, mim00, MANAGED_WEBSPACE:mim00, {"target": [ "mim12-mi@mim12.hostsharing.net" ]}),
|
|
|
|
2429=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00, mim00, MANAGED_WEBSPACE:mim00, {"target": [ "mim12-mi@mim12.hostsharing.net" ]}),
|
|
|
|
5002431=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00-abruf, mim00-abruf, MANAGED_WEBSPACE:mim00, {"target": [ "michael.mellis@hostsharing.net" ]}),
|
|
|
|
2431=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00-abruf, mim00-abruf, MANAGED_WEBSPACE:mim00, {"target": [ "michael.mellis@hostsharing.net" ]}),
|
|
|
|
5002449=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00-hhfx, mim00-hhfx, MANAGED_WEBSPACE:mim00, {"target": [ "mim00-hhfx", "|/usr/bin/formail -I 'Reply-To: hamburger-fx@example.net' | /usr/lib/sendmail mim00-hhfx-l" ]}),
|
|
|
|
2449=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00-hhfx, mim00-hhfx, MANAGED_WEBSPACE:mim00, {"target": [ "mim00-hhfx", "|/usr/bin/formail -I 'Reply-To: hamburger-fx@example.net' | /usr/lib/sendmail mim00-hhfx-l" ]}),
|
|
|
|
5002451=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00-hhfx-l, mim00-hhfx-l, MANAGED_WEBSPACE:mim00, {"target": [ ":include:/home/pacs/mim00/etc/hhfx.list" ]}),
|
|
|
|
2451=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00-hhfx-l, mim00-hhfx-l, MANAGED_WEBSPACE:mim00, {"target": [ ":include:/home/pacs/mim00/etc/hhfx.list" ]}),
|
|
|
|
5002454=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00-dev.null, mim00-dev.null, MANAGED_WEBSPACE:mim00, {"target": [ "/dev/null" ]}),
|
|
|
|
2454=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00-dev.null, mim00-dev.null, MANAGED_WEBSPACE:mim00, {"target": [ "/dev/null" ]}),
|
|
|
|
5002455=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00-1_with_space, mim00-1_with_space, MANAGED_WEBSPACE:mim00, {"target": [ "|/home/pacs/mim00/install/corpslistar/listar" ]}),
|
|
|
|
2455=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00-1_with_space, mim00-1_with_space, MANAGED_WEBSPACE:mim00, {"target": [ "|/home/pacs/mim00/install/corpslistar/listar" ]}),
|
|
|
|
5002456=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00-1_with_single_quotes, mim00-1_with_single_quotes, MANAGED_WEBSPACE:mim00, {"target": [ "|/home/pacs/rir00/mailinglist/ecartis -r kybs06-intern" ]})
|
|
|
|
2456=HsHostingAssetRealEntity(EMAIL_ALIAS, mim00-1_with_single_quotes, mim00-1_with_single_quotes, MANAGED_WEBSPACE:mim00, {"target": [ "|/home/pacs/rir00/mailinglist/ecartis -r kybs06-intern" ]})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
""");
|
|
|
|
""");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -373,7 +380,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
@Order(15000)
|
|
|
|
@Order(15000)
|
|
|
|
void createDatabaseInstances() {
|
|
|
|
void createDatabaseInstances() {
|
|
|
|
createDatabaseInstances(hostingAssets.values().stream().filter(ha -> ha.getType() == MANAGED_SERVER).toList());
|
|
|
|
createDatabaseInstances(packetAssets.values().stream().filter(ha -> ha.getType() == MANAGED_SERVER).toList());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -381,16 +388,16 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
void verifyDatabaseInstances() {
|
|
|
|
void verifyDatabaseInstances() {
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(firstOfEachType(5, PGSQL_INSTANCE, MARIADB_INSTANCE)).isEqualToIgnoringWhitespace("""
|
|
|
|
assertThat(firstOfEach(8, dbInstanceAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
{
|
|
|
|
{
|
|
|
|
6000000=HsHostingAssetRealEntity(PGSQL_INSTANCE, vm1061|PgSql.default, vm1061-PostgreSQL default instance, MANAGED_SERVER:vm1061),
|
|
|
|
0=HsHostingAssetRealEntity(PGSQL_INSTANCE, vm1061|PgSql.default, vm1061-PostgreSQL default instance, MANAGED_SERVER:vm1061),
|
|
|
|
6000001=HsHostingAssetRealEntity(MARIADB_INSTANCE, vm1061|MariaDB.default, vm1061-MariaDB default instance, MANAGED_SERVER:vm1061),
|
|
|
|
1=HsHostingAssetRealEntity(MARIADB_INSTANCE, vm1061|MariaDB.default, vm1061-MariaDB default instance, MANAGED_SERVER:vm1061),
|
|
|
|
6000002=HsHostingAssetRealEntity(PGSQL_INSTANCE, vm1050|PgSql.default, vm1050-PostgreSQL default instance, MANAGED_SERVER:vm1050),
|
|
|
|
2=HsHostingAssetRealEntity(PGSQL_INSTANCE, vm1050|PgSql.default, vm1050-PostgreSQL default instance, MANAGED_SERVER:vm1050),
|
|
|
|
6000003=HsHostingAssetRealEntity(MARIADB_INSTANCE, vm1050|MariaDB.default, vm1050-MariaDB default instance, MANAGED_SERVER:vm1050),
|
|
|
|
3=HsHostingAssetRealEntity(MARIADB_INSTANCE, vm1050|MariaDB.default, vm1050-MariaDB default instance, MANAGED_SERVER:vm1050),
|
|
|
|
6000004=HsHostingAssetRealEntity(PGSQL_INSTANCE, vm1068|PgSql.default, vm1068-PostgreSQL default instance, MANAGED_SERVER:vm1068),
|
|
|
|
4=HsHostingAssetRealEntity(PGSQL_INSTANCE, vm1068|PgSql.default, vm1068-PostgreSQL default instance, MANAGED_SERVER:vm1068),
|
|
|
|
6000005=HsHostingAssetRealEntity(MARIADB_INSTANCE, vm1068|MariaDB.default, vm1068-MariaDB default instance, MANAGED_SERVER:vm1068),
|
|
|
|
5=HsHostingAssetRealEntity(MARIADB_INSTANCE, vm1068|MariaDB.default, vm1068-MariaDB default instance, MANAGED_SERVER:vm1068),
|
|
|
|
6000006=HsHostingAssetRealEntity(PGSQL_INSTANCE, vm1093|PgSql.default, vm1093-PostgreSQL default instance, MANAGED_SERVER:vm1093),
|
|
|
|
6=HsHostingAssetRealEntity(PGSQL_INSTANCE, vm1093|PgSql.default, vm1093-PostgreSQL default instance, MANAGED_SERVER:vm1093),
|
|
|
|
6000007=HsHostingAssetRealEntity(MARIADB_INSTANCE, vm1093|MariaDB.default, vm1093-MariaDB default instance, MANAGED_SERVER:vm1093)
|
|
|
|
7=HsHostingAssetRealEntity(MARIADB_INSTANCE, vm1093|MariaDB.default, vm1093-MariaDB default instance, MANAGED_SERVER:vm1093)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
""");
|
|
|
|
""");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -411,18 +418,18 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
void verifyDatabaseUsers() {
|
|
|
|
void verifyDatabaseUsers() {
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(firstOfEachType(5, PGSQL_USER, MARIADB_USER)).isEqualToIgnoringWhitespace("""
|
|
|
|
assertThat(firstOfEach(10, dbUserAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
{
|
|
|
|
{
|
|
|
|
7001857=HsHostingAssetRealEntity(PGSQL_USER, PGU|hsh00, hsh00, MANAGED_WEBSPACE:hsh00, PGSQL_INSTANCE:vm1050|PgSql.default, { "password": "SCRAM-SHA-256$4096:Zml4ZWQgc2FsdA==$JDiZmaxU+O+ByArLY/CkYZ8HbOk0r/I8LyABnno5gQs=:NI3T500/63dzI1B07Jh3UtQGlukS6JxuS0XoxM/QgAc="}),
|
|
|
|
1857=HsHostingAssetRealEntity(PGSQL_USER, PGU|hsh00, hsh00, MANAGED_WEBSPACE:hsh00, PGSQL_INSTANCE:vm1050|PgSql.default, { "password": "SCRAM-SHA-256$4096:Zml4ZWQgc2FsdA==$JDiZmaxU+O+ByArLY/CkYZ8HbOk0r/I8LyABnno5gQs=:NI3T500/63dzI1B07Jh3UtQGlukS6JxuS0XoxM/QgAc="}),
|
|
|
|
7001858=HsHostingAssetRealEntity(MARIADB_USER, MAU|hsh00, hsh00, MANAGED_WEBSPACE:hsh00, MARIADB_INSTANCE:vm1050|MariaDB.default, { "password": "*59067A36BA197AD0A47D74909296C5B002A0FB9F"}),
|
|
|
|
1858=HsHostingAssetRealEntity(MARIADB_USER, MAU|hsh00, hsh00, MANAGED_WEBSPACE:hsh00, MARIADB_INSTANCE:vm1050|MariaDB.default, { "password": "*59067A36BA197AD0A47D74909296C5B002A0FB9F"}),
|
|
|
|
7001859=HsHostingAssetRealEntity(PGSQL_USER, PGU|hsh00_vorstand, hsh00_vorstand, MANAGED_WEBSPACE:hsh00, PGSQL_INSTANCE:vm1050|PgSql.default, { "password": "SCRAM-SHA-256$4096:Zml4ZWQgc2FsdA==$54Wh+OGx/GaIvAia+I3k78jHGhqmYwe4+iLssmH5zhk=:D4Gq1z2Li2BVSaZrz1azDrs6pwsIzhq4+suK1Hh6ZIg="}),
|
|
|
|
1859=HsHostingAssetRealEntity(PGSQL_USER, PGU|hsh00_vorstand, hsh00_vorstand, MANAGED_WEBSPACE:hsh00, PGSQL_INSTANCE:vm1050|PgSql.default, { "password": "SCRAM-SHA-256$4096:Zml4ZWQgc2FsdA==$54Wh+OGx/GaIvAia+I3k78jHGhqmYwe4+iLssmH5zhk=:D4Gq1z2Li2BVSaZrz1azDrs6pwsIzhq4+suK1Hh6ZIg="}),
|
|
|
|
7001860=HsHostingAssetRealEntity(PGSQL_USER, PGU|hsh00_hsadmin, hsh00_hsadmin, MANAGED_WEBSPACE:hsh00, PGSQL_INSTANCE:vm1050|PgSql.default, { "password": "SCRAM-SHA-256$4096:Zml4ZWQgc2FsdA==$54Wh+OGx/GaIvAia+I3k78jHGhqmYwe4+iLssmH5zhk=:D4Gq1z2Li2BVSaZrz1azDrs6pwsIzhq4+suK1Hh6ZIg="}),
|
|
|
|
1860=HsHostingAssetRealEntity(PGSQL_USER, PGU|hsh00_hsadmin, hsh00_hsadmin, MANAGED_WEBSPACE:hsh00, PGSQL_INSTANCE:vm1050|PgSql.default, { "password": "SCRAM-SHA-256$4096:Zml4ZWQgc2FsdA==$54Wh+OGx/GaIvAia+I3k78jHGhqmYwe4+iLssmH5zhk=:D4Gq1z2Li2BVSaZrz1azDrs6pwsIzhq4+suK1Hh6ZIg="}),
|
|
|
|
7001861=HsHostingAssetRealEntity(PGSQL_USER, PGU|hsh00_hsadmin_ro, hsh00_hsadmin_ro, MANAGED_WEBSPACE:hsh00, PGSQL_INSTANCE:vm1050|PgSql.default, { "password": "SCRAM-SHA-256$4096:Zml4ZWQgc2FsdA==$UhJnJJhmKANbcaG+izWK3rz5bmhhluSuiCJFlUmDVI8=:6AC4mbLfJGiGlEOWhpz9BivvMODhLLHOnRnnktJPgn8="}),
|
|
|
|
1861=HsHostingAssetRealEntity(PGSQL_USER, PGU|hsh00_hsadmin_ro, hsh00_hsadmin_ro, MANAGED_WEBSPACE:hsh00, PGSQL_INSTANCE:vm1050|PgSql.default, { "password": "SCRAM-SHA-256$4096:Zml4ZWQgc2FsdA==$UhJnJJhmKANbcaG+izWK3rz5bmhhluSuiCJFlUmDVI8=:6AC4mbLfJGiGlEOWhpz9BivvMODhLLHOnRnnktJPgn8="}),
|
|
|
|
7004908=HsHostingAssetRealEntity(MARIADB_USER, MAU|hsh00_mantis, hsh00_mantis, MANAGED_WEBSPACE:hsh00, MARIADB_INSTANCE:vm1050|MariaDB.default, { "password": "*EA4C0889A22AAE66BBEBC88161E8CF862D73B44F"}),
|
|
|
|
4908=HsHostingAssetRealEntity(MARIADB_USER, MAU|hsh00_mantis, hsh00_mantis, MANAGED_WEBSPACE:hsh00, MARIADB_INSTANCE:vm1050|MariaDB.default, { "password": "*EA4C0889A22AAE66BBEBC88161E8CF862D73B44F"}),
|
|
|
|
7004909=HsHostingAssetRealEntity(MARIADB_USER, MAU|hsh00_mantis_ro, hsh00_mantis_ro, MANAGED_WEBSPACE:hsh00, MARIADB_INSTANCE:vm1050|MariaDB.default, { "password": "*B3BB6D0DA2EC01958616E9B3BCD2926FE8C38383"}),
|
|
|
|
4909=HsHostingAssetRealEntity(MARIADB_USER, MAU|hsh00_mantis_ro, hsh00_mantis_ro, MANAGED_WEBSPACE:hsh00, MARIADB_INSTANCE:vm1050|MariaDB.default, { "password": "*B3BB6D0DA2EC01958616E9B3BCD2926FE8C38383"}),
|
|
|
|
7004931=HsHostingAssetRealEntity(PGSQL_USER, PGU|hsh00_phpPgSqlAdmin, hsh00_phpPgSqlAdmin, MANAGED_WEBSPACE:hsh00, PGSQL_INSTANCE:vm1050|PgSql.default, { "password": "SCRAM-SHA-256$4096:Zml4ZWQgc2FsdA==$UhJnJJhmKANbcaG+izWK3rz5bmhhluSuiCJFlUmDVI8=:6AC4mbLfJGiGlEOWhpz9BivvMODhLLHOnRnnktJPgn8="}),
|
|
|
|
4931=HsHostingAssetRealEntity(PGSQL_USER, PGU|hsh00_phpPgSqlAdmin, hsh00_phpPgSqlAdmin, MANAGED_WEBSPACE:hsh00, PGSQL_INSTANCE:vm1050|PgSql.default, { "password": "SCRAM-SHA-256$4096:Zml4ZWQgc2FsdA==$UhJnJJhmKANbcaG+izWK3rz5bmhhluSuiCJFlUmDVI8=:6AC4mbLfJGiGlEOWhpz9BivvMODhLLHOnRnnktJPgn8="}),
|
|
|
|
7004932=HsHostingAssetRealEntity(MARIADB_USER, MAU|hsh00_phpMyAdmin, hsh00_phpMyAdmin, MANAGED_WEBSPACE:hsh00, MARIADB_INSTANCE:vm1050|MariaDB.default, { "password": "*3188720B1889EF5447C722629765F296F40257C2"}),
|
|
|
|
4932=HsHostingAssetRealEntity(MARIADB_USER, MAU|hsh00_phpMyAdmin, hsh00_phpMyAdmin, MANAGED_WEBSPACE:hsh00, MARIADB_INSTANCE:vm1050|MariaDB.default, { "password": "*3188720B1889EF5447C722629765F296F40257C2"}),
|
|
|
|
7007520=HsHostingAssetRealEntity(MARIADB_USER, MAU|lug00_wla, lug00_wla, MANAGED_WEBSPACE:lug00, MARIADB_INSTANCE:vm1068|MariaDB.default, { "password": "*11667C0EAC42BF8B0295ABEDC7D2868A835E4DB5"})
|
|
|
|
7520=HsHostingAssetRealEntity(MARIADB_USER, MAU|lug00_wla, lug00_wla, MANAGED_WEBSPACE:lug00, MARIADB_INSTANCE:vm1068|MariaDB.default, { "password": "*11667C0EAC42BF8B0295ABEDC7D2868A835E4DB5"})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
""");
|
|
|
|
""");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -443,18 +450,18 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
void verifyDatabases() {
|
|
|
|
void verifyDatabases() {
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(firstOfEachType(5, PGSQL_DATABASE, MARIADB_DATABASE)).isEqualToIgnoringWhitespace("""
|
|
|
|
assertThat(firstOfEach(10, dbAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
{
|
|
|
|
{
|
|
|
|
8000077=HsHostingAssetRealEntity(PGSQL_DATABASE, PGD|hsh00_vorstand, hsh00_vorstand, PGSQL_USER:PGU|hsh00_vorstand, { "encoding": "LATIN1"}),
|
|
|
|
1077=HsHostingAssetRealEntity(PGSQL_DATABASE, PGD|hsh00_vorstand, hsh00_vorstand, PGSQL_USER:PGU|hsh00_vorstand, {"encoding": "LATIN1"}),
|
|
|
|
8000786=HsHostingAssetRealEntity(MARIADB_DATABASE, MAD|hsh00_addr, hsh00_addr, MARIADB_USER:MAU|hsh00, { "encoding": "latin1"}),
|
|
|
|
1786=HsHostingAssetRealEntity(MARIADB_DATABASE, MAD|hsh00_addr, hsh00_addr, MARIADB_USER:MAU|hsh00, {"encoding": "latin1"}),
|
|
|
|
8000805=HsHostingAssetRealEntity(MARIADB_DATABASE, MAD|hsh00_db2, hsh00_db2, MARIADB_USER:MAU|hsh00, { "encoding": "latin1"}),
|
|
|
|
1805=HsHostingAssetRealEntity(MARIADB_DATABASE, MAD|hsh00_dba, hsh00_dba, MARIADB_USER:MAU|hsh00, {"encoding": "latin1"}),
|
|
|
|
8001858=HsHostingAssetRealEntity(PGSQL_DATABASE, PGD|hsh00, hsh00, PGSQL_USER:PGU|hsh00, { "encoding": "LATIN1"}),
|
|
|
|
1858=HsHostingAssetRealEntity(PGSQL_DATABASE, PGD|hsh00, hsh00, PGSQL_USER:PGU|hsh00, {"encoding": "LATIN1"}),
|
|
|
|
8001860=HsHostingAssetRealEntity(PGSQL_DATABASE, PGD|hsh00_hsadmin, hsh00_hsadmin, PGSQL_USER:PGU|hsh00_hsadmin, { "encoding": "UTF8"}),
|
|
|
|
1860=HsHostingAssetRealEntity(PGSQL_DATABASE, PGD|hsh00_hsadmin, hsh00_hsadmin, PGSQL_USER:PGU|hsh00_hsadmin, {"encoding": "UTF8"}),
|
|
|
|
8004908=HsHostingAssetRealEntity(MARIADB_DATABASE, MAD|hsh00_mantis, hsh00_mantis, MARIADB_USER:MAU|hsh00_mantis, { "encoding": "utf8"}),
|
|
|
|
4908=HsHostingAssetRealEntity(MARIADB_DATABASE, MAD|hsh00_mantis, hsh00_mantis, MARIADB_USER:MAU|hsh00_mantis, {"encoding": "utf8"}),
|
|
|
|
8004931=HsHostingAssetRealEntity(PGSQL_DATABASE, PGD|hsh00_phpPgSqlAdmin, hsh00_phpPgSqlAdmin, PGSQL_USER:PGU|hsh00_phpPgSqlAdmin, { "encoding": "UTF8"}),
|
|
|
|
4931=HsHostingAssetRealEntity(PGSQL_DATABASE, PGD|hsh00_phpPgSqlAdmin, hsh00_phpPgSqlAdmin, PGSQL_USER:PGU|hsh00_phpPgSqlAdmin, {"encoding": "UTF8"}),
|
|
|
|
8004932=HsHostingAssetRealEntity(PGSQL_DATABASE, PGD|hsh00_phpPgSqlAdmin_new, hsh00_phpPgSqlAdmin_new, PGSQL_USER:PGU|hsh00_phpPgSqlAdmin, { "encoding": "UTF8"}),
|
|
|
|
4932=HsHostingAssetRealEntity(PGSQL_DATABASE, PGD|hsh00_phpPgSqlAdmin_new, hsh00_phpPgSqlAdmin_new, PGSQL_USER:PGU|hsh00_phpPgSqlAdmin, {"encoding": "UTF8"}),
|
|
|
|
8004941=HsHostingAssetRealEntity(MARIADB_DATABASE, MAD|hsh00_phpMyAdmin, hsh00_phpMyAdmin, MARIADB_USER:MAU|hsh00_phpMyAdmin, { "encoding": "utf8"}),
|
|
|
|
4941=HsHostingAssetRealEntity(MARIADB_DATABASE, MAD|hsh00_phpMyAdmin, hsh00_phpMyAdmin, MARIADB_USER:MAU|hsh00_phpMyAdmin, {"encoding": "utf8"}),
|
|
|
|
8004942=HsHostingAssetRealEntity(MARIADB_DATABASE, MAD|hsh00_phpMyAdmin_old, hsh00_phpMyAdmin_old, MARIADB_USER:MAU|hsh00_phpMyAdmin, { "encoding": "utf8"})
|
|
|
|
4942=HsHostingAssetRealEntity(MARIADB_DATABASE, MAD|hsh00_phpMyAdmin_old, hsh00_phpMyAdmin_old, MARIADB_USER:MAU|hsh00_phpMyAdmin, {"encoding": "utf8"})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
""");
|
|
|
|
""");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -490,59 +497,107 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
void verifyDomains() {
|
|
|
|
void verifyDomains() {
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(firstOfEachType(
|
|
|
|
assertThat(firstOfEach(12, domainSetupAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
12,
|
|
|
|
|
|
|
|
DOMAIN_SETUP,
|
|
|
|
|
|
|
|
DOMAIN_DNS_SETUP,
|
|
|
|
|
|
|
|
DOMAIN_HTTP_SETUP,
|
|
|
|
|
|
|
|
DOMAIN_MBOX_SETUP,
|
|
|
|
|
|
|
|
DOMAIN_SMTP_SETUP)).isEqualToIgnoringWhitespace("""
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
10004531=HsHostingAssetRealEntity(DOMAIN_SETUP, l-u-g.org, l-u-g.org),
|
|
|
|
4531=HsHostingAssetRealEntity(DOMAIN_SETUP, l-u-g.org, l-u-g.org),
|
|
|
|
10004532=HsHostingAssetRealEntity(DOMAIN_SETUP, linuxfanboysngirls.de, linuxfanboysngirls.de),
|
|
|
|
4532=HsHostingAssetRealEntity(DOMAIN_SETUP, linuxfanboysngirls.de, linuxfanboysngirls.de),
|
|
|
|
10004534=HsHostingAssetRealEntity(DOMAIN_SETUP, lug-mars.de, lug-mars.de),
|
|
|
|
4534=HsHostingAssetRealEntity(DOMAIN_SETUP, lug-mars.de, lug-mars.de),
|
|
|
|
10004581=HsHostingAssetRealEntity(DOMAIN_SETUP, 1981.ist-im-netz.de, 1981.ist-im-netz.de, DOMAIN_SETUP:ist-im-netz.de),
|
|
|
|
4581=HsHostingAssetRealEntity(DOMAIN_SETUP, 1981.ist-im-netz.de, 1981.ist-im-netz.de, DOMAIN_SETUP:ist-im-netz.de),
|
|
|
|
10004587=HsHostingAssetRealEntity(DOMAIN_SETUP, mellis.de, mellis.de),
|
|
|
|
4587=HsHostingAssetRealEntity(DOMAIN_SETUP, mellis.de, mellis.de),
|
|
|
|
10004589=HsHostingAssetRealEntity(DOMAIN_SETUP, ist-im-netz.de, ist-im-netz.de),
|
|
|
|
4589=HsHostingAssetRealEntity(DOMAIN_SETUP, ist-im-netz.de, ist-im-netz.de),
|
|
|
|
10004600=HsHostingAssetRealEntity(DOMAIN_SETUP, waera.de, waera.de),
|
|
|
|
4600=HsHostingAssetRealEntity(DOMAIN_SETUP, waera.de, waera.de),
|
|
|
|
10004604=HsHostingAssetRealEntity(DOMAIN_SETUP, xn--wra-qla.de, wära.de),
|
|
|
|
4604=HsHostingAssetRealEntity(DOMAIN_SETUP, xn--wra-qla.de, wära.de),
|
|
|
|
10027662=HsHostingAssetRealEntity(DOMAIN_SETUP, dph-netzwerk.de, dph-netzwerk.de),
|
|
|
|
7662=HsHostingAssetRealEntity(DOMAIN_SETUP, dph-netzwerk.de, dph-netzwerk.de)
|
|
|
|
11004531=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, l-u-g.org|DNS, DNS-Setup für l-u-g.org, DOMAIN_SETUP:l-u-g.org, MANAGED_WEBSPACE:lug00, {"TTL": 21600, "auto-A-RR": true, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": true, "auto-NS-RR": true, "auto-SOA": true, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": true, "auto-WILDCARD-SPF-RR": false, "user-RR": [ ]}),
|
|
|
|
}
|
|
|
|
11004532=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, linuxfanboysngirls.de|DNS, DNS-Setup für linuxfanboysngirls.de, DOMAIN_SETUP:linuxfanboysngirls.de, MANAGED_WEBSPACE:lug00, {"TTL": 21600, "auto-A-RR": true, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": true, "auto-NS-RR": true, "auto-SOA": true, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": true, "auto-WILDCARD-SPF-RR": false, "user-RR": [ ]}),
|
|
|
|
""");
|
|
|
|
11004534=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, lug-mars.de|DNS, DNS-Setup für lug-mars.de, DOMAIN_SETUP:lug-mars.de, MANAGED_WEBSPACE:lug00, {"TTL": 14400, "auto-A-RR": true, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": false, "auto-NS-RR": true, "auto-SOA": false, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": false, "auto-WILDCARD-SPF-RR": false, "user-RR": [ "lug-mars.de. 14400 IN SOA dns1.hostsharing.net. hostmaster.hostsharing.net. 1611590905 10800 3600 604800 3600", "lug-mars.de. 14400 IN MX 10 mailin1.hostsharing.net.", "lug-mars.de. 14400 IN MX 20 mailin2.hostsharing.net.", "lug-mars.de. 14400 IN MX 30 mailin3.hostsharing.net.", "bbb.lug-mars.de. 14400 IN A 83.223.79.72", "ftp.lug-mars.de. 14400 IN A 83.223.79.72", "www.lug-mars.de. 14400 IN A 83.223.79.72" ]}),
|
|
|
|
|
|
|
|
11004581=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, 1981.ist-im-netz.de|DNS, DNS-Setup für 1981.ist-im-netz.de, DOMAIN_SETUP:1981.ist-im-netz.de, MANAGED_WEBSPACE:mim00, {"TTL": 21600, "auto-A-RR": true, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": true, "auto-NS-RR": true, "auto-SOA": true, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": true, "auto-WILDCARD-SPF-RR": false, "user-RR": [ ]}),
|
|
|
|
assertThat(firstOfEach(12, domainDnsSetupAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
11004587=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, mellis.de|DNS, DNS-Setup für mellis.de, DOMAIN_SETUP:mellis.de, MANAGED_WEBSPACE:mim00, {"TTL": 21600, "auto-A-RR": true, "auto-AAAA-RR": true, "auto-AUTOCONFIG-RR": true, "auto-AUTODISCOVER-RR": true, "auto-DKIM-RR": true, "auto-MAILSERVICES-RR": true, "auto-MX-RR": true, "auto-NS-RR": true, "auto-SOA": true, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": true, "auto-WILDCARD-MX-RR": true, "auto-WILDCARD-SPF-RR": true, "user-RR": [ "dump.hoennig.de. 21600 IN CNAME mih12.hostsharing.net.", "fotos.hoennig.de. 21600 IN CNAME mih12.hostsharing.net.", "maven.hoennig.de. 21600 IN NS dns1.hostsharing.net." ]}),
|
|
|
|
{
|
|
|
|
11004589=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, ist-im-netz.de|DNS, DNS-Setup für ist-im-netz.de, DOMAIN_SETUP:ist-im-netz.de, MANAGED_WEBSPACE:mim00, {"TTL": 700, "auto-A-RR": true, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": true, "auto-NS-RR": true, "auto-SOA": true, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": false, "auto-WILDCARD-SPF-RR": false, "user-RR": [ ]}),
|
|
|
|
4531=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, l-u-g.org|DNS, DNS-Setup für l-u-g.org, DOMAIN_SETUP:l-u-g.org, MANAGED_WEBSPACE:lug00, {"TTL": 21600, "auto-A-RR": true, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": true, "auto-NS-RR": true, "auto-SOA": true, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": true, "auto-WILDCARD-SPF-RR": false, "user-RR": [ ]}),
|
|
|
|
11004600=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, waera.de|DNS, DNS-Setup für waera.de, DOMAIN_SETUP:waera.de, MANAGED_WEBSPACE:mim00, {"TTL": 21600, "auto-A-RR": false, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": false, "auto-NS-RR": false, "auto-SOA": false, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": false, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": false, "auto-WILDCARD-SPF-RR": false, "user-RR": [ ]}),
|
|
|
|
4532=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, linuxfanboysngirls.de|DNS, DNS-Setup für linuxfanboysngirls.de, DOMAIN_SETUP:linuxfanboysngirls.de, MANAGED_WEBSPACE:lug00, {"TTL": 21600, "auto-A-RR": true, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": true, "auto-NS-RR": true, "auto-SOA": true, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": true, "auto-WILDCARD-SPF-RR": false, "user-RR": [ ]}),
|
|
|
|
11004604=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, xn--wra-qla.de|DNS, DNS-Setup für wära.de, DOMAIN_SETUP:xn--wra-qla.de, MANAGED_WEBSPACE:mim00, {"TTL": 21600, "auto-A-RR": false, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": false, "auto-NS-RR": false, "auto-SOA": false, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": false, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": false, "auto-WILDCARD-SPF-RR": false, "user-RR": [ ]}),
|
|
|
|
4534=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, lug-mars.de|DNS, DNS-Setup für lug-mars.de, DOMAIN_SETUP:lug-mars.de, MANAGED_WEBSPACE:lug00, {"TTL": 14400, "auto-A-RR": true, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": false, "auto-NS-RR": true, "auto-SOA": false, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": false, "auto-WILDCARD-SPF-RR": false, "user-RR": [ "lug-mars.de. 14400 IN SOA dns1.hostsharing.net. hostmaster.hostsharing.net. 1611590905 10800 3600 604800 3600", "lug-mars.de. 14400 IN MX 10 mailin1.hostsharing.net.", "lug-mars.de. 14400 IN MX 20 mailin2.hostsharing.net.", "lug-mars.de. 14400 IN MX 30 mailin3.hostsharing.net.", "bbb.lug-mars.de. 14400 IN A 83.223.79.72", "ftp.lug-mars.de. 14400 IN A 83.223.79.72", "www.lug-mars.de. 14400 IN A 83.223.79.72" ]}),
|
|
|
|
11027662=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, dph-netzwerk.de|DNS, DNS-Setup für dph-netzwerk.de, DOMAIN_SETUP:dph-netzwerk.de, MANAGED_WEBSPACE:dph00, {"TTL": 21600, "auto-A-RR": true, "auto-AAAA-RR": true, "auto-AUTOCONFIG-RR": true, "auto-AUTODISCOVER-RR": true, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": true, "auto-MX-RR": true, "auto-NS-RR": true, "auto-SOA": true, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": true, "auto-WILDCARD-MX-RR": true, "auto-WILDCARD-SPF-RR": false, "user-RR": [ "dph-netzwerk.de. 21600 IN TXT \\"v=spf1 include:spf.hostsharing.net ?all\\"", "*.dph-netzwerk.de. 21600 IN TXT \\"v=spf1 include:spf.hostsharing.net ?all\\"" ]}),
|
|
|
|
4581=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, 1981.ist-im-netz.de|DNS, DNS-Setup für 1981.ist-im-netz.de, DOMAIN_SETUP:1981.ist-im-netz.de, MANAGED_WEBSPACE:mim00, {"TTL": 21600, "auto-A-RR": true, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": true, "auto-NS-RR": true, "auto-SOA": true, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": true, "auto-WILDCARD-SPF-RR": false, "user-RR": [ ]}),
|
|
|
|
12004531=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, l-u-g.org|HTTP, HTTP-Setup für l-u-g.org, DOMAIN_SETUP:l-u-g.org, UNIX_USER:lug00, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": false, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
4587=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, mellis.de|DNS, DNS-Setup für mellis.de, DOMAIN_SETUP:mellis.de, MANAGED_WEBSPACE:mim00, {"TTL": 21600, "auto-A-RR": true, "auto-AAAA-RR": true, "auto-AUTOCONFIG-RR": true, "auto-AUTODISCOVER-RR": true, "auto-DKIM-RR": true, "auto-MAILSERVICES-RR": true, "auto-MX-RR": true, "auto-NS-RR": true, "auto-SOA": true, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": true, "auto-WILDCARD-MX-RR": true, "auto-WILDCARD-SPF-RR": true, "user-RR": [ "dump.hoennig.de. 21600 IN CNAME mih12.hostsharing.net.", "fotos.hoennig.de. 21600 IN CNAME mih12.hostsharing.net.", "maven.hoennig.de. 21600 IN NS dns1.hostsharing.net." ]}),
|
|
|
|
12004532=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, linuxfanboysngirls.de|HTTP, HTTP-Setup für linuxfanboysngirls.de, DOMAIN_SETUP:linuxfanboysngirls.de, UNIX_USER:lug00-wla.2, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": false, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
4589=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, ist-im-netz.de|DNS, DNS-Setup für ist-im-netz.de, DOMAIN_SETUP:ist-im-netz.de, MANAGED_WEBSPACE:mim00, {"TTL": 700, "auto-A-RR": true, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": true, "auto-NS-RR": true, "auto-SOA": true, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": false, "auto-WILDCARD-SPF-RR": false, "user-RR": [ ]}),
|
|
|
|
12004534=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, lug-mars.de|HTTP, HTTP-Setup für lug-mars.de, DOMAIN_SETUP:lug-mars.de, UNIX_USER:lug00-wla.2, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": true, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "www" ]}),
|
|
|
|
4600=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, waera.de|DNS, DNS-Setup für waera.de, DOMAIN_SETUP:waera.de, MANAGED_WEBSPACE:mim00, {"TTL": 21600, "auto-A-RR": false, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": false, "auto-NS-RR": false, "auto-SOA": false, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": false, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": false, "auto-WILDCARD-SPF-RR": false, "user-RR": [ ]}),
|
|
|
|
12004581=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, 1981.ist-im-netz.de|HTTP, HTTP-Setup für 1981.ist-im-netz.de, DOMAIN_SETUP:1981.ist-im-netz.de, UNIX_USER:mim00, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": false, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
4604=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, xn--wra-qla.de|DNS, DNS-Setup für wära.de, DOMAIN_SETUP:xn--wra-qla.de, MANAGED_WEBSPACE:mim00, {"TTL": 21600, "auto-A-RR": false, "auto-AAAA-RR": false, "auto-AUTOCONFIG-RR": false, "auto-AUTODISCOVER-RR": false, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": false, "auto-MX-RR": false, "auto-NS-RR": false, "auto-SOA": false, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": false, "auto-WILDCARD-AAAA-RR": false, "auto-WILDCARD-MX-RR": false, "auto-WILDCARD-SPF-RR": false, "user-RR": [ ]}),
|
|
|
|
12004587=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, mellis.de|HTTP, HTTP-Setup für mellis.de, DOMAIN_SETUP:mellis.de, UNIX_USER:mim00, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": false, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": true, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "www", "michael", "test", "photos", "static", "input" ]}),
|
|
|
|
7662=HsHostingAssetRealEntity(DOMAIN_DNS_SETUP, dph-netzwerk.de|DNS, DNS-Setup für dph-netzwerk.de, DOMAIN_SETUP:dph-netzwerk.de, MANAGED_WEBSPACE:dph00, {"TTL": 21600, "auto-A-RR": true, "auto-AAAA-RR": true, "auto-AUTOCONFIG-RR": true, "auto-AUTODISCOVER-RR": true, "auto-DKIM-RR": false, "auto-MAILSERVICES-RR": true, "auto-MX-RR": true, "auto-NS-RR": true, "auto-SOA": true, "auto-SPF-RR": false, "auto-WILDCARD-A-RR": true, "auto-WILDCARD-AAAA-RR": true, "auto-WILDCARD-MX-RR": true, "auto-WILDCARD-SPF-RR": false, "user-RR": [ "dph-netzwerk.de. 21600 IN TXT \\"v=spf1 include:spf.hostsharing.net ?all\\"", "*.dph-netzwerk.de. 21600 IN TXT \\"v=spf1 include:spf.hostsharing.net ?all\\"" ]})
|
|
|
|
12004589=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, ist-im-netz.de|HTTP, HTTP-Setup für ist-im-netz.de, DOMAIN_SETUP:ist-im-netz.de, UNIX_USER:mim00, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": false, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": true, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
}
|
|
|
|
12004600=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, waera.de|HTTP, HTTP-Setup für waera.de, DOMAIN_SETUP:waera.de, UNIX_USER:mim00, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": false, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
""");
|
|
|
|
12004604=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, xn--wra-qla.de|HTTP, HTTP-Setup für wära.de, DOMAIN_SETUP:xn--wra-qla.de, UNIX_USER:mim00, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": false, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
|
|
|
|
12027662=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, dph-netzwerk.de|HTTP, HTTP-Setup für dph-netzwerk.de, DOMAIN_SETUP:dph-netzwerk.de, UNIX_USER:dph00-dph, {"autoconfig": true, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": true, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
assertThat(firstOfEach(12, domainHttpSetupAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
13004531=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, l-u-g.org|MBOX, E-Mail-Empfang-Setup für l-u-g.org, DOMAIN_SETUP:l-u-g.org, MANAGED_WEBSPACE:lug00),
|
|
|
|
{
|
|
|
|
13004532=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, linuxfanboysngirls.de|MBOX, E-Mail-Empfang-Setup für linuxfanboysngirls.de, DOMAIN_SETUP:linuxfanboysngirls.de, MANAGED_WEBSPACE:lug00),
|
|
|
|
4531=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, l-u-g.org|HTTP, HTTP-Setup für l-u-g.org, DOMAIN_SETUP:l-u-g.org, UNIX_USER:lug00, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": false, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
13004534=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, lug-mars.de|MBOX, E-Mail-Empfang-Setup für lug-mars.de, DOMAIN_SETUP:lug-mars.de, MANAGED_WEBSPACE:lug00),
|
|
|
|
4532=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, linuxfanboysngirls.de|HTTP, HTTP-Setup für linuxfanboysngirls.de, DOMAIN_SETUP:linuxfanboysngirls.de, UNIX_USER:lug00-wla.2, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": false, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
13004581=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, 1981.ist-im-netz.de|MBOX, E-Mail-Empfang-Setup für 1981.ist-im-netz.de, DOMAIN_SETUP:1981.ist-im-netz.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
4534=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, lug-mars.de|HTTP, HTTP-Setup für lug-mars.de, DOMAIN_SETUP:lug-mars.de, UNIX_USER:lug00-wla.2, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": true, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "www" ]}),
|
|
|
|
13004587=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, mellis.de|MBOX, E-Mail-Empfang-Setup für mellis.de, DOMAIN_SETUP:mellis.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
4581=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, 1981.ist-im-netz.de|HTTP, HTTP-Setup für 1981.ist-im-netz.de, DOMAIN_SETUP:1981.ist-im-netz.de, UNIX_USER:mim00, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": false, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
13004589=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, ist-im-netz.de|MBOX, E-Mail-Empfang-Setup für ist-im-netz.de, DOMAIN_SETUP:ist-im-netz.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
4587=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, mellis.de|HTTP, HTTP-Setup für mellis.de, DOMAIN_SETUP:mellis.de, UNIX_USER:mim00, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": false, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": true, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "www", "michael", "test", "photos", "static", "input" ]}),
|
|
|
|
13004600=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, waera.de|MBOX, E-Mail-Empfang-Setup für waera.de, DOMAIN_SETUP:waera.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
4589=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, ist-im-netz.de|HTTP, HTTP-Setup für ist-im-netz.de, DOMAIN_SETUP:ist-im-netz.de, UNIX_USER:mim00, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": false, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": true, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
13004604=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, xn--wra-qla.de|MBOX, E-Mail-Empfang-Setup für wära.de, DOMAIN_SETUP:xn--wra-qla.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
4600=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, waera.de|HTTP, HTTP-Setup für waera.de, DOMAIN_SETUP:waera.de, UNIX_USER:mim00, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": false, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
13027662=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, dph-netzwerk.de|MBOX, E-Mail-Empfang-Setup für dph-netzwerk.de, DOMAIN_SETUP:dph-netzwerk.de, MANAGED_WEBSPACE:dph00),
|
|
|
|
4604=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, xn--wra-qla.de|HTTP, HTTP-Setup für wära.de, DOMAIN_SETUP:xn--wra-qla.de, UNIX_USER:mim00, {"autoconfig": false, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": false, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]}),
|
|
|
|
14004531=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, l-u-g.org|SMTP, E-Mail-Versand-Setup für l-u-g.org, DOMAIN_SETUP:l-u-g.org, MANAGED_WEBSPACE:lug00),
|
|
|
|
7662=HsHostingAssetRealEntity(DOMAIN_HTTP_SETUP, dph-netzwerk.de|HTTP, HTTP-Setup für dph-netzwerk.de, DOMAIN_SETUP:dph-netzwerk.de, UNIX_USER:dph00-dph, {"autoconfig": true, "cgi": true, "fastcgi": true, "fcgi-php-bin": "/usr/lib/cgi-bin/php", "greylisting": true, "htdocsfallback": true, "includes": true, "indexes": true, "letsencrypt": true, "multiviews": true, "passenger": true, "passenger-errorpage": false, "passenger-nodejs": "/usr/bin/node", "passenger-python": "/usr/bin/python3", "passenger-ruby": "/usr/bin/ruby", "subdomains": [ "*" ]})
|
|
|
|
14004532=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, linuxfanboysngirls.de|SMTP, E-Mail-Versand-Setup für linuxfanboysngirls.de, DOMAIN_SETUP:linuxfanboysngirls.de, MANAGED_WEBSPACE:lug00),
|
|
|
|
}
|
|
|
|
14004534=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, lug-mars.de|SMTP, E-Mail-Versand-Setup für lug-mars.de, DOMAIN_SETUP:lug-mars.de, MANAGED_WEBSPACE:lug00),
|
|
|
|
""");
|
|
|
|
14004581=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, 1981.ist-im-netz.de|SMTP, E-Mail-Versand-Setup für 1981.ist-im-netz.de, DOMAIN_SETUP:1981.ist-im-netz.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
|
|
|
|
14004587=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, mellis.de|SMTP, E-Mail-Versand-Setup für mellis.de, DOMAIN_SETUP:mellis.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
assertThat(firstOfEach(12, domainMBoxSetupAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
14004589=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, ist-im-netz.de|SMTP, E-Mail-Versand-Setup für ist-im-netz.de, DOMAIN_SETUP:ist-im-netz.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
{
|
|
|
|
14004600=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, waera.de|SMTP, E-Mail-Versand-Setup für waera.de, DOMAIN_SETUP:waera.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
4531=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, l-u-g.org|MBOX, E-Mail-Empfang-Setup für l-u-g.org, DOMAIN_SETUP:l-u-g.org, MANAGED_WEBSPACE:lug00),
|
|
|
|
14004604=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, xn--wra-qla.de|SMTP, E-Mail-Versand-Setup für wära.de, DOMAIN_SETUP:xn--wra-qla.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
4532=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, linuxfanboysngirls.de|MBOX, E-Mail-Empfang-Setup für linuxfanboysngirls.de, DOMAIN_SETUP:linuxfanboysngirls.de, MANAGED_WEBSPACE:lug00),
|
|
|
|
14027662=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, dph-netzwerk.de|SMTP, E-Mail-Versand-Setup für dph-netzwerk.de, DOMAIN_SETUP:dph-netzwerk.de, MANAGED_WEBSPACE:dph00)
|
|
|
|
4534=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, lug-mars.de|MBOX, E-Mail-Empfang-Setup für lug-mars.de, DOMAIN_SETUP:lug-mars.de, MANAGED_WEBSPACE:lug00),
|
|
|
|
|
|
|
|
4581=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, 1981.ist-im-netz.de|MBOX, E-Mail-Empfang-Setup für 1981.ist-im-netz.de, DOMAIN_SETUP:1981.ist-im-netz.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
|
|
|
|
4587=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, mellis.de|MBOX, E-Mail-Empfang-Setup für mellis.de, DOMAIN_SETUP:mellis.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
|
|
|
|
4589=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, ist-im-netz.de|MBOX, E-Mail-Empfang-Setup für ist-im-netz.de, DOMAIN_SETUP:ist-im-netz.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
|
|
|
|
4600=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, waera.de|MBOX, E-Mail-Empfang-Setup für waera.de, DOMAIN_SETUP:waera.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
|
|
|
|
4604=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, xn--wra-qla.de|MBOX, E-Mail-Empfang-Setup für wära.de, DOMAIN_SETUP:xn--wra-qla.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
|
|
|
|
7662=HsHostingAssetRealEntity(DOMAIN_MBOX_SETUP, dph-netzwerk.de|MBOX, E-Mail-Empfang-Setup für dph-netzwerk.de, DOMAIN_SETUP:dph-netzwerk.de, MANAGED_WEBSPACE:dph00)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
""");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(firstOfEach(12, domainSmtpSetupAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
4531=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, l-u-g.org|SMTP, E-Mail-Versand-Setup für l-u-g.org, DOMAIN_SETUP:l-u-g.org, MANAGED_WEBSPACE:lug00),
|
|
|
|
|
|
|
|
4532=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, linuxfanboysngirls.de|SMTP, E-Mail-Versand-Setup für linuxfanboysngirls.de, DOMAIN_SETUP:linuxfanboysngirls.de, MANAGED_WEBSPACE:lug00),
|
|
|
|
|
|
|
|
4534=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, lug-mars.de|SMTP, E-Mail-Versand-Setup für lug-mars.de, DOMAIN_SETUP:lug-mars.de, MANAGED_WEBSPACE:lug00),
|
|
|
|
|
|
|
|
4581=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, 1981.ist-im-netz.de|SMTP, E-Mail-Versand-Setup für 1981.ist-im-netz.de, DOMAIN_SETUP:1981.ist-im-netz.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
|
|
|
|
4587=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, mellis.de|SMTP, E-Mail-Versand-Setup für mellis.de, DOMAIN_SETUP:mellis.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
|
|
|
|
4589=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, ist-im-netz.de|SMTP, E-Mail-Versand-Setup für ist-im-netz.de, DOMAIN_SETUP:ist-im-netz.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
|
|
|
|
4600=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, waera.de|SMTP, E-Mail-Versand-Setup für waera.de, DOMAIN_SETUP:waera.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
|
|
|
|
4604=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, xn--wra-qla.de|SMTP, E-Mail-Versand-Setup für wära.de, DOMAIN_SETUP:xn--wra-qla.de, MANAGED_WEBSPACE:mim00),
|
|
|
|
|
|
|
|
7662=HsHostingAssetRealEntity(DOMAIN_SMTP_SETUP, dph-netzwerk.de|SMTP, E-Mail-Versand-Setup für dph-netzwerk.de, DOMAIN_SETUP:dph-netzwerk.de, MANAGED_WEBSPACE:dph00)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
""");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
|
|
@Order(16030)
|
|
|
|
|
|
|
|
void importEmailAddresses() {
|
|
|
|
|
|
|
|
try (Reader reader = resourceReader(MIGRATION_DATA_PATH + "/hosting/emailaddr.csv")) {
|
|
|
|
|
|
|
|
final var lines = readAllLines(reader);
|
|
|
|
|
|
|
|
importEmailAddresses(justHeader(lines), withoutHeader(lines));
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
|
|
@Order(16039)
|
|
|
|
|
|
|
|
void verifyEmailAddresses() {
|
|
|
|
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(firstOfEach(12, emailAddressAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
54746=HsHostingAssetRealEntity(EMAIL_ADDRESS, abuse@l-u-g.org, abuse@l-u-g.org, DOMAIN_MBOX_SETUP:l-u-g.org|MBOX, {"local-part": "abuse", "target": [ "lug00" ]}),
|
|
|
|
|
|
|
|
54747=HsHostingAssetRealEntity(EMAIL_ADDRESS, postmaster@l-u-g.org, postmaster@l-u-g.org, DOMAIN_MBOX_SETUP:l-u-g.org|MBOX, {"local-part": "postmaster", "target": [ "lug00" ]}),
|
|
|
|
|
|
|
|
54748=HsHostingAssetRealEntity(EMAIL_ADDRESS, webmaster@l-u-g.org, webmaster@l-u-g.org, DOMAIN_MBOX_SETUP:l-u-g.org|MBOX, {"local-part": "webmaster", "target": [ "lug00" ]}),
|
|
|
|
|
|
|
|
54749=HsHostingAssetRealEntity(EMAIL_ADDRESS, abuse@linuxfanboysngirls.de, abuse@linuxfanboysngirls.de, DOMAIN_MBOX_SETUP:linuxfanboysngirls.de|MBOX, {"local-part": "abuse", "target": [ "lug00-mars" ]}),
|
|
|
|
|
|
|
|
54750=HsHostingAssetRealEntity(EMAIL_ADDRESS, postmaster@linuxfanboysngirls.de, postmaster@linuxfanboysngirls.de, DOMAIN_MBOX_SETUP:linuxfanboysngirls.de|MBOX, {"local-part": "postmaster", "target": [ "m.hinsel@example.org" ]}),
|
|
|
|
|
|
|
|
54751=HsHostingAssetRealEntity(EMAIL_ADDRESS, webmaster@linuxfanboysngirls.de, webmaster@linuxfanboysngirls.de, DOMAIN_MBOX_SETUP:linuxfanboysngirls.de|MBOX, {"local-part": "webmaster", "target": [ "m.hinsel@example.org" ]}),
|
|
|
|
|
|
|
|
54755=HsHostingAssetRealEntity(EMAIL_ADDRESS, abuse@lug-mars.de, abuse@lug-mars.de, DOMAIN_MBOX_SETUP:lug-mars.de|MBOX, {"local-part": "abuse", "target": [ "lug00-marl" ]}),
|
|
|
|
|
|
|
|
54756=HsHostingAssetRealEntity(EMAIL_ADDRESS, postmaster@lug-mars.de, postmaster@lug-mars.de, DOMAIN_MBOX_SETUP:lug-mars.de|MBOX, {"local-part": "postmaster", "target": [ "m.hinsel@example.org" ]}),
|
|
|
|
|
|
|
|
54757=HsHostingAssetRealEntity(EMAIL_ADDRESS, webmaster@lug-mars.de, webmaster@lug-mars.de, DOMAIN_MBOX_SETUP:lug-mars.de|MBOX, {"local-part": "webmaster", "target": [ "m.hinsel@example.org" ]}),
|
|
|
|
|
|
|
|
54760=HsHostingAssetRealEntity(EMAIL_ADDRESS, info@hamburg-west.l-u-g.org, info@hamburg-west.l-u-g.org, DOMAIN_MBOX_SETUP:l-u-g.org|MBOX, {"local-part": "info", "sub-domain": "hamburg-west", "target": [ "peter.lottmann@example.com" ]}),
|
|
|
|
|
|
|
|
54761=HsHostingAssetRealEntity(EMAIL_ADDRESS, lugmaster@hamburg-west.l-u-g.org, lugmaster@hamburg-west.l-u-g.org, DOMAIN_MBOX_SETUP:l-u-g.org|MBOX, {"local-part": "lugmaster", "sub-domain": "hamburg-west", "target": [ "raoul.lottmann@example.com" ]}),
|
|
|
|
|
|
|
|
54762=HsHostingAssetRealEntity(EMAIL_ADDRESS, postmaster@hamburg-west.l-u-g.org, postmaster@hamburg-west.l-u-g.org, DOMAIN_MBOX_SETUP:l-u-g.org|MBOX, {"local-part": "postmaster", "sub-domain": "hamburg-west", "target": [ "raoul.lottmann@example.com" ]})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
""");
|
|
|
|
""");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -564,7 +619,11 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
@Order(18020)
|
|
|
|
@Order(18020)
|
|
|
|
void validateHostingAssets() {
|
|
|
|
void validateHostingAssets() {
|
|
|
|
hostingAssets.forEach((id, ha) -> {
|
|
|
|
validateHostingAssets(ipNumberAssets);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void validateHostingAssets(final Map<Integer, HsHostingAssetRealEntity> assets) {
|
|
|
|
|
|
|
|
assets.forEach((id, ha) -> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
new HostingAssetEntitySaveProcessor(em, ha)
|
|
|
|
new HostingAssetEntitySaveProcessor(em, ha)
|
|
|
|
.preprocessEntity()
|
|
|
|
.preprocessEntity()
|
|
|
@ -622,7 +681,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("PERSISTING cloud-servers to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING cloud-servers to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
|
|
|
|
|
|
|
|
persistHostingAssetsOfType(CLOUD_SERVER);
|
|
|
|
persistHostingAssets(packetAssets, CLOUD_SERVER);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -630,7 +689,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistManagedServers() {
|
|
|
|
void persistManagedServers() {
|
|
|
|
System.out.println("PERSISTING managed-servers to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING managed-servers to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(MANAGED_SERVER);
|
|
|
|
persistHostingAssets(packetAssets, MANAGED_SERVER);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -638,7 +697,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistManagedWebspaces() {
|
|
|
|
void persistManagedWebspaces() {
|
|
|
|
System.out.println("PERSISTING managed-webspaces to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING managed-webspaces to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(MANAGED_WEBSPACE);
|
|
|
|
persistHostingAssets(packetAssets, MANAGED_WEBSPACE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -646,7 +705,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistIPNumbers() {
|
|
|
|
void persistIPNumbers() {
|
|
|
|
System.out.println("PERSISTING ip-numbers to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING ip-numbers to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(IPV4_NUMBER);
|
|
|
|
persistHostingAssets(ipNumberAssets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -654,7 +713,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistUnixUsers() {
|
|
|
|
void persistUnixUsers() {
|
|
|
|
System.out.println("PERSISTING unix-users to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING unix-users to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(UNIX_USER);
|
|
|
|
persistHostingAssets(unixUserAssets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -662,7 +721,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistEmailAliases() {
|
|
|
|
void persistEmailAliases() {
|
|
|
|
System.out.println("PERSISTING email-aliases to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING email-aliases to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(EMAIL_ALIAS);
|
|
|
|
persistHostingAssets(emailAliasAssets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -670,7 +729,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistDatabaseInstances() {
|
|
|
|
void persistDatabaseInstances() {
|
|
|
|
System.out.println("PERSISTING db-users to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING db-users to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(PGSQL_INSTANCE, MARIADB_INSTANCE);
|
|
|
|
persistHostingAssets(dbInstanceAssets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -678,7 +737,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistDatabaseUsers() {
|
|
|
|
void persistDatabaseUsers() {
|
|
|
|
System.out.println("PERSISTING db-users to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING db-users to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(PGSQL_USER, MARIADB_USER);
|
|
|
|
persistHostingAssets(dbUserAssets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -686,7 +745,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistDatabases() {
|
|
|
|
void persistDatabases() {
|
|
|
|
System.out.println("PERSISTING databases to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING databases to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(PGSQL_DATABASE, MARIADB_DATABASE);
|
|
|
|
persistHostingAssets(dbAssets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -694,7 +753,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistDomainSetups() {
|
|
|
|
void persistDomainSetups() {
|
|
|
|
System.out.println("PERSISTING domain setups to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING domain setups to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(DOMAIN_SETUP);
|
|
|
|
persistHostingAssets(domainSetupAssets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -702,7 +761,8 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistDomainDnsSetups() {
|
|
|
|
void persistDomainDnsSetups() {
|
|
|
|
System.out.println("PERSISTING domain DNS setups to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING domain DNS setups to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(DOMAIN_DNS_SETUP);
|
|
|
|
HsDomainDnsSetupHostingAssetValidator.addZonefileErrorsTo(zonefileErrors);
|
|
|
|
|
|
|
|
persistHostingAssets(domainDnsSetupAssets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -710,7 +770,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistDomainHttpSetups() {
|
|
|
|
void persistDomainHttpSetups() {
|
|
|
|
System.out.println("PERSISTING domain HTTP setups to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING domain HTTP setups to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(DOMAIN_HTTP_SETUP);
|
|
|
|
persistHostingAssets(domainHttpSetupAssets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -718,7 +778,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistDomainMboxSetups() {
|
|
|
|
void persistDomainMboxSetups() {
|
|
|
|
System.out.println("PERSISTING domain MBOX setups to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING domain MBOX setups to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(DOMAIN_MBOX_SETUP);
|
|
|
|
persistHostingAssets(domainMBoxSetupAssets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -726,7 +786,15 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
@Commit
|
|
|
|
@Commit
|
|
|
|
void persistDomainSmtpSetups() {
|
|
|
|
void persistDomainSmtpSetups() {
|
|
|
|
System.out.println("PERSISTING domain SMTP setups to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
System.out.println("PERSISTING domain SMTP setups to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
persistHostingAssetsOfType(DOMAIN_SMTP_SETUP);
|
|
|
|
persistHostingAssets(domainSmtpSetupAssets);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
|
|
@Order(19400)
|
|
|
|
|
|
|
|
@Commit
|
|
|
|
|
|
|
|
void persistEmailAddresses() {
|
|
|
|
|
|
|
|
System.out.println("PERSISTING email-aliases to database '" + jdbcUrl + "' as user '" + postgresAdminUser + "'");
|
|
|
|
|
|
|
|
persistHostingAssets(emailAddressAssets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
@ -734,22 +802,22 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
void verifyPersistedUnixUsersWithUserId() {
|
|
|
|
void verifyPersistedUnixUsersWithUserId() {
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
assumeThatWeAreImportingControlledTestData();
|
|
|
|
|
|
|
|
|
|
|
|
assertThat(firstOfEachType(15, UNIX_USER)).isEqualToIgnoringWhitespace("""
|
|
|
|
assertThat(firstOfEach(15, unixUserAssets)).isEqualToIgnoringWhitespace("""
|
|
|
|
{
|
|
|
|
{
|
|
|
|
4005803=HsHostingAssetRealEntity(UNIX_USER, lug00, LUGs, MANAGED_WEBSPACE:lug00, { "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 102090}),
|
|
|
|
100705=HsHostingAssetRealEntity(UNIX_USER, hsh00-mim, Michael Mellis, MANAGED_WEBSPACE:hsh00, {"HDD hard quota": 0, "HDD soft quota": 0, "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/false", "userid": 10003}),
|
|
|
|
4005805=HsHostingAssetRealEntity(UNIX_USER, lug00-wla.1, Paul Klemm, MANAGED_WEBSPACE:lug00, { "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 102091}),
|
|
|
|
100824=HsHostingAssetRealEntity(UNIX_USER, hsh00, Hostsharing Paket, MANAGED_WEBSPACE:hsh00, {"HDD hard quota": 0, "HDD soft quota": 0, "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 10000}),
|
|
|
|
4005809=HsHostingAssetRealEntity(UNIX_USER, lug00-wla.2, Walter Müller, MANAGED_WEBSPACE:lug00, { "SSD hard quota": 8, "SSD soft quota": 4, "locked": false, "password": null, "shell": "/bin/bash", "userid": 102093}),
|
|
|
|
167846=HsHostingAssetRealEntity(UNIX_USER, hsh00-dph, hsh00-uph, MANAGED_WEBSPACE:hsh00, {"HDD hard quota": 0, "HDD soft quota": 0, "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/false", "userid": 110568}),
|
|
|
|
4005811=HsHostingAssetRealEntity(UNIX_USER, lug00-ola.a, LUG OLA - POP a, MANAGED_WEBSPACE:lug00, { "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/usr/bin/passwd", "userid": 102094}),
|
|
|
|
169546=HsHostingAssetRealEntity(UNIX_USER, dph00, Reinhard Wiese, MANAGED_WEBSPACE:dph00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 110593}),
|
|
|
|
4005813=HsHostingAssetRealEntity(UNIX_USER, lug00-ola.b, LUG OLA - POP b, MANAGED_WEBSPACE:lug00, { "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/usr/bin/passwd", "userid": 102095}),
|
|
|
|
169596=HsHostingAssetRealEntity(UNIX_USER, dph00-dph, Domain admin, MANAGED_WEBSPACE:dph00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 110594}),
|
|
|
|
4005835=HsHostingAssetRealEntity(UNIX_USER, lug00-test, Test, MANAGED_WEBSPACE:lug00, { "SSD hard quota": 1024, "SSD soft quota": 1024, "locked": false, "password": null, "shell": "/usr/bin/passwd", "userid": 102106}),
|
|
|
|
5803=HsHostingAssetRealEntity(UNIX_USER, lug00, LUGs, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 102090}),
|
|
|
|
4005964=HsHostingAssetRealEntity(UNIX_USER, mim00, Michael Mellis, MANAGED_WEBSPACE:mim00, { "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 102147}),
|
|
|
|
5805=HsHostingAssetRealEntity(UNIX_USER, lug00-wla.1, Paul Klemm, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 102091}),
|
|
|
|
4005966=HsHostingAssetRealEntity(UNIX_USER, mim00-1981, Jahrgangstreffen 1981, MANAGED_WEBSPACE:mim00, { "SSD hard quota": 256, "SSD soft quota": 128, "locked": false, "password": null, "shell": "/bin/bash", "userid": 102148}),
|
|
|
|
5809=HsHostingAssetRealEntity(UNIX_USER, lug00-wla.2, Walter Müller, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 8, "SSD soft quota": 4, "locked": false, "password": null, "shell": "/bin/bash", "userid": 102093}),
|
|
|
|
4005990=HsHostingAssetRealEntity(UNIX_USER, mim00-mail, Mailbox, MANAGED_WEBSPACE:mim00, { "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 102160}),
|
|
|
|
5811=HsHostingAssetRealEntity(UNIX_USER, lug00-ola.a, LUG OLA - POP a, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/usr/bin/passwd", "userid": 102094}),
|
|
|
|
4100705=HsHostingAssetRealEntity(UNIX_USER, hsh00-mim, Michael Mellis, MANAGED_WEBSPACE:hsh00, { "HDD hard quota": 0, "HDD soft quota": 0, "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/false", "userid": 10003}),
|
|
|
|
5813=HsHostingAssetRealEntity(UNIX_USER, lug00-ola.b, LUG OLA - POP b, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/usr/bin/passwd", "userid": 102095}),
|
|
|
|
4100824=HsHostingAssetRealEntity(UNIX_USER, hsh00, Hostsharing Paket, MANAGED_WEBSPACE:hsh00, { "HDD hard quota": 0, "HDD soft quota": 0, "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 10000}),
|
|
|
|
5835=HsHostingAssetRealEntity(UNIX_USER, lug00-test, Test, MANAGED_WEBSPACE:lug00, {"SSD hard quota": 1024, "SSD soft quota": 1024, "locked": false, "password": null, "shell": "/usr/bin/passwd", "userid": 102106}),
|
|
|
|
4167846=HsHostingAssetRealEntity(UNIX_USER, hsh00-dph, hsh00-uph, MANAGED_WEBSPACE:hsh00, { "HDD hard quota": 0, "HDD soft quota": 0, "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/false", "userid": 110568}),
|
|
|
|
5964=HsHostingAssetRealEntity(UNIX_USER, mim00, Michael Mellis, MANAGED_WEBSPACE:mim00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 102147}),
|
|
|
|
4169546=HsHostingAssetRealEntity(UNIX_USER, dph00, Reinhard Wiese, MANAGED_WEBSPACE:dph00, { "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 110593}),
|
|
|
|
5966=HsHostingAssetRealEntity(UNIX_USER, mim00-1981, Jahrgangstreffen 1981, MANAGED_WEBSPACE:mim00, {"SSD hard quota": 256, "SSD soft quota": 128, "locked": false, "password": null, "shell": "/bin/bash", "userid": 102148}),
|
|
|
|
4169596=HsHostingAssetRealEntity(UNIX_USER, dph00-dph, Domain admin, MANAGED_WEBSPACE:dph00, { "SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 110594})
|
|
|
|
5990=HsHostingAssetRealEntity(UNIX_USER, mim00-mail, Mailbox, MANAGED_WEBSPACE:mim00, {"SSD hard quota": 0, "SSD soft quota": 0, "locked": false, "password": null, "shell": "/bin/bash", "userid": 102160})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
""");
|
|
|
|
""");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -796,16 +864,14 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
|
|
|
|
|
|
|
|
// ============================================================================================
|
|
|
|
// ============================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
private void persistHostingAssetsOfType(final HsHostingAssetType... hsHostingAssetTypes) {
|
|
|
|
private void persistHostingAssets(final Map<Integer, HsHostingAssetRealEntity> assets) {
|
|
|
|
final var hsHostingAssetTypeSet = stream(hsHostingAssetTypes).collect(toSet());
|
|
|
|
persistHostingAssets(assets, null);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (hsHostingAssetTypeSet.contains(DOMAIN_DNS_SETUP)) {
|
|
|
|
|
|
|
|
HsDomainDnsSetupHostingAssetValidator.addZonefileErrorsTo(zonefileErrors);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void persistHostingAssets(final Map<Integer, HsHostingAssetRealEntity> assets, final HsHostingAssetType type) {
|
|
|
|
jpaAttempt.transacted(() ->
|
|
|
|
jpaAttempt.transacted(() ->
|
|
|
|
hostingAssets.forEach((key, ha) -> {
|
|
|
|
assets.forEach((key, ha) -> {
|
|
|
|
if (hsHostingAssetTypeSet.contains(ha.getType())) {
|
|
|
|
if (type == null || type == ha.getType()) {
|
|
|
|
context(rbacSuperuser); // if put only outside the loop, it seems to get lost after a while, no idea why
|
|
|
|
context(rbacSuperuser); // if put only outside the loop, it seems to get lost after a while, no idea why
|
|
|
|
logError(() ->
|
|
|
|
logError(() ->
|
|
|
|
new HostingAssetEntitySaveProcessor(em, ha)
|
|
|
|
new HostingAssetEntitySaveProcessor(em, ha)
|
|
|
@ -831,7 +897,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
.identifier(rec.getString("inet_addr"))
|
|
|
|
.identifier(rec.getString("inet_addr"))
|
|
|
|
.caption(rec.getString("description"))
|
|
|
|
.caption(rec.getString("description"))
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
hostingAssets.put(IP_NUMBER_ID_OFFSET + rec.getInteger("inet_addr_id"), ipNumber);
|
|
|
|
ipNumberAssets.put(rec.getInteger("inet_addr_id"), ipNumber);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -847,7 +913,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
rec.getString("hive_name"),
|
|
|
|
rec.getString("hive_name"),
|
|
|
|
rec.getInteger("inet_addr_id"),
|
|
|
|
rec.getInteger("inet_addr_id"),
|
|
|
|
new AtomicReference<>());
|
|
|
|
new AtomicReference<>());
|
|
|
|
hives.put(HIVE_ID_OFFSET + hive_id, hive);
|
|
|
|
hives.put(hive_id, hive);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -879,7 +945,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
.project(bookingProjects.get(bp_id))
|
|
|
|
.project(bookingProjects.get(bp_id))
|
|
|
|
.validity(toPostgresDateRange(created, cancelled))
|
|
|
|
.validity(toPostgresDateRange(created, cancelled))
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
bookingItems.put(PACKET_ID_OFFSET + packet_id, bookingItem);
|
|
|
|
bookingItems.put(BI_PACKET_ID_OFFSET + packet_id, bookingItem);
|
|
|
|
final var haType = determineHaType(basepacket_code);
|
|
|
|
final var haType = determineHaType(basepacket_code);
|
|
|
|
|
|
|
|
|
|
|
|
logError(() -> assertThat(!free || haType == MANAGED_WEBSPACE || bookingItem.getRelatedProject()
|
|
|
|
logError(() -> assertThat(!free || haType == MANAGED_WEBSPACE || bookingItem.getRelatedProject()
|
|
|
@ -898,11 +964,10 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
.bookingItem(bookingItem)
|
|
|
|
.bookingItem(bookingItem)
|
|
|
|
.caption("HA " + packet_name)
|
|
|
|
.caption("HA " + packet_name)
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
hostingAssets.put(PACKET_ID_OFFSET + packet_id, asset);
|
|
|
|
packetAssets.put(packet_id, asset);
|
|
|
|
if (haType == MANAGED_SERVER) {
|
|
|
|
if (haType == MANAGED_SERVER) {
|
|
|
|
hive(hive_id).serverRef.set(asset);
|
|
|
|
hive(hive_id).serverRef.set(asset);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (cur_inet_addr_id != null) {
|
|
|
|
if (cur_inet_addr_id != null) {
|
|
|
|
ipNumber(cur_inet_addr_id).setAssignedToAsset(asset);
|
|
|
|
ipNumber(cur_inet_addr_id).setAssignedToAsset(asset);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1032,7 +1097,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
final var packet_id = rec.getInteger("packet_id");
|
|
|
|
final var packet_id = rec.getInteger("packet_id");
|
|
|
|
final var unixUserAsset = HsHostingAssetRealEntity.builder()
|
|
|
|
final var unixUserAsset = HsHostingAssetRealEntity.builder()
|
|
|
|
.type(UNIX_USER)
|
|
|
|
.type(UNIX_USER)
|
|
|
|
.parentAsset(hostingAssets.get(PACKET_ID_OFFSET + packet_id))
|
|
|
|
.parentAsset(packetAssets.get(packet_id))
|
|
|
|
.identifier(rec.getString("name"))
|
|
|
|
.identifier(rec.getString("name"))
|
|
|
|
.caption(rec.getString("comment"))
|
|
|
|
.caption(rec.getString("comment"))
|
|
|
|
.isLoaded(true) // avoid overwriting imported userids with generated ids
|
|
|
|
.isLoaded(true) // avoid overwriting imported userids with generated ids
|
|
|
@ -1076,7 +1141,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
unixUserAsset.getConfig().remove("HDD soft quota");
|
|
|
|
unixUserAsset.getConfig().remove("HDD soft quota");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
hostingAssets.put(UNIXUSER_ID_OFFSET + unixuser_id, unixUserAsset);
|
|
|
|
unixUserAssets.put(unixuser_id, unixUserAsset);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1086,19 +1151,19 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
.map(this::trimAll)
|
|
|
|
.map(this::trimAll)
|
|
|
|
.map(row -> new Record(columns, row))
|
|
|
|
.map(row -> new Record(columns, row))
|
|
|
|
.forEach(rec -> {
|
|
|
|
.forEach(rec -> {
|
|
|
|
final var unixuser_id = rec.getInteger("emailalias_id");
|
|
|
|
final var emailalias_id = rec.getInteger("emailalias_id");
|
|
|
|
final var packet_id = rec.getInteger("pac_id");
|
|
|
|
final var packet_id = rec.getInteger("pac_id");
|
|
|
|
final var targets = parseCsvLine(rec.getString("target"));
|
|
|
|
final var targets = parseCsvLine(rec.getString("target"));
|
|
|
|
final var unixUserAsset = HsHostingAssetRealEntity.builder()
|
|
|
|
final var emailAliasAsset = HsHostingAssetRealEntity.builder()
|
|
|
|
.type(EMAIL_ALIAS)
|
|
|
|
.type(EMAIL_ALIAS)
|
|
|
|
.parentAsset(hostingAssets.get(PACKET_ID_OFFSET + packet_id))
|
|
|
|
.parentAsset(packetAssets.get(packet_id))
|
|
|
|
.identifier(rec.getString("name"))
|
|
|
|
.identifier(rec.getString("name"))
|
|
|
|
.caption(rec.getString("name"))
|
|
|
|
.caption(rec.getString("name"))
|
|
|
|
.config(ofEntries(
|
|
|
|
.config(ofEntries(
|
|
|
|
entry("target", targets)
|
|
|
|
entry("target", targets)
|
|
|
|
))
|
|
|
|
))
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
hostingAssets.put(EMAILALIAS_ID_OFFSET + unixuser_id, unixUserAsset);
|
|
|
|
emailAliasAssets.put(emailalias_id, emailAliasAsset);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1116,7 +1181,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
.caption(pa.getIdentifier() + "-PostgreSQL default instance")
|
|
|
|
.caption(pa.getIdentifier() + "-PostgreSQL default instance")
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
pa.getSubHostingAssets().add(pgSqlInstanceAsset);
|
|
|
|
pa.getSubHostingAssets().add(pgSqlInstanceAsset);
|
|
|
|
hostingAssets.put(DBINSTANCE_ID_OFFSET + idRef.getAndIncrement(), pgSqlInstanceAsset);
|
|
|
|
dbInstanceAssets.put(idRef.getAndIncrement(), pgSqlInstanceAsset);
|
|
|
|
|
|
|
|
|
|
|
|
final var mariaDbInstanceAsset = HsHostingAssetRealEntity.builder()
|
|
|
|
final var mariaDbInstanceAsset = HsHostingAssetRealEntity.builder()
|
|
|
|
.type(MARIADB_INSTANCE)
|
|
|
|
.type(MARIADB_INSTANCE)
|
|
|
@ -1125,7 +1190,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
.caption(pa.getIdentifier() + "-MariaDB default instance")
|
|
|
|
.caption(pa.getIdentifier() + "-MariaDB default instance")
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
pa.getSubHostingAssets().add(mariaDbInstanceAsset);
|
|
|
|
pa.getSubHostingAssets().add(mariaDbInstanceAsset);
|
|
|
|
hostingAssets.put(DBINSTANCE_ID_OFFSET + idRef.getAndIncrement(), mariaDbInstanceAsset);
|
|
|
|
dbInstanceAssets.put(idRef.getAndIncrement(), mariaDbInstanceAsset);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1151,14 +1216,14 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
final HsHostingAssetType dbInstanceAssetType = "mysql".equals(engine) ? MARIADB_INSTANCE
|
|
|
|
final HsHostingAssetType dbInstanceAssetType = "mysql".equals(engine) ? MARIADB_INSTANCE
|
|
|
|
: "pgsql".equals(engine) ? PGSQL_INSTANCE
|
|
|
|
: "pgsql".equals(engine) ? PGSQL_INSTANCE
|
|
|
|
: failWith("unknown DB engine " + engine);
|
|
|
|
: failWith("unknown DB engine " + engine);
|
|
|
|
final var relatedWebspaceHA = hostingAssets.get(PACKET_ID_OFFSET + packet_id).getParentAsset();
|
|
|
|
final var relatedWebspaceHA = packetAssets.get(packet_id).getParentAsset();
|
|
|
|
final var dbInstanceAsset = relatedWebspaceHA.getSubHostingAssets().stream()
|
|
|
|
final var dbInstanceAsset = relatedWebspaceHA.getSubHostingAssets().stream()
|
|
|
|
.filter(ha -> ha.getType() == dbInstanceAssetType)
|
|
|
|
.filter(ha -> ha.getType() == dbInstanceAssetType)
|
|
|
|
.findAny().orElseThrow(); // there is exactly one: the default instance for the given type
|
|
|
|
.findAny().orElseThrow(); // there is exactly one: the default instance for the given type
|
|
|
|
|
|
|
|
|
|
|
|
final var dbUserAsset = HsHostingAssetRealEntity.builder()
|
|
|
|
final var dbUserAsset = HsHostingAssetRealEntity.builder()
|
|
|
|
.type(dbUserAssetType)
|
|
|
|
.type(dbUserAssetType)
|
|
|
|
.parentAsset(hostingAssets.get(PACKET_ID_OFFSET + packet_id))
|
|
|
|
.parentAsset(packetAssets.get(packet_id))
|
|
|
|
.assignedToAsset(dbInstanceAsset)
|
|
|
|
.assignedToAsset(dbInstanceAsset)
|
|
|
|
.identifier(dbUserAssetType.name().substring(0, 2) + "U|" + name)
|
|
|
|
.identifier(dbUserAssetType.name().substring(0, 2) + "U|" + name)
|
|
|
|
.caption(name)
|
|
|
|
.caption(name)
|
|
|
@ -1167,7 +1232,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
)))
|
|
|
|
)))
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
dbUsersByEngineAndName.put(engine + ":" + name, dbUserAsset);
|
|
|
|
dbUsersByEngineAndName.put(engine + ":" + name, dbUserAsset);
|
|
|
|
hostingAssets.put(DBUSER_ID_OFFSET + dbuser_id, dbUserAsset);
|
|
|
|
dbUserAssets.put(dbuser_id, dbUserAsset);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1198,7 +1263,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
type == MARIADB_DATABASE ? encoding.toLowerCase() : encoding.toUpperCase())
|
|
|
|
type == MARIADB_DATABASE ? encoding.toLowerCase() : encoding.toUpperCase())
|
|
|
|
))
|
|
|
|
))
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
hostingAssets.put(DB_ID_OFFSET + database_id, dbAsset);
|
|
|
|
dbAssets.put(database_id, dbAsset);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1228,11 +1293,11 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
))
|
|
|
|
))
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
domainSetupsByName.put(domain_name, domainSetupAsset);
|
|
|
|
domainSetupsByName.put(domain_name, domainSetupAsset);
|
|
|
|
hostingAssets.put(DOMAIN_SETUP_OFFSET + domain_id, domainSetupAsset);
|
|
|
|
domainSetupAssets.put(domain_id, domainSetupAsset);
|
|
|
|
domainSetupAsset.setSubHostingAssets(new ArrayList<>());
|
|
|
|
domainSetupAsset.setSubHostingAssets(new ArrayList<>());
|
|
|
|
|
|
|
|
|
|
|
|
// Domain DNS Setup
|
|
|
|
// Domain DNS Setup
|
|
|
|
final var ownerAsset = hostingAssets.get(UNIXUSER_ID_OFFSET + owner_id);
|
|
|
|
final var ownerAsset = unixUserAssets.get(owner_id);
|
|
|
|
final var webspaceAsset = ownerAsset.getParentAsset();
|
|
|
|
final var webspaceAsset = ownerAsset.getParentAsset();
|
|
|
|
assertThat(webspaceAsset.getType()).isEqualTo(MANAGED_WEBSPACE);
|
|
|
|
assertThat(webspaceAsset.getType()).isEqualTo(MANAGED_WEBSPACE);
|
|
|
|
final var domainDnsSetupAsset = HsHostingAssetRealEntity.builder()
|
|
|
|
final var domainDnsSetupAsset = HsHostingAssetRealEntity.builder()
|
|
|
@ -1243,7 +1308,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
.caption("DNS-Setup für " + IDN.toUnicode(domain_name))
|
|
|
|
.caption("DNS-Setup für " + IDN.toUnicode(domain_name))
|
|
|
|
.config(new HashMap<>()) // is read from separate files
|
|
|
|
.config(new HashMap<>()) // is read from separate files
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
hostingAssets.put(DOMAIN_DNS_SETUP_OFFSET + domain_id, domainDnsSetupAsset);
|
|
|
|
domainDnsSetupAssets.put(domain_id, domainDnsSetupAsset);
|
|
|
|
domainSetupAsset.getSubHostingAssets().add(domainDnsSetupAsset);
|
|
|
|
domainSetupAsset.getSubHostingAssets().add(domainDnsSetupAsset);
|
|
|
|
|
|
|
|
|
|
|
|
// Domain HTTP Setup
|
|
|
|
// Domain HTTP Setup
|
|
|
@ -1282,7 +1347,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
httpDomainSetupValidator.getProperty("passenger-ruby").defaultValue()))
|
|
|
|
httpDomainSetupValidator.getProperty("passenger-ruby").defaultValue()))
|
|
|
|
))
|
|
|
|
))
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
hostingAssets.put(DOMAIN_HTTP_SETUP_OFFSET + domain_id, domainHttpSetupAsset);
|
|
|
|
domainHttpSetupAssets.put(domain_id, domainHttpSetupAsset);
|
|
|
|
domainSetupAsset.getSubHostingAssets().add(domainHttpSetupAsset);
|
|
|
|
domainSetupAsset.getSubHostingAssets().add(domainHttpSetupAsset);
|
|
|
|
|
|
|
|
|
|
|
|
// Domain MBOX Setup
|
|
|
|
// Domain MBOX Setup
|
|
|
@ -1295,8 +1360,9 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
.config(ofEntries(
|
|
|
|
.config(ofEntries(
|
|
|
|
// no properties available
|
|
|
|
// no properties available
|
|
|
|
))
|
|
|
|
))
|
|
|
|
|
|
|
|
.subHostingAssets(new ArrayList<>())
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
hostingAssets.put(DOMAIN_MBOX_SETUP_OFFSET + domain_id, domainMboxSetupAsset);
|
|
|
|
domainMBoxSetupAssets.put(domain_id, domainMboxSetupAsset);
|
|
|
|
domainSetupAsset.getSubHostingAssets().add(domainMboxSetupAsset);
|
|
|
|
domainSetupAsset.getSubHostingAssets().add(domainMboxSetupAsset);
|
|
|
|
|
|
|
|
|
|
|
|
// Domain SMTP Setup
|
|
|
|
// Domain SMTP Setup
|
|
|
@ -1310,7 +1376,7 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
// no properties available
|
|
|
|
// no properties available
|
|
|
|
))
|
|
|
|
))
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
hostingAssets.put(DOMAIN_SMTP_SETUP_OFFSET + domain_id, domainSmtpSetupAsset);
|
|
|
|
domainSmtpSetupAssets.put(domain_id, domainSmtpSetupAsset);
|
|
|
|
domainSetupAsset.getSubHostingAssets().add(domainSmtpSetupAsset);
|
|
|
|
domainSetupAsset.getSubHostingAssets().add(domainSmtpSetupAsset);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -1378,6 +1444,51 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void importEmailAddresses(final String[] header, final List<String[]> records) {
|
|
|
|
|
|
|
|
final var columns = new Columns(header);
|
|
|
|
|
|
|
|
records.stream()
|
|
|
|
|
|
|
|
.map(this::trimAll)
|
|
|
|
|
|
|
|
.map(row -> new Record(columns, row))
|
|
|
|
|
|
|
|
.forEach(rec -> {
|
|
|
|
|
|
|
|
// emailaddr_id;domain_id;localpart;subdomain;target
|
|
|
|
|
|
|
|
final var emailaddr_id = rec.getInteger("emailaddr_id");
|
|
|
|
|
|
|
|
final var domain_id = rec.getInteger("domain_id");
|
|
|
|
|
|
|
|
final var localpart = rec.getString("localpart");
|
|
|
|
|
|
|
|
final var subdomain = rec.getString("subdomain");
|
|
|
|
|
|
|
|
final var targets = parseCsvLine(rec.getString("target"));
|
|
|
|
|
|
|
|
final var domainMboxSetup = domainMBoxSetupAssets.get(domain_id);
|
|
|
|
|
|
|
|
final var domainSetup = domainMboxSetup.getParentAsset();
|
|
|
|
|
|
|
|
final var emailAddress = localpart + "@" +
|
|
|
|
|
|
|
|
(subdomain != null && !subdomain.isBlank() ? subdomain + "." : "") + domainSetup.getIdentifier();
|
|
|
|
|
|
|
|
final var emailAddressAsset = HsHostingAssetRealEntity.builder()
|
|
|
|
|
|
|
|
.type(EMAIL_ADDRESS)
|
|
|
|
|
|
|
|
.parentAsset(domainMboxSetup)
|
|
|
|
|
|
|
|
.identifier(emailAddress)
|
|
|
|
|
|
|
|
.caption(emailAddress)
|
|
|
|
|
|
|
|
.config(ofNonNullEntries(
|
|
|
|
|
|
|
|
entryIfNotNull("local-part", localpart),
|
|
|
|
|
|
|
|
entryIfNotNull("sub-domain", subdomain),
|
|
|
|
|
|
|
|
entry("target", targets)
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
emailAddressAssets.put(emailaddr_id, emailAddressAsset);
|
|
|
|
|
|
|
|
domainMboxSetup.getSubHostingAssets().add(emailAddressAsset);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SafeVarargs
|
|
|
|
|
|
|
|
private static Map<String, Object> ofNonNullEntries(final Map.Entry<String, Object>... entries) {
|
|
|
|
|
|
|
|
//noinspection unchecked
|
|
|
|
|
|
|
|
return ofEntries(stream(entries).filter(Objects::nonNull).toArray(Map.Entry[]::new));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static Map.Entry<String, Object> entryIfNotNull(final String key, final @Nullable String value) {
|
|
|
|
|
|
|
|
if (value == null || value.isBlank()) {
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return entry(key, value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ============================================================================================
|
|
|
|
// ============================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
<V> V returning(
|
|
|
|
<V> V returning(
|
|
|
@ -1408,26 +1519,31 @@ public class ImportHostingAssets extends ImportOfficeData {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static HsHostingAssetRealEntity ipNumber(final Integer inet_addr_id) {
|
|
|
|
private static HsHostingAssetRealEntity ipNumber(final Integer inet_addr_id) {
|
|
|
|
return inet_addr_id != null ? hostingAssets.get(IP_NUMBER_ID_OFFSET + inet_addr_id) : null;
|
|
|
|
return inet_addr_id != null ? ipNumberAssets.get(inet_addr_id) : null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static Hive hive(final Integer hive_id) {
|
|
|
|
private static Hive hive(final Integer hive_id) {
|
|
|
|
return hive_id != null ? hives.get(HIVE_ID_OFFSET + hive_id) : null;
|
|
|
|
return hive_id != null ? hives.get(hive_id) : null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static HsHostingAssetRealEntity pac(final Integer packet_id) {
|
|
|
|
private static HsHostingAssetRealEntity pac(final Integer packet_id) {
|
|
|
|
return packet_id != null ? hostingAssets.get(PACKET_ID_OFFSET + packet_id) : null;
|
|
|
|
return packet_id != null ? packetAssets.get(packet_id) : null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private String firstOfEachType(
|
|
|
|
private String firstOfEach(
|
|
|
|
final int maxCount,
|
|
|
|
final int maxCount,
|
|
|
|
final HsHostingAssetType... types) {
|
|
|
|
final Map<Integer, HsHostingAssetRealEntity> assets) {
|
|
|
|
return toJsonFormattedString(stream(types)
|
|
|
|
return toJsonFormattedString(assets.entrySet().stream().limit(maxCount)
|
|
|
|
.flatMap(t ->
|
|
|
|
.collect(toMap(Map.Entry::getKey, Map.Entry::getValue, ImportHostingAssets::uniqueKeys, TreeMap::new)));
|
|
|
|
hostingAssets.entrySet().stream()
|
|
|
|
}
|
|
|
|
.filter(hae -> hae.getValue().getType() == t)
|
|
|
|
|
|
|
|
.limit(maxCount)
|
|
|
|
private String firstOfEach(
|
|
|
|
)
|
|
|
|
final int maxCount,
|
|
|
|
|
|
|
|
final Map<Integer, HsHostingAssetRealEntity> assets,
|
|
|
|
|
|
|
|
final HsHostingAssetType type) {
|
|
|
|
|
|
|
|
return toJsonFormattedString(assets.entrySet().stream()
|
|
|
|
|
|
|
|
.filter(hae -> hae.getValue().getType() == type)
|
|
|
|
|
|
|
|
.limit(maxCount)
|
|
|
|
.collect(toMap(Map.Entry::getKey, Map.Entry::getValue, ImportHostingAssets::uniqueKeys, TreeMap::new)));
|
|
|
|
.collect(toMap(Map.Entry::getKey, Map.Entry::getValue, ImportHostingAssets::uniqueKeys, TreeMap::new)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|