civo 1.5.31 → 1.5.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/civo/instance.rb +1 -1
- data/app/models/civo/load_balancer.rb +4 -60
- data/lib/civo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 908daaca3941a3644861bb75bd44770c866fa880b9721b8e62ef6fdc3578d1e3
|
4
|
+
data.tar.gz: 18a887b7a756d714077e128dbfee1886539c793f6bd4eeeb30c5c790020cf45e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54dc9f77d27645af4cdca80554e04a0e29a7a75790c2c235cb9a2192168f7235e3ddca518c86669af0153cbab97642809128d48f79658cd2a70da635df82a223
|
7
|
+
data.tar.gz: 75b4ad008c6d23eefd6d7054f41b1c65d63f61e6c4efe62aae3eb8d7b4fb8922c2d68fb99cff64ffe9fbb309ec300895482dda0a30f3f0e285548918ddbba263
|
data/app/models/civo/instance.rb
CHANGED
@@ -20,7 +20,7 @@ module Civo
|
|
20
20
|
put :move_ip, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/ip/:ip", requires: [:ip, :id]
|
21
21
|
put :rescue, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/rescue", requires: [:id]
|
22
22
|
put :unrescue, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/unrescue", requires: [:id]
|
23
|
-
put :vnc, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/vnc", requires: [:id, :
|
23
|
+
put :vnc, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/vnc", requires: [:id, :region]
|
24
24
|
if ENV["CIVO_API_VERSION"] == "2"
|
25
25
|
put :firewall, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/firewall", requires: [:firewall_id, :id]
|
26
26
|
else
|
@@ -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: [:
|
6
|
-
put :update, "/v2/loadbalancers/:id",
|
7
|
-
delete :remove, "/v2/loadbalancers/:id", required: [:id]
|
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
|
data/lib/civo/version.rb
CHANGED
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.
|
4
|
+
version: 1.5.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flexirest
|