Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/aptible/api/operation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ class Operation < Resource
field :enable_backups
field :enable_pitr

# vhost:provision WAF request attributes
field :waf_status_request
field :waf_enabled_rulesets

def user
auth = Aptible::Auth::User.new(token: token, headers: headers)
auth.find_by_url(links['user'].href)
Expand Down
1 change: 1 addition & 0 deletions lib/aptible/api/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def root_url
require 'aptible/api/settings'
require 'aptible/api/source'
require 'aptible/api/vhost'
require 'aptible/api/waf_config'
require 'aptible/api/ssh_portal_connection'
require 'aptible/api/stack'
require 'aptible/api/stack_layer'
Expand Down
5 changes: 5 additions & 0 deletions lib/aptible/api/vhost.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ class Vhost < Resource
has_many :operations
has_many :settings

# TODO - is there a better way to allow linking engine to
# enable creation AND retrieval for has_one?
has_one :waf_config
has_many :waf_configs

field :id
field :virtual_domain
field :type
Expand Down
14 changes: 14 additions & 0 deletions lib/aptible/api/waf_config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module Aptible
module Api
class WafConfig < Resource
belongs_to :vhost

field :id
field :status
field :enabled_rulesets
field :created_at, type: Time
field :updated_at, type: Time
field :deleted_at, type: Time
end
end
end
Loading