fog-oraclecloud 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b5dc7f1557e8c37f5f2f8a1970b80eb36785a77
|
4
|
+
data.tar.gz: 28c71f5e220187f8ab8bad9a5cbf7779c6c30736
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 083b3e775808dbe63a9fe1ccb690aa46e7c71443a5c66a19294bea8250b4d97daddd0925e7da3aa5ffd36a8a21528488e94094e30db63a4003668260658289ff
|
7
|
+
data.tar.gz: c62eaf8a025bc0864e8df9f830e51f2401a01091ebabbc4ebdd14629d6a702edee6782d945e7514499ee0a12efa61d420547f4a06ac0bb7e35e90ffb9994b01b
|
data/.gitignore
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/Gemfile.lock
|
4
|
-
/_yardoc/
|
5
|
-
/coverage/
|
6
|
-
/doc/
|
7
|
-
/pkg/
|
8
|
-
/spec/reports/
|
9
|
-
/tmp/
|
10
|
-
*.gem
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/Gemfile.lock
|
4
|
+
/_yardoc/
|
5
|
+
/coverage/
|
6
|
+
/doc/
|
7
|
+
/pkg/
|
8
|
+
/spec/reports/
|
9
|
+
/tmp/
|
10
|
+
*.gem
|
11
|
+
|
12
|
+
.byebug_history
|
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in fog-oracle.gemspec
|
4
|
-
gemspec
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in fog-oracle.gemspec
|
4
|
+
gemspec
|
data/LICENSE
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2016 Oracle Corporation
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Oracle Corporation
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
21
|
SOFTWARE.
|
data/README.md
CHANGED
@@ -1,153 +1,153 @@
|
|
1
|
-
# Fog::OracleCloud
|
2
|
-
|
3
|
-
Module for the 'fog' gem to support the Oracle Cloud (IaaS and PaaS)
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
```ruby
|
10
|
-
gem 'fog-oraclecloud'
|
11
|
-
```
|
12
|
-
|
13
|
-
And then execute:
|
14
|
-
|
15
|
-
$ bundle
|
16
|
-
|
17
|
-
Or install it yourself as:
|
18
|
-
|
19
|
-
$ gem install fog-oraclecloud
|
20
|
-
|
21
|
-
## Usage
|
22
|
-
|
23
|
-
Before you can use fog-aws, you must require it in your application:
|
24
|
-
|
25
|
-
```ruby
|
26
|
-
require 'fog/oraclecloud'
|
27
|
-
```
|
28
|
-
|
29
|
-
Since it's a bad practice to have your credentials in source code, you should load them from default fog configuration file: ```~/.fog```. This file could look like this:
|
30
|
-
|
31
|
-
```
|
32
|
-
default:
|
33
|
-
oracle_username: <USERNAME>
|
34
|
-
oracle_password: <PASSWORD>
|
35
|
-
oracle_domain: <IDENTITY DOMAIN>
|
36
|
-
oracle_region: <emea or remove if using US data centre>
|
37
|
-
oracle_compute_api: <COMPUTE API>
|
38
|
-
oracle_storage_api: <STORAGE_API>
|
39
|
-
```
|
40
|
-
|
41
|
-
### Example: Java Cloud Service
|
42
|
-
Get all Java Instances
|
43
|
-
```ruby
|
44
|
-
instances = Fog::OracleCloud[:java].instances
|
45
|
-
```
|
46
|
-
Create a Java Instance
|
47
|
-
```ruby
|
48
|
-
instance = Fog::OracleCloud[:java].instances.create(
|
49
|
-
:service_name => 'TestWLS',
|
50
|
-
:description => 'A new weblogic instance',
|
51
|
-
:dba_name => 'SYS',
|
52
|
-
:dba_password => 'password',
|
53
|
-
:db_service_name => 'TestDB',
|
54
|
-
:admin_password => 'Welcome1$',
|
55
|
-
:admin_username => 'weblogic',
|
56
|
-
:shape => 'oc3',
|
57
|
-
:version => '12.2.1',
|
58
|
-
:ssh_key => 'ssh-rsa AAAAB3NzaC1yc2...',
|
59
|
-
)
|
60
|
-
```
|
61
|
-
Delete an instance
|
62
|
-
```ruby
|
63
|
-
instance = Fog::OracleCloud[:java].instances.get('TestWLS')
|
64
|
-
# Have to add the database details in so that the tables in the database can be removed
|
65
|
-
instance.dba_name = 'Admin'
|
66
|
-
instance.dba_password = 'password'
|
67
|
-
instance.destroy()
|
68
|
-
```
|
69
|
-
|
70
|
-
## Supported Services
|
71
|
-
The following services are supported:
|
72
|
-
* Java Cloud Service
|
73
|
-
* create_instance
|
74
|
-
* delete_instance
|
75
|
-
* get_instance
|
76
|
-
* get_server
|
77
|
-
* list_instances
|
78
|
-
* list_servers
|
79
|
-
* SOA Cloud Service
|
80
|
-
* create_instance
|
81
|
-
* delete_instance
|
82
|
-
* get_instance
|
83
|
-
* list_instances
|
84
|
-
* Database Cloud Service
|
85
|
-
* backup_instance
|
86
|
-
* create_instance
|
87
|
-
* create_snapshot
|
88
|
-
* delete_instance
|
89
|
-
* delete_snapshot
|
90
|
-
* get_instance
|
91
|
-
* get_snapshot
|
92
|
-
* list_backups
|
93
|
-
* list_instances
|
94
|
-
* list_patches
|
95
|
-
* list_recoveries
|
96
|
-
* list_servers
|
97
|
-
* list_snapshots
|
98
|
-
* recover_instance
|
99
|
-
* scale_instance
|
100
|
-
* Compute Cloud Servcice
|
101
|
-
* create_image
|
102
|
-
* create_image_list
|
103
|
-
* create_instance
|
104
|
-
* create_orchestration
|
105
|
-
* create_security_application
|
106
|
-
* create_security_rule
|
107
|
-
* create_ssh_key
|
108
|
-
* create_volume
|
109
|
-
* delete_image_list
|
110
|
-
* delete_instance
|
111
|
-
* delete_orchestration
|
112
|
-
* delete_security_application
|
113
|
-
* delete_ssh_key
|
114
|
-
* get_image
|
115
|
-
* get_image_list
|
116
|
-
* get_instance
|
117
|
-
* get_orchestration
|
118
|
-
* get_security_application
|
119
|
-
* get_security_rule
|
120
|
-
* get_ssh_key
|
121
|
-
* list_image_lists
|
122
|
-
* list_images
|
123
|
-
* list_instances
|
124
|
-
* list_orchestrations
|
125
|
-
* list_security_applications
|
126
|
-
* list_security_lists
|
127
|
-
* list_security_rules
|
128
|
-
* list_ssh_keys
|
129
|
-
* list_volumes
|
130
|
-
* start_orchestration
|
131
|
-
* stop_orchestration
|
132
|
-
* update_image
|
133
|
-
* update_image_list
|
134
|
-
* update_orchestration
|
135
|
-
* update_ssh_key
|
136
|
-
* Storage Cloud Service
|
137
|
-
* create_container
|
138
|
-
* delete_container
|
139
|
-
* get_container
|
140
|
-
* list_containers
|
141
|
-
|
142
|
-
These basically align with the REST API documentation on docs.oracle.com. Check there for particulars around parameters, types etc.
|
143
|
-
|
144
|
-
**Note**: The APIs above are slightly modified from the Oracle cloud to provide consistency across requests. Keep in mind the following:
|
145
|
-
* All parameters are given in lower camel case (ie: service_name, not ServiceName)
|
146
|
-
* For IaaS services you don't need to provide the fully qualified names (ie: Compute/<identity_domain>/<name>). The system will prepend the configured user when necessary
|
147
|
-
* The Java and Database configuration has all the parameters as top level attributes (ie: don't configure parameters/content_port, use content_port)
|
148
|
-
* Smart defaults are included where possible. Check the code to see.
|
149
|
-
|
150
|
-
## Contributing
|
151
|
-
|
152
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/fog/fog-oraclecloud.
|
153
|
-
|
1
|
+
# Fog::OracleCloud
|
2
|
+
|
3
|
+
Module for the 'fog' gem to support the Oracle Cloud (IaaS and PaaS)
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'fog-oraclecloud'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install fog-oraclecloud
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
Before you can use fog-aws, you must require it in your application:
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'fog/oraclecloud'
|
27
|
+
```
|
28
|
+
|
29
|
+
Since it's a bad practice to have your credentials in source code, you should load them from default fog configuration file: ```~/.fog```. This file could look like this:
|
30
|
+
|
31
|
+
```
|
32
|
+
default:
|
33
|
+
oracle_username: <USERNAME>
|
34
|
+
oracle_password: <PASSWORD>
|
35
|
+
oracle_domain: <IDENTITY DOMAIN>
|
36
|
+
oracle_region: <emea or remove if using US data centre>
|
37
|
+
oracle_compute_api: <COMPUTE API>
|
38
|
+
oracle_storage_api: <STORAGE_API>
|
39
|
+
```
|
40
|
+
|
41
|
+
### Example: Java Cloud Service
|
42
|
+
Get all Java Instances
|
43
|
+
```ruby
|
44
|
+
instances = Fog::OracleCloud[:java].instances
|
45
|
+
```
|
46
|
+
Create a Java Instance
|
47
|
+
```ruby
|
48
|
+
instance = Fog::OracleCloud[:java].instances.create(
|
49
|
+
:service_name => 'TestWLS',
|
50
|
+
:description => 'A new weblogic instance',
|
51
|
+
:dba_name => 'SYS',
|
52
|
+
:dba_password => 'password',
|
53
|
+
:db_service_name => 'TestDB',
|
54
|
+
:admin_password => 'Welcome1$',
|
55
|
+
:admin_username => 'weblogic',
|
56
|
+
:shape => 'oc3',
|
57
|
+
:version => '12.2.1',
|
58
|
+
:ssh_key => 'ssh-rsa AAAAB3NzaC1yc2...',
|
59
|
+
)
|
60
|
+
```
|
61
|
+
Delete an instance
|
62
|
+
```ruby
|
63
|
+
instance = Fog::OracleCloud[:java].instances.get('TestWLS')
|
64
|
+
# Have to add the database details in so that the tables in the database can be removed
|
65
|
+
instance.dba_name = 'Admin'
|
66
|
+
instance.dba_password = 'password'
|
67
|
+
instance.destroy()
|
68
|
+
```
|
69
|
+
|
70
|
+
## Supported Services
|
71
|
+
The following services are supported:
|
72
|
+
* Java Cloud Service
|
73
|
+
* create_instance
|
74
|
+
* delete_instance
|
75
|
+
* get_instance
|
76
|
+
* get_server
|
77
|
+
* list_instances
|
78
|
+
* list_servers
|
79
|
+
* SOA Cloud Service
|
80
|
+
* create_instance
|
81
|
+
* delete_instance
|
82
|
+
* get_instance
|
83
|
+
* list_instances
|
84
|
+
* Database Cloud Service
|
85
|
+
* backup_instance
|
86
|
+
* create_instance
|
87
|
+
* create_snapshot
|
88
|
+
* delete_instance
|
89
|
+
* delete_snapshot
|
90
|
+
* get_instance
|
91
|
+
* get_snapshot
|
92
|
+
* list_backups
|
93
|
+
* list_instances
|
94
|
+
* list_patches
|
95
|
+
* list_recoveries
|
96
|
+
* list_servers
|
97
|
+
* list_snapshots
|
98
|
+
* recover_instance
|
99
|
+
* scale_instance
|
100
|
+
* Compute Cloud Servcice
|
101
|
+
* create_image
|
102
|
+
* create_image_list
|
103
|
+
* create_instance
|
104
|
+
* create_orchestration
|
105
|
+
* create_security_application
|
106
|
+
* create_security_rule
|
107
|
+
* create_ssh_key
|
108
|
+
* create_volume
|
109
|
+
* delete_image_list
|
110
|
+
* delete_instance
|
111
|
+
* delete_orchestration
|
112
|
+
* delete_security_application
|
113
|
+
* delete_ssh_key
|
114
|
+
* get_image
|
115
|
+
* get_image_list
|
116
|
+
* get_instance
|
117
|
+
* get_orchestration
|
118
|
+
* get_security_application
|
119
|
+
* get_security_rule
|
120
|
+
* get_ssh_key
|
121
|
+
* list_image_lists
|
122
|
+
* list_images
|
123
|
+
* list_instances
|
124
|
+
* list_orchestrations
|
125
|
+
* list_security_applications
|
126
|
+
* list_security_lists
|
127
|
+
* list_security_rules
|
128
|
+
* list_ssh_keys
|
129
|
+
* list_volumes
|
130
|
+
* start_orchestration
|
131
|
+
* stop_orchestration
|
132
|
+
* update_image
|
133
|
+
* update_image_list
|
134
|
+
* update_orchestration
|
135
|
+
* update_ssh_key
|
136
|
+
* Storage Cloud Service
|
137
|
+
* create_container
|
138
|
+
* delete_container
|
139
|
+
* get_container
|
140
|
+
* list_containers
|
141
|
+
|
142
|
+
These basically align with the REST API documentation on docs.oracle.com. Check there for particulars around parameters, types etc.
|
143
|
+
|
144
|
+
**Note**: The APIs above are slightly modified from the Oracle cloud to provide consistency across requests. Keep in mind the following:
|
145
|
+
* All parameters are given in lower camel case (ie: service_name, not ServiceName)
|
146
|
+
* For IaaS services you don't need to provide the fully qualified names (ie: Compute/<identity_domain>/<name>). The system will prepend the configured user when necessary
|
147
|
+
* The Java and Database configuration has all the parameters as top level attributes (ie: don't configure parameters/content_port, use content_port)
|
148
|
+
* Smart defaults are included where possible. Check the code to see.
|
149
|
+
|
150
|
+
## Contributing
|
151
|
+
|
152
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/fog/fog-oraclecloud.
|
153
|
+
|
data/Rakefile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
2
|
-
task :default => :spec
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
task :default => :spec
|
data/bin/console
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "fog/oracle"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "fog/oracle"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
set -euo pipefail
|
3
|
-
IFS=$'\n\t'
|
4
|
-
set -vx
|
5
|
-
|
6
|
-
bundle install
|
7
|
-
|
8
|
-
# Do any other automated setup that you need to do here
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
set -euo pipefail
|
3
|
+
IFS=$'\n\t'
|
4
|
+
set -vx
|
5
|
+
|
6
|
+
bundle install
|
7
|
+
|
8
|
+
# Do any other automated setup that you need to do here
|