Sha256: bc0050d93865d0b90a9551d8ed2730a70b03b0a3a56b49bdf2d5dd4565a52851
Contents?: true
Size: 867 Bytes
Versions: 2
Compression:
Stored size: 867 Bytes
Contents
module Ocp::Registry class CloudManager class Openstack module NovaHelper NOVA_QUOTA_FIELDS = ["metadata_items", "cores", "instances", "injected_files", "injected_file_content_bytes", "ram", "floating_ips", "fixed_ips", "security_groups", "security_group_rules"] def default_compute_quota with_openstack { compute.get_quota_defaults(nil).body["quota_set"] } end def set_compute_quota(tenant_id, hash) with_openstack do settings = Ocp::Registry::Common.hash_filter(hash, NOVA_QUOTA_FIELDS) compute.update_quota(tenant_id,settings).body["quota_set"] end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ocp_registry-0.0.5.pre | lib/ocp_registry/cloud_manager/openstack/nova_helper.rb |
ocp_registry-0.0.1.alpha | lib/ocp_registry/cloud_manager/openstack/nova_helper.rb |