Class: Fog::NFV::OpenStack::Vnfds

Inherits:
OpenStack::Collection show all
Defined in:
lib/fog/nfv/openstack/models/vnfds.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Collection

#response

Instance Method Summary collapse

Methods inherited from OpenStack::Collection

#find_by_id, #load_response, #summary

Instance Method Details

#all(options = {}) ⇒ Object


10
11
12
# File 'lib/fog/nfv/openstack/models/vnfds.rb', line 10

def all(options = {})
  load_response(service.list_vnfds(options), 'vnfds')
end

#destroy(uuid) ⇒ Object


21
22
23
24
# File 'lib/fog/nfv/openstack/models/vnfds.rb', line 21

def destroy(uuid)
  vnfd = get(uuid)
  vnfd.destroy
end

#get(uuid) ⇒ Object


14
15
16
17
18
19
# File 'lib/fog/nfv/openstack/models/vnfds.rb', line 14

def get(uuid)
  data = service.get_vnfd(uuid).body['vnfd']
  new(data)
rescue Fog::NFV::OpenStack::NotFound
  nil
end