コード例 #1
0
def test_create_quota():
    try:
        sdk_quota.create_quota("jenkins", cpus=4.0, mem=4000)
        quotas = sdk_quota.list_quotas()

        present = False
        for quota in quotas['infos']:
            if quota['role'] == "jenkins":
                present = True
                break

        assert present, "There was no quota present for the jenkins role"

    finally:
        sdk_quota.remove_quota("jenkins")

        quotas = sdk_quota.list_quotas()
        if 'infos' in quotas:
            for quota in quotas['infos']:
                assert quota['role'] != "jenkins"
コード例 #2
0
def _set_quota(role, cpus):
    sdk_quota.create_quota(role, cpus=cpus)
コード例 #3
0
ファイル: test_load.py プロジェクト: jrx/dcos-jenkins-service
def _set_quota(role, cpus, memory, quota_type):
    sdk_quota.create_quota(role, cpus=cpus, mem=memory, quota_type=quota_type)
コード例 #4
0
def _set_quota(role, cpus, memory):
    sdk_quota.create_quota(role, cpus=cpus, mem=memory)