fog-aliyun 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/fog/aliyun/compute.rb +4 -4
- data/lib/fog/aliyun/models/compute/flavor.rb +28 -0
- data/lib/fog/aliyun/models/compute/flavors.rb +13 -0
- data/lib/fog/aliyun/models/compute/server.rb +12 -0
- data/lib/fog/aliyun/models/compute/vpcs.rb +1 -1
- data/lib/fog/aliyun/models/storage/directories.rb +19 -3
- data/lib/fog/aliyun/requests/compute/allocate_eip_address.rb +1 -1
- data/lib/fog/aliyun/requests/compute/allocate_public_ip_address.rb +1 -1
- data/lib/fog/aliyun/requests/compute/associate_eip_address.rb +1 -1
- data/lib/fog/aliyun/requests/compute/attach_disk.rb +1 -1
- data/lib/fog/aliyun/requests/compute/create_disk.rb +2 -2
- data/lib/fog/aliyun/requests/compute/create_image.rb +1 -1
- data/lib/fog/aliyun/requests/compute/create_security_group.rb +1 -1
- data/lib/fog/aliyun/requests/compute/create_security_group_egress_ip_rule.rb +1 -1
- data/lib/fog/aliyun/requests/compute/create_security_group_egress_sg_rule.rb +1 -1
- data/lib/fog/aliyun/requests/compute/create_security_group_ip_rule.rb +1 -1
- data/lib/fog/aliyun/requests/compute/create_security_group_sg_rule.rb +1 -1
- data/lib/fog/aliyun/requests/compute/create_server.rb +23 -12
- data/lib/fog/aliyun/requests/compute/create_snapshot.rb +1 -1
- data/lib/fog/aliyun/requests/compute/create_vpc.rb +1 -1
- data/lib/fog/aliyun/requests/compute/create_vswitch.rb +1 -1
- data/lib/fog/aliyun/requests/compute/delete_disk.rb +1 -1
- data/lib/fog/aliyun/requests/compute/delete_image.rb +1 -1
- data/lib/fog/aliyun/requests/compute/delete_security_group.rb +1 -1
- data/lib/fog/aliyun/requests/compute/delete_security_group_egress_ip_rule.rb +1 -1
- data/lib/fog/aliyun/requests/compute/delete_security_group_egress_sg_rule.rb +1 -1
- data/lib/fog/aliyun/requests/compute/delete_security_group_ip_rule.rb +1 -1
- data/lib/fog/aliyun/requests/compute/delete_security_group_sg_rule.rb +1 -1
- data/lib/fog/aliyun/requests/compute/delete_server.rb +1 -1
- data/lib/fog/aliyun/requests/compute/delete_snapshot.rb +1 -1
- data/lib/fog/aliyun/requests/compute/delete_vpc.rb +1 -1
- data/lib/fog/aliyun/requests/compute/delete_vswitch.rb +1 -1
- data/lib/fog/aliyun/requests/compute/detach_disk.rb +1 -1
- data/lib/fog/aliyun/requests/compute/join_security_group.rb +1 -1
- data/lib/fog/aliyun/requests/compute/leave_security_group.rb +1 -1
- data/lib/fog/aliyun/requests/compute/list_disks.rb +1 -1
- data/lib/fog/aliyun/requests/compute/list_eip_addresses.rb +1 -1
- data/lib/fog/aliyun/requests/compute/list_images.rb +1 -1
- data/lib/fog/aliyun/requests/compute/list_route_tables.rb +1 -1
- data/lib/fog/aliyun/requests/compute/list_security_group_rules.rb +1 -1
- data/lib/fog/aliyun/requests/compute/list_security_groups.rb +1 -1
- data/lib/fog/aliyun/requests/compute/list_server_types.rb +2 -2
- data/lib/fog/aliyun/requests/compute/list_servers.rb +1 -1
- data/lib/fog/aliyun/requests/compute/list_snapshots.rb +1 -1
- data/lib/fog/aliyun/requests/compute/list_vpcs.rb +1 -1
- data/lib/fog/aliyun/requests/compute/list_vrouters.rb +1 -1
- data/lib/fog/aliyun/requests/compute/list_vswitchs.rb +1 -1
- data/lib/fog/aliyun/requests/compute/list_zones.rb +1 -1
- data/lib/fog/aliyun/requests/compute/modify_vpc.rb +1 -1
- data/lib/fog/aliyun/requests/compute/modify_vswitch.rb +1 -1
- data/lib/fog/aliyun/requests/compute/reboot_server.rb +1 -1
- data/lib/fog/aliyun/requests/compute/release_eip_address.rb +1 -1
- data/lib/fog/aliyun/requests/compute/start_server.rb +1 -1
- data/lib/fog/aliyun/requests/compute/stop_server.rb +1 -1
- data/lib/fog/aliyun/requests/compute/unassociate_eip_address.rb +1 -1
- data/lib/fog/aliyun/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 376e9d625d0f891e03da5fa24434bf5788e37a8c4a376a68c36e0491ec7db99e
|
4
|
+
data.tar.gz: 9aa48ef8f48fedfdbb039396f6541684454a99ab596da88aeb69080dbc683c30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd565acfa305709b20e24775a94ca17eb3dd12f2151361fca6a0cf40fa43993108b18d02b6d9fe6ecef86fabc7a64204710c4efe6650c62d0c94c90002ebcf42
|
7
|
+
data.tar.gz: 641a2b4a09e558c29851bebd8ec089f6fd872f6c568f3076ca74c6d7909adb3b99d0fe32bfa7e05059e45630fc0f6422a5a97945b3b719f16e60b4cbbe874287
|
data/lib/fog/aliyun/compute.rb
CHANGED
@@ -36,7 +36,8 @@ module Fog
|
|
36
36
|
collection :route_tables
|
37
37
|
model :route_entry
|
38
38
|
collection :route_entrys
|
39
|
-
|
39
|
+
model :flavor
|
40
|
+
collection :flavors
|
40
41
|
## REQUESTS
|
41
42
|
#
|
42
43
|
request_path 'fog/aliyun/requests/compute'
|
@@ -274,7 +275,6 @@ module Fog
|
|
274
275
|
missing_credentials << :aliyun_accesskey_secret unless @aliyun_accesskey_secret
|
275
276
|
missing_credentials << :aliyun_region_id unless @aliyun_region_id
|
276
277
|
missing_credentials << :aliyun_url unless @aliyun_url
|
277
|
-
missing_credentials << :aliyun_zone_id unless @aliyun_zone_id
|
278
278
|
raise ArgumentError, "Missing required arguments: #{missing_credentials.join(', ')}" unless missing_credentials.empty?
|
279
279
|
|
280
280
|
@connection_options = options[:connection_options] || {}
|
@@ -383,7 +383,7 @@ module Fog
|
|
383
383
|
end
|
384
384
|
|
385
385
|
# operation compute--collection of default parameters
|
386
|
-
def
|
386
|
+
def defaultParameters(action, sigNonce, time)
|
387
387
|
parTimeFormat = time.strftime('%Y-%m-%dT%H:%M:%SZ')
|
388
388
|
para = {
|
389
389
|
'Format' => 'JSON',
|
@@ -416,7 +416,7 @@ module Fog
|
|
416
416
|
end
|
417
417
|
|
418
418
|
# compute signature
|
419
|
-
# This method should be considered deprecated and replaced with sign_without_encoding, which is better for using querystring hashes and not
|
419
|
+
# This method should be considered deprecated and replaced with sign_without_encoding, which is better for using querystring hashes and not
|
420
420
|
# building querystrings with string concatination.
|
421
421
|
def sign(accessKeySecret, parameters)
|
422
422
|
signature = sign_without_encoding(accessKeySecret, parameters)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class Aliyun
|
6
|
+
class Flavor < Fog::Model
|
7
|
+
attribute :base_line_credit, aliases: 'BaseLineCredit'
|
8
|
+
attribute :cpu_core_count, aliases: 'CpuCoreCount'
|
9
|
+
attribute :eni_private_ip_quantitiy, aliases: 'EniPrivateIpAddressQuantity'
|
10
|
+
attribute :eni_quantity, aliases: 'EniQuantity'
|
11
|
+
attribute :gpu_amount, aliases: 'GPUAmount'
|
12
|
+
attribute :gpu_spec, aliases: 'GPUSpec'
|
13
|
+
attribute :intial_credit, aliases: 'IntialCredit'
|
14
|
+
attribute :instance_bandwidth_rx, aliases: 'InstanceBandwidthRx'
|
15
|
+
attribute :instance_bandwidth_tx, aliases: 'InstanceBandwidthTx'
|
16
|
+
attribute :instance_family_level, aliases: 'InstanceFamilyLevel'
|
17
|
+
attribute :instance_pps_rx, aliases: 'InstancePpsRx'
|
18
|
+
attribute :instance_pps_tx, aliases: 'InstancePpsTx'
|
19
|
+
attribute :instance_type_family, alieses: 'InstanceTypeFamily'
|
20
|
+
attribute :instance_type_id, aliases: 'InstanceTypeId'
|
21
|
+
attribute :local_storage_amount, aliases: 'LocalStorageAmount'
|
22
|
+
attribute :local_storage_capacity, aliases: 'LocalStorageCapacity'
|
23
|
+
attribute :local_storage_category, aliases: 'LocalStorageCategory'
|
24
|
+
attribute :memory_size, alieses: 'MemorySize'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class Aliyun
|
4
|
+
class Flavors < Fog::Collection
|
5
|
+
model Fog::Compute::Aliyun::Flavor
|
6
|
+
def all
|
7
|
+
data = Fog::JSON.decode(service.list_server_types.body)['InstanceTypes']['InstanceType']
|
8
|
+
load(data)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -34,6 +34,9 @@ module Fog
|
|
34
34
|
attribute :charge_type, aliases: 'InstanceChargeType'
|
35
35
|
attribute :operation_locks, aliases: 'OperationLocks'
|
36
36
|
attribute :expired_at, aliases: 'ExpiredTime'
|
37
|
+
attribute :vswitch_id, aliases: 'VSwitchId'
|
38
|
+
attribute :key_pair_name, aliases: 'KeyPairName'
|
39
|
+
attribute :user_data, aliases: 'UserData'
|
37
40
|
|
38
41
|
def image
|
39
42
|
requires :image_id
|
@@ -45,6 +48,15 @@ module Fog
|
|
45
48
|
$vpc = Fog::Compute::Aliyun::Vpcs.new(service: service).all('vpcId' => vpc_id)[0]
|
46
49
|
end
|
47
50
|
|
51
|
+
def save(options = {})
|
52
|
+
requires :image_id, :security_group_ids, :type
|
53
|
+
options[:VSwitchId] = vswitch_id if vswitch_id
|
54
|
+
options[:KeyPairName] = key_pair_name if key_pair_name
|
55
|
+
options[:UserData] = user_data if user_data
|
56
|
+
options[:InstanceName] = name if name
|
57
|
+
data = Fog::JSON.decode(service.create_server(image_id, security_group_ids, type, options).body)
|
58
|
+
merge_attributes(data)
|
59
|
+
end
|
48
60
|
# {"ImageId"=>"ubuntu1404_32_20G_aliaegis_20150325.vhd", "InnerIpAddress"=>{"IpAddress"=>["10.171.90.171"]},
|
49
61
|
# "VlanId"=>"", "InstanceId"=>"i-25d1ry3jz",
|
50
62
|
# "EipAddress"=>{"IpAddress"=>"", "AllocationId"=>"", "InternetChargeType"=>""},
|
@@ -24,11 +24,27 @@ module Fog
|
|
24
24
|
load(data)
|
25
25
|
end
|
26
26
|
|
27
|
+
# get method used to get a specified directory.
|
28
|
+
# If the directory is not exist, this method will create a new with 'key'
|
29
|
+
# In order to support multi-buckets scenario which making bucket as a solo directory, it have been expanded.
|
30
|
+
# If key is a directory(including /), return an existed or a new one;
|
31
|
+
# If key does not contain /, if bucket, return '', else return an existed or a new one directory;
|
27
32
|
def get(key, options = {})
|
28
33
|
if !key.nil? && key != '' && key != '.'
|
29
|
-
|
30
|
-
|
31
|
-
|
34
|
+
if key.include? '/'
|
35
|
+
dir = key + '/'
|
36
|
+
ret = service.head_object(dir, options)
|
37
|
+
new(key: key) if ret.data[:status] == 200
|
38
|
+
else
|
39
|
+
data = service.get_bucket(key)
|
40
|
+
if data[:status] == 404
|
41
|
+
dir = key + '/'
|
42
|
+
ret = service.head_object(dir, options)
|
43
|
+
new(key: key) if ret.data[:status] == 200
|
44
|
+
else
|
45
|
+
new(key: '')
|
46
|
+
end
|
47
|
+
end
|
32
48
|
else
|
33
49
|
new(key: '')
|
34
50
|
end
|
@@ -26,7 +26,7 @@ module Fog
|
|
26
26
|
_sigNonce = randonStr
|
27
27
|
_time = Time.new.utc
|
28
28
|
|
29
|
-
_parameters =
|
29
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
30
30
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
31
31
|
|
32
32
|
# optional parameters
|
@@ -20,7 +20,7 @@ module Fog
|
|
20
20
|
_sigNonce = randonStr
|
21
21
|
_time = Time.new.utc
|
22
22
|
|
23
|
-
_parameters =
|
23
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
24
24
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
25
25
|
|
26
26
|
_parameters['InstanceId'] = server_id
|
@@ -22,7 +22,7 @@ module Fog
|
|
22
22
|
|
23
23
|
type = options['instance_type']
|
24
24
|
|
25
|
-
_parameters =
|
25
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
26
26
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
27
27
|
|
28
28
|
_parameters['InstanceId'] = server_id
|
@@ -23,7 +23,7 @@ module Fog
|
|
23
23
|
sigNonce = randonStr
|
24
24
|
time = Time.new.utc
|
25
25
|
|
26
|
-
parameters =
|
26
|
+
parameters = defaultParameters(action, sigNonce, time)
|
27
27
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
28
28
|
|
29
29
|
parameters['InstanceId'] = instanceId
|
@@ -25,7 +25,7 @@ module Fog
|
|
25
25
|
sigNonce = randonStr
|
26
26
|
time = Time.new.utc
|
27
27
|
|
28
|
-
parameters =
|
28
|
+
parameters = defaultParameters(action, sigNonce, time)
|
29
29
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
30
30
|
|
31
31
|
parameters['ZoneId'] = @aliyun_zone_id
|
@@ -90,7 +90,7 @@ module Fog
|
|
90
90
|
sigNonce = randonStr
|
91
91
|
time = Time.new.utc
|
92
92
|
|
93
|
-
parameters =
|
93
|
+
parameters = defaultParameters(action, sigNonce, time)
|
94
94
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
95
95
|
|
96
96
|
parameters['ZoneId'] = @aliyun_zone_id
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['SnapshotId'] = snapshotId
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['SecurityGroupId'] = securitygroup_id
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['SecurityGroupId'] = securitygroup_id
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['SecurityGroupId'] = securitygroup_id
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['SecurityGroupId'] = securitygroup_id
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
_sigNonce = randonStr
|
11
11
|
_time = Time.new.utc
|
12
12
|
|
13
|
-
_parameters =
|
13
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
14
14
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
15
15
|
|
16
16
|
_parameters['ImageId'] = imageId
|
@@ -68,19 +68,30 @@ module Fog
|
|
68
68
|
_parameters['PrivateIpAddress'] = _PrivateIpAddress
|
69
69
|
_pathURL += '&PrivateIpAddress=' + _PrivateIpAddress
|
70
70
|
end
|
71
|
-
|
71
|
+
end
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
73
|
+
_InternetMaxBandwidthIn = options[:InternetMaxBandwidthIn]
|
74
|
+
if _InternetMaxBandwidthIn
|
75
|
+
_parameters['InternetMaxBandwidthIn'] = _InternetMaxBandwidthIn
|
76
|
+
_pathURL += '&InternetMaxBandwidthIn=' + _InternetMaxBandwidthIn
|
77
|
+
end
|
78
78
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
79
|
+
_InternetMaxBandwidthOut = options[:InternetMaxBandwidthOut]
|
80
|
+
if _InternetMaxBandwidthOut
|
81
|
+
_parameters['InternetMaxBandwidthOut'] = _InternetMaxBandwidthOut
|
82
|
+
_pathURL += '&InternetMaxBandwidthOut=' + _InternetMaxBandwidthOut
|
83
|
+
end
|
84
|
+
|
85
|
+
_KeyPairName = options[:KeyPairName]
|
86
|
+
if _KeyPairName
|
87
|
+
_parameters['KeyPairName'] = _KeyPairName
|
88
|
+
_pathURL += '&KeyPairName=' + _KeyPairName
|
89
|
+
end
|
90
|
+
|
91
|
+
_UserData = options[:UserData]
|
92
|
+
if _UserData
|
93
|
+
_parameters['UserData'] = _UserData
|
94
|
+
_pathURL += '&UserData=' + _UserData
|
84
95
|
end
|
85
96
|
|
86
97
|
_signature = sign(@aliyun_accesskey_secret, _parameters)
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['DiskId'] = diskId
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['CidrBlock'] = cidrBlock
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['VpcId'] = vpcId
|
@@ -20,7 +20,7 @@ module Fog
|
|
20
20
|
sigNonce = randonStr
|
21
21
|
time = Time.new.utc
|
22
22
|
|
23
|
-
parameters =
|
23
|
+
parameters = defaultParameters(action, sigNonce, time)
|
24
24
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
25
25
|
|
26
26
|
parameters['DiskId'] = diskId
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['ImageId'] = imageId
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['SecurityGroupId'] = securitygroup_id
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['SecurityGroupId'] = securitygroup_id
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['SecurityGroupId'] = securitygroup_id
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['SecurityGroupId'] = securitygroup_id
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
_sigNonce = randonStr
|
11
11
|
_time = Time.new.utc
|
12
12
|
|
13
|
-
_parameters =
|
13
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
14
14
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
15
15
|
|
16
16
|
_parameters['InstanceId'] = server_id
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['SnapshotId'] = snapshotId
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['InstanceId'] = instanceId
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
_sigNonce = randonStr
|
11
11
|
_time = Time.new.utc
|
12
12
|
|
13
|
-
_parameters =
|
13
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
14
14
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
15
15
|
|
16
16
|
_parameters['InstanceId'] = server_id
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
_sigNonce = randonStr
|
11
11
|
_time = Time.new.utc
|
12
12
|
|
13
|
-
_parameters =
|
13
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
14
14
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
15
15
|
|
16
16
|
_parameters['InstanceId'] = server_id
|
@@ -34,7 +34,7 @@ module Fog
|
|
34
34
|
sigNonce = randonStr
|
35
35
|
time = Time.new.utc
|
36
36
|
|
37
|
-
parameters =
|
37
|
+
parameters = defaultParameters(action, sigNonce, time)
|
38
38
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
39
39
|
|
40
40
|
pageNumber = options[:pageNumber]
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
_sigNonce = randonStr
|
11
11
|
_time = Time.new.utc
|
12
12
|
|
13
|
-
_parameters =
|
13
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
14
14
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
15
15
|
|
16
16
|
_Status = options[:state]
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
pageNumber = options[:pageNumber]
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['VRouterId'] = vrouterid
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['SecurityGroupId'] = securityGroupId
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
pageNumber = options[:pageNumber]
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
_sigNonce = randonStr
|
11
11
|
_time = Time.new.utc
|
12
12
|
|
13
|
-
_parameters =
|
13
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
14
14
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
15
15
|
|
16
16
|
_signature = sign(@aliyun_accesskey_secret, _parameters)
|
@@ -28,7 +28,7 @@ module Fog
|
|
28
28
|
_sigNonce = randonStr
|
29
29
|
_time = Time.new.utc
|
30
30
|
|
31
|
-
_parameters =
|
31
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
32
32
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
33
33
|
|
34
34
|
_signature = sign(@aliyun_accesskey_secret, _parameters)
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
_sigNonce = randonStr
|
11
11
|
_time = Time.new.utc
|
12
12
|
|
13
|
-
_parameters =
|
13
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
14
14
|
_query_parameters = defaultAliyunQueryParameters(_action, _sigNonce, _time)
|
15
15
|
|
16
16
|
_InstanceId = options[:instanceId]
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
pageNumber = options[:pageNumber]
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
_VpcId = options[:vpcId]
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
_VRouterId = options[:vRouterId]
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['VpcId'] = vpcid
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
signature = sign(@aliyun_accesskey_secret, parameters)
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['VpcId'] = vpcId
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
sigNonce = randonStr
|
11
11
|
time = Time.new.utc
|
12
12
|
|
13
|
-
parameters =
|
13
|
+
parameters = defaultParameters(action, sigNonce, time)
|
14
14
|
pathUrl = defaultAliyunUri(action, sigNonce, time)
|
15
15
|
|
16
16
|
parameters['VSwitchId'] = vSwitchId
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
_sigNonce = randonStr
|
11
11
|
_time = Time.new.utc
|
12
12
|
|
13
|
-
_parameters =
|
13
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
14
14
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
15
15
|
|
16
16
|
_parameters['InstanceId'] = server_id
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
_sigNonce = randonStr
|
11
11
|
_time = Time.new.utc
|
12
12
|
|
13
|
-
_parameters =
|
13
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
14
14
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
15
15
|
|
16
16
|
_parameters['AllocationId'] = allocationId
|
@@ -16,7 +16,7 @@ module Fog
|
|
16
16
|
_sigNonce = randonStr
|
17
17
|
_time = Time.new.utc
|
18
18
|
|
19
|
-
_parameters =
|
19
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
20
20
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
21
21
|
|
22
22
|
_parameters['InstanceId'] = server_id
|
@@ -16,7 +16,7 @@ module Fog
|
|
16
16
|
_sigNonce = randonStr
|
17
17
|
_time = Time.new.utc
|
18
18
|
|
19
|
-
_parameters =
|
19
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
20
20
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
21
21
|
|
22
22
|
_parameters['InstanceId'] = server_id
|
@@ -22,7 +22,7 @@ module Fog
|
|
22
22
|
|
23
23
|
type = options['instance_type']
|
24
24
|
|
25
|
-
_parameters =
|
25
|
+
_parameters = defaultParameters(_action, _sigNonce, _time)
|
26
26
|
_pathURL = defaultAliyunUri(_action, _sigNonce, _time)
|
27
27
|
|
28
28
|
_parameters['InstanceId'] = server_id
|
data/lib/fog/aliyun/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-aliyun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Qinsi Deng, Jianxun Li, Jane Han
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -183,6 +183,8 @@ files:
|
|
183
183
|
- lib/fog/aliyun/compute.rb
|
184
184
|
- lib/fog/aliyun/models/compute/eip_address.rb
|
185
185
|
- lib/fog/aliyun/models/compute/eip_addresses.rb
|
186
|
+
- lib/fog/aliyun/models/compute/flavor.rb
|
187
|
+
- lib/fog/aliyun/models/compute/flavors.rb
|
186
188
|
- lib/fog/aliyun/models/compute/image.rb
|
187
189
|
- lib/fog/aliyun/models/compute/images.rb
|
188
190
|
- lib/fog/aliyun/models/compute/route_entry.rb
|
@@ -303,8 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
303
305
|
- !ruby/object:Gem::Version
|
304
306
|
version: '0'
|
305
307
|
requirements: []
|
306
|
-
|
307
|
-
rubygems_version: 2.6.11
|
308
|
+
rubygems_version: 3.0.6
|
308
309
|
signing_key:
|
309
310
|
specification_version: 4
|
310
311
|
summary: Fog provider for Aliyun Web Services.
|