Search in sources :

Example 31 with DatabaseStack

use of com.sequenceiq.cloudbreak.cloud.model.DatabaseStack in project cloudbreak by hortonworks.

the class GcpDatabaseServerLaunchServiceTest method testLaunchWhenDatabaseAlreadyExistShouldNotCreateAgain.

@Test
public void testLaunchWhenDatabaseAlreadyExistShouldNotCreateAgain() throws Exception {
    AuthenticatedContext authenticatedContext = mock(AuthenticatedContext.class);
    DatabaseStack databaseStack = mock(DatabaseStack.class);
    PersistenceNotifier persistenceNotifier = mock(PersistenceNotifier.class);
    CloudCredential cloudCredential = mock(CloudCredential.class);
    DatabaseServer databaseServer = mock(DatabaseServer.class);
    SQLAdmin sqlAdmin = mock(SQLAdmin.class);
    Compute compute = mock(Compute.class);
    SQLAdmin.Instances sqlAdminInstances = mock(SQLAdmin.Instances.class);
    SQLAdmin.Instances.List sqlAdminInstancesList = mock(SQLAdmin.Instances.List.class);
    InstancesListResponse instancesListResponse = mock(InstancesListResponse.class);
    when(authenticatedContext.getCloudCredential()).thenReturn(cloudCredential);
    when(cloudCredential.getName()).thenReturn("credential");
    when(databaseStack.getDatabaseServer()).thenReturn(databaseServer);
    when(databaseServer.getServerId()).thenReturn("server-1");
    when(gcpSQLAdminFactory.buildSQLAdmin(any(CloudCredential.class), anyString())).thenReturn(sqlAdmin);
    when(gcpComputeFactory.buildCompute(any(CloudCredential.class))).thenReturn(compute);
    when(gcpStackUtil.getProjectId(any(CloudCredential.class))).thenReturn("project-id");
    when(sqlAdmin.instances()).thenReturn(sqlAdminInstances);
    when(sqlAdminInstances.list(anyString())).thenReturn(sqlAdminInstancesList);
    when(sqlAdminInstancesList.execute()).thenReturn(instancesListResponse);
    DatabaseInstance databaseInstance = new DatabaseInstance();
    databaseInstance.setName("server-1");
    databaseInstance.setState("RUNNABLE");
    Settings settings = new Settings();
    settings.setActivationPolicy("ALWAYS");
    databaseInstance.setSettings(settings);
    when(instancesListResponse.getItems()).thenReturn(List.of(databaseInstance));
    when(authenticatedContext.getCloudContext()).thenReturn(cloudContext);
    when(cloudContext.getLocation()).thenReturn(location(region("region"), availabilityZone("az1")));
    List<CloudResource> launch = underTest.launch(authenticatedContext, databaseStack, persistenceNotifier);
    Assert.assertEquals(0, launch.size());
}
Also used : CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) DatabaseStack(com.sequenceiq.cloudbreak.cloud.model.DatabaseStack) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) SQLAdmin(com.google.api.services.sqladmin.SQLAdmin) DatabaseInstance(com.google.api.services.sqladmin.model.DatabaseInstance) InstancesListResponse(com.google.api.services.sqladmin.model.InstancesListResponse) PersistenceNotifier(com.sequenceiq.cloudbreak.cloud.notification.PersistenceNotifier) Compute(com.google.api.services.compute.Compute) DatabaseServer(com.sequenceiq.cloudbreak.cloud.model.DatabaseServer) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) Settings(com.google.api.services.sqladmin.model.Settings) Test(org.junit.jupiter.api.Test)

Example 32 with DatabaseStack

use of com.sequenceiq.cloudbreak.cloud.model.DatabaseStack in project cloudbreak by hortonworks.

the class GcpDatabaseServerLaunchServiceTest method testLaunchWhenDatabaseNOTAlreadyExistAndUserCreateThrowExceptionShouldThrowGcpResourceException.

