Skip to content

Commit 391cda2

Browse files
committed
Renames Fog::<Service>::OpenStack to Fog::OpenStack::<Service>
Moves the files accordingly (cherry picked from commit b312b3d)
1 parent ed8ef3c commit 391cda2

File tree

1,677 files changed

+16724
-16786
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,677 files changed

+16724
-16786
lines changed

README.md

+29-29
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,18 @@ The exception is if you're using Nova (and not Neutron) for your instance networ
8282
Initialise a connection to the compute service:
8383

8484
```ruby
85-
compute = Fog::Compute::OpenStack.new(@connection_params)
85+
compute = Fog::OpenStack::Compute.new(@connection_params)
8686
```
8787

8888
Get a list of available images for use with booting new instances:
8989

9090
```ruby
9191
p compute.images
92-
# => <Fog::Compute::OpenStack::Images
92+
# => <Fog::OpenStack::Compute::Images
9393
# filters={},
9494
# server=nil
9595
# [
96-
# <Fog::Compute::OpenStack::Image
96+
# <Fog::OpenStack::Compute::Image
9797
# id="57a67f8a-7bae-4578-b684-b9b4dcd48d7f",
9898
# ...
9999
# >
@@ -105,17 +105,17 @@ List available flavors so we can decide how powerful to make this instance:
105105

106106
```ruby
107107
p compute.flavors
108-
# => <Fog::Compute::OpenStack::Flavors
108+
# => <Fog::OpenStack::Compute::Flavors
109109
# [
110-
# <Fog::Compute::OpenStack::Flavor
110+
# <Fog::OpenStack::Compute::Flavor
111111
# id="1",
112112
# name="m1.tiny",
113113
# ram=512,
114114
# disk=1,
115115
# vcpus=1,
116116
# ...
117117
# >,
118-
# <Fog::Compute::OpenStack::Flavor
118+
# <Fog::OpenStack::Compute::Flavor
119119
# id="2",
120120
# name="m1.small",
121121
# ram=2048,
@@ -141,7 +141,7 @@ instance.wait_for { ready? }
141141
# => {:duration=>17.359134}
142142

143143
p instance
144-
# => <Fog::Compute::OpenStack::Server
144+
# => <Fog::OpenStack::Compute::Server
145145
# id="63633125-26b5-4fe1-a909-0f44d1ab3337",
146146
# instance_name=nil,
147147
# addresses={"public"=>[{"OS-EXT-IPS-MAC:mac_addr"=>"fa:16:3e:f4:75:ab", "version"=>4, "addr"=>"1.2.3.4", "OS-EXT-IPS:type"=>"fixed"}]},
@@ -177,11 +177,11 @@ Allow TCP traffic through port 22:
177177
```ruby
178178
security_group = compute.security_groups.create name: "Test SSH",
179179
description: "Allow access to port 22"
180-
# => <Fog::Compute::OpenStack::SecurityGroup
180+
# => <Fog::OpenStack::Compute::SecurityGroup
181181
# id="e5d53d00-b3f9-471a-b90f-985694b966ed",
182182
# name="Test SSH",
183183
# description="Allow access to port 22",
184-
# security_group_rules= <Fog::Compute::OpenStack::SecurityGroupRules
184+
# security_group_rules= <Fog::OpenStack::Compute::SecurityGroupRules
185185
# [
186186

187187
# ]
@@ -196,7 +196,7 @@ compute.security_group_rules.create parent_group_id: security_group.id,
196196

197197
key_pair = compute.key_pairs.create name: "My Public Key",
198198
public_key: "/full/path/to/ssh.pub"
199-
# => <Fog::Compute::OpenStack::KeyPair
199+
# => <Fog::OpenStack::Compute::KeyPair
200200
# name="My Public Key",
201201
# ...
202202
# user_id="20746f49211e4037a91269df6a3fbf7b",
@@ -212,7 +212,7 @@ instance = compute.servers.create name: "Test 2",
212212
flavor_ref: flavor.id,
213213
key_name: key_pair.name,
214214
security_groups: security_group
215-
# => <Fog::Compute::OpenStack::Server
215+
# => <Fog::OpenStack::Compute::Server
216216
# id="e18ebdfb-e5f5-4a45-929f-4cc9926dc2c7",
217217
# name="Test 2",
218218
# state="ACTIVE",
@@ -230,7 +230,7 @@ floating_ip_address = compute.addresses.create pool: pool_name
230230
instance.associate_address floating_ip_address.ip
231231

232232
p floating_ip_address
233-
# => <Fog::Compute::OpenStack::Address
233+
# => <Fog::OpenStack::Compute::Address
234234
# id="54064324-ce7d-448d-9753-94497b29dc91",
235235
# ip="1.2.3.4",
236236
# pool="external",
@@ -256,12 +256,12 @@ $ pwd
256256
Create and attach a volume to a running instance:
257257

258258
```ruby
259-
compute = Fog::Compute::OpenStack.new(@connection_params)
259+
compute = Fog::OpenStack::Compute.new(@connection_params)
260260

