civo 0.3.10 → 0.3.11
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/firewall.rb +15 -0
- data/app/models/civo/firewall_rule +0 -0
- data/app/models/civo/firewall_rule.rb +20 -0
- data/app/models/civo/snapshot.rb +23 -23
- data/lib/civo.rb +2 -0
- data/lib/civo/version.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d48fa3b2ddda003285dd28ae9a84cbc5b5868f9
|
4
|
+
data.tar.gz: e5bdea6214eda9588cadd2d8a0061ac3d6d6e499
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cad4e75151b1b2590d0baf8344ca2a80e37634e92c9332476da5a3fae700267f3a729fd0c6e26f3ddb6ce34d09684c2957018dc09888e101c41c2e4545144c02
|
7
|
+
data.tar.gz: 41142318d01252290d6fd28e87fd5cb76a82b939360f3cc23f9ca32bb9408206ed31e5ab2d7faf9ae9a0d9d20172d258b8a821588a3e11dcc9f54b84aae3b51a
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Civo
|
2
|
+
class Firewall < Base
|
3
|
+
get :all, "/v1/firewalls", fake: [{
|
4
|
+
"name" => "instance-12345",
|
5
|
+
"instance_count" => 10,
|
6
|
+
"rules_count" => 3
|
7
|
+
}]
|
8
|
+
put :create, "/v1/firewalls/:name", required: [:name], fake: {
|
9
|
+
"result" => "success"
|
10
|
+
}
|
11
|
+
delete :remove, "/v1/firewalls/:name", required: [:name], fake: {
|
12
|
+
"result" => "success"
|
13
|
+
}
|
14
|
+
end
|
15
|
+
end
|
File without changes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Civo
|
2
|
+
class FirewallRule < Base
|
3
|
+
get :all, "/v1/firewalls/:name/rules", required: [:name], fake: [{
|
4
|
+
"id" => "12345678-9012-3456-7890-123456789012",
|
5
|
+
"protocol" => "tcp",
|
6
|
+
"start_port" => "0",
|
7
|
+
"end_port" => "65535",
|
8
|
+
"cidr" => "0.0.0.0/0",
|
9
|
+
"direction" => "inbound",
|
10
|
+
"restriction" => "allow"
|
11
|
+
}]
|
12
|
+
put :create, "/v1/firewalls/:name/rules", required: [:name, :protocol, :start_port, :end_port,
|
13
|
+
:cidr, :direction, :restriction], fake: {
|
14
|
+
"result" => "success"
|
15
|
+
}
|
16
|
+
delete :remove, "/v1/firewalls/:name/rules/:id", required: [:name, :id], fake: {
|
17
|
+
"result" => "success"
|
18
|
+
}
|
19
|
+
end
|
20
|
+
end
|
data/app/models/civo/snapshot.rb
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
module Civo
|
2
2
|
class Snapshot < Base
|
3
3
|
get :all, "/v1/snapshots", fake: [{
|
4
|
-
"name"
|
5
|
-
"instance_id"
|
6
|
-
"safe"
|
7
|
-
"requested_at"
|
8
|
-
"completed_at"
|
9
|
-
"status"
|
4
|
+
"name" => "my-instance-snapshot",
|
5
|
+
"instance_id" => "44aab548-61ca-11e5-860e-5cf9389be614",
|
6
|
+
"safe" => true,
|
7
|
+
"requested_at" => "2015-09-20T19:31:36+00:00",
|
8
|
+
"completed_at" => nil,
|
9
|
+
"status" => "new"
|
10
10
|
}]
|
11
|
-
get :find, "/v1/snapshots/:name", fake: {
|
12
|
-
"name"
|
13
|
-
"instance_id"
|
14
|
-
"safe"
|
15
|
-
"requested_at"
|
16
|
-
"completed_at"
|
17
|
-
"status"
|
11
|
+
get :find, "/v1/snapshots/:name", required: [:name], fake: {
|
12
|
+
"name" => "my-instance-snapshot",
|
13
|
+
"instance_id" => "44aab548-61ca-11e5-860e-5cf9389be614",
|
14
|
+
"safe" => true,
|
15
|
+
"requested_at" => "2015-09-20T19:31:36+00:00",
|
16
|
+
"completed_at" => nil,
|
17
|
+
"status" => "new"
|
18
18
|
}
|
19
|
-
put :create, "/v1/snapshots/:name", required: [:instance_id], fake: {
|
20
|
-
"name"
|
21
|
-
"instance_id"
|
22
|
-
"safe"
|
23
|
-
"requested_at"
|
24
|
-
"completed_at"
|
25
|
-
"status"
|
19
|
+
put :create, "/v1/snapshots/:name", required: [:name, :instance_id], fake: {
|
20
|
+
"name" => "my-instance-snapshot",
|
21
|
+
"instance_id" => "44aab548-61ca-11e5-860e-5cf9389be614",
|
22
|
+
"safe" => true,
|
23
|
+
"requested_at" => "2015-09-20T19:31:36+00:00",
|
24
|
+
"completed_at" => nil,
|
25
|
+
"status" => "new"
|
26
26
|
}
|
27
|
-
delete :remove, "/v1/
|
28
|
-
"name"
|
29
|
-
"result"
|
27
|
+
delete :remove, "/v1/snapshots/:name", required: [:name], fake: {
|
28
|
+
"name" => "my-instance-snapshot",
|
29
|
+
"result" => "success"
|
30
30
|
}
|
31
31
|
end
|
32
32
|
end
|
data/lib/civo.rb
CHANGED
@@ -15,6 +15,8 @@ module Civo
|
|
15
15
|
autoload :Region, "#{ENGINE_ROOT}/app/models/civo/region"
|
16
16
|
autoload :Template, "#{ENGINE_ROOT}/app/models/civo/template"
|
17
17
|
autoload :Snapshot, "#{ENGINE_ROOT}/app/models/civo/snapshot"
|
18
|
+
autoload :Firewall, "#{ENGINE_ROOT}/app/models/civo/firewall"
|
19
|
+
autoload :FirewallRule, "#{ENGINE_ROOT}/app/models/civo/firewall_rule"
|
18
20
|
autoload :Instance, "#{ENGINE_ROOT}/app/models/civo/instance"
|
19
21
|
autoload :Ip, "#{ENGINE_ROOT}/app/models/civo/ip"
|
20
22
|
end
|
data/lib/civo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: civo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
@@ -63,6 +63,9 @@ files:
|
|
63
63
|
- Rakefile
|
64
64
|
- app/models/civo/account.rb
|
65
65
|
- app/models/civo/base.rb
|
66
|
+
- app/models/civo/firewall.rb
|
67
|
+
- app/models/civo/firewall_rule
|
68
|
+
- app/models/civo/firewall_rule.rb
|
66
69
|
- app/models/civo/instance.rb
|
67
70
|
- app/models/civo/ip.rb
|
68
71
|
- app/models/civo/quota.rb
|