Skip to content
Brad Frank edited this page Mar 13, 2015 · 14 revisions

HMDCQuotas

Import Module

from hmdcquotas import HMDCQuotas
quotas = HMDCQuotas()

Functions

Convert quota unit to KB

Example: quotas.convert_to_kb("50G")

Find a vserver by volume

Example: quotas.get_vserver("projects_ci3")

Get quota information about a group

Example: quotas.group_lookup("admin", "projects", "nc-hmdc-svm01-mgmt")

Modify quotas directly

Example: quotas.modify("add", "admin", "projects", "nc-hmdc-svm01-mgmt", ["50G", 655362])

Find quota with group name and volume

Example: quotas.search_vservers("admin", ["projects"])

Find group quota with group name and vserver

Example: quotas.search_volumes("admin", "nc-hmdc-svm01-mgmt")