apcera 0.1.6.10 → 0.1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apcera/api_client.rb +2 -1
- data/lib/apcera/version.rb +1 -1
- data/lib/apcera_api_helper.rb +17 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69a59e9b2ab5e6603c1196de06fc345facc8a71f
|
4
|
+
data.tar.gz: 4bd6eb59b4c6c04d4bf0db816576936573c76730
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2512f1cb55672d0f533c57dd9f407cb27bc2036e5bf628365e48905feda1c22073ea9925c400d9a45e0770020b6a839b29accbf9b4cf8f8f24137040d7eb3b04
|
7
|
+
data.tar.gz: 0e3819ce69b0c90d41ad5683c885f2fe742e5eb3428511624d4b0c4655877a33051ef84e0b8ea9d3f869f4b334be924ef9b18ef10040629793ed3ec11e6e449f
|
data/lib/apcera/api_client.rb
CHANGED
data/lib/apcera/version.rb
CHANGED
data/lib/apcera_api_helper.rb
CHANGED
@@ -94,8 +94,13 @@ class ApceraAuth
|
|
94
94
|
@domain = parts.last
|
95
95
|
|
96
96
|
@api_host = "api.#{@domain}"
|
97
|
-
|
97
|
+
|
98
|
+
# Have to be running against a 2.x cluster or later for this to work. Older
|
99
|
+
# Clusters want the auth host to be "auth.xxx" not or "gauth.xxx"
|
100
|
+
#
|
101
|
+
@auth_host = "gauth.#{@domain}"
|
98
102
|
@base_api_url = "#{scheme}://#{@api_host}"
|
103
|
+
|
99
104
|
@base_auth_url = "#{scheme}://#{@auth_host}"
|
100
105
|
|
101
106
|
# if the $HTTP_URI is set then we are in app_token mode, and auth is done.
|
@@ -741,7 +746,17 @@ class ApceraApiHelper
|
|
741
746
|
|
742
747
|
puts "Scaling #{job_fqn} from #{job.num_instances} to #{number_of_instances} "
|
743
748
|
job.num_instances = number_of_instances
|
744
|
-
|
749
|
+
puts "Payload is #{job.to_json}"
|
750
|
+
begin
|
751
|
+
Timeout.timeout(10) do
|
752
|
+
self.update_job(job)
|
753
|
+
end
|
754
|
+
rescue Timeout::Error
|
755
|
+
puts '========== REQUEST TO API TIMED OUT =============='
|
756
|
+
end
|
757
|
+
STDOUT.flush
|
758
|
+
|
759
|
+
puts "DONE Scaling #{job_fqn} from #{job.num_instances} to #{number_of_instances}"
|
745
760
|
end
|
746
761
|
|
747
762
|
def update_job(job)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apcera
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|