Method: OpenStack::Network::QoSPolicy#create_bandwidth_limit_rule

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

#create_bandwidth_limit_rule(options) ⇒ Object



57
58
59
60
61
62
# File 'lib/openstack/network/qos_policy.rb', line 57

def create_bandwidth_limit_rule(options)
  data = JSON.generate(:bandwidth_limit_rule => options)
  response = @connection.req("POST", "/qos/policies/#{@id}/bandwidth_limit_rules", {:data => data})
  OpenStack::Exception.raise_exception(response) unless response.code.match(/^20.$/)
  OpenStack::Network::QoSBandwidthLimitRule.new(self, JSON.parse(response.body)["bandwidth_limit_rule"])
end