@Test
public void testLaunchWhenDatabaseNOTAlreadyExistAndUserCreateThrowExceptionShouldThrowGcpResourceException() throws Exception {
    Network network = new Network(new Subnet("10.0.0.0/16"), Map.of("subnetId", "s-1", "availabilityZone", "a"));
    Map<String, Object> map = new HashMap<>();
    map.put("engineVersion", "1");
    DatabaseServer databaseServer = DatabaseServer.builder().connectionDriver("driver").serverId("driver").connectorJarUrl("driver").engine(DatabaseEngine.POSTGRESQL).location("location").port(99).storageSize(50L).rootUserName("rootUserName").rootPassword("rootPassword").flavor("flavor").useSslEnforcement(true).params(map).build();
    AuthenticatedContext authenticatedContext = mock(AuthenticatedContext.class);
    DatabaseStack databaseStack = mock(DatabaseStack.class);
    PersistenceNotifier persistenceNotifier = mock(PersistenceNotifier.class);
    CloudCredential cloudCredential = mock(CloudCredential.class);
    SQLAdmin sqlAdmin = mock(SQLAdmin.class);
    Compute compute = mock(Compute.class);
    DatabaseInstance databaseInstance = mock(DatabaseInstance.class);
    Compute.Subnetworks subnetworks = mock(Compute.Subnetworks.class);
    Compute.Subnetworks.Get subnetworksGet = mock(Compute.Subnetworks.Get.class);
    SQLAdmin.Users users = mock(SQLAdmin.Users.class);
    SQLAdmin.Users.Insert usersInsert = mock(SQLAdmin.Users.Insert.class);
    SQLAdmin.Instances.Get instancesGet = mock(SQLAdmin.Instances.Get.class);
    SQLAdmin.Instances sqlAdminInstances = mock(SQLAdmin.Instances.class);
    SQLAdmin.Instances.List sqlAdminInstancesList = mock(SQLAdmin.Instances.List.class);
    InstancesListResponse instancesListResponse = mock(InstancesListResponse.class);
    Operation operation = mock(Operation.class);
    SQLAdmin.Instances.Insert sqlAdminInstancesInsert = mock(SQLAdmin.Instances.Insert.class);
    IpMapping ipMapping = new IpMapping();
    ipMapping.setIpAddress("10.0.0.0");
    ipMapping.setType("PRIVATE");
    GoogleJsonResponseException googleJsonResponseException = mock(GoogleJsonResponseException.class);
    GoogleJsonError googleJsonError = mock(GoogleJsonError.class);
    when(googleJsonResponseException.getDetails()).thenReturn(googleJsonError);
    when(googleJsonError.getMessage()).thenReturn("error");
    when(authenticatedContext.getCloudCredential()).thenReturn(cloudCredential);
    when(cloudCredential.getName()).thenReturn("credential");
    when(databaseStack.getDatabaseServer()).thenReturn(databaseServer);
    when(databaseStack.getNetwork()).thenReturn(network);
    when(gcpLabelUtil.createLabelsFromTagsMap(anyMap())).thenReturn(new HashMap<>());
    when(gcpSQLAdminFactory.buildSQLAdmin(any(CloudCredential.class), anyString())).thenReturn(sqlAdmin);
    when(gcpComputeFactory.buildCompute(any(CloudCredential.class))).thenReturn(compute);
    when(compute.subnetworks()).thenReturn(subnetworks);
    when(subnetworks.get(anyString(), anyString(), anyString())).thenReturn(subnetworksGet);
    when(subnetworksGet.execute()).thenReturn(new Subnetwork());
    when(gcpStackUtil.getProjectId(any(CloudCredential.class))).thenReturn("project-id");
    when(sqlAdmin.instances()).thenReturn(sqlAdminInstances);
    when(sqlAdminInstances.list(anyString())).thenReturn(sqlAdminInstancesList);
    when(sqlAdminInstancesList.execute()).thenReturn(instancesListResponse);
    when(instancesListResponse.getItems()).thenReturn(List.of());
    when(databaseInstance.getName()).thenReturn("name");
    when(sqlAdminInstances.get(anyString(), anyString())).thenReturn(instancesGet);
    when(instancesGet.execute()).thenReturn(databaseInstance);
    when(sqlAdminInstances.insert(anyString(), any(DatabaseInstance.class))).thenReturn(sqlAdminInstancesInsert);
    when(sqlAdminInstancesInsert.setPrettyPrint(anyBoolean())).thenReturn(sqlAdminInstancesInsert);
    when(sqlAdminInstancesInsert.execute()).thenReturn(operation);
    when(databaseInstance.getIpAddresses()).thenReturn(List.of(ipMapping));
    doNothing().when(databasePollerService).launchDatabasePoller(any(AuthenticatedContext.class), anyList());
    when(sqlAdmin.users()).thenReturn(users);
    when(users.insert(anyString(), anyString(), any(User.class))).thenReturn(usersInsert);
    when(usersInsert.execute()).thenThrow(googleJsonResponseException);
    when(authenticatedContext.getCloudContext()).thenReturn(cloudContext);
    when(cloudContext.getLocation()).thenReturn(location(region("region"), availabilityZone("az1")));
    GcpResourceException gcpResourceException = assertThrows(GcpResourceException.class, () -> underTest.launch(authenticatedContext, databaseStack, persistenceNotifier));
    Assert.assertEquals("error: [ resourceType: GCP_DATABASE,  resourceName: driver ]", gcpResourceException.getMessage());
}
Also used : User(com.google.api.services.sqladmin.model.User) HashMap(java.util.HashMap) DatabaseStack(com.sequenceiq.cloudbreak.cloud.model.DatabaseStack) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) Operation(com.google.api.services.sqladmin.model.Operation) SQLAdmin(com.google.api.services.sqladmin.SQLAdmin) DatabaseInstance(com.google.api.services.sqladmin.model.DatabaseInstance) InstancesListResponse(com.google.api.services.sqladmin.model.InstancesListResponse) Network(com.sequenceiq.cloudbreak.cloud.model.Network) PersistenceNotifier(com.sequenceiq.cloudbreak.cloud.notification.PersistenceNotifier) DatabaseServer(com.sequenceiq.cloudbreak.cloud.model.DatabaseServer) GoogleJsonError(com.google.api.client.googleapis.json.GoogleJsonError) Subnetwork(com.google.api.services.compute.model.Subnetwork) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) IpMapping(com.google.api.services.sqladmin.model.IpMapping) GoogleJsonResponseException(com.google.api.client.googleapis.json.GoogleJsonResponseException) Compute(com.google.api.services.compute.Compute) GcpResourceException(com.sequenceiq.cloudbreak.cloud.gcp.GcpResourceException) Subnet(com.sequenceiq.cloudbreak.cloud.model.Subnet) Test(org.junit.jupiter.api.Test)

Example 33 with DatabaseStack

use of com.sequenceiq.cloudbreak.cloud.model.DatabaseStack in project cloudbreak by hortonworks.

the class GcpDatabaseServerLaunchServiceTest method testLaunchWhenDatabaseNOTAlreadyExistAndSharedProjectIdShouldCreate.

@Test
public void testLaunchWhenDatabaseNOTAlreadyExistAndSharedProjectIdShouldCreate() throws Exception {
    Network network = new Network(new Subnet("10.0.0.0/16"), Map.of("subnetId", "s-1", "availabilityZone", "a", "sharedProjectId", "sp1"));
    Map<String, Object> map = new HashMap<>();
    map.put("engineVersion", "1");
    DatabaseServer databaseServer = DatabaseServer.builder().connectionDriver("driver").serverId("driver").connectorJarUrl("driver").engine(DatabaseEngine.POSTGRESQL).location("location").port(99).storageSize(50L).rootUserName("rootUserName").rootPassword("rootPassword").flavor("flavor").useSslEnforcement(true).params(map).build();
    AuthenticatedContext authenticatedContext = mock(AuthenticatedContext.class);
    DatabaseStack databaseStack = mock(DatabaseStack.class);
    PersistenceNotifier persistenceNotifier = mock(PersistenceNotifier.class);
    CloudCredential cloudCredential = mock(CloudCredential.class);
    SQLAdmin sqlAdmin = mock(SQLAdmin.class);
    Compute compute = mock(Compute.class);
    DatabaseInstance databaseInstance = mock(DatabaseInstance.class);
    Compute.Subnetworks subnetworks = mock(Compute.Subnetworks.class);
    Compute.Subnetworks.Get subnetworksGet = mock(Compute.Subnetworks.Get.class);
    SQLAdmin.Users users = mock(SQLAdmin.Users.class);
    SQLAdmin.Users.Insert usersInsert = mock(SQLAdmin.Users.Insert.class);
    SQLAdmin.Instances.Get instancesGet = mock(SQLAdmin.Instances.Get.class);
    SQLAdmin.Instances sqlAdminInstances = mock(SQLAdmin.Instances.class);
    SQLAdmin.Instances.List sqlAdminInstancesList = mock(SQLAdmin.Instances.List.class);
    InstancesListResponse instancesListResponse = mock(InstancesListResponse.class);
    Operation operation = mock(Operation.class);
    SQLAdmin.Instances.Insert sqlAdminInstancesInsert = mock(SQLAdmin.Instances.Insert.class);
    IpMapping ipMapping = new IpMapping();
    ipMapping.setIpAddress("10.0.0.0");
    ipMapping.setType("PRIVATE");
    when(authenticatedContext.getCloudCredential()).thenReturn(cloudCredential);
    when(cloudCredential.getName()).thenReturn("credential");
    when(databaseStack.getDatabaseServer()).thenReturn(databaseServer);
    when(databaseStack.getNetwork()).thenReturn(network);
    when(gcpLabelUtil.createLabelsFromTagsMap(anyMap())).thenReturn(new HashMap<>());
    when(gcpSQLAdminFactory.buildSQLAdmin(any(CloudCredential.class), anyString())).thenReturn(sqlAdmin);
    when(gcpComputeFactory.buildCompute(any(CloudCredential.class))).thenReturn(compute);
    when(compute.subnetworks()).thenReturn(subnetworks);
    when(subnetworks.get(anyString(), anyString(), anyString())).thenReturn(subnetworksGet);
    when(subnetworksGet.execute()).thenReturn(new Subnetwork());
    when(gcpStackUtil.getProjectId(any(CloudCredential.class))).thenReturn("project-id");
    when(sqlAdmin.instances()).thenReturn(sqlAdminInstances);
    when(sqlAdminInstances.list(anyString())).thenReturn(sqlAdminInstancesList);
    when(sqlAdminInstancesList.execute()).thenReturn(instancesListResponse);
    when(instancesListResponse.getItems()).thenReturn(List.of());
    when(databaseInstance.getName()).thenReturn("name");
    when(sqlAdminInstances.get(anyString(), anyString())).thenReturn(instancesGet);
    when(instancesGet.execute()).thenReturn(databaseInstance);
    when(sqlAdminInstances.insert(anyString(), databaseInstanceArgumentCaptor.capture())).thenReturn(sqlAdminInstancesInsert);
    when(sqlAdminInstancesInsert.setPrettyPrint(anyBoolean())).thenReturn(sqlAdminInstancesInsert);
    when(sqlAdminInstancesInsert.execute()).thenReturn(operation);
    when(databaseInstance.getIpAddresses()).thenReturn(List.of(ipMapping));
    doNothing().when(databasePollerService).launchDatabasePoller(any(AuthenticatedContext.class), anyList());
    when(sqlAdmin.users()).thenReturn(users);
    when(users.insert(anyString(), anyString(), any(User.class))).thenReturn(usersInsert);
    when(usersInsert.execute()).thenReturn(operation);
    when(authenticatedContext.getCloudContext()).thenReturn(cloudContext);
    when(cloudContext.getLocation()).thenReturn(location(region("region"), availabilityZone("az1")));
    List<CloudResource> launch = underTest.launch(authenticatedContext, databaseStack, persistenceNotifier);
    assertNull(databaseInstanceArgumentCaptor.getValue().getDiskEncryptionConfiguration());
    Assert.assertEquals(1, launch.size());
}
Also used : User(com.google.api.services.sqladmin.model.User) HashMap(java.util.HashMap) DatabaseStack(com.sequenceiq.cloudbreak.cloud.model.DatabaseStack) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) Operation(com.google.api.services.sqladmin.model.Operation) SQLAdmin(com.google.api.services.sqladmin.SQLAdmin) DatabaseInstance(com.google.api.services.sqladmin.model.DatabaseInstance) InstancesListResponse(com.google.api.services.sqladmin.model.InstancesListResponse) Network(com.sequenceiq.cloudbreak.cloud.model.Network) PersistenceNotifier(com.sequenceiq.cloudbreak.cloud.notification.PersistenceNotifier) DatabaseServer(com.sequenceiq.cloudbreak.cloud.model.DatabaseServer) Subnetwork(com.google.api.services.compute.model.Subnetwork) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) IpMapping(com.google.api.services.sqladmin.model.IpMapping) Compute(com.google.api.services.compute.Compute) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) Subnet(com.sequenceiq.cloudbreak.cloud.model.Subnet) Test(org.junit.jupiter.api.Test)

