Class: VBox::BandwidthControl

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

Instance Attribute Summary collapse

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 Attribute Details

#refObject (readonly)

Returns the value of attribute ref.



4
5
6
# File 'lib/virtualbox/classes/bandwidth_control.rb', line 4

def ref
  @ref
end

Instance Method Details

#create_bandwidth_group(args = {}) ⇒ Object

Methods



14
15
16
17
# File 'lib/virtualbox/classes/bandwidth_control.rb', line 14

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



19
20
21
22
# File 'lib/virtualbox/classes/bandwidth_control.rb', line 19

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



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

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



31
32
33
34
# File 'lib/virtualbox/classes/bandwidth_control.rb', line 31

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



8
9
10
# File 'lib/virtualbox/classes/bandwidth_control.rb', line 8

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