<commit_before>#!/bin/bash
BIN_DIR=${BIN_DIR:-.}
# Tenants
ADMIN_TENANT=`$BIN_DIR/keystone-manage tenant --ks-id-only create \
                                       tenant_name=admin`
DEMO_TENANT=`$BIN_DIR/keystone-manage tenant --ks-id-only create \
                                      tenant_name=demo`
INVIS_TENANT=`$BIN_DIR/keystone-manage tenant --ks-id-only create \
                                       tenant_name=invisible_to_admin`


# Users
ADMIN_USER=`$BIN_DIR/keystone-manage user --ks-id-only create \
                                          name=admin \
                                          "password=%<PASSWORD>%" \
                                          email=<EMAIL>`
DEMO_USER=`$BIN_DIR/keystone-manage user --ks-id-only create \
                                         name=demo \
                                         "password=<PASSWORD>%" \
                                         email=<EMAIL>`

# Roles
ADMIN_ROLE=`$BIN_DIR/keystone-manage role --ks-id-only create \
                                          name=Admin`
MEMBER_ROLE=`$BIN_DIR/keystone-manage role --ks-id-only create \
                                           name=Member`
KEYSTONEADMIN_ROLE=`$BIN_DIR/keystone-manage role --ks-id-only create \
                                                  name=KeystoneAdmin`
KEYSTONESERVICE_ROLE=`$BIN_DIR/keystone-manage role --ks-id-only create \
                                                         name=KeystoneServiceAdmin`
SYSADMIN_ROLE=`$BIN_DIR/keystone-manage role --ks-id-only create \
                                             name=sysadmin`
NETADMIN_ROLE=`$BIN_DIR/keystone-manage role --ks-id-only create \
                                             name=netadmin`


# Add Roles to Users in Tenants

$BIN_DIR/keystone-manage role add_user_to_tenant \
                              role_id=$ADMIN_ROLE \
                              user_id=$ADMIN_USER \
                              tenant_id=$ADMIN_TENANT
$BIN_DIR/keystone-manage role add_user_to_tenant \
                              role_id=$MEMBER_ROLE \
                              user_id=$DEMO_USER \
                              tenant_id=$DEMO_TENANT
$BIN_DIR/keystone-manage role add_user_to_tenant \
                              role_id=$SYSADMIN_ROLE \
                              user_id=$DEMO_USER \
                              tenant_id=$DEMO_TENANT
$BIN_DIR/keystone-manage role add_user_to_tenant \
                              role_id=$NETADMIN_ROLE \
                              user_id=$DEMO_USER \
                              tenant_id=$DEMO_TENANT
$BIN_DIR/keystone-manage role add_user_to_tenant \
                              role_id=$MEMBER_ROLE \
                              user_id=$DEMO_USER \
                              tenant_id=$INVIS_TENANT
$BIN_DIR/keystone-manage role add_user_to_tenant \
                              role_id=$ADMIN_ROLE \
                              user_id=$ADMIN_USER \<commit_msg>updating to match master ksl CLI options<commit_after>#!/bin/bash
BIN_DIR=${BIN_DIR:-.}
# Tenants
ADMIN_TENANT=`$BIN_DIR/keystone-manage tenant --id-only create \
                                       tenant_name=admin`
DEMO_TENANT=`$BIN_DIR/keystone-manage tenant --id-only create \
                                      tenant_name=demo`
INVIS_TENANT=`$BIN_DIR/keystone-manage tenant --id-only create \
                                       tenant_name=invisible_to_admin`


# Users
ADMIN_USER=`$BIN_DIR/keystone-manage user --id-only create \
                                          name=admin \
                                          "password=<PASSWORD>%" \
                                          email=<EMAIL>`
DEMO_USER=`$BIN_DIR/keystone-manage user --id-only create \
                                         name=demo \
                                         "password=%<PASSWORD>%" \
                                         email=<EMAIL>`

# Roles
ADMIN_ROLE=`$BIN_DIR/keystone-manage role --id-only create \
                                          name=Admin`
MEMBER_ROLE=`$BIN_DIR/keystone-manage role --id-only create \
                                           name=Member`
KEYSTONEADMIN_ROLE=`$BIN_DIR/keystone-manage role --id-only create \
                                                  name=KeystoneAdmin`
KEYSTONESERVICE_ROLE=`$BIN_DIR/keystone-manage role --id-only create \
                                                         name=KeystoneServiceAdmin`
SYSADMIN_ROLE=`$BIN_DIR/keystone-manage role --id-only create \
                                             name=sysadmin`
NETADMIN_ROLE=`$BIN_DIR/keystone-manage role --id-only create \
                                             name=netadmin`


# Add Roles to Users in Tenants

$BIN_DIR/keystone-manage role add_user_to_tenant \
                              role_id=$ADMIN_ROLE \
                              user_id=$ADMIN_USER \
                              tenant_id=$ADMIN_TENANT
$BIN_DIR/keystone-manage role add_user_to_tenant \
                              role_id=$MEMBER_ROLE \
                              user_id=$DEMO_USER \
                              tenant_id=$DEMO_TENANT
$BIN_DIR/keystone-manage role add_user_to_tenant \
                              role_id=$SYSADMIN_ROLE \
                              user_id=$DEMO_USER \
                              tenant_id=$DEMO_TENANT
$BIN_DIR/keystone-manage role add_user_to_tenant \
                              role_id=$NETADMIN_ROLE \
                              user_id=$DEMO_USER \
                              tenant_id=$DEMO_TENANT
$BIN_DIR/keystone-manage role add_user_to_tenant \
                              role_id=$MEMBER_ROLE \
                              user_id=$DEMO_USER \
                              tenant_id=$INVIS_TENANT
$BIN_DIR/keystone-manage role add_user_to_tenant \
                              role_id=$ADMIN_ROLE \
                              user_id=$ADMIN_USER \
{'fraction_non_alphanumeric': 0.07956448911222781, 'fraction_numerical': 0.0, 'mean_word_length': 1.1069160197600565, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 54, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2321298', 'n_tokens_mistral': 1654, 'n_tokens_neox': 1569, 'n_words': 216}