Example 34 with DatabaseStack

use of com.sequenceiq.cloudbreak.cloud.model.DatabaseStack in project cloudbreak by hortonworks.

the class AzureDatabaseResourceServiceTest method shouldReturnDeletedDbServerWhenTerminateDatabaseServerAndSingleResourceGroup.

@Test
void shouldReturnDeletedDbServerWhenTerminateDatabaseServerAndSingleResourceGroup() {
    PersistenceNotifier persistenceNotifier = mock(PersistenceNotifier.class);
    DatabaseStack databaseStack = mock(DatabaseStack.class);
    when(azureResourceGroupMetadataProvider.getResourceGroupUsage(any(DatabaseStack.class))).thenReturn(ResourceGroupUsage.SINGLE);
    when(azureUtils.deleteDatabaseServer(any(), anyString(), anyBoolean())).thenReturn(Optional.empty());
    List<CloudResource> cloudResources = List.of(CloudResource.builder().type(AZURE_DATABASE).reference("dbReference").name("dbName").status(CommonStatus.CREATED).params(Map.of()).build());
    List<CloudResourceStatus> resourceStatuses = victim.terminateDatabaseServer(ac, databaseStack, cloudResources, false, persistenceNotifier);
    assertEquals(1, resourceStatuses.size());
    assertEquals(AZURE_DATABASE, resourceStatuses.get(0).getCloudResource().getType());
    assertEquals(DELETED, resourceStatuses.get(0).getStatus());
    verify(azureUtils).deleteDatabaseServer(any(), eq("dbReference"), anyBoolean());
    verify(client, never()).deleteResourceGroup(anyString());
    verify(persistenceNotifier).notifyDeletion(any(), any());
}
Also used : CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) PersistenceNotifier(com.sequenceiq.cloudbreak.cloud.notification.PersistenceNotifier) DatabaseStack(com.sequenceiq.cloudbreak.cloud.model.DatabaseStack) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) Test(org.junit.jupiter.api.Test)

