civo 1.5.30 → 1.5.32

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
  SHA256:
3
- metadata.gz: cc190edcb0cb62c21ce1226dc4160f23c51452bbf150b2d09cf4b70c01f99b3f
4
- data.tar.gz: 2c434a79a9443043d99704213af474532aadce7f1c13c8399e516ca8f5e2071c
3
+ metadata.gz: 8f0416720f70ec31ea6e66a04c074dd0f35c5391da2cbd62c53ddb4963107cf6
4
+ data.tar.gz: 53ec652019e3cbe744b9b911418e98445fae300c810ae84f84c5679a70d9154e
5
5
  SHA512:
6
- metadata.gz: 432d5fc731a3510275239010d933e4a1996cf67a2c13908600cc24612e6a77b8731e6ff0977bc026bc5dbc5ffab5fffc2f14c260f3b1714234fe4752308b0c3c
7
- data.tar.gz: 4dc25d55c70f81296a5bd993ce5611a721cac5b5f89e156a184f45d36f3c58550a356244605a1a69c991c0af946b5dea36e2107ad824f00e1f76cd920a63d3ed
6
+ metadata.gz: e402ca7db1e251a81f1c36962328137dd0ddf4be9a6c852fac1cd3f91617f337a8dc08620762307dc2b452ca4172528ba7e3f244031830db4d323081b024d835
7
+ data.tar.gz: 54b735bdf1e71c10d98928256308b79a45f9ed409c7ac9a7972ac7e94bd2cae0af9a9813e4a57dfdb005bcc6f10aee37790e7b6279d662430e5b940970b638ea
@@ -1,69 +1,13 @@
1
1
  module Civo
2
2
  class LoadBalancer < Base
3
3
  get :all, "/v2/loadbalancers"
4
- get :find, "/v2/loadbalancers/:id"
5
- post :create, "/v2/loadbalancers", required: [:hostname], fake: :get_loadbalancer
6
- put :update, "/v2/loadbalancers/:id", fake: :get_loadbalancer
7
- delete :remove, "/v2/loadbalancers/:id", required: [:id], fake: :delete_loadbalancer
4
+ get :find, "/v2/loadbalancers/:id", requires: [:id]
5
+ post :create, "/v2/loadbalancers", required: [:name], request_body_type: :json
6
+ put :update, "/v2/loadbalancers/:id", required: [:id, :name], request_body_type: :json
7
+ delete :remove, "/v2/loadbalancers/:id", required: [:id]
8
8
 
9
9
  def to_partial_path
10
10
  "civo/loadbalancer"
11
11
  end
12
-
13
- def loadbalancers
14
- [
15
- {
16
- id: 23,
17
- name: "Johnny",
18
- algorithm: "round_robin",
19
- state: "available",
20
- public_ipv4: "192.168.1.10",
21
- private_ipv4: "10.10.10.10",
22
- firewall_id: "86E2749F-8FA1-4D49-8833-299D02E585B8",
23
- cluster_id: "96E2749F-8FA1-4D49-8833-299D02E585B8"
24
- },
25
- {
26
- id: 223,
27
- name: "Dep",
28
- algorithm: "weighted_fixed",
29
- state: "available",
30
- public_ipv4: "192.168.1.30",
31
- private_ipv4: "10.10.10.12",
32
- firewall_id: "36E2749F-8FA1-4D49-8833-299D02E585B8",
33
- cluster_id: "46E2749F-8FA1-4D49-8833-299D02E585B8"
34
- }
35
- ].to_json
36
- end
37
-
38
- def get_loadbalancer
39
- {
40
- id: 23,
41
- name: "Johnny",
42
- algorithm: "round_robin",
43
- state: "available",
44
- public_ipv4: "192.168.1.10",
45
- private_ipv4: "10.10.10.10",
46
- firewall_id: "86E2749F-8FA1-4D49-8833-299D02E585B8",
47
- cluster_id: "96E2749F-8FA1-4D49-8833-299D02E585B8",
48
- endpoints: [
49
- {
50
- ip: "192.168.1.4",
51
- protocol: "TCP",
52
- source_port: 80,
53
- target_port: 31579
54
- },
55
- {
56
- ip: "192.168.1.5",
57
- protocol: "TCP",
58
- source_port: 80,
59
- target_port: 31579
60
- }
61
- ]
62
- }.to_json
63
- end
64
-
65
- def delete_loadbalancer
66
- { result: "Success" }.to_json
67
- end
68
12
  end
69
13
  end
@@ -0,0 +1,9 @@
1
+ module Civo
2
+ class VolumeType < Base
3
+ get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/volumetypes"
4
+
5
+ def to_partial_path
6
+ "civo/volumetype"
7
+ end
8
+ end
9
+ end
data/lib/civo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Civo
2
- VERSION = "1.5.30"
2
+ VERSION = "1.5.32"
3
3
  end
data/lib/civo.rb CHANGED
@@ -45,3 +45,4 @@ require_relative "../app/models/civo/team_member"
45
45
  require_relative "../app/models/civo/template"
46
46
  require_relative "../app/models/civo/user"
47
47
  require_relative "../app/models/civo/volume"
48
+ require_relative "../app/models/civo/volume_type"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: civo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.30
4
+ version: 1.5.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-08 00:00:00.000000000 Z
11
+ date: 2024-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flexirest
@@ -113,6 +113,7 @@ files:
113
113
  - app/models/civo/template.rb
114
114
  - app/models/civo/user.rb
115
115
  - app/models/civo/volume.rb
116
+ - app/models/civo/volume_type.rb
116
117
  - app/models/civo/webhook.rb
117
118
  - config/routes.rb
118
119
  - lib/civo.rb