Skip to content

Commit 54a20c4

Browse files
committed
Update Compute to use provider::service syntax
Authored-by: Seth Boyles <[email protected]>
1 parent 5de9351 commit 54a20c4

28 files changed

+85
-85
lines changed

lib/fog/aliyun/compute.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def request(params)
313313
rescue Excon::Errors::HTTPStatusError => error
314314
raise case error
315315
when Excon::Errors::NotFound
316-
Fog::Compute::Aliyun::NotFound.slurp(error)
316+
Fog::Aliyun::Compute::NotFound.slurp(error)
317317
else
318318
error
319319
end
@@ -336,7 +336,7 @@ def VPCrequest(params)
336336
rescue Excon::Errors::HTTPStatusError => error
337337
raise case error
338338
when Excon::Errors::NotFound
339-
Fog::Compute::Aliyun::NotFound.slurp(error)
339+
Fog::Aliyun::Compute::NotFound.slurp(error)
340340
else
341341
error
342342
end

lib/fog/aliyun/models/compute/eip_address.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
require 'fog/core/model'
44
module Fog
5-
module Compute
6-
class Aliyun
5+
module Aliyun
6+
class Compute
77
class EipAddress < Fog::Model
88
identity :id, aliases: 'AllocationId'
99

lib/fog/aliyun/models/compute/eip_addresses.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
require 'fog/aliyun/models/compute/eip_address'
55

66
module Fog
7-
module Compute
8-
class Aliyun
7+
module Aliyun
8+
class Compute
99
class EipAddresses < Fog::Collection
10-
model Fog::Compute::Aliyun::EipAddress
10+
model Fog::Aliyun::Compute::EipAddress
1111

1212
def all(filters_arg = {})
1313
data = Fog::JSON.decode(service.list_eip_addresses(filters_arg).body)['EipAddresses']['EipAddress']

lib/fog/aliyun/models/compute/flavor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
require 'fog/core/model'
22

33
module Fog
4-
module Compute
5-
class Aliyun
4+
module Aliyun
5+
class Compute
66
class Flavor < Fog::Model
77
attribute :base_line_credit, aliases: 'BaseLineCredit'
88
attribute :cpu_core_count, aliases: 'CpuCoreCount'

lib/fog/aliyun/models/compute/flavors.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module Fog
2-
module Compute
3-
class Aliyun
2+
module Aliyun
3+
class Compute
44
class Flavors < Fog::Collection
5-
model Fog::Compute::Aliyun::Flavor
5+
model Fog::Aliyun::Compute::Flavor
66
def all
77
data = Fog::JSON.decode(service.list_server_types.body)['InstanceTypes']['InstanceType']
88
load(data)

lib/fog/aliyun/models/compute/image.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
require 'fog/core/model'
44
module Fog
5-
module Compute
6-
class Aliyun
5+
module Aliyun
6+
class Compute
77
class Image < Fog::Model
88
identity :id, aliases: 'ImageId'
99

@@ -56,7 +56,7 @@ def ready?
5656

5757
def snapshot
5858
requires :snapshot_id
59-
Fog::Compute::Aliyun::Snapshots.new(service: service).all(snapshotIds: [snapshot_id])[0]
59+
Fog::Aliyun::Compute::Snapshots.new(service: service).all(snapshotIds: [snapshot_id])[0]
6060
end
6161

6262
private

lib/fog/aliyun/models/compute/images.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
require 'fog/aliyun/models/compute/image'
55

66
module Fog
7-
module Compute
8-
class Aliyun
7+
module Aliyun
8+
class Compute
99
class Images < Fog::Collection
10-
model Fog::Compute::Aliyun::Image
10+
model Fog::Aliyun::Compute::Image
1111

1212
def all(filters_arg = {})
1313
unless filters_arg.is_a?(Hash)

lib/fog/aliyun/models/compute/route_entry.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
require 'fog/core/model'
44
module Fog
5-
module Compute
6-
class Aliyun
5+
module Aliyun
6+
class Compute
77
class RouteEntry < Fog::Model
88
# "RouteTables"=>{"RouteTable"=>[
99
# {"CreationTime"=>"2015-08-03T11:23:35Z", "RouteEntrys"=>{"RouteEntry"=>[

lib/fog/aliyun/models/compute/route_entrys.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
require 'fog/aliyun/models/compute/route_entry'
55

66
module Fog
7-
module Compute
8-
class Aliyun
7+
module Aliyun
8+
class Compute
99
class RouteEntrys < Fog::Collection
1010
attribute :route_table
1111

12-
model Fog::Compute::Aliyun::RouteEntry
12+
model Fog::Aliyun::Compute::RouteEntry
1313

1414
def all(options = {})
1515
requires :route_table

lib/fog/aliyun/models/compute/route_table.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
require 'fog/core/model'
44
module Fog
5-
module Compute
6-
class Aliyun
5+
module Aliyun
6+
class Compute
77
class RouteTable < Fog::Model
88
# "RouteTables"=>{"RouteTable"=>[
99
# {"CreationTime"=>"2015-08-03T11:23:35Z", "RouteEntrys"=>{"RouteEntry"=>[
@@ -17,10 +17,10 @@ class RouteTable < Fog::Model
1717
attribute :created_at, aliases: 'CreationTime'
1818
attribute :type, aliases: 'RouteTableType'
1919
attribute :v_router_id, aliases: 'VRouterId'
20-
# collection Fog::Compute::Aliyun::RouteEntrys
20+
# collection Fog::Aliyun::Compute::RouteEntrys
2121
def route_entrys
2222
@route_entrys ||= begin
23-
Fog::Compute::Aliyun::RouteEntrys.new(
23+
Fog::Aliyun::Compute::RouteEntrys.new(
2424
route_table: self,
2525
service: service
2626
)

0 commit comments

Comments
 (0)