Class: Fog::Compute::OpenStack::OsInterfaces

Inherits:
OpenStack::Collection show all
Defined in:
lib/fog/compute/openstack/models/os_interfaces.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Collection

#response

Instance Method Summary collapse

Methods inherited from OpenStack::Collection

#destroy, #find_by_id, #load_response, #summary

Instance Method Details

#allObject



12
13
14
15
16
17
# File 'lib/fog/compute/openstack/models/os_interfaces.rb', line 12

def all
  requires :server

  data = service.list_os_interfaces(server.id)
  load_response(data, 'interfaceAttachments')
end

#get(port_id) ⇒ Object



19
20
21
22
23
24
# File 'lib/fog/compute/openstack/models/os_interfaces.rb', line 19

def get(port_id)
  requires :server

  data = service.get_os_interface(server.id,port_id)
  load_response(data, 'interfaceAttachment')
end