fog-openstack 0.1.15 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -1
- data/README.md +36 -5
- data/docs/common/connection_params.md +45 -0
- data/docs/common/resources.md +11 -0
- data/docs/compute.md +2 -46
- data/docs/getting_started.md +11 -10
- data/docs/network.md +2 -47
- data/docs/orchestration.md +2 -2
- data/docs/planning.md +2 -47
- data/docs/shared_file_system.md +82 -0
- data/docs/storage.md +5 -51
- data/docs/workflow.md +4 -2
- data/examples/metric/basics.rb +42 -0
- data/examples/shared_file_system/basics.rb +68 -0
- data/gemfiles/Gemfile-1.9 +1 -0
- data/lib/fog/identity/openstack/v3/requests/list_groups.rb +1 -1
- data/lib/fog/image/openstack/v2/models/image.rb +60 -15
- data/lib/fog/image/openstack/v2/models/images.rb +1 -4
- data/lib/fog/metric/openstack.rb +126 -0
- data/lib/fog/metric/openstack/models/metric.rb +18 -0
- data/lib/fog/metric/openstack/models/metrics.rb +31 -0
- data/lib/fog/metric/openstack/models/resource.rb +16 -0
- data/lib/fog/metric/openstack/models/resources.rb +24 -0
- data/lib/fog/metric/openstack/requests/get_metric.rb +62 -0
- data/lib/fog/metric/openstack/requests/get_metric_measures.rb +38 -0
- data/lib/fog/metric/openstack/requests/get_resource.rb +37 -0
- data/lib/fog/metric/openstack/requests/get_resource_metric_measures.rb +46 -0
- data/lib/fog/metric/openstack/requests/list_metrics.rb +104 -0
- data/lib/fog/metric/openstack/requests/list_resources.rb +70 -0
- data/lib/fog/network/openstack.rb +12 -9
- data/lib/fog/network/openstack/models/rbac_policy.rb +0 -1
- data/lib/fog/network/openstack/requests/create_floating_ip.rb +1 -1
- data/lib/fog/network/openstack/requests/create_network.rb +3 -3
- data/lib/fog/openstack.rb +25 -15
- data/lib/fog/openstack/version.rb +1 -1
- data/lib/fog/orchestration/openstack/models/stack.rb +5 -1
- data/lib/fog/shared_file_system/openstack.rb +278 -0
- data/lib/fog/shared_file_system/openstack/models/network.rb +42 -0
- data/lib/fog/shared_file_system/openstack/models/networks.rb +28 -0
- data/lib/fog/shared_file_system/openstack/models/share.rb +63 -0
- data/lib/fog/shared_file_system/openstack/models/shares.rb +28 -0
- data/lib/fog/shared_file_system/openstack/models/snapshot.rb +45 -0
- data/lib/fog/shared_file_system/openstack/models/snapshots.rb +28 -0
- data/lib/fog/shared_file_system/openstack/requests/create_share.rb +49 -0
- data/lib/fog/shared_file_system/openstack/requests/create_share_network.rb +41 -0
- data/lib/fog/shared_file_system/openstack/requests/create_snapshot.rb +46 -0
- data/lib/fog/shared_file_system/openstack/requests/delete_share.rb +29 -0
- data/lib/fog/shared_file_system/openstack/requests/delete_share_network.rb +28 -0
- data/lib/fog/shared_file_system/openstack/requests/delete_snapshot.rb +30 -0
- data/lib/fog/shared_file_system/openstack/requests/get_share.rb +26 -0
- data/lib/fog/shared_file_system/openstack/requests/get_share_network.rb +26 -0
- data/lib/fog/shared_file_system/openstack/requests/get_snapshot.rb +26 -0
- data/lib/fog/shared_file_system/openstack/requests/list_share_networks.rb +25 -0
- data/lib/fog/shared_file_system/openstack/requests/list_share_networks_detail.rb +25 -0
- data/lib/fog/shared_file_system/openstack/requests/list_shares.rb +25 -0
- data/lib/fog/shared_file_system/openstack/requests/list_shares_detail.rb +25 -0
- data/lib/fog/shared_file_system/openstack/requests/list_snapshots.rb +25 -0
- data/lib/fog/shared_file_system/openstack/requests/list_snapshots_detail.rb +25 -0
- data/lib/fog/shared_file_system/openstack/requests/update_share.rb +39 -0
- data/lib/fog/shared_file_system/openstack/requests/update_share_network.rb +31 -0
- data/lib/fog/shared_file_system/openstack/requests/update_snapshot.rb +31 -0
- metadata +43 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33930f096ce867d0d328ccfcf748104caefefcf8
|
4
|
+
data.tar.gz: a0ffe19cfb27b239d8a1376c18711433c341015e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c0529686e26404cd6d80ac858c78adcb16a275383031959bec90a161887be1ae043140c1d9921fe2cd3f55a2856370561c0c9d4b808440e1c925a8601f29294
|
7
|
+
data.tar.gz: 3317ae20e8b81989572b91af05fd5298a13da6a604028e3b50f8ccc840da268f507d4b84359cf63c7f9b57bf871c3c52356752b4d05ce27be63f9ec86d528dd9
|
data/.rubocop.yml
CHANGED
@@ -82,6 +82,8 @@ SpaceBeforeFirstArg:
|
|
82
82
|
Enabled: false
|
83
83
|
SpecialGlobalVars:
|
84
84
|
AutoCorrect: false
|
85
|
+
Style/FrozenStringLiteralComment:
|
86
|
+
Enabled: false
|
85
87
|
StringLiterals:
|
86
88
|
Enabled: false
|
87
89
|
StringLiteralsInInterpolation:
|
@@ -91,4 +93,4 @@ TrailingCommaInLiteral:
|
|
91
93
|
WhileUntilModifier:
|
92
94
|
Enabled: false
|
93
95
|
WordArray:
|
94
|
-
AutoCorrect: false
|
96
|
+
AutoCorrect: false
|
data/README.md
CHANGED
@@ -340,11 +340,42 @@ end
|
|
340
340
|
Excon.get cirros_location, response_block: streamer
|
341
341
|
image_out.close
|
342
342
|
|
343
|
-
image.images.create name: "cirros",
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
343
|
+
image_handle = image.images.create name: "cirros",
|
344
|
+
disk_format: "qcow2",
|
345
|
+
container_format: "bare"
|
346
|
+
|
347
|
+
# => <Fog::Image::OpenStack::V2::Image
|
348
|
+
# id="67c4d02c-5601-4619-bd14-d2f7f96a046c",
|
349
|
+
# name="cirros",
|
350
|
+
# visibility="private",
|
351
|
+
# tags=[],
|
352
|
+
# self="/v2/images/67c4d02c-5601-4619-bd14-d2f7f96a046c",
|
353
|
+
# size=nil,
|
354
|
+
# disk_format="qcow2",
|
355
|
+
# container_format="bare",
|
356
|
+
# id="67c4d02c-5601-4619-bd14-d2f7f96a046c",
|
357
|
+
# checksum=nil,
|
358
|
+
# self="/v2/images/67c4d02c-5601-4619-bd14-d2f7f96a046c",
|
359
|
+
# file="/v2/images/67c4d02c-5601-4619-bd14-d2f7f96a046c/file",
|
360
|
+
# min_disk=0,
|
361
|
+
# created_at="2016-10-31T03:38:28Z",
|
362
|
+
# updated_at="2016-10-31T03:38:28Z",
|
363
|
+
# protected=false,
|
364
|
+
# status="queued",
|
365
|
+
# min_ram=0,
|
366
|
+
# owner="6b9ec8080b8443c5afe2267a39b9bf74",
|
367
|
+
# properties=nil,
|
368
|
+
# metadata=nil,
|
369
|
+
# location=nil,
|
370
|
+
# network_allocated=nil,
|
371
|
+
# base_image_ref=nil,
|
372
|
+
# image_type=nil,
|
373
|
+
# instance_uuid=nil,
|
374
|
+
# user_id=nil
|
375
|
+
# >
|
376
|
+
|
377
|
+
|
378
|
+
image_handle.upload_data File.binread(image_out.path)
|
348
379
|
|
349
380
|
```
|
350
381
|
|
@@ -0,0 +1,45 @@
|
|
1
|
+
### Optional Connection Parameters
|
2
|
+
|
3
|
+
Fog supports passing additional connection parameters to its underlying HTTP library (Excon) using the `:connection_options` parameter.
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<tr>
|
7
|
+
<th>Key</th>
|
8
|
+
<th>Description</th>
|
9
|
+
</tr>
|
10
|
+
<tr>
|
11
|
+
<td>:connect_timeout</td>
|
12
|
+
<td>Connection timeout (default: 60 seconds)</td>
|
13
|
+
</tr>
|
14
|
+
<tr>
|
15
|
+
<td>:read_timeout</td>
|
16
|
+
<td>Read timeout for connection (default: 60 seconds)</td> </tr>
|
17
|
+
<tr>
|
18
|
+
<td>:write_timeout</td>
|
19
|
+
<td>Write timeout for connection (default: 60 seconds)</td>
|
20
|
+
</tr>
|
21
|
+
<tr>
|
22
|
+
<td>:proxy</td>
|
23
|
+
<td>Proxy for HTTP and HTTPS connections</td>
|
24
|
+
</tr>
|
25
|
+
<tr>
|
26
|
+
<td>:ssl_ca_path</td>
|
27
|
+
<td>Path to SSL certificate authorities</td>
|
28
|
+
</tr>
|
29
|
+
<tr>
|
30
|
+
<td>:ssl_ca_file</td>
|
31
|
+
<td>SSL certificate authority file</td>
|
32
|
+
</tr>
|
33
|
+
<tr>
|
34
|
+
<td>:ssl_verify_peer</td>
|
35
|
+
<td>SSL verify peer (default: true)</td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td>:debug_request</td>
|
39
|
+
<td>debug print request (default: false)</td>
|
40
|
+
</tr>
|
41
|
+
<tr>
|
42
|
+
<td>:debug_response</td>
|
43
|
+
<td>debug print response (default: false)</td>
|
44
|
+
</tr>
|
45
|
+
</table>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
## Resources
|
2
|
+
|
3
|
+
* [fog.io](http://fog.io/)
|
4
|
+
* [fog-openstack rdoc](http://rubydoc.info/gems/fog-openstack)
|
5
|
+
* [fog-openstack Github repo](https://github.com/fog/fog-openstack)
|
6
|
+
* [Excon Github repo](https://github.com/geemus/excon)
|
7
|
+
|
8
|
+
|
9
|
+
## Support and Feedback
|
10
|
+
|
11
|
+
Your feedback is appreciated! If you have specific issues with the **fog-openstack** SDK, you should file an [issue via Github](https://github.com/fog/fog-openstack/issues).
|
data/docs/compute.md
CHANGED
@@ -26,43 +26,7 @@ Next, create a connection to the Compute Service:
|
|
26
26
|
|
27
27
|
**Note** `openstack_username` and `openstack_tenant` default to `admin` if omitted.
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
Fog supports passing additional connection parameters to its underlying HTTP library (Excon) using the `:connection_options` parameter.
|
32
|
-
|
33
|
-
<table>
|
34
|
-
<tr>
|
35
|
-
<th>Key</th>
|
36
|
-
<th>Description</th>
|
37
|
-
</tr>
|
38
|
-
<tr>
|
39
|
-
<td>:connect_timeout</td>
|
40
|
-
<td>Connection timeout (default: 60 seconds)</td>
|
41
|
-
</tr>
|
42
|
-
<tr>
|
43
|
-
<td>:read_timeout</td>
|
44
|
-
<td>Read timeout for connection (default: 60 seconds)</td> </tr>
|
45
|
-
<tr>
|
46
|
-
<td>:write_timeout</td>
|
47
|
-
<td>Write timeout for connection (default: 60 seconds)</td>
|
48
|
-
</tr>
|
49
|
-
<tr>
|
50
|
-
<td>:proxy</td>
|
51
|
-
<td>Proxy for HTTP and HTTPS connections</td>
|
52
|
-
</tr>
|
53
|
-
<tr>
|
54
|
-
<td>:ssl_ca_path</td>
|
55
|
-
<td>Path to SSL certificate authorities</td>
|
56
|
-
</tr>
|
57
|
-
<tr>
|
58
|
-
<td>:ssl_ca_file</td>
|
59
|
-
<td>SSL certificate authority file</td>
|
60
|
-
</tr>
|
61
|
-
<tr>
|
62
|
-
<td>:ssl_verify_peer</td>
|
63
|
-
<td>SSL verify peer (default: true)</td>
|
64
|
-
</tr>
|
65
|
-
</table>
|
29
|
+
Read more about the [Optional Connection Parameters](common/connection_params.md)
|
66
30
|
|
67
31
|
|
68
32
|
## Fog Abstractions
|
@@ -668,13 +632,5 @@ Example code using Compute can be found [here](https://github.com/fog/fog/tree/m
|
|
668
632
|
|
669
633
|
## Additional Resources
|
670
634
|
|
671
|
-
* [fog.io](http://fog.io/)
|
672
|
-
* [Fog rdoc](http://rubydoc.info/gems/fog/)
|
673
|
-
* [Fog Github repo](https://github.com/fog/fog)
|
674
|
-
* [Fog Github Issues](https://github.com/fog/fog/issues)
|
675
|
-
* [Excon Github repo](https://github.com/geemus/excon)
|
676
635
|
* [OpenStack Compute API](http://docs.openstack.org/api/openstack-compute/2/content/)
|
677
|
-
|
678
|
-
## Support and Feedback
|
679
|
-
|
680
|
-
Your feedback is appreciated! If you have specific issues with the **fog** SDK, you should file an [issue via Github](https://github.com/fog/fog/issues).
|
636
|
+
* [more resources and feedback](common/resources.md)
|
data/docs/getting_started.md
CHANGED
@@ -34,7 +34,7 @@ gem 'fog-openstack'
|
|
34
34
|
|
35
35
|
After creating your `Gemfile` execute the following command to install the libraries:
|
36
36
|
|
37
|
-
bundle install
|
37
|
+
bundle install
|
38
38
|
|
39
39
|
## Next Steps
|
40
40
|
|
@@ -43,7 +43,7 @@ Now that you have installed Fog and obtained your credentials, you are ready to
|
|
43
43
|
Start by executing the following command:
|
44
44
|
|
45
45
|
irb
|
46
|
-
|
46
|
+
|
47
47
|
Once `irb` has launched you will need to require the Fog library.
|
48
48
|
|
49
49
|
If using Ruby 1.8.x execute the following command:
|
@@ -68,14 +68,15 @@ Fog::OpenStack.services
|
|
68
68
|
These services can be explored in further depth in the following documents:
|
69
69
|
|
70
70
|
* [Compute](compute.md)
|
71
|
+
* [Introspection](introspection.md)
|
72
|
+
* [Metering](metering.md)
|
73
|
+
* [Network](network.md)
|
74
|
+
* [NFV](nfv.md)
|
75
|
+
* [Orchestration](orchestration.md)
|
76
|
+
* [Planning](planning.md)
|
77
|
+
* [Shared File System](shared_file_system.md)
|
71
78
|
* [Storage (Swift)](storage.md)
|
79
|
+
* [Workflow](workflow.md)
|
72
80
|
|
73
81
|
## Additional Resources
|
74
|
-
|
75
|
-
* [Fog rdoc](http://rubydoc.info/gems/fog)
|
76
|
-
* [Fog Github repo](https://github.com/fog/fog)
|
77
|
-
* [Release Notes](https://github.com/fog/fog/blob/master/changelog.txt)
|
78
|
-
|
79
|
-
|
80
|
-
## Support and Feedback
|
81
|
-
Your feedback is appreciated! If you have specific issues with the **fog** SDK, you should file an [issue via Github](https://github.com/fog/fog/issues).
|
82
|
+
[resources and feedback](common/resources.md)
|
data/docs/network.md
CHANGED
@@ -26,44 +26,7 @@ service = Fog::Network::OpenStack.new(
|
|
26
26
|
)
|
27
27
|
```
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
Fog supports passing additional connection parameters to its underlying HTTP library (Excon) using the `:connection_options` parameter.
|
32
|
-
|
33
|
-
<table>
|
34
|
-
<tr>
|
35
|
-
<th>Key</th>
|
36
|
-
<th>Description</th>
|
37
|
-
</tr>
|
38
|
-
<tr>
|
39
|
-
<td>:connect_timeout</td>
|
40
|
-
<td>Connection timeout (default: 60 seconds)</td>
|
41
|
-
</tr>
|
42
|
-
<tr>
|
43
|
-
<td>:read_timeout</td>
|
44
|
-
<td>Read timeout for connection (default: 60 seconds)</td> </tr>
|
45
|
-
<tr>
|
46
|
-
<td>:write_timeout</td>
|
47
|
-
<td>Write timeout for connection (default: 60 seconds)</td>
|
48
|
-
</tr>
|
49
|
-
<tr>
|
50
|
-
<td>:proxy</td>
|
51
|
-
<td>Proxy for HTTP and HTTPS connections</td>
|
52
|
-
</tr>
|
53
|
-
<tr>
|
54
|
-
<td>:ssl_ca_path</td>
|
55
|
-
<td>Path to SSL certificate authorities</td>
|
56
|
-
</tr>
|
57
|
-
<tr>
|
58
|
-
<td>:ssl_ca_file</td>
|
59
|
-
<td>SSL certificate authority file</td>
|
60
|
-
</tr>
|
61
|
-
<tr>
|
62
|
-
<td>:ssl_verify_peer</td>
|
63
|
-
<td>SSL verify peer (default: true)</td>
|
64
|
-
</tr>
|
65
|
-
</table>
|
66
|
-
|
29
|
+
Read more about the [Optional Connection Parameters](common/connection_params.md)
|
67
30
|
|
68
31
|
## Fog Abstractions
|
69
32
|
|
@@ -271,13 +234,5 @@ Example code using Network can be found [here](https://github.com/fog/fog-openst
|
|
271
234
|
|
272
235
|
## Additional Resources
|
273
236
|
|
274
|
-
* [fog.io](http://fog.io/)
|
275
|
-
* [fog-openstack rdoc](http://rubydoc.info/gems/fog-openstack)
|
276
|
-
* [fog-openstack Github repo](https://github.com/fog/fog-openstack)
|
277
|
-
* [fog-openstack Github Issues](https://github.com/fog/fog-openstack/issues)
|
278
|
-
* [Excon Github repo](https://github.com/geemus/excon)
|
279
237
|
* [OpenStack Network API](http://developer.openstack.org/api-ref-networking-v2.html)
|
280
|
-
|
281
|
-
## Support and Feedback
|
282
|
-
|
283
|
-
Your feedback is appreciated! If you have specific issues with the **fog-openstack** SDK, you should file an [issue via Github](https://github.com/fog/fog-openstack/issues).
|
238
|
+
* [more resources and feedback](common/resources.md)
|
data/docs/orchestration.md
CHANGED
@@ -35,6 +35,8 @@ service = Fog::Orchestration::OpenStack.new({
|
|
35
35
|
```
|
36
36
|
We will use this `service` to interact with the Orchestration resources, `stack`, `event`, `resource`, and `template`
|
37
37
|
|
38
|
+
Read more about the [Optional Connection Parameters](common/connection_params.md)
|
39
|
+
|
38
40
|
## Stacks
|
39
41
|
|
40
42
|
Get a list of stacks you own:
|
@@ -333,5 +335,3 @@ stack = service.stacks.get(stack.stack_name, stack.id)
|
|
333
335
|
stack.stack_status
|
334
336
|
=> "ROLLBACK_IN_PROGRESS"
|
335
337
|
```
|
336
|
-
|
337
|
-
|
data/docs/planning.md
CHANGED
@@ -40,43 +40,7 @@ service = Fog::Openstack.new({
|
|
40
40
|
})
|
41
41
|
```
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
Fog supports passing additional connection parameters to its underlying HTTP library (Excon) using the `:connection_options` parameter.
|
46
|
-
|
47
|
-
<table>
|
48
|
-
<tr>
|
49
|
-
<th>Key</th>
|
50
|
-
<th>Description</th>
|
51
|
-
</tr>
|
52
|
-
<tr>
|
53
|
-
<td>:connect_timeout</td>
|
54
|
-
<td>Connection timeout (default: 60 seconds)</td>
|
55
|
-
</tr>
|
56
|
-
<tr>
|
57
|
-
<td>:read_timeout</td>
|
58
|
-
<td>Read timeout for connection (default: 60 seconds)</td> </tr>
|
59
|
-
<tr>
|
60
|
-
<td>:write_timeout</td>
|
61
|
-
<td>Write timeout for connection (default: 60 seconds)</td>
|
62
|
-
</tr>
|
63
|
-
<tr>
|
64
|
-
<td>:proxy</td>
|
65
|
-
<td>Proxy for HTTP and HTTPS connections</td>
|
66
|
-
</tr>
|
67
|
-
<tr>
|
68
|
-
<td>:ssl_ca_path</td>
|
69
|
-
<td>Path to SSL certificate authorities</td>
|
70
|
-
</tr>
|
71
|
-
<tr>
|
72
|
-
<td>:ssl_ca_file</td>
|
73
|
-
<td>SSL certificate authority file</td>
|
74
|
-
</tr>
|
75
|
-
<tr>
|
76
|
-
<td>:ssl_verify_peer</td>
|
77
|
-
<td>SSL verify peer (default: true)</td>
|
78
|
-
</tr>
|
79
|
-
</table>
|
43
|
+
Read more about the [Optional Connection Parameters](common/connection_params.md)
|
80
44
|
|
81
45
|
## Fog Abstractions
|
82
46
|
|
@@ -257,14 +221,5 @@ The remainder of this document details the model abstraction.
|
|
257
221
|
|
258
222
|
## Additional Resources
|
259
223
|
|
260
|
-
* [fog.io](http://fog.io/)
|
261
|
-
* [Fog rdoc](http://rubydoc.info/gems/fog/)
|
262
|
-
* [Fog Github repo](https://github.com/fog/fog)
|
263
|
-
* [Fog Github Issues](https://github.com/fog/fog/issues)
|
264
|
-
* [Excon Github repo](https://github.com/geemus/excon)
|
265
224
|
* [Tuskar API](http://docs.openstack.org/developer/tuskar/)
|
266
|
-
|
267
|
-
## Support and Feedback
|
268
|
-
|
269
|
-
Your feedback is appreciated! If you have specific issues with the **fog** SDK, you should file an [issue via Github](https://github.com/fog/fog/issues).
|
270
|
-
|
225
|
+
* [more resources and feedback](common/resources.md)
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# Shared File System (Manila)
|
2
|
+
|
3
|
+
This document explains how to get started using OpenStack Shared File System (Manila) with Fog. It assumes you have read the [Getting Started with Fog and OpenStack](getting_started.md) document.
|
4
|
+
|
5
|
+
## Starting irb console
|
6
|
+
|
7
|
+
Start by executing the following command:
|
8
|
+
```
|
9
|
+
irb
|
10
|
+
```
|
11
|
+
|
12
|
+
or if you use bundler for managing your gems:
|
13
|
+
```
|
14
|
+
bundle exec irb
|
15
|
+
```
|
16
|
+
|
17
|
+
Once `irb` has launched you need to require the Fog library by executing:
|
18
|
+
```
|
19
|
+
require 'fog/openstack'
|
20
|
+
```
|
21
|
+
## Create Service
|
22
|
+
|
23
|
+
Next, create a connection to the Shared File System Service:
|
24
|
+
```
|
25
|
+
service = Fog::SharedFileSystem::OpenStack.new(
|
26
|
+
:openstack_auth_url => 'http://KEYSTONE_HOST:KEYSTONE_PORT/v3/auth/tokens', # OpenStack Keystone v3 endpoint
|
27
|
+
:openstack_username => OPEN_STACK_USER, # Your OpenStack Username
|
28
|
+
:openstack_domain_name => OPEN_STACK_DOMAIN, # Your OpenStack Domain name
|
29
|
+
:openstack_project_name => OPEN_STACK_PROJECT, # Your OpenStack Project name
|
30
|
+
:openstack_api_key => OPEN_STACK_PASSWORD, # Your OpenStack Password
|
31
|
+
:connection_options => {} # Optional
|
32
|
+
)
|
33
|
+
```
|
34
|
+
|
35
|
+
Read more about the [Optional Connection Parameters](common/connection_params.md)
|
36
|
+
|
37
|
+
## Fog Abstractions
|
38
|
+
|
39
|
+
Fog provides both a **model** and **request** abstraction. The request abstraction provides the most efficient interface and the model abstraction wraps the request abstraction to provide a convenient `ActiveModel` like interface.
|
40
|
+
|
41
|
+
### Request Layer
|
42
|
+
|
43
|
+
The request abstraction maps directly to the [OpenStack Shared File System API](http://developer.openstack.org/api-ref/shared-file-systems). It provides the most efficient interface to the OpenStack Shared File System service.
|
44
|
+
|
45
|
+
To see a list of requests supported by the service:
|
46
|
+
```
|
47
|
+
service.requests
|
48
|
+
```
|
49
|
+
|
50
|
+
#### Example Request
|
51
|
+
|
52
|
+
To request a list of networks:
|
53
|
+
```
|
54
|
+
response = service.list_shares
|
55
|
+
```
|
56
|
+
|
57
|
+
To learn more about Shared File System request methods refer to [rdoc](http://www.rubydoc.info/gems/fog-openstack/Fog/SharedFileSystem/OpenStack/Real).
|
58
|
+
|
59
|
+
### Model Layer
|
60
|
+
|
61
|
+
Fog models behave in a manner similar to `ActiveModel`. Models will generally respond to `create`, `save`, `persisted?`, `destroy`, `reload` and `attributes` methods. Additionally, fog will automatically create attribute accessors.
|
62
|
+
|
63
|
+
To see a list of collections supported by the service:
|
64
|
+
```
|
65
|
+
service.collections
|
66
|
+
```
|
67
|
+
|
68
|
+
#### Example Request
|
69
|
+
|
70
|
+
To request a collection of share networks:
|
71
|
+
```
|
72
|
+
networks = service.networks
|
73
|
+
```
|
74
|
+
|
75
|
+
## Examples
|
76
|
+
|
77
|
+
Example code using Shared File System can be found [here](https://github.com/fog/fog-openstack/tree/master/examples/share).
|
78
|
+
|
79
|
+
## Additional Resources
|
80
|
+
|
81
|
+
* [OpenStack Shared File System API](http://developer.openstack.org/api-ref/shared-file-systems/)
|
82
|
+
* [more resources and feedback](common/resources.md)
|