Class: OvirtSDK4::OpenstackSubnetsService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(subnet, opts = {}) ⇒ OpenStackSubnet
Adds a new
subnet
. -
#list(opts = {}) ⇒ Array<OpenStackSubnet>
Returns the list of sub-networks.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#subnet_service(id) ⇒ OpenstackSubnetService
Locates the
subnet
service.
Methods inherited from Service
Instance Method Details
#add(subnet, opts = {}) ⇒ OpenStackSubnet
Adds a new subnet
.
16749 16750 16751 |
# File 'lib/ovirtsdk4/services.rb', line 16749 def add(subnet, opts = {}) internal_add(subnet, OpenStackSubnet, ADD, opts) end |
#list(opts = {}) ⇒ Array<OpenStackSubnet>
Returns the list of sub-networks.
The order of the returned list of sub-networks isn’t guaranteed.
16783 16784 16785 |
# File 'lib/ovirtsdk4/services.rb', line 16783 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
16805 16806 16807 16808 16809 16810 16811 16812 16813 16814 |
# File 'lib/ovirtsdk4/services.rb', line 16805 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return subnet_service(path) end return subnet_service(path[0..(index - 1)]).service(path[(index +1)..-1]) end |
#subnet_service(id) ⇒ OpenstackSubnetService
Locates the subnet
service.
16794 16795 16796 |
# File 'lib/ovirtsdk4/services.rb', line 16794 def subnet_service(id) OpenstackSubnetService.new(self, id) end |