civo 0.3.13 → 0.3.14
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 +3 -11
- data/app/models/civo/firewall_rule.rb +3 -15
- data/app/models/civo/instance.rb +1 -0
- data/lib/civo/version.rb +1 -1
- metadata +2 -3
- data/app/models/civo/firewall_rule +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34735df97b431f2fd2841c799b5e95848f17aeba
|
4
|
+
data.tar.gz: 3adb22eab41a786533ef46ecc73ad6b4072db716
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f44d7ce9445e75ad5ad6bcf45484a892bf8e08de8a81ceb7280e54f312cc3ffa07c42418e7a1d8b39dad9c66114a655fe07ae799d90cf9f4f469fcd107eb63a
|
7
|
+
data.tar.gz: 8154252cc2473c8808b18a52c70eefc3e072680f5d2cd530991e095f4b0686fa663bb22cea7bc131a5fb74e87aeaebe1534bf05783670b769bb029d2db820682
|
data/app/models/civo/firewall.rb
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
module Civo
|
2
2
|
class Firewall < Base
|
3
|
-
get :all, "/v1/firewalls"
|
4
|
-
|
5
|
-
|
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
|
-
}
|
3
|
+
get :all, "/v1/firewalls"
|
4
|
+
put :create, "/v1/firewalls/:name", required: [:name]
|
5
|
+
delete :remove, "/v1/firewalls/:name", required: [:name]
|
14
6
|
end
|
15
7
|
end
|
@@ -1,20 +1,8 @@
|
|
1
1
|
module Civo
|
2
2
|
class FirewallRule < Base
|
3
|
-
get :all, "/v1/firewalls/:name/rules", required: [:name]
|
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
|
-
}]
|
3
|
+
get :all, "/v1/firewalls/:name/rules", required: [:name]
|
12
4
|
put :create, "/v1/firewalls/:name/rules", required: [:name, :protocol, :start_port,
|
13
|
-
:cidr, :direction
|
14
|
-
|
15
|
-
}
|
16
|
-
delete :remove, "/v1/firewalls/:name/rules/:id", required: [:name, :id], fake: {
|
17
|
-
"result" => "success"
|
18
|
-
}
|
5
|
+
:cidr, :direction]
|
6
|
+
delete :remove, "/v1/firewalls/:name/rules/:id", required: [:name, :id]
|
19
7
|
end
|
20
8
|
end
|
data/app/models/civo/instance.rb
CHANGED
@@ -12,6 +12,7 @@ module Civo
|
|
12
12
|
put :start, "/v1/instances/:id/start", requires: [:id]
|
13
13
|
put :upgrade, "/v1/instances/:id", requires: [:size, :id]
|
14
14
|
put :restore, "/v1/instances/:id/restore", requires: [:snapshot, :id]
|
15
|
+
put :firewall, "/v1/instances/:id/firewall", requires: [:name, :id]
|
15
16
|
|
16
17
|
def nice_ip_addresses
|
17
18
|
@ip_addresses ||= (self._attributes[:ip_addresses].items rescue []).map do |ip|
|
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: 0.3.
|
4
|
+
version: 0.3.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flexirest
|
@@ -64,7 +64,6 @@ files:
|
|
64
64
|
- app/models/civo/account.rb
|
65
65
|
- app/models/civo/base.rb
|
66
66
|
- app/models/civo/firewall.rb
|
67
|
-
- app/models/civo/firewall_rule
|
68
67
|
- app/models/civo/firewall_rule.rb
|
69
68
|
- app/models/civo/instance.rb
|
70
69
|
- app/models/civo/ip.rb
|
File without changes
|