Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VpnTunnel #164

Merged
merged 5 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/aptible/api/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ def root_url
require 'aptible/api/persistent_disk'
require 'aptible/api/disk_attachment'
require 'aptible/api/maintenance'
require 'aptible/api/vpn_tunnel'
35 changes: 35 additions & 0 deletions lib/aptible/api/vpn_tunnel.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module Aptible
module Api
class VpnTunnel < Resource
belongs_to :stack
has_many :operations

field :id
field :stack_id
field :handle
field :psk
field :phase_1_alg
field :phase_1_dh_group
field :phase_1_lifetime
field :phase_2_alg
field :phase_2_dh_group
field :phase_2_lifetime
field :peer_id
field :our_gateway
field :our_networks
field :peer_gateway
field :peer_networks
field :key_exchange
field :auto
field :status
field :backend
field :deleted_at, type: Time
field :created_at, type: Time
field :updated_at, type: Time

def provisioned?
status == 'provisioned'
end
end
end
end