Skip to content

Commit e8f4837

Browse files
committed
Fix compatibility with fog-core 2.x.
1 parent f91351d commit e8f4837

File tree

157 files changed

+472
-491
lines changed

Some content is hidden

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

157 files changed

+472
-491
lines changed

examples/compute.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,26 @@ If you are unfamiliar with fog, we recommend reading our [getting started](getti
4040

4141
```ruby
4242
prod_fe_servers = @sl.servers.tagged_with(['production', 'frontend'])
43-
# => [ <Fog::Compute::Softlayer::Server>,
44-
# <Fog::Compute::Softlayer::Server>,
45-
# <Fog::Compute::Softlayer::Server>,
46-
# <Fog::Compute::Softlayer::Server>,
47-
# <Fog::Compute::Softlayer::Server>,]
43+
# => [ <Fog::Softlayer::Compute::Server>,
44+
# <Fog::Softlayer::Compute::Server>,
45+
# <Fog::Softlayer::Compute::Server>,
46+
# <Fog::Softlayer::Compute::Server>,
47+
# <Fog::Softlayer::Compute::Server>,]
4848
```
4949

5050
1. Get a server's public/frontend VLAN
5151

5252
```ruby
5353
server = @sl.servers.get(12345)
5454
server.vlan
55-
# => <Fog::Network::Softlayer::Network
55+
# => <Fog::Softlayer::Network::Network
5656
# id=123456,
5757
# name='frontend-staging-vlan',
5858
# modify_date="2014-02-22T12:42:31-06:00",
5959
# note=nil,
6060
# tags=['sparkle', 'motion'],
6161
# type="STANDARD",
62-
# datacenter= <Fog::Network::Softlayer::Datacenter
62+
# datacenter= <Fog::Softlayer::Network::Datacenter
6363
# id=168642,
6464
# long_name="San Jose 1",
6565
# name="sjc01"
@@ -74,14 +74,14 @@ If you are unfamiliar with fog, we recommend reading our [getting started](getti
7474
```ruby
7575
server = @sl.servers.get(12345)
7676
server.private_vlan
77-
# => <Fog::Network::Softlayer::Network
77+
# => <Fog::Softlayer::Network::Network
7878
# id=123456,
7979
# name='backend-staging-vlan',
8080
# modify_date="2014-02-22T12:42:33-06:00",
8181
# note=nil,
8282
# tags=[],
8383
# type="STANDARD",
84-
# datacenter= <Fog::Network::Softlayer::Datacenter
84+
# datacenter= <Fog::Softlayer::Network::Datacenter
8585
# id=168642,
8686
# long_name="San Jose 1",
8787
# name="sjc01"
@@ -212,9 +212,9 @@ If you are unfamiliar with fog, we recommend reading our [getting started](getti
212212

213213
```ruby
214214
the_first_key = @sl.key_pairs.by_label('my-new-key')
215-
# => <Fog::Compute::Softlayer::KeyPair>
215+
# => <Fog::Softlayer::Compute::KeyPair>
216216
the_second_key = @sl.key_pairs.by_label('my-other-new-key')
217-
# => <Fog::Compute::Softlayer::KeyPair>
217+
# => <Fog::Softlayer::Compute::KeyPair>
218218
219219
opts = {
220220
:flavor_id => 'm1.small',
@@ -224,7 +224,7 @@ If you are unfamiliar with fog, we recommend reading our [getting started](getti
224224
:key_pairs => [ the_first_key, the_second_key ]
225225
}
226226
@sl.servers.create(opts)
227-
# => <Fog::Compute::Softlayer::Server>
227+
# => <Fog::Softlayer::Compute::Server>
228228
```
229229

230230

@@ -239,20 +239,20 @@ If you are unfamiliar with fog, we recommend reading our [getting started](getti
239239
```ruby
240240
# I want to launch another server to hold docker containers into my existing staging VLANs
241241
# I'll start by getting a staging server so I can use its vlans as a reference.
242-
staging_server = @sl.servers.tagged_with(['staging', 'docker']).first # => <Fog::Compute::Softlayer::Server>
242+
staging_server = @sl.servers.tagged_with(['staging', 'docker']).first # => <Fog::Softlayer::Compute::Server>
243243
244244
opts = {
245245
:flavor_id => 'm1.large',
246246
:image_id => '23f7f05f-3657-4330-8772-329ed2e816bc', # Ubuntu Docker Image
247247
:domain => 'staging.example.com',
248248
:datacenter => 'ams01', # This needs to be the same datacenter as the target VLAN of course.
249249
:name => 'additional-docker-host',
250-
:vlan => staging.server.vlan, # Passing in a <Fog::Network::Softlayer::Network> object.
250+
:vlan => staging.server.vlan, # Passing in a <Fog::Softlayer::Network::Network> object.
251251
:private_vlan => staging.server.private_vlan.id, # Passing in an Integer (the id of a network/vlan) works too.
252252
}
253253
254254
new_staging_server = @sl.servers.create(opts)
255-
# => <Fog::Compute::Softlayer::Server>
255+
# => <Fog::Softlayer::Compute::Server>
256256
257257
258258
```
@@ -270,7 +270,7 @@ If you are unfamiliar with fog, we recommend reading our [getting started](getti
270270
}
271271
272272
private_vm = @sl.servers.create(opts)
273-
# => <Fog::Compute::Softlayer::Server>
273+
# => <Fog::Softlayer::Compute::Server>
274274
```
275275
1. Provision a Server with 1Gbps network components.
276276

@@ -285,7 +285,7 @@ If you are unfamiliar with fog, we recommend reading our [getting started](getti
285285
}
286286
287287
private_vm = @sl.servers.create(opts)
288-
# => <Fog::Compute::Softlayer::Server>
288+
# => <Fog::Softlayer::Compute::Server>
289289
```
290290

291291
1. Provision a Server with user metadata.

examples/dns.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ or using the service:
7272

7373
##### Update Operations
7474

75-
After this point we consider you have a Fog::DNS::Softlayer::Domain on @domain variable
75+
After this point we consider you have a Fog::Softlayer::DNS::Domain on @domain variable
7676

7777
* Update Record Entry
7878

@@ -84,7 +84,7 @@ After this point we consider you have a Fog::DNS::Softlayer::Domain on @domain v
8484

8585
##### Destroy Operations
8686

87-
After this point we consider you have a Fog::DNS::Softlayer::Domain on @domain variable
87+
After this point we consider you have a Fog::Softlayer::DNS::Domain on @domain variable
8888

8989
* Destroy Domain
9090

examples/global_ip_address.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ require 'fog/softlayer'
99
@sl = Fog::Network[:softlayer]
1010
```
1111

12-
Global IP addresses are accessed through the `Fog::Network::Softlayer::Ip` model. Unlike "normal" IP addresses they can be specifically created and destroyed (non-global IP addresses are created/destroyed via a subnet).
12+
Global IP addresses are accessed through the `Fog::Softlayer::Network::Ip` model. Unlike "normal" IP addresses they can be specifically created and destroyed (non-global IP addresses are created/destroyed via a subnet).
1313

1414
```ruby
1515
global_ips = @network.ips.select { |ip| ip.global? }
16-
# => [ <Fog::Network::Softlayer::Ip
16+
# => [ <Fog::Softlayer::Network::Ip
1717
# id=123456789,
1818
# subnet_id=123456,
1919
# address="203.0.113.5",
@@ -26,7 +26,7 @@ Global IP addresses are accessed through the `Fog::Network::Softlayer::Ip` model
2626
# note=nil,
2727
# assigned_to=nil
2828
# >,
29-
# <Fog::Network::Softlayer::Ip
29+
# <Fog::Softlayer::Network::Ip
3030
# id=123456790,
3131
# subnet_id=123457,
3232
# address="203.0.113.6",
@@ -35,7 +35,7 @@ Global IP addresses are accessed through the `Fog::Network::Softlayer::Ip` model
3535
# network=false,
3636
# reserved=false,
3737
# global_id=1235,
38-
# destination_ip= <Fog::Network::Softlayer::Ip
38+
# destination_ip= <Fog::Softlayer::Network::Ip
3939
# id=123458,
4040
# subnet_id=123456,
4141
# address="203.0.113.7",
@@ -61,7 +61,7 @@ Route an unrouted global IP to a specific server:
6161

6262
```ruby
6363
global_ip = @network.ips.select { |ip| ip.global? && !ip.routed? }.first
64-
# => <Fog::Network::Softlayer::Ip
64+
# => <Fog::Softlayer::Network::Ip
6565
# id=123456789,
6666
# subnet_id=123456,
6767
# address="203.0.113.5",
@@ -78,14 +78,14 @@ global_ip.routed? # => false
7878

7979

8080
@compute = Fog::Compute[:softlayer]
81-
dest_server = @compute.servers.tagged_with(['production', 'frontend', 'hkg']).first # => <Fog::Compute::Softlayer::Server>
82-
dest_ip = @network.ips.by_address(dest_server.public_ip_address) # => <Fog::Network::Softlayer::Ip>
81+
dest_server = @compute.servers.tagged_with(['production', 'frontend', 'hkg']).first # => <Fog::Softlayer::Compute::Server>
82+
dest_ip = @network.ips.by_address(dest_server.public_ip_address) # => <Fog::Softlayer::Network::Ip>
8383

8484

8585
global_ip.route(dest_ip) # => true
8686

8787
global_ip.reload
88-
# => <Fog::Network::Softlayer::Ip
88+
# => <Fog::Softlayer::Network::Ip
8989
# id=123456789,
9090
# subnet_id=123456,
9191
# address="203.0.113.5",
@@ -94,7 +94,7 @@ global_ip.reload
9494
# network=false,
9595
# reserved=false,
9696
# global_id=1234,
97-
# destination_ip= <Fog::Network::Softlayer::Ip
97+
# destination_ip= <Fog::Softlayer::Network::Ip
9898
# id=123458,
9999
# subnet_id=123456,
100100
# address="203.0.113.8",
@@ -121,11 +121,11 @@ That same address to a different server:
121121
global_ip = @network.ips.by_address('203.0.113.5')
122122
global_ip.destination.address # => 203.0.113.8
123123

124-
london_server = @compute.servers.tagged_with(['production', 'frontend', 'lon']).first # => <Fog::Compute::Softlayer::Server>
125-
dest_ip = @network.ips.by_address(london_server.public_ip_address) # => <Fog::Network::Softlayer::Ip>
124+
london_server = @compute.servers.tagged_with(['production', 'frontend', 'lon']).first # => <Fog::Softlayer::Compute::Server>
125+
dest_ip = @network.ips.by_address(london_server.public_ip_address) # => <Fog::Softlayer::Network::Ip>
126126

127127
global_ip.route(dest_ip) # => true
128-
global_ip.reload # => <Fog::Network::Softlayer::Ip>
128+
global_ip.reload # => <Fog::Softlayer::Network::Ip>
129129
global_ip.destination.address # => 203.0.113.9
130130
```
131131

@@ -135,20 +135,20 @@ global_ip = @network.ips.by_address('203.0.113.5')
135135
global_ip.routed? # => true
136136

137137
global_ip.unroute # => true
138-
global_ip.reload # => <Fog::Network::Softlayer::Ip>
138+
global_ip.reload # => <Fog::Softlayer::Network::Ip>
139139

140140
global_ip.routed? # => false
141141
```
142142

143143
Create new IPv4:
144144
*Note:* these methods are blocking and can take several seconds to respond.
145145
```ruby
146-
@network.create_new_global_ipv4 # => <Fog::Network::Softlayer::Ip>
146+
@network.create_new_global_ipv4 # => <Fog::Softlayer::Network::Ip>
147147
```
148148

149149
Create new IPv6:
150150
```ruby
151-
@network.create_new_global_ipv6 # => <Fog::Network::Softlayer::Ip>
151+
@network.create_new_global_ipv6 # => <Fog::Softlayer::Network::Ip>
152152
```
153153

154154
Destroy a global IP address:

examples/key_pairs.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,32 @@ If you are unfamiliar with fog, we recommend reading our [getting started](getti
1515

1616
```ruby
1717
kp1 = @sl.key_pairs.create(:label => 'my-new-key', :key => 'ssh-rsa AAAAxbU2lx...')
18-
# => <Fog::Compute::Softlayer::KeyPair>
18+
# => <Fog::Softlayer::Compute::KeyPair>
1919
kp2 = @sl.key_pairs.new
2020
kp2.label = 'my-new-new-key'
2121
kp2.key = 'ssh-rsa AAAAxbU2lx...'
2222
kp2.save
23-
# => <Fog::Compute::Softlayer::KeyPair>
23+
# => <Fog::Softlayer::Compute::KeyPair>
2424
```
2525

2626
1. Get
2727

2828
```ruby
2929
# By id:
3030
kp = @sl.key_pairs.get(123456)
31-
# => <Fog::Compute::Softlayer::KeyPair>
31+
# => <Fog::Softlayer::Compute::KeyPair>
3232

3333
# By label:
3434
kp = @sl.key_pairs.by_label('my-new-key')
35-
# => <Fog::Compute::Softlayer::KeyPair>
35+
# => <Fog::Softlayer::Compute::KeyPair>
3636
```
3737

3838

3939
1. Destroy
4040

4141
```ruby
4242
kp = @sl.key_pairs.by_label('my-new-key')
43-
# => <Fog::Compute::Softlayer::KeyPair>
43+
# => <Fog::Softlayer::Compute::KeyPair>
4444
kp.destroy
4545
```
4646

@@ -50,9 +50,9 @@ If you are unfamiliar with fog, we recommend reading our [getting started](getti
5050

5151
```ruby
5252
the_first_key = @sl.key_pairs.by_label('my-new-key')
53-
# => <Fog::Compute::Softlayer::KeyPair>
53+
# => <Fog::Softlayer::Compute::KeyPair>
5454
the_second_key = @sl.key_pairs.by_label('my-other-new-key')
55-
# => <Fog::Compute::Softlayer::KeyPair>
55+
# => <Fog::Softlayer::Compute::KeyPair>
5656

5757
opts = {
5858
:flavor_id => 'm1.small',
@@ -62,14 +62,14 @@ If you are unfamiliar with fog, we recommend reading our [getting started](getti
6262
:key_pairs => [ the_first_key, the_second_key ]
6363
}
6464
@sl.servers.create(opts)
65-
# => <Fog::Compute::Softlayer::Server>
65+
# => <Fog::Softlayer::Compute::Server>
6666
```
6767
6868
1. Look at the key pairs on a server.
6969
7070
```ruby
7171
server = @sl.servers.get(12345)
7272
server.key_pairs
73-
# => [ <Fog::Compute::Softlayer::Server>,
74-
# <Fog::Compute::Softlayer::Server>]
75-
```
73+
# => [ <Fog::Softlayer::Compute::Server>,
74+
# <Fog::Softlayer::Compute::Server>]
75+
```

0 commit comments

Comments
 (0)