def clean_migrated_mongo(clean_mongo):
    deviceauth_cli = CliDeviceauth()
    useradm_cli = CliUseradm()

    deviceauth_cli.migrate()
    useradm_cli.migrate()

    yield clean_mongo
def clean_migrated_mongo_mt(clean_mongo):
    deviceauth_cli = CliDeviceauth()
    useradm_cli = CliUseradm()
    for t in ['tenant1', 'tenant2']:
        deviceauth_cli.migrate(t)
        useradm_cli.migrate(t)

    yield clean_mongo
예제 #3
0
def clean_migrated_mongo(clean_mongo):
    useradm_cli = CliUseradm()
    depl_cli = CliDeployments()

    useradm_cli.migrate()
    depl_cli.migrate()

    yield clean_mongo
예제 #4
0
파일: common.py 프로젝트: kacf/integration
def create_user(name: str,
                pwd: str,
                tid: str = "",
                containers_namespace: str = "backend-tests") -> User:
    cli = CliUseradm(containers_namespace)
    uid = cli.create_user(name, pwd, tid)

    return User(uid, name, pwd)
예제 #5
0
def clean_migrated_mongo(clean_mongo):
    useradm_cli = CliUseradm()
    tenantadm_cli = CliTenantadm()

    for t in ['tenant1', 'tenant2']:
        useradm_cli.migrate(t)
        tenantadm_cli.migrate()

    yield clean_mongo
예제 #6
0
def clean_migrated_mongo_mt(clean_mongo):
    deviceauth_cli = CliDeviceauth()
    useradm_cli = CliUseradm()
    tenantadm_cli = CliTenantadm()
    for t in ["tenant1", "tenant2"]:
        deviceauth_cli.migrate(t)
        useradm_cli.migrate(t)
        tenantadm_cli.migrate()

    yield clean_mongo
예제 #7
0
def create_user(name, pwd, tid='', docker_prefix=None):
    cli = CliUseradm(docker_prefix)

    uid = cli.create_user(name, pwd, tid)

    return User(uid, name, pwd)
예제 #8
0
 def create_user(self, username, password, tenant_id=""):
     namespace = get_container_manager().name
     cli = CliUseradm(containers_namespace=namespace)
     cli.create_user(username, password, tenant_id)
예제 #9
0
def clean_migrated_mongo(clean_mongo):
    CliDeviceauth().migrate()
    CliUseradm().migrate()
    CliDeviceMonitor().migrate()
    yield clean_mongo