Class: VBox::BandwidthControl

Inherits:
Base
  • Object
show all
Defined in:
lib/virtualbox/classes/bandwidth_control.rb

Instance Attribute Summary

Attributes inherited from Base

#ref

Instance Method Summary collapse

Methods inherited from Base

#_this, #delete!, #ensure_hash, #initialize, #vbox_class

Constructor Details

This class inherits a constructor from VBox::Base

Instance Method Details

#create_bandwidth_group(args = {}) ⇒ Object

Methods



12
13
14
15
# File 'lib/virtualbox/classes/bandwidth_control.rb', line 12

def create_bandwidth_group(args={})
  ensure_hash args
  VBox::WebService.send_request(:i_bandwidth_contol_create_bandwidth_group, _this.merge(args))
end

#delete_bandwidth_group(args = {}) ⇒ Object



17
18
19
20
# File 'lib/virtualbox/classes/bandwidth_control.rb', line 17

def delete_bandwidth_group(args={})
  ensure_hash args
  VBox::WebService.send_request(:i_bandwidth_control_delete_bandwidth_group, _this.merge(args))
end

#get_all_bandwidth_groupsObject



22
23
24
25
26
27
# File 'lib/virtualbox/classes/bandwidth_control.rb', line 22

def get_all_bandwidth_groups
  bandwidth_groups = VBox::WebService.send_request(:i_bandwidth_control_get_all_bandwidth_groups, _this)
  bandwidth_groups.map do |bandwidth_group|
    VBox::BandwidthGroup.new(bandwidth_group)
  end
end

#get_bandwidth_groupObject



29
30
31
32
# File 'lib/virtualbox/classes/bandwidth_control.rb', line 29

def get_bandwidth_group
  bandwidth_group = VBox::WebService.send_request(:i_bandwidth_control_get_bandwidth_group, _this)
  VBox::BandwidthGroup.new(bandwidth_group)
end

#num_groupsObject

Attributes



6
7
8
# File 'lib/virtualbox/classes/bandwidth_control.rb', line 6

def num_groups
  VBox::WebService.send_request(:i_bandwidth_control_get_num_groups, _this)
end