Class: Squall::HypervisorZone
- Inherits:
-
Base
- Object
- Base
- Squall::HypervisorZone
- Defined in:
- lib/squall/hypervisor_zone.rb
Overview
OnApp HypervisorZone
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary (collapse)
-
- (Object) add_data_store_join(id, data_store_id)
Add a data store to a hypervisor zone.
-
- (Object) add_network_join(id, options = {})
Add a network to a hypervisor zone.
-
- (Object) create(options = {})
Creates a new hypervisor zone.
-
- (Object) data_store_joins(id)
List data store joins attached to a hypervisor zone.
-
- (Object) delete(id)
Deletes an existing hypervisor zone.
-
- (Object) edit(id, options = {})
Updates an existing hypervisor zone.
-
- (Object) hypervisors(id)
List hypervisors attached to a zone.
-
- (Object) list
Lists all hypervisor zones.
-
- (Object) network_joins(id)
List networks attached to a hypervisor zone.
-
- (Object) remove_data_store_join(id, data_store_join_id)
Remove a data store from a hypervisor zone.
-
- (Object) remove_network_join(id, network_join_id)
Remove a network from a hypervisor zone.
-
- (Object) show(id)
Get the details for a hypervisor zone.
Methods inherited from Base
#check_config, #default_params, #key_for_class, #request
Instance Method Details
- (Object) add_data_store_join(id, data_store_id)
Add a data store to a hypervisor zone.
77 78 79 |
# File 'lib/squall/hypervisor_zone.rb', line 77 def add_data_store_join(id, data_store_id) request(:post, "/settings/hypervisor_zones/#{id}/data_store_joins.json", query: { data_store_id: data_store_id }) end |
- (Object) add_network_join(id, options = {})
Add a network to a hypervisor zone
109 110 111 |
# File 'lib/squall/hypervisor_zone.rb', line 109 def add_network_join(id, = {}) request(:post, "/settings/hypervisor_zones/#{id}/network_joins.json", query: { network_join: }) end |
- (Object) create(options = {})
Creates a new hypervisor zone.
28 29 30 |
# File 'lib/squall/hypervisor_zone.rb', line 28 def create( = {}) request(:post, "/settings/hypervisor_zones.json", query: { pack: }) end |
- (Object) data_store_joins(id)
List data store joins attached to a hypervisor zone.
66 67 68 69 |
# File 'lib/squall/hypervisor_zone.rb', line 66 def data_store_joins(id) response = request(:get, "/settings/hypervisor_zones/#{id}/data_store_joins.json") response.collect { |i| i['data_store_join'] } end |
- (Object) delete(id)
Deletes an existing hypervisor zone.
47 48 49 |
# File 'lib/squall/hypervisor_zone.rb', line 47 def delete(id) request(:delete, "/settings/hypervisor_zones/#{id}.json") end |
- (Object) edit(id, options = {})
Updates an existing hypervisor zone.
38 39 40 |
# File 'lib/squall/hypervisor_zone.rb', line 38 def edit(id, = {}) request(:put, "/settings/hypervisor_zones/#{id}.json", query: { pack: }) end |
- (Object) hypervisors(id)
List hypervisors attached to a zone.
56 57 58 59 |
# File 'lib/squall/hypervisor_zone.rb', line 56 def hypervisors(id) response = request(:get, "/settings/hypervisor_zones/#{id}/hypervisors.json") response.collect { |hv| hv['hypervisor'] } end |
- (Object) list
Lists all hypervisor zones.
7 8 9 10 |
# File 'lib/squall/hypervisor_zone.rb', line 7 def list response = request(:get, "/settings/hypervisor_zones.json") response.collect { |i| i['hypervisor_group'] } end |
- (Object) network_joins(id)
List networks attached to a hypervisor zone.
96 97 98 99 |
# File 'lib/squall/hypervisor_zone.rb', line 96 def network_joins(id) response = request(:get, "/settings/hypervisor_zones/#{id}/network_joins.json") response.collect { |i| i['network_join'] } end |
- (Object) remove_data_store_join(id, data_store_join_id)
Remove a data store from a hypervisor zone.
87 88 89 |
# File 'lib/squall/hypervisor_zone.rb', line 87 def remove_data_store_join(id, data_store_join_id) request(:delete, "/settings/hypervisor_zones/#{id}/data_store_joins/#{data_store_join_id}.json") end |
- (Object) remove_network_join(id, network_join_id)
Remove a network from a hypervisor zone.
119 120 121 |
# File 'lib/squall/hypervisor_zone.rb', line 119 def remove_network_join(id, network_join_id) request(:delete, "/settings/hypervisor_zones/#{id}/network_joins/#{network_join_id}.json") end |
- (Object) show(id)
Get the details for a hypervisor zone.
17 18 19 20 |
# File 'lib/squall/hypervisor_zone.rb', line 17 def show(id) response = request(:get, "/settings/hypervisor_zones/#{id}.json") response['hypervisor_group'] end |