easy_manager 0.9.5 → 0.9.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a57f024caf732d9e27c552eb5513227696b4c838ace5d4fb5a718828684fb799
|
4
|
+
data.tar.gz: 468082e846f7ebec73731e64feac02a2c49fc55f5dc7adefde6fb9afa288a558
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4f062339e5769f6243272170da6195311e54b9bdca9af04224e7f616c022d5d7f2a17d42cb29791a257471ed8729da264c777a8a1b206b26c40170073396603
|
7
|
+
data.tar.gz: 10fe12a3b38bd75e95ba1e48555ef777d980615836a885107113474b36be06b63dad813bc1f014d185c0c3d6cdcdff5ad6a53f5babca3aef5c6c8dcf0902387d
|
@@ -6,10 +6,10 @@ class EasyManager
|
|
6
6
|
class Config
|
7
7
|
def self.srv_infos(srv_type)
|
8
8
|
srv_infos = {
|
9
|
-
'DEV1-S' => { volume: 20_000_000_000, volume_type: '
|
10
|
-
'DEV1-M' => { volume: 40_000_000_000, volume_type: '
|
11
|
-
'DEV1-L' => { volume: 80_000_000_000, volume_type: '
|
12
|
-
'DEV1-XL' => { volume: 120_000_000_000, volume_type: '
|
9
|
+
'DEV1-S' => { volume: 20_000_000_000, volume_type: 'b_ssd' },
|
10
|
+
'DEV1-M' => { volume: 40_000_000_000, volume_type: 'b_ssd' },
|
11
|
+
'DEV1-L' => { volume: 80_000_000_000, volume_type: 'b_ssd' },
|
12
|
+
'DEV1-XL' => { volume: 120_000_000_000, volume_type: 'b_ssd' }
|
13
13
|
}
|
14
14
|
srv_infos[srv_type]
|
15
15
|
end
|
@@ -18,16 +18,11 @@ class EasyManager
|
|
18
18
|
Utilities.parse_json(response.body)
|
19
19
|
end
|
20
20
|
|
21
|
-
def self.delete(scw, ip_id
|
22
|
-
|
21
|
+
def self.delete(scw, ip_id)
|
22
|
+
Typhoeus.delete(
|
23
23
|
File.join(scw.api_url, "/instance/v1/zones/#{scw.zone}/ips/#{ip_id}"),
|
24
24
|
headers: scw.headers
|
25
25
|
)
|
26
|
-
return resp if resp&.code == 204
|
27
|
-
|
28
|
-
sleep(rand(10..60))
|
29
|
-
tries += 1
|
30
|
-
delete(scw, ip_id, tries) unless tries >= 3
|
31
26
|
end
|
32
27
|
end
|
33
28
|
end
|
@@ -87,18 +87,13 @@ class EasyManager
|
|
87
87
|
)
|
88
88
|
end
|
89
89
|
|
90
|
-
def self.action(scw, srv_id, action
|
90
|
+
def self.action(scw, srv_id, action)
|
91
91
|
data = { action: action }
|
92
|
-
|
92
|
+
Typhoeus.post(
|
93
93
|
File.join(scw.api_url, "/instance/v1/zones/#{scw.zone}/servers/#{srv_id}/action"),
|
94
94
|
headers: scw.headers,
|
95
95
|
body: data.to_json
|
96
96
|
)
|
97
|
-
return resp if resp&.code == 202
|
98
|
-
|
99
|
-
sleep(rand(10..60))
|
100
|
-
tries += 1
|
101
|
-
action(scw, srv_id, action, tries) unless tries >= 3
|
102
97
|
end
|
103
98
|
|
104
99
|
def self.srv_data(scw, srv_type, image, name_pattern, tags)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua MARTINELLE
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt_pbkdf
|
@@ -56,28 +56,28 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 4.0.0
|
59
|
+
version: 4.0.0
|
60
60
|
type: :runtime
|
61
61
|
prerelease: false
|
62
62
|
version_requirements: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
64
|
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: 4.0.0
|
66
|
+
version: 4.0.0
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: net-ssh
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: 7.0
|
73
|
+
version: 7.1.0
|
74
74
|
type: :runtime
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: 7.0
|
80
|
+
version: 7.1.0
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: typhoeus
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|