Example 35 with DatabaseStack

use of com.sequenceiq.cloudbreak.cloud.model.DatabaseStack in project cloudbreak by hortonworks.

the class AzureTemplateBuilderDbTest method buildTestWhenUseSslEnforcementInternal.

private void buildTestWhenUseSslEnforcementInternal(String templatePath, boolean useSslEnforcement) {
    Template template = Optional.ofNullable(factoryBean.getObject()).map(config -> {
        try {
            return config.getTemplate(templatePath, "UTF-8");
        } catch (IOException e) {
            throw new IllegalStateException(e);
        }
    }).orElseThrow();
    DatabaseStack databaseStack = createDatabaseStack(useSslEnforcement, template.toString());
    Mockito.when(azureDatabaseTemplateProvider.getTemplate(databaseStack)).thenReturn(template);
    Mockito.when(azureUtils.encodeString(SUBNET_ID)).thenReturn("hash");
    String result = underTest.build(cloudContext, databaseStack);
    assertThat(JsonUtil.isValid(result)).overridingErrorMessage("Invalid JSON: " + result).isTrue();
    assertThat(result).contains("        \"useSslEnforcement\": {\n" + "            \"type\": \"bool\",\n" + "            \"defaultValue\": " + useSslEnforcement + ",");
    assertThat(result).contains("        \"privateEndpointName\": {\n" + "            \"defaultValue\": \"pe-hash-to-myServer\",\n" + "            \"type\": \"String\"\n" + "        }");
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) BeforeEach(org.junit.jupiter.api.BeforeEach) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) Region(com.sequenceiq.cloudbreak.cloud.model.Region) Mock(org.mockito.Mock) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) HashMap(java.util.HashMap) JsonUtil(com.sequenceiq.cloudbreak.common.json.JsonUtil) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Map(java.util.Map) Spy(org.mockito.Spy) Location(com.sequenceiq.cloudbreak.cloud.model.Location) Network(com.sequenceiq.cloudbreak.cloud.model.Network) Template(freemarker.template.Template) MethodSource(org.junit.jupiter.params.provider.MethodSource) InjectMocks(org.mockito.InjectMocks) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) FreeMarkerConfigurationFactoryBean(org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean) Subnet(com.sequenceiq.cloudbreak.cloud.model.Subnet) IOException(java.io.IOException) UUID(java.util.UUID) FreeMarkerTemplateUtils(com.sequenceiq.cloudbreak.util.FreeMarkerTemplateUtils) DatabaseStack(com.sequenceiq.cloudbreak.cloud.model.DatabaseStack) Test(org.junit.jupiter.api.Test) Mockito(org.mockito.Mockito) List(java.util.List) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Optional(java.util.Optional) OutboundInternetTraffic(com.sequenceiq.common.api.type.OutboundInternetTraffic) Collections(java.util.Collections) DatabaseServer(com.sequenceiq.cloudbreak.cloud.model.DatabaseServer) DatabaseStack(com.sequenceiq.cloudbreak.cloud.model.DatabaseStack) IOException(java.io.IOException) Template(freemarker.template.Template)

