예제 #1
0
def user():
    """Prepare user object."""
    profile = fake.simple_profile()
    user = User(None,
                username=profile['username'],
                password=fake.password(),
                organization=organization(),
                active=True)
    user.save()

    return user
예제 #2
0
파일: devenv.py 프로젝트: samos123/kqueen
        organization = Organization(
            id=uuid_organization,
            name='DemoOrg',
            namespace='demoorg'
        )
        organization.save()
    except:
        raise Exception('Adding DemoOrg organization failed')

    try:
        user = User(
            username='******',
            password='******',
            organization=organization,
        )
        user.save()
    except:
        raise Exception('Adding admin user failed')

    # AWS + Jenkins
    try:
        provisioner = Provisioner(
            id=uuid_provisioner_jenkins,
            name='Jenkins provisioner to AWS',
            state='OK',
            engine='kqueen.engines.JenkinsEngine',
            parameters={
                'username': '******',
                'password': '******'
            }
        )