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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19ced1bccbd835ca854ee20d14a94b568bed1c8f
4
- data.tar.gz: e1c7660dd09fe8ef1cc8e9e55eacbf2c5cf75fba
3
+ metadata.gz: 0d48fa3b2ddda003285dd28ae9a84cbc5b5868f9
4
+ data.tar.gz: e5bdea6214eda9588cadd2d8a0061ac3d6d6e499
5
5
  SHA512:
6
- metadata.gz: 05911c35a133742b2bec60596d33be2e79f15a927f5a9a399ba25dee505b35dc4b29e6b58158b9d560610d92e8ee291a515d32c51ee83d14f9d11f595ca56e2d
7
- data.tar.gz: f063722bbc6b59859adf7418ff66b95f75d44486bba87e3beafbd2359aaa616af8d0ca246aa6831bea38658539f7b1744a2557a60a875e10c71994b215a8f05d
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
@@ -1,32 +1,32 @@
1
1
  module Civo
2
2
  class Snapshot < Base
3
3
  get :all, "/v1/snapshots", fake: [{
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"
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": "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"
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": "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"
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/templates/:name", fake: {
28
- "name": "my-instance-snapshot",
29
- "result": "ok"
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Civo
2
- VERSION = "0.3.10"
2
+ VERSION = "0.3.11"
3
3
  end
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.10
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