Aggregations

DatabaseStack (com.sequenceiq.cloudbreak.cloud.model.DatabaseStack)48 Test (org.junit.jupiter.api.Test)34 CloudCredential (com.sequenceiq.cloudbreak.cloud.model.CloudCredential)24 DatabaseServer (com.sequenceiq.cloudbreak.cloud.model.DatabaseServer)24 AuthenticatedContext (com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext)22 SQLAdmin (com.google.api.services.sqladmin.SQLAdmin)16 InstancesListResponse (com.google.api.services.sqladmin.model.InstancesListResponse)13 DatabaseInstance (com.google.api.services.sqladmin.model.DatabaseInstance)12 PersistenceNotifier (com.sequenceiq.cloudbreak.cloud.notification.PersistenceNotifier)12 CloudContext (com.sequenceiq.cloudbreak.cloud.context.CloudContext)11 DatabaseServer (com.sequenceiq.redbeams.domain.stack.DatabaseServer)11 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)11 CloudResource (com.sequenceiq.cloudbreak.cloud.model.CloudResource)10 Network (com.sequenceiq.cloudbreak.cloud.model.Network)9 ExternalDatabaseStatus (com.sequenceiq.cloudbreak.cloud.model.ExternalDatabaseStatus)8 Location (com.sequenceiq.cloudbreak.cloud.model.Location)8 Subnet (com.sequenceiq.cloudbreak.cloud.model.Subnet)8 Json (com.sequenceiq.cloudbreak.common.json.Json)8 DBStack (com.sequenceiq.redbeams.domain.stack.DBStack)7 Network (com.sequenceiq.redbeams.domain.stack.Network)7