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

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

Instance Attribute Summary

Attributes inherited from Fog::OpenStack::Collection

#response

Instance Method Summary collapse

Methods inherited from Fog::OpenStack::Collection

#destroy, #find_by_id, #load_response, #summary

Instance Method Details

#allObject



12
13
14
15
16
17
# File 'lib/fog/openstack/compute/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/openstack/compute/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