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
subnetservice.
Methods inherited from Service
Instance Method Details
#add(subnet, opts = {}) ⇒ OpenStackSubnet
Adds a new subnet.
16671 16672 16673 |
# File 'lib/ovirtsdk4/services.rb', line 16671 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.
16705 16706 16707 |
# File 'lib/ovirtsdk4/services.rb', line 16705 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
16727 16728 16729 16730 16731 16732 16733 16734 16735 16736 |
# File 'lib/ovirtsdk4/services.rb', line 16727 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.
16716 16717 16718 |
# File 'lib/ovirtsdk4/services.rb', line 16716 def subnet_service(id) OpenstackSubnetService.new(self, id) end |