Class: Fog::OpenStack::NFV::Vnfd
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::NFV::Vnfd
show all
- Defined in:
- lib/fog/openstack/nfv/models/vnfd.rb
Instance Attribute Summary
Attributes inherited from Model
#project
Instance Method Summary
collapse
Methods inherited from Model
#initialize
Instance Method Details
#create(options = {}) ⇒ Object
21
22
23
24
|
# File 'lib/fog/openstack/nfv/models/vnfd.rb', line 21
def create(options = {})
merge_attributes(service.create_vnfd(default_options.merge(options)).body['vnfd'])
self
end
|
#default_options ⇒ Object
40
41
42
43
44
45
|
# File 'lib/fog/openstack/nfv/models/vnfd.rb', line 40
def default_options
{
:vnfd => vnfd,
:auth => auth
}
end
|
#destroy ⇒ Object
34
35
36
37
38
|
# File 'lib/fog/openstack/nfv/models/vnfd.rb', line 34
def destroy
requires :id
service.delete_vnfd(id)
true
end
|
#save(options = {}) ⇒ Object
30
31
32
|
# File 'lib/fog/openstack/nfv/models/vnfd.rb', line 30
def save(options = {})
identity ? update(options) : create(options)
end
|
#update(_options = {}) ⇒ Object
#vnf_attributes ⇒ Object
47
48
49
|
# File 'lib/fog/openstack/nfv/models/vnfd.rb', line 47
def vnf_attributes
attributes['attributes']
end
|