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
attachmentservice. -
#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.
15004 15005 15006 |
# File 'lib/ovirtsdk4/services.rb', line 15004 def add(, opts = {}) internal_add(, NetworkAttachment, ADD, opts) end |
#attachment_service(id) ⇒ NetworkAttachmentService
Locates the attachment service.
15049 15050 15051 |
# File 'lib/ovirtsdk4/services.rb', line 15049 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.
15038 15039 15040 |
# File 'lib/ovirtsdk4/services.rb', line 15038 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
15060 15061 15062 15063 15064 15065 15066 15067 15068 15069 |
# File 'lib/ovirtsdk4/services.rb', line 15060 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 |