fluke/devops-service/providers/static.rb
Tim Lianov 03dc3d8d99 v3
2018-04-04 22:44:39 +03:00

46 lines
1.0 KiB
Ruby

require_relative "provider"
require_relative "static/static_connector"
require_relative "static/static_provider_account"
require_relative "static/category_provider_static"
module Provider
class Static < AbstractProvider
PROVIDER = "static"
def name
PROVIDER
end
def create_connector config, account
options = {
#static_ssh_key: account.ssh_key,
# static_proxy: config[:static_proxy],
# static_no_proxy: config[:static_no_proxy],
static_integration_run_list: config[:static_integration_run_list]
}
add_connector(account.account_name, StaticConnector.new(options))
end
def create_account hash
Devops::Model::StaticProviderAccount.new(hash)
end
def create_category_provider hash
Devops::Model::CategoryProviderStatic.new(hash)
end
def account name
Devops::Model::StaticProviderAccount.find(name)
end
def accounts
Devops::Model::StaticProviderAccount.all
end
end
register Static
end