Class: Fog::Network::OpenStack::IpsecSiteConnection

Inherits:
OpenStack::Model show all
Defined in:
lib/fog/network/openstack/models/ipsec_site_connection.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from OpenStack::Model

#initialize, #save

Constructor Details

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

Instance Method Details

#createObject



25
26
27
28
29
30
31
32
33
# File 'lib/fog/network/openstack/models/ipsec_site_connection.rb', line 25

def create
  requires :name, :vpnservice_id, :ikepolicy_id, :ipsecpolicy_id,
           :peer_address, :peer_id, :peer_cidrs, :psk
  merge_attributes(service.create_ipsec_site_connection(vpnservice_id,
                                                        ikepolicy_id,
                                                        ipsecpolicy_id,
                                                        attributes).body['ipsec_site_connection'])
  self
end

#destroyObject



43
44
45
46
47
# File 'lib/fog/network/openstack/models/ipsec_site_connection.rb', line 43

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

#updateObject



35
36
37
38
39
40
41
# File 'lib/fog/network/openstack/models/ipsec_site_connection.rb', line 35

def update
  requires :id, :name, :vpnservice_id, :ikepolicy_id, :ipsecpolicy_id,
           :peer_address, :peer_id, :peer_cidrs, :psk
  merge_attributes(service.update_ipsec_site_connection(id,
                                                        attributes).body['ipsec_site_connection'])
  self
end