261261
volume = compute.volumes.create name: "Test",
262262
description: "Testing",
263263
size: 1
264-
# => <Fog::Compute::OpenStack::Volume
264+
# => <Fog::OpenStack::Compute::Volume
265265
# id="4a212986-c6b6-4a93-8319-c6a98e347750",
266266
# name="Test",
267267
# description="Testing",
@@ -292,7 +292,7 @@ volume.reload
292292
compute.snapshots.create volume_id: volume.id,
293293
name: "test",
294294
description: "test"
295-
# => <Fog::Compute::OpenStack::Snapshot
295+
# => <Fog::OpenStack::Compute::Snapshot
296296
# id="7a8c9192-25ee-4364-be91-070b7a6d9855",
297297
# name="test",
298298
# description="test",
@@ -315,7 +315,7 @@ Download Glance image:
315315

316316
```ruby
317317

318-
image = Fog::Image::OpenStack.new(@connection_params)
318+
image = Fog::OpenStack::Image.new(@connection_params)
319319

320320
image_out = File.open("/tmp/cirros-image-download", 'wb')
321321

@@ -345,7 +345,7 @@ image_handle = image.images.create name: "cirros",
345345
disk_format: "qcow2",
346346
container_format: "bare"
347347

348-
# => <Fog::Image::OpenStack::V2::Image
348+
# => <Fog::OpenStack::Image::V2::Image
349349
# id="67c4d02c-5601-4619-bd14-d2f7f96a046c",
350350
# name="cirros",
351351
# visibility="private",
@@ -392,12 +392,12 @@ cirros.destroy
392392
List domains (Keystone V3 only):
393393

394394
```ruby
395-
identity = Fog::Identity::OpenStack.new(@connection_params)
395+
identity = Fog::OpenStack::Identity.new(@connection_params)
396396

397397
identity.domains
398-
# => <Fog::Identity::OpenStack::V3::Domains
398+
# => <Fog::OpenStack::Identity::V3::Domains
399399
# [
400-
# <Fog::Identity::OpenStack::V3::Domain
400+
# <Fog::OpenStack::Identity::V3::Domain
401401
# id="default",
402402
# description="",
403403
# enabled=true,
@@ -411,9 +411,9 @@ List projects (aka tenants):
411411

412412
```ruby
413413
identity.projects
414-
# => <Fog::Identity::OpenStack::V3::Projects
414+
# => <Fog::OpenStack::Identity::V3::Projects
415415
# [
416-
# <Fog::Identity::OpenStack::V3::Project
416+
# <Fog::OpenStack::Identity::V3::Project
417417
# id="008e5537d3424295a03560abc923693c",
418418
# domain_id="default",
419419
# description="Project 1",
@@ -425,15 +425,15 @@ identity.projects
425425

426426
# On Keystone V2
427427
identity.tenants
428-
# => <Fog::Identity::OpenStack::V2::Tenants
428+
# => <Fog::OpenStack::Identity::V2::Tenants
429429
# [ ... ]
430430
```
431431

432432
List users:
433433

434434
```ruby
435435
identity.users
436-
# => <Fog::Identity::OpenStack::V3::Users
436+
# => <Fog::OpenStack::Identity::V3::Users
437437
# [ ... ]
438438
```
439439

@@ -446,7 +446,7 @@ user = identity.users.create name: "test",
446446
project_id: project_id,
447447
448448
password: "test"
449-
# => <Fog::Identity::OpenStack::V3::User
449+
# => <Fog::OpenStack::Identity::V3::User
450450
# id="474a59153ebd4e709938e5e9b614dc57",
451451
# default_project_id=nil,
452452
# description=nil,
@@ -467,7 +467,7 @@ Create/destroy new tenant:
467467

468468
project = identity.projects.create name: "test",
469469
description: "test"
470-
# => <Fog::Identity::OpenStack::V3::Project
470+
# => <Fog::OpenStack::Identity::V3::Project
471471
# id="423559128a7249f2973cdb7d5d581c4d",
472472
# domain_id="default",
473473
# description="test",
@@ -486,7 +486,7 @@ Grant user role on tenant and revoke it:
486486

487487
```ruby
488488
role = identity.roles.select{|role| role.name == "_member_"}[0]
489-
# => <Fog::Identity::OpenStack::V3::Role
489+
# => <Fog::OpenStack::Identity::V3::Role
490490
# id="9fe2ff9ee4384b1894a90878d3e92bab",
491491
# name="_member_",
492492
# >
@@ -502,15 +502,15 @@ Set up a project's public gateway (needed for external access):
502502

503503
```ruby
504504

505-
identity = Fog::Identity::OpenStack.new(@connection_params)
505+
identity = Fog::OpenStack::Identity.new(@connection_params)
506506

507507
tenants = identity.projects.select do |project|
508508
project.name == @connection_params[:openstack_project_name]
509509
end
510510

511511
tenant_id = tenants[0].id
512512

513-
neutron = Fog::Network::OpenStack.new(@connection_params)
513+
neutron = Fog::OpenStack::Network.new(@connection_params)
514514

515515
network = neutron.networks.create name: "default",
516516
tenant_id: tenant_id

0 commit comments

Comments
 (0)