Class: Fog::OpenStack::Network::VpnService

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/openstack/network/models/vpn_service.rb

Instance Attribute Summary

Attributes inherited from Model

#project

Instance Method Summary collapse

Methods inherited from Model

#initialize, #save

Constructor Details

This class inherits a constructor from Fog::OpenStack::Model

Instance Method Details

#createObject



19
20
21
22
23
24
25
# File 'lib/fog/openstack/network/models/vpn_service.rb', line 19

def create
  requires :subnet_id, :router_id, :name, :admin_state_up
  merge_attributes(service.create_vpn_service(subnet_id,
                                              router_id,
                                              attributes).body['vpnservice'])
  self
end

#destroyObject



34
35
36
37
38
# File 'lib/fog/openstack/network/models/vpn_service.rb', line 34

def destroy
  requires :id
  service.delete_vpn_service(id)
  true
end

#updateObject



27
28
29
30
31
32
# File 'lib/fog/openstack/network/models/vpn_service.rb', line 27

def update
  requires :id, :subnet_id, :router_id, :name, :admin_state_up
  merge_attributes(service.update_vpn_service(id,
                                              attributes).body['vpnservice'])
  self
end