Commit dab0cd64 authored by Rostislav Vatolin [SLB]'s avatar Rostislav Vatolin [SLB]
Browse files

load test data for ent-v2

parent 07d4c55e
......@@ -72,7 +72,15 @@ export COSMOS_ENDPOINT=$(az keyvault secret show --id https://${ENV_VAULT}.vault
export COSMOS_KEY=$(az keyvault secret show --id https://${ENV_VAULT}.vault.azure.net/secrets/${PARTITION_NAME}-cosmos-primary-key --query value -otsv)
export SERVICE_PRINCIPAL_ID=$(az keyvault secret show --id https://${ENV_VAULT}.vault.azure.net/secrets/app-dev-sp-username --query value -otsv)
export SERVICE_PRINCIPAL_OID=$(az keyvault secret show --id https://${ENV_VAULT}.vault.azure.net/secrets/app-dev-sp-id --query value -otsv)
export GRAPH_DB_PASSWORD=$(az keyvault secret show --id https://${ENV_VAULT}.vault.azure.net/secrets/graph-db-primary-key --query value -otsv)
export GRAPH_DB_HOST=$(az group list --query "[?contains(name, 'cr${UNIQUE}')].name" -otsv | awk '{ print substr( $0, 1, length($0)-3 ) }')-graph.gremlin.cosmos.azure.com
# Execute the Upload
python3 upload-data.py
```
__Upload Graph Cosmos DB Test Data__
```bash
cd entitlements_data_uploader
mvn compile exec:java -DGRAPH_DB_HOST=$GRAPH_DB_HOST -DGRAPH_DB_PASSWORD=$GRAPH_DB_PASSWORD -DSERVICE_PRINCIPAL_ID=$SERVICE_PRINCIPAL_ID -DNO_DATA_ACCESS_TESTER=$NO_DATA_ACCESS_TESTER
```
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.opengroup.osdu</groupId>
<artifactId>entitlements_data_uploader</artifactId>
<version>0.0.1</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<mainClass>org.opengroup.osdu.Uploader</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-driver</artifactId>
<version>3.4.8</version>
</dependency>
</dependencies>
</project>
package org.opengroup.osdu;
import org.apache.tinkerpop.gremlin.driver.Client;
import org.apache.tinkerpop.gremlin.driver.Cluster;
import org.apache.tinkerpop.gremlin.driver.ser.Serializers;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.ExecutionException;
public class Uploader {
private static final String DEFAULT_DP = "opendes";
public static void main(String[] args) throws IOException, ExecutionException, InterruptedException {
String dbHost = System.getProperty("GRAPH_DB_HOST");
String password = System.getProperty("GRAPH_DB_PASSWORD");
String intTesterUsername = System.getProperty("SERVICE_PRINCIPAL_ID");
String noDataAccessTester = System.getProperty("NO_DATA_ACCESS_TESTER");
String[] dataPartitions = new String[]{DEFAULT_DP, "common"};
Client client = createClient(dbHost, password);
for (String dp: dataPartitions) {
String[] commands = getGroovyCommands("/bootstrap-data.txt");
for (String command : commands) {
if (!DEFAULT_DP.equals(dp)) {
command = replaceDefaultDp(command, dp);
}
submitCommand(client, command);
}
}
String[] usersForIntTests = new String[]{"/users-for-tests-for-opendes-dp.txt", "/users-for-tests-for-common-dp.txt"};
for (String bootStrapFile: usersForIntTests) {
String[] commands = getGroovyCommands(bootStrapFile);
for (String command : commands) {
command = configureIntTester(command, intTesterUsername);
command = configureNoDataAccessTester(command, noDataAccessTester);
submitCommand(client, command);
}
}
System.exit(0);
}
private static String replaceDefaultDp(String command, String dp) {
return command.replaceAll(DEFAULT_DP, dp);
}
private static String configureIntTester(String command, String intTester) {
return command.replaceAll("INT_TESTER_USERNAME", intTester);
}
private static String configureNoDataAccessTester(String command, String noDataAccessTester) {
return command.replaceAll("NO_DATA_ACCESS_TESTER", noDataAccessTester);
}
private static Client createClient(String dbHost, String password) {
Cluster cluster = Cluster.build(dbHost)
.port(443)
.credentials("/dbs/osdu-graph/colls/Entitlements", password)
.enableSsl(true)
.maxContentLength(65536)
.serializer(Serializers.GRAPHSON_V2D0.toString())
.create();
return cluster.connect().alias("g");
}
private static String[] getGroovyCommands(String filename) throws IOException {
String commands;
try (InputStream inputStream = Uploader.class.getResourceAsStream(filename)) {
if (inputStream == null) {
throw new IOException();
}
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int length;
while ((length = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, length);
}
commands = outputStream.toString(StandardCharsets.UTF_8.toString());
}
return commands.split(System.lineSeparator());
}
private static void submitCommand(Client client, String command) throws ExecutionException, InterruptedException {
if ((Integer) client.submit(command).statusAttributes().get().get("x-ms-status-code") != 200) {
throw new RuntimeException("Error during data upload");
}
System.out.println("Completed: " + command);
}
}
g.addV('GROUP').property('nodeId', 'users.datalake.ops@opendes.contoso.com').property('name', 'users.datalake.ops').property('description', 'Datalake ops').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'users.datalake.admins@opendes.contoso.com').property('name', 'users.datalake.admins').property('description', 'Datalake admins').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'users.datalake.editors@opendes.contoso.com').property('name', 'users.datalake.editors').property('description', 'Datalake editors').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'users.datalake.viewers@opendes.contoso.com').property('name', 'users.datalake.viewers').property('description', 'Datalake viewers').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'users@opendes.contoso.com').property('name', 'users').property('description', 'Datalake users').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'users.data.root@opendes.contoso.com').property('name', 'users.data.root').property('description', 'Datalake root users').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'service.storage.viewer@opendes.contoso.com').property('name', 'service.storage.viewer').property('description', 'The viewer of the datalake storage service').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.storage.viewer@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.viewers@opendes.contoso.com'))
g.V().has('nodeId','service.storage.viewer@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.editors@opendes.contoso.com'))
g.V().has('nodeId','service.storage.viewer@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.admins@opendes.contoso.com'))
g.V().has('nodeId','service.storage.viewer@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.storage.admin@opendes.contoso.com').property('name', 'service.storage.admin').property('description', 'Datalake Storage admins').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.storage.admin@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.storage.creator@opendes.contoso.com').property('name', 'service.storage.creator').property('description', 'Datalake Storage creators').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.storage.creator@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.V().has('nodeId','service.storage.creator@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.admins@opendes.contoso.com'))
g.V().has('nodeId','service.storage.creator@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.editors@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.search.admin@opendes.contoso.com').property('name', 'service.search.admin').property('description', 'Datalake Search admins').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.search.admin@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.V().has('nodeId','service.search.admin@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.admins@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.search.user@opendes.contoso.com').property('name', 'service.search.user').property('description', 'Datalake Search users').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.search.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.viewers@opendes.contoso.com'))
g.V().has('nodeId','service.search.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.editors@opendes.contoso.com'))
g.V().has('nodeId','service.search.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.admins@opendes.contoso.com'))
g.V().has('nodeId','service.search.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.entitlements.admin@opendes.contoso.com').property('name', 'service.entitlements.admin').property('description', 'Datalake Entitlements admins').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.entitlements.admin@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.admins@opendes.contoso.com'))
g.V().has('nodeId','service.entitlements.admin@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.entitlements.user@opendes.contoso.com').property('name', 'service.entitlements.user').property('description', 'Datalake Entitlements users').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.entitlements.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.viewers@opendes.contoso.com'))
g.V().has('nodeId','service.entitlements.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.editors@opendes.contoso.com'))
g.V().has('nodeId','service.entitlements.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.admins@opendes.contoso.com'))
g.V().has('nodeId','service.entitlements.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.legal.user@opendes.contoso.com').property('name', 'service.legal.user').property('description', 'Datalake Legal users').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.legal.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.viewers@opendes.contoso.com'))
g.V().has('nodeId','service.legal.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.editors@opendes.contoso.com'))
g.V().has('nodeId','service.legal.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.admins@opendes.contoso.com'))
g.V().has('nodeId','service.legal.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.legal.editor@opendes.contoso.com').property('name', 'service.legal.editor').property('description', 'Datalake Legal editors').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.legal.editor@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.editors@opendes.contoso.com'))
g.V().has('nodeId','service.legal.editor@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.admins@opendes.contoso.com'))
g.V().has('nodeId','service.legal.editor@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.legal.admin@opendes.contoso.com').property('name', 'service.legal.admin').property('description', 'Datalake Legal admins').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.legal.admin@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.plugin.admin@opendes.contoso.com').property('name', 'service.plugin.admin').property('description', 'Datalake Plugin-Manager admins').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.plugin.admin@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.plugin.user@opendes.contoso.com').property('name', 'service.plugin.user').property('description', 'Datalake Plugin-Manager users').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.plugin.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.viewers@opendes.contoso.com'))
g.V().has('nodeId','service.plugin.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.editors@opendes.contoso.com'))
g.V().has('nodeId','service.plugin.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.admins@opendes.contoso.com'))
g.V().has('nodeId','service.plugin.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.messaging.admin@opendes.contoso.com').property('name', 'service.messaging.admin').property('description', 'Datalake Messaging admins').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.messaging.admin@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.messaging.user@opendes.contoso.com').property('name', 'service.messaging.user').property('description', 'Datalake Messaging users').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','service.messaging.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.viewers@opendes.contoso.com'))
g.V().has('nodeId','service.messaging.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.editors@opendes.contoso.com'))
g.V().has('nodeId','service.messaging.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.admins@opendes.contoso.com'))
g.V().has('nodeId','service.messaging.user@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users.datalake.ops@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'service.schema-service.viewers@opendes.contoso.com').property('name', 'service.schema-service.viewers').property('description', 'Datalake Schema users').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'service.schema-service.editors@opendes.contoso.com').property('name', 'service.schema-service.editors').property('description', 'Datalake Schema editors').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'service.workflow.creator@opendes.contoso.com').property('name', 'service.workflow.creator').property('description', 'Datalake Workflow creators').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'service.workflow.viewer@opendes.contoso.com').property('name', 'service.workflow.viewer').property('description', 'Datalake Workflow viewers').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'service.workflow.admin@opendes.contoso.com').property('name', 'service.workflow.admin').property('description', 'Datalake Workflow admins').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'data.datalake.admin@opendes.contoso.com').property('name', 'data.datalake.admin').property('description', 'Datalake admins').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'data.datalake.viewer@opendes.contoso.com').property('name', 'data.datalake.viewer').property('description', 'Datalake viewers').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'data.default.viewer@opendes.contoso.com').property('name', 'data.default.viewer').property('description', 'Datalake default viewers').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'data.default.owner@opendes.contoso.com').property('name', 'data.default.owner').property('description', 'Datalake default owners').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'cron.job@opendes.contoso.com').property('name', 'cron.job').property('description', 'Cron job').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'notification.pubsub@opendes.contoso.com').property('name', 'notification.pubsub').property('description', 'Datalake Notification users').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'service.file.viewers@opendes.contoso.com').property('name', 'service.file.viewers').property('description', 'Datalake File viewers').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'service.file.editors@opendes.contoso.com').property('name', 'service.file.editors').property('description', 'Datalake File editors').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'service.delivery.viewer@opendes.contoso.com').property('name', 'service.delivery.viewer').property('description', 'Datalake Delivery viewers').property('dataPartitionId','opendes').property('appIds','[]')
g.addV('GROUP').property('nodeId', 'data.default.viewers@opendes.contoso.com').property('name', 'data.default.viewers').property('description', 'Default data viewers').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','data.default.viewers@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users@opendes.contoso.com'))
g.addV('GROUP').property('nodeId', 'data.default.owners@opendes.contoso.com').property('name', 'data.default.owners').property('description', 'Default data owners').property('dataPartitionId','opendes').property('appIds','[]')
g.V().has('nodeId','data.default.owners@opendes.contoso.com').addE('child').property('role', 'MEMBER').to(g.V().has('nodeId','users@opendes.contoso.com'))
\ No newline at end of file
g.addV('USER').property('nodeId', 'INT_TESTER_USERNAME').property('dataPartitionId', 'common')
g.V().has('nodeId','users@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.storage.admin@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.legal.admin@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','data.datalake.admin@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','data.datalake.viewer@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','data.default.viewer@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','data.default.owner@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.search.admin@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.search.user@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','data.default.viewers@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','data.default.owners@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.entitlements.admin@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.schema-service.viewers@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.schema-service.editors@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.workflow.creator@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.workflow.viewer@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.workflow.admin@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','users.datalake.ops@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','cron.job@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','notification.pubsub@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.file.viewers@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.file.editors@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.delivery.viewer@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.addV('USER').property('nodeId', 'NO_DATA_ACCESS_TESTER').property('dataPartitionId', 'common')
g.V().has('nodeId','service.storage.admin@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','NO_DATA_ACCESS_TESTER'))
g.V().has('nodeId','service.legal.admin@common.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','NO_DATA_ACCESS_TESTER'))
g.addV('USER').property('nodeId', 'testMember@test.com').property('dataPartitionId', 'common')
g.addV('USER').property('nodeId', 'testmMemberOwner@test.com').property('dataPartitionId', 'common')
\ No newline at end of file
g.addV('USER').property('nodeId', 'INT_TESTER_USERNAME').property('dataPartitionId', 'opendes')
g.V().has('nodeId','service.storage.admin@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.legal.admin@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','data.datalake.viewer@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','data.test1@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','data.default.viewer@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','data.default.owner@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.search.admin@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.search.user@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','data.default.viewers@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','data.default.owners@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.entitlements.admin@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.schema-service.viewers@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.schema-service.editors@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.workflow.creator@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.workflow.viewer@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.workflow.admin@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','users.datalake.ops@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','cron.job@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','notification.pubsub@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.file.viewers@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.file.editors@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','service.delivery.viewer@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.V().has('nodeId','users@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','INT_TESTER_USERNAME'))
g.addV('USER').property('nodeId', 'NO_DATA_ACCESS_TESTER').property('dataPartitionId', 'opendes')
g.V().has('nodeId','service.storage.admin@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','NO_DATA_ACCESS_TESTER'))
g.V().has('nodeId','service.legal.admin@opendes.contoso.com').addE('child').property('role', 'OWNER').to(g.V().has('nodeId','NO_DATA_ACCESS_TESTER'))
g.addV('USER').property('nodeId', 'testMember@test.com').property('dataPartitionId', 'opendes')
g.addV('USER').property('nodeId', 'testmMemberOwner@test.com').property('dataPartitionId', 'opendes')
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment