idcf-ilb 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6d85d4223388f0a809843489c8ffeea35560105
4
- data.tar.gz: cda181912eba70f0942c51ff34ff9b94d6706946
3
+ metadata.gz: 426de25224e43ab9c30cac73329470ee89408683
4
+ data.tar.gz: 8305e3d6a082bebeee7be8eddb653d31196b4d19
5
5
  SHA512:
6
- metadata.gz: e4d2dfb9bbc52a8fef13380ffe21a33723cca1075b7f93ce17567b59c9da78b459090a7e98a4df875389796cf89456deac3b08135b81e3586bfd383eecaac994
7
- data.tar.gz: 084ddad1e7b25140d6805610b12aed379f1f2d7dde9cad1243bc2c1887272008dcdbc0d031df2c737ff89a328c027a1964ea041f5a1f789e7451f87b23e2ffb2
6
+ metadata.gz: e29e16fe57ee99966313aac21545496721eb31776a77a4af11e97455688029556ba61fc793687ae803d6d79f038944b8c214252c338a78823c966faa3a0c28b7
7
+ data.tar.gz: ea7be01a1d123972930d1203a0e82b2d2d99086421f1bd42b2ffd6aef990753cea6106cfacf15eac7a30a69fdc5788e00ab2e6271425ccb07e602ebc648b4fe9
@@ -7,3 +7,4 @@ env:
7
7
  global:
8
8
  - secure: "GYnbgGX4ELD31qLfeXmaVAcEZeLSXV4VmQPi7GHBSLckrEfUlc2jJrdwcYY0t4+kfL1HPHkCVb61u7/KizD3fbjo9B+RjIKDCzOnRt0qf4TMnieJDLLaWhGvEPQZpqSSX9skvqbY1eMipFn+PgN9CEFRqnnVANp8PxY3TxGh5zi0hTaxZIh918/FxH0gCiTQOGpkjInSadY8bI9tDlKAV8g+EDolAerWz7WDq3+d/GM/VhpQyprqQkd76cyQ2HkBEvngJYAm1RpsJfnSPuqE0rP6C82onV4kVoREI0l0YZGVV1octXrucHqxLRnqAr3yb0pua8vLYVlSEn0Xf44B2XBQURsOkCmMCbbwwT8jhNP/dcy9pASQY1wpcyUQ/HVDISKU807E5S2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DxTX49/7U8U4Q6rxsOwnBBZkXaE00hA7y0riiXjw8M5IK7l/oYq7sECJRPZzzlO3rTXRVvtWFl/KjfvxU/xZ6R5NZcSLqFMi9Se/Zew3NbwH7MwFkgW/6gZtFxpK1JP+aw/FJgRnOAGf96AXkkMBMB+nyhwjNZNHoHxi6jlT3kPFr+5jq/OXBAE+7T/d5oQ0sw8hCh4xGtCzyqF94QFLwXd1xmkNzji2ygwQXxVYxMXas4pkFfYp23dmcR1IxKy42s1dymjsJMeR62aV94I7XUMjE0CK4xADCU0potLtSs0iqsCFxn3J0L6vdSLnNEkBpqw+3QRlW4EaRAVnNfwxjVnX7F89e7iFS17LTkzZw4CZOldAS0pklvejMcsoZyzEzWFF+TgB9Ehc2pMMbOh51PECOf32You3918Q+oG4hYTH81xBaFo+zk/Jp73o4baG1ouD3C/Her1HiaOZDxCLVpx5f71R+tc+dCd55MmErMFEbxJN3O42DcN2mua/3n9tiwvU2or7IjIXU9VRLLiGgKs5vaioH5+xuD5sGlcHB5jUPWlXnCnTTBAVocFHbILj9jIm2A7ROK0awckDHgaV/x0rP5i+Q="
