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.
16215 16216 16217 |
# File 'lib/ovirtsdk4/services.rb', line 16215 def add(, opts = {}) internal_add(, NetworkAttachment, ADD, opts) end |
#attachment_service(id) ⇒ NetworkAttachmentService
Locates the attachment
service.
16260 16261 16262 |
# File 'lib/ovirtsdk4/services.rb', line 16260 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.
16249 16250 16251 |
# File 'lib/ovirtsdk4/services.rb', line 16249 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
16271 16272 16273 16274 16275 16276 16277 16278 16279 16280 |
# File 'lib/ovirtsdk4/services.rb', line 16271 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 |