Method: OpenStack::Network::QoSPolicy#get_bandwidth_limit_rules

Defined in:
lib/openstack/network/qos_policy.rb

#get_bandwidth_limit_rulesObject



44
45
46
47
48
49
# File 'lib/openstack/network/qos_policy.rb', line 44

def get_bandwidth_limit_rules
  response = @connection.req("GET", "/qos/policies/#{@id}/bandwidth_limit_rules")
  OpenStack::Exception.raise_exception(response) unless response.code.match(/^20.$/)
  rules_hash = JSON.parse(response.body)["bandwidth_limit_rules"]
  rules_hash.inject([]){|res, current| res << OpenStack::Network::QoSBandwidthLimitRule.new(self, current); res}
end