data/README.md CHANGED
@@ -4,9 +4,10 @@
4
4
  [![Code Climate](https://codeclimate.com/github/idcf/idcf-ilb-ruby/badges/gpa.svg)](https://codeclimate.com/github/idcf/idcf-ilb-ruby)
5
5
  [![Test Coverage](https://codeclimate.com/github/idcf/idcf-ilb-ruby/badges/coverage.svg)](https://codeclimate.com/github/idcf/idcf-ilb-ruby/coverage)
6
6
 
7
- A Ruby client for [IDCF Cloud ILB service](https://console.jp-east.idcfcloud.com/ilb/).
7
+ A Ruby client for IDCF Cloud ILB service.
8
8
 
9
9
  ## Installation
10
+ Note: requires Ruby 2.1.0 or higher.
10
11
 
11
12
  Add this line to your application's Gemfile:
12
13
 
@@ -26,7 +27,8 @@ Or install it yourself as:
26
27
  ### Basic usage
27
28
  #### Client
28
29
  You can create a instance of client by specifying API_KEY and SECRET_KEY.
29
- You can get API_KEY and SECRET_KEY in [IDCF Cloud](https://console.idcfcloud.com/user/apikey).
30
+ You can get API_KEY and SECRET_KEY in [IDCF Cloud](https://console.idcfcloud.com/user/apikey).
31
+ You can also specify HOST. If you do not specify HOST, your client send request to "ilb.jp-east.idcfcloud.com".
30
32
 
31
33
  ```ruby
32
34
  require "idcf/ilb"
@@ -34,7 +36,8 @@ require "idcf/ilb"
34
36
  client =
35
37
  Idcf::Ilb::Client.new(
36
38
  api_key: ENV["IDCF_API_KEY"],
37
- secret_key: ENV["IDCF_SECRET_KEY"]
39
+ secret_key: ENV["IDCF_SECRET_KEY"],
40
+ host: ENV["IDCF_ILB_HOST"]
38
41
  )
39
42
 
40
43
  # Call GET request directly
@@ -1,3 +1,4 @@
1
+ require "active_support"
1
2
  require "faraday"
2
3
  require "faraday_middleware"
3
4
 
@@ -19,7 +20,7 @@ module Idcf
19
20
  include ClientExtensions::Log
20
21
  include ClientExtensions::Traffic
21
22
 
22
- attr_reader :api_key, :secret_key, :host, :endpoint
23
+ attr_reader :api_key, :secret_key, :host, :endpoint, :ssl
23
24
 
24
25
  # The constructor of Ilb::Client uses keyword arguments.
25
26
  #
@@ -29,6 +30,7 @@ module Idcf
29
30
  secret_key:,
30
31
  host: "ilb.jp-east.idcfcloud.com",
31
32
  endpoint: "/api/v1",
33
+ ssl: true,
32
34
  verify_ssl: true
33
35
  )
34
36
 
@@ -36,6 +38,7 @@ module Idcf
36
38
  @secret_key = secret_key
37
39
  @host = host
38
40
  @endpoint = endpoint
41
+ @ssl = ssl
39
42
  @verify_ssl = verify_ssl
40
43
  end
41
44
 
@@ -168,12 +171,16 @@ module Idcf
168
171
  response
169
172
  end
170
173
 
174
+ def protocol
175
+ ssl ? "https" : "http"
176
+ end
177
+
171
178
  def ssl_options
172
179
  { verify: @verify_ssl }
173
180
  end
174
181
 
175
182
  def url_prefix
176
- "https://#{host}"
183
+ "#{protocol}://#{host}"
177
184
  end
178
185
  end
179
186
  end
@@ -46,6 +46,7 @@ module Idcf
46
46
  end
47
47
  end
48
48
 
49
+ return if "DELETE" == @res.body["method"]
49
50
  if flag == true
50
51
  if specify_res_id == true
51
52
  res_id = @res.body["resource_id"]
@@ -5,10 +5,13 @@ module Idcf
5
5
  class Job < Base
6
6
  self.valid_attributes = {
7
7
  id: { type: String },
8
+ account_id: { type: String },
9
+ job_status: { type: String },
10
+ result_code: { type: Integer, list: :optional },
8
11
  resource: { type: String, list: :optional },
9
12
  resource_id: { type: String },
10
13
  path: { type: String },
11
- method: { type: String, list: :required },
14
+ method: { type: String, list: :optional },
12
15
  created_at: { type: String },
13
16
  updated_at: { type: String }
14
17
  }
@@ -5,6 +5,7 @@ module Idcf
5
5
  class Sslpolicy < Base
6
6
  self.valid_attributes = {
7
7
  id: { type: String },
8
+ account_id: { type: String },
8
9
  name: { type: String, create: :required },
9
10
  algorithms: { type: Array, create: :required },
10
11
  state: { type: String },
@@ -6,7 +6,12 @@ module Idcf
6
6
  self.valid_attributes = {
7
7
  from: { type: String, list: :optional },
8
8
  to: { type: String, list: :optional },
9
- unit: { type: String, list: :optional }
9
+ unit: { type: String, list: :optional },
10
+ total_public_in: { type: Integer },
11
+ total_public_out: { type: Integer },
12
+ total_local_in: { type: Integer },
13
+ total_local_out: { type: Integer },
14
+ created_at: { type: String }
10
15
  }
11
16
  end
12
17
  end
@@ -1,5 +1,5 @@
1
1
  module Idcf
2
2
  module Ilb
3
- VERSION = "0.0.1".freeze
3
+ VERSION = "0.0.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idcf-ilb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akito Ueno
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-16 00:00:00.000000000 Z
11
+ date: 2016-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  version: '0'
226
226
  requirements: []
227
227
  rubyforge_project:
228
- rubygems_version: 2.4.5
228
+ rubygems_version: 2.4.5.1
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: A Ruby client for IDCF Cloud ILB Service.