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.
14919 14920 14921 |
# File 'lib/ovirtsdk4/services.rb', line 14919 def add(, opts = {}) internal_add(, NetworkAttachment, ADD, opts) end |
#attachment_service(id) ⇒ NetworkAttachmentService
Locates the attachment
service.
14964 14965 14966 |
# File 'lib/ovirtsdk4/services.rb', line 14964 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.
14953 14954 14955 |
# File 'lib/ovirtsdk4/services.rb', line 14953 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 |
# File 'lib/ovirtsdk4/services.rb', line 14975 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 |