Class: OvirtSDK4::NetworkAttachmentsService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(attachment, opts = {}) ⇒ NetworkAttachment
Add a new network attachment to the network interface.
-
#attachment_service(id) ⇒ NetworkAttachmentService
Locates the
attachment
service. -
#list(opts = {}) ⇒ Array<NetworkAttachment>
Returns the list of network attachments of the host or host NIC.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#add(attachment, opts = {}) ⇒ NetworkAttachment
Add a new network attachment to the network interface.
16079 16080 16081 |
# File 'lib/ovirtsdk4/services.rb', line 16079 def add(, opts = {}) internal_add(, NetworkAttachment, ADD, opts) end |
#attachment_service(id) ⇒ NetworkAttachmentService
Locates the attachment
service.
16124 16125 16126 |
# File 'lib/ovirtsdk4/services.rb', line 16124 def (id) NetworkAttachmentService.new(self, id) end |
#list(opts = {}) ⇒ Array<NetworkAttachment>
Returns the list of network attachments of the host or host NIC.
The order of the returned list of network attachments isn’t guaranteed.
16113 16114 16115 |
# File 'lib/ovirtsdk4/services.rb', line 16113 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
16135 16136 16137 16138 16139 16140 16141 16142 16143 16144 |
# File 'lib/ovirtsdk4/services.rb', line 16135 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return (path) end return (path[0..(index - 1)]).service(path[(index + 1)..-1]) end |