# File lib/openstack/network/qos_bandwidth_limit_rule.rb, line 15 def populate(rule_hash=nil) if @id and not rule_hash response = @policy.connection.req("GET", "/qos/policies/#{@policy_id}/bandwidth_limit_rules/#{@id}") OpenStack::Exception.raise_exception(response) unless response.code.match(/^20.$/) rule_hash = JSON.parse(response.body)["bandwidth_limit_rule"] end @id = rule_hash["id"] @policy_id = rule_hash["policy_id"] || @policy.id @max_kbps = rule_hash["max_kbps"] @max_burst_kbps = rule_hash["max_burst_kbps"] end