fog-oraclecloud 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +12 -10
- data/Gemfile +4 -4
- data/LICENSE +20 -20
- data/README.md +153 -153
- data/Rakefile +2 -2
- data/bin/console +14 -14
- data/bin/setup +8 -8
- data/fog-oracle.gemspec +32 -31
- data/lib/fog/oraclecloud.rb +29 -29
- data/lib/fog/oraclecloud/compute.rb +184 -184
- data/lib/fog/oraclecloud/database.rb +129 -129
- data/lib/fog/oraclecloud/java.rb +123 -115
- data/lib/fog/oraclecloud/models/compute/image.rb +43 -43
- data/lib/fog/oraclecloud/models/compute/image_list.rb +39 -39
- data/lib/fog/oraclecloud/models/compute/image_lists.rb +22 -22
- data/lib/fog/oraclecloud/models/compute/images.rb +22 -22
- data/lib/fog/oraclecloud/models/compute/instance.rb +74 -69
- data/lib/fog/oraclecloud/models/compute/instances.rb +22 -22
- data/lib/fog/oraclecloud/models/compute/object_plan.rb +16 -16
- data/lib/fog/oraclecloud/models/compute/object_plans.rb +12 -12
- data/lib/fog/oraclecloud/models/compute/orchestration.rb +89 -89
- data/lib/fog/oraclecloud/models/compute/orchestrations.rb +20 -20
- data/lib/fog/oraclecloud/models/compute/security_application.rb +42 -42
- data/lib/fog/oraclecloud/models/compute/security_applications.rb +22 -22
- data/lib/fog/oraclecloud/models/compute/security_list.rb +26 -26
- data/lib/fog/oraclecloud/models/compute/security_lists.rb +22 -22
- data/lib/fog/oraclecloud/models/compute/security_rule.rb +41 -41
- data/lib/fog/oraclecloud/models/compute/security_rules.rb +22 -22
- data/lib/fog/oraclecloud/models/compute/ssh_key.rb +37 -37
- data/lib/fog/oraclecloud/models/compute/ssh_keys.rb +22 -22
- data/lib/fog/oraclecloud/models/compute/volume.rb +47 -47
- data/lib/fog/oraclecloud/models/compute/volumes.rb +20 -20
- data/lib/fog/oraclecloud/models/database/backup.rb +37 -37
- data/lib/fog/oraclecloud/models/database/backups.rb +30 -30
- data/lib/fog/oraclecloud/models/database/instance.rb +331 -331
- data/lib/fog/oraclecloud/models/database/instances.rb +25 -25
- data/lib/fog/oraclecloud/models/database/patch.rb +34 -34
- data/lib/fog/oraclecloud/models/database/patches.rb +18 -18
- data/lib/fog/oraclecloud/models/database/recoveries.rb +26 -26
- data/lib/fog/oraclecloud/models/database/recovery.rb +43 -43
- data/lib/fog/oraclecloud/models/database/server.rb +28 -28
- data/lib/fog/oraclecloud/models/database/servers.rb +18 -18
- data/lib/fog/oraclecloud/models/database/snapshot.rb +60 -60
- data/lib/fog/oraclecloud/models/database/snapshots.rb +22 -22
- data/lib/fog/oraclecloud/models/java/database.rb +17 -17
- data/lib/fog/oraclecloud/models/java/databases.rb +17 -17
- data/lib/fog/oraclecloud/models/java/instance.rb +269 -265
- data/lib/fog/oraclecloud/models/java/instances.rb +23 -23
- data/lib/fog/oraclecloud/models/java/server.rb +62 -62
- data/lib/fog/oraclecloud/models/java/servers.rb +25 -25
- data/lib/fog/oraclecloud/models/soa/instance.rb +163 -163
- data/lib/fog/oraclecloud/models/soa/instances.rb +54 -54
- data/lib/fog/oraclecloud/models/storage/container.rb +33 -33
- data/lib/fog/oraclecloud/models/storage/containers.rb +24 -24
- data/lib/fog/oraclecloud/models/storage/object.rb +27 -27
- data/lib/fog/oraclecloud/models/storage/objects.rb +27 -27
- data/lib/fog/oraclecloud/requests/compute/create_image.rb +30 -30
- data/lib/fog/oraclecloud/requests/compute/create_image_list.rb +27 -27
- data/lib/fog/oraclecloud/requests/compute/create_instance.rb +53 -53
- data/lib/fog/oraclecloud/requests/compute/create_orchestration.rb +82 -82
- data/lib/fog/oraclecloud/requests/compute/create_security_application.rb +28 -28
- data/lib/fog/oraclecloud/requests/compute/create_security_rule.rb +29 -29
- data/lib/fog/oraclecloud/requests/compute/create_ssh_key.rb +46 -46
- data/lib/fog/oraclecloud/requests/compute/create_volume.rb +28 -28
- data/lib/fog/oraclecloud/requests/compute/delete_image.rb +19 -19
- data/lib/fog/oraclecloud/requests/compute/delete_image_list.rb +19 -19
- data/lib/fog/oraclecloud/requests/compute/delete_instance.rb +33 -33
- data/lib/fog/oraclecloud/requests/compute/delete_orchestration.rb +36 -36
- data/lib/fog/oraclecloud/requests/compute/delete_security_application.rb +20 -20
- data/lib/fog/oraclecloud/requests/compute/delete_security_rule.rb +20 -20
- data/lib/fog/oraclecloud/requests/compute/delete_ssh_key.rb +32 -32
- data/lib/fog/oraclecloud/requests/compute/get_image.rb +21 -21
- data/lib/fog/oraclecloud/requests/compute/get_image_list.rb +21 -21
- data/lib/fog/oraclecloud/requests/compute/get_instance.rb +45 -45
- data/lib/fog/oraclecloud/requests/compute/get_orchestration.rb +39 -39
- data/lib/fog/oraclecloud/requests/compute/get_security_application.rb +20 -20
- data/lib/fog/oraclecloud/requests/compute/get_security_rule.rb +20 -20
- data/lib/fog/oraclecloud/requests/compute/get_ssh_key.rb +39 -39
- data/lib/fog/oraclecloud/requests/compute/list_image_lists.rb +29 -29
- data/lib/fog/oraclecloud/requests/compute/list_images.rb +16 -16
- data/lib/fog/oraclecloud/requests/compute/list_instances.rb +28 -28
- data/lib/fog/oraclecloud/requests/compute/list_orchestrations.rb +28 -28
- data/lib/fog/oraclecloud/requests/compute/list_security_applications.rb +21 -21
- data/lib/fog/oraclecloud/requests/compute/list_security_lists.rb +16 -16
- data/lib/fog/oraclecloud/requests/compute/list_security_rules.rb +21 -21
- data/lib/fog/oraclecloud/requests/compute/list_ssh_keys.rb +29 -29
- data/lib/fog/oraclecloud/requests/compute/list_volumes.rb +16 -16
- data/lib/fog/oraclecloud/requests/compute/start_orchestration.rb +39 -39
- data/lib/fog/oraclecloud/requests/compute/stop_orchestration.rb +39 -39
- data/lib/fog/oraclecloud/requests/compute/update_image.rb +27 -27
- data/lib/fog/oraclecloud/requests/compute/update_image_list.rb +27 -27
- data/lib/fog/oraclecloud/requests/compute/update_orchestration.rb +80 -80
- data/lib/fog/oraclecloud/requests/compute/update_ssh_key.rb +49 -49
- data/lib/fog/oraclecloud/requests/database/backup_instance.rb +45 -45
- data/lib/fog/oraclecloud/requests/database/create_instance.rb +101 -101
- data/lib/fog/oraclecloud/requests/database/create_snapshot.rb +50 -50
- data/lib/fog/oraclecloud/requests/database/delete_instance.rb +26 -26
- data/lib/fog/oraclecloud/requests/database/delete_snapshot.rb +26 -26
- data/lib/fog/oraclecloud/requests/database/get_instance.rb +62 -62
- data/lib/fog/oraclecloud/requests/database/get_instance_from_job.rb +31 -31
- data/lib/fog/oraclecloud/requests/database/get_snapshot.rb +43 -43
- data/lib/fog/oraclecloud/requests/database/list_backups.rb +39 -39
- data/lib/fog/oraclecloud/requests/database/list_instances.rb +29 -29
- data/lib/fog/oraclecloud/requests/database/list_patches.rb +51 -51
- data/lib/fog/oraclecloud/requests/database/list_recoveries.rb +40 -40
- data/lib/fog/oraclecloud/requests/database/list_servers.rb +27 -27
- data/lib/fog/oraclecloud/requests/database/list_snapshots.rb +27 -27
- data/lib/fog/oraclecloud/requests/database/recover_instance.rb +83 -83
- data/lib/fog/oraclecloud/requests/database/scale_instance.rb +40 -40
- data/lib/fog/oraclecloud/requests/java/create_instance.rb +156 -87
- data/lib/fog/oraclecloud/requests/java/delete_instance.rb +37 -37
- data/lib/fog/oraclecloud/requests/java/get_instance.rb +43 -43
- data/lib/fog/oraclecloud/requests/java/get_server.rb +42 -42
- data/lib/fog/oraclecloud/requests/java/list_instances.rb +29 -29
- data/lib/fog/oraclecloud/requests/java/list_servers.rb +30 -30
- data/lib/fog/oraclecloud/requests/java/scale_a_node.rb +45 -45
- data/lib/fog/oraclecloud/requests/java/scale_in_a_cluster.rb +35 -35
- data/lib/fog/oraclecloud/requests/java/scale_out_a_cluster.rb +38 -38
- data/lib/fog/oraclecloud/requests/soa/create_instance.rb +71 -71
- data/lib/fog/oraclecloud/requests/soa/delete_instance.rb +35 -35
- data/lib/fog/oraclecloud/requests/soa/get_instance.rb +42 -42
- data/lib/fog/oraclecloud/requests/soa/get_job_status.rb +22 -22
- data/lib/fog/oraclecloud/requests/soa/list_instances.rb +29 -29
- data/lib/fog/oraclecloud/requests/storage/create_container.rb +41 -41
- data/lib/fog/oraclecloud/requests/storage/delete_container.rb +15 -15
- data/lib/fog/oraclecloud/requests/storage/get_container.rb +63 -63
- data/lib/fog/oraclecloud/requests/storage/list_containers.rb +27 -27
- data/lib/fog/oraclecloud/soa.rb +106 -106
- data/lib/fog/oraclecloud/storage.rb +98 -98
- data/lib/fog/oraclecloud/version.rb +5 -5
- data/tests/helper.rb +5 -3
- data/tests/helpers/mock_helper.rb +14 -14
- data/tests/requests/compute_tests.rb +9 -9
- data/tests/requests/database_tests.rb +241 -241
- data/tests/requests/instance_tests.rb +68 -61
- data/tests/requests/java_tests.rb +149 -109
- data/tests/requests/orchestrations_tests.rb +90 -90
- data/tests/requests/soa_tests.rb +151 -151
- data/tests/requests/ssh_keys_tests.rb +53 -53
- data/tests/requests/storage_tests.rb +54 -54
- metadata +17 -3
@@ -1,41 +1,41 @@
|
|
1
|
-
require 'fog/core/model'
|
2
|
-
|
3
|
-
module Fog
|
4
|
-
module Compute
|
5
|
-
class OracleCloud
|
6
|
-
class SecurityRule < Fog::Model
|
7
|
-
identity :name
|
8
|
-
|
9
|
-
attribute :dst_list
|
10
|
-
attribute :name
|
11
|
-
attribute :src_list
|
12
|
-
attribute :uri
|
13
|
-
attribute :disabled
|
14
|
-
attribute :application
|
15
|
-
attribute :proxyuri
|
16
|
-
attribute :action
|
17
|
-
|
18
|
-
# Only used in create
|
19
|
-
attribute :description
|
20
|
-
|
21
|
-
def save
|
22
|
-
#identity ? update : create
|
23
|
-
create
|
24
|
-
end
|
25
|
-
|
26
|
-
def create
|
27
|
-
requires :name, :src_list, :dst_list, :application, :action
|
28
|
-
|
29
|
-
data = service.create_security_rule(name, src_list, dst_list, application, action,
|
30
|
-
:description => description,
|
31
|
-
:disabled => disabled)
|
32
|
-
end
|
33
|
-
|
34
|
-
def destroy
|
35
|
-
requires :name
|
36
|
-
service.delete_security_rule(name)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class OracleCloud
|
6
|
+
class SecurityRule < Fog::Model
|
7
|
+
identity :name
|
8
|
+
|
9
|
+
attribute :dst_list
|
10
|
+
attribute :name
|
11
|
+
attribute :src_list
|
12
|
+
attribute :uri
|
13
|
+
attribute :disabled
|
14
|
+
attribute :application
|
15
|
+
attribute :proxyuri
|
16
|
+
attribute :action
|
17
|
+
|
18
|
+
# Only used in create
|
19
|
+
attribute :description
|
20
|
+
|
21
|
+
def save
|
22
|
+
#identity ? update : create
|
23
|
+
create
|
24
|
+
end
|
25
|
+
|
26
|
+
def create
|
27
|
+
requires :name, :src_list, :dst_list, :application, :action
|
28
|
+
|
29
|
+
data = service.create_security_rule(name, src_list, dst_list, application, action,
|
30
|
+
:description => description,
|
31
|
+
:disabled => disabled)
|
32
|
+
end
|
33
|
+
|
34
|
+
def destroy
|
35
|
+
requires :name
|
36
|
+
service.delete_security_rule(name)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -1,22 +1,22 @@
|
|
1
|
-
require 'fog/core/collection'
|
2
|
-
|
3
|
-
module Fog
|
4
|
-
module Compute
|
5
|
-
class OracleCloud
|
6
|
-
class SecurityRules < Fog::Collection
|
7
|
-
|
8
|
-
model Fog::Compute::OracleCloud::SecurityRule
|
9
|
-
|
10
|
-
def all
|
11
|
-
data = service.list_security_rules().body['result']
|
12
|
-
load(data)
|
13
|
-
end
|
14
|
-
|
15
|
-
def get(name)
|
16
|
-
data = service.get_security_rule(name).body
|
17
|
-
new(data)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
1
|
+
require 'fog/core/collection'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class OracleCloud
|
6
|
+
class SecurityRules < Fog::Collection
|
7
|
+
|
8
|
+
model Fog::Compute::OracleCloud::SecurityRule
|
9
|
+
|
10
|
+
def all
|
11
|
+
data = service.list_security_rules().body['result']
|
12
|
+
load(data)
|
13
|
+
end
|
14
|
+
|
15
|
+
def get(name)
|
16
|
+
data = service.get_security_rule(name).body
|
17
|
+
new(data)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -1,37 +1,37 @@
|
|
1
|
-
require 'fog/core/model'
|
2
|
-
|
3
|
-
module Fog
|
4
|
-
module Compute
|
5
|
-
class OracleCloud
|
6
|
-
class SshKey < Fog::Model
|
7
|
-
identity :uri
|
8
|
-
|
9
|
-
attribute :enabled
|
10
|
-
attribute :key
|
11
|
-
attribute :name
|
12
|
-
|
13
|
-
def save
|
14
|
-
identity ? update : create
|
15
|
-
end
|
16
|
-
|
17
|
-
def create
|
18
|
-
requires :enabled, :name, :key
|
19
|
-
|
20
|
-
data = service.create_ssh_key(name, enabled, key)
|
21
|
-
merge_attributes(data.body)
|
22
|
-
end
|
23
|
-
|
24
|
-
def update
|
25
|
-
requires :enabled, :name, :key, :uri
|
26
|
-
data = service.update_ssh_key(name, enabled, key)
|
27
|
-
merge_attributes(data.body)
|
28
|
-
end
|
29
|
-
|
30
|
-
def destroy
|
31
|
-
requires :name
|
32
|
-
service.delete_ssh_key(name)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class OracleCloud
|
6
|
+
class SshKey < Fog::Model
|
7
|
+
identity :uri
|
8
|
+
|
9
|
+
attribute :enabled
|
10
|
+
attribute :key
|
11
|
+
attribute :name
|
12
|
+
|
13
|
+
def save
|
14
|
+
identity ? update : create
|
15
|
+
end
|
16
|
+
|
17
|
+
def create
|
18
|
+
requires :enabled, :name, :key
|
19
|
+
|
20
|
+
data = service.create_ssh_key(name, enabled, key)
|
21
|
+
merge_attributes(data.body)
|
22
|
+
end
|
23
|
+
|
24
|
+
def update
|
25
|
+
requires :enabled, :name, :key, :uri
|
26
|
+
data = service.update_ssh_key(uri, name, enabled, key)
|
27
|
+
merge_attributes(data.body)
|
28
|
+
end
|
29
|
+
|
30
|
+
def destroy
|
31
|
+
requires :name
|
32
|
+
service.delete_ssh_key(name)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -1,22 +1,22 @@
|
|
1
|
-
require 'fog/core/collection'
|
2
|
-
|
3
|
-
module Fog
|
4
|
-
module Compute
|
5
|
-
class OracleCloud
|
6
|
-
class SshKeys < Fog::Collection
|
7
|
-
|
8
|
-
model Fog::Compute::OracleCloud::SshKey
|
9
|
-
|
10
|
-
def get(name)
|
11
|
-
data = service.get_ssh_key(name).body
|
12
|
-
new(data)
|
13
|
-
end
|
14
|
-
|
15
|
-
def all
|
16
|
-
data = service.list_ssh_keys().body['result']
|
17
|
-
load(data)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
1
|
+
require 'fog/core/collection'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class OracleCloud
|
6
|
+
class SshKeys < Fog::Collection
|
7
|
+
|
8
|
+
model Fog::Compute::OracleCloud::SshKey
|
9
|
+
|
10
|
+
def get(name)
|
11
|
+
data = service.get_ssh_key(name).body
|
12
|
+
new(data)
|
13
|
+
end
|
14
|
+
|
15
|
+
def all
|
16
|
+
data = service.list_ssh_keys().body['result']
|
17
|
+
load(data)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -1,47 +1,47 @@
|
|
1
|
-
require 'fog/core/model'
|
2
|
-
|
3
|
-
module Fog
|
4
|
-
module Compute
|
5
|
-
class OracleCloud
|
6
|
-
class Volume < Fog::Model
|
7
|
-
identity :name
|
8
|
-
|
9
|
-
attribute :status
|
10
|
-
attribute :account
|
11
|
-
attribute :writecache
|
12
|
-
attribute :managed
|
13
|
-
attribute :description
|
14
|
-
attribute :tags
|
15
|
-
attribute :bootable
|
16
|
-
attribute :hypervisor
|
17
|
-
attribute :quota
|
18
|
-
attribute :uri
|
19
|
-
attribute :snapshot
|
20
|
-
attribute :status_detail
|
21
|
-
attribute :imagelist_entry
|
22
|
-
attribute :storage_pool
|
23
|
-
attribute :machineimage_name
|
24
|
-
attribute :status_timestamp
|
25
|
-
attribute :shared
|
26
|
-
attribute :imagelist
|
27
|
-
attribute :size
|
28
|
-
|
29
|
-
def save
|
30
|
-
#identity ? update : create
|
31
|
-
create
|
32
|
-
end
|
33
|
-
|
34
|
-
def create
|
35
|
-
requires :name, :size
|
36
|
-
|
37
|
-
data = service.create_volume(name, size)
|
38
|
-
end
|
39
|
-
|
40
|
-
def destroy
|
41
|
-
requires :name
|
42
|
-
service.delete_volume(name)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class OracleCloud
|
6
|
+
class Volume < Fog::Model
|
7
|
+
identity :name
|
8
|
+
|
9
|
+
attribute :status
|
10
|
+
attribute :account
|
11
|
+
attribute :writecache
|
12
|
+
attribute :managed
|
13
|
+
attribute :description
|
14
|
+
attribute :tags
|
15
|
+
attribute :bootable
|
16
|
+
attribute :hypervisor
|
17
|
+
attribute :quota
|
18
|
+
attribute :uri
|
19
|
+
attribute :snapshot
|
20
|
+
attribute :status_detail
|
21
|
+
attribute :imagelist_entry
|
22
|
+
attribute :storage_pool
|
23
|
+
attribute :machineimage_name
|
24
|
+
attribute :status_timestamp
|
25
|
+
attribute :shared
|
26
|
+
attribute :imagelist
|
27
|
+
attribute :size
|
28
|
+
|
29
|
+
def save
|
30
|
+
#identity ? update : create
|
31
|
+
create
|
32
|
+
end
|
33
|
+
|
34
|
+
def create
|
35
|
+
requires :name, :size
|
36
|
+
|
37
|
+
data = service.create_volume(name, size)
|
38
|
+
end
|
39
|
+
|
40
|
+
def destroy
|
41
|
+
requires :name
|
42
|
+
service.delete_volume(name)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -1,20 +1,20 @@
|
|
1
|
-
module Fog
|
2
|
-
module Compute
|
3
|
-
class OracleCloud
|
4
|
-
class Volumes < Fog::Collection
|
5
|
-
|
6
|
-
model Fog::Compute::OracleCloud::Volume
|
7
|
-
|
8
|
-
def all
|
9
|
-
data = service.list_volumes().body['result']
|
10
|
-
load(data)
|
11
|
-
end
|
12
|
-
|
13
|
-
def get(name)
|
14
|
-
data = service.get_volume(name).body
|
15
|
-
new(data)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class OracleCloud
|
4
|
+
class Volumes < Fog::Collection
|
5
|
+
|
6
|
+
model Fog::Compute::OracleCloud::Volume
|
7
|
+
|
8
|
+
def all
|
9
|
+
data = service.list_volumes().body['result']
|
10
|
+
load(data)
|
11
|
+
end
|
12
|
+
|
13
|
+
def get(name)
|
14
|
+
data = service.get_volume(name).body
|
15
|
+
new(data)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,37 +1,37 @@
|
|
1
|
-
require 'fog/core/model'
|
2
|
-
|
3
|
-
module Fog
|
4
|
-
module OracleCloud
|
5
|
-
class Database
|
6
|
-
class Backup < Fog::Model
|
7
|
-
identity :db_tag, :aliases=>'dbTag'
|
8
|
-
|
9
|
-
attribute :backup_complete_date, :aliases=>'backupCompleteDate'
|
10
|
-
attribute :status
|
11
|
-
attribute :database_id
|
12
|
-
|
13
|
-
def completed?
|
14
|
-
status == "COMPLETED"
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
# Had to override reload as we need to pass the database_id
|
20
|
-
def reload
|
21
|
-
requires :identity, :database_id
|
22
|
-
|
23
|
-
data = begin
|
24
|
-
collection.get(database_id, identity)
|
25
|
-
rescue Excon::Errors::SocketError
|
26
|
-
nil
|
27
|
-
end
|
28
|
-
return unless data
|
29
|
-
|
30
|
-
new_attributes = data.attributes
|
31
|
-
merge_attributes(new_attributes)
|
32
|
-
self
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module OracleCloud
|
5
|
+
class Database
|
6
|
+
class Backup < Fog::Model
|
7
|
+
identity :db_tag, :aliases=>'dbTag'
|
8
|
+
|
9
|
+
attribute :backup_complete_date, :aliases=>'backupCompleteDate'
|
10
|
+
attribute :status
|
11
|
+
attribute :database_id
|
12
|
+
|
13
|
+
def completed?
|
14
|
+
status == "COMPLETED"
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
# Had to override reload as we need to pass the database_id
|
20
|
+
def reload
|
21
|
+
requires :identity, :database_id
|
22
|
+
|
23
|
+
data = begin
|
24
|
+
collection.get(database_id, identity)
|
25
|
+
rescue Excon::Errors::SocketError
|
26
|
+
nil
|
27
|
+
end
|
28
|
+
return unless data
|
29
|
+
|
30
|
+
new_attributes = data.attributes
|
31
|
+
merge_attributes(new_attributes)
|
32
|
+
self
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|