From 6571efb6c3afd568c019e7bb46aba84328a4e821 Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Wed, 1 Nov 2017 16:12:44 +0900 Subject: Fix spec. Fix usage ping. Fix warnings by adding new models and attributes. --- app/services/clusters/create_service.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'app/services/clusters') diff --git a/app/services/clusters/create_service.rb b/app/services/clusters/create_service.rb index 8c30e247fdc..503118fa6b6 100644 --- a/app/services/clusters/create_service.rb +++ b/app/services/clusters/create_service.rb @@ -2,6 +2,9 @@ module Clusters class CreateService < BaseService attr_reader :access_token + TEMPOLARY_API_URL = 'http://tempolary_api_url'.freeze + TEMPOLARY_TOKEN = 'tempolary_token'.freeze + def execute(access_token) @access_token = access_token @@ -28,8 +31,13 @@ module Clusters def cluster_params return @cluster_params if defined?(@cluster_params) - params[:provider_gcp_attributes].try do |h| - h[:access_token] = access_token + params[:provider_gcp_attributes].try do |provider| + provider[:access_token] = access_token + + params[:platform_kubernetes_attributes].try do |platform| + platform[:api_url] = TEMPOLARY_API_URL + platform[:token] = TEMPOLARY_TOKEN + end end @cluster_params = params.merge(user: current_user) -- cgit v1.2.1