From 3063a57e9412b25fa03c4d0984b64670bbb7256b Mon Sep 17 00:00:00 2001 From: dengqinsi Date: Mon, 28 Sep 2015 23:40:03 -0700 Subject: [PATCH] Update comments. --- fog-aliyun.gemspec | 2 +- lib/fog/aliyun/requests/compute/allocate_eip_address.rb | 2 +- .../aliyun/requests/compute/allocate_public_ip_address.rb | 2 +- lib/fog/aliyun/requests/compute/associate_eip_address.rb | 2 +- lib/fog/aliyun/requests/compute/create_disk.rb | 2 +- lib/fog/aliyun/requests/compute/create_security_group.rb | 2 +- .../requests/compute/create_security_group_ip_rule.rb | 4 +--- .../requests/compute/create_security_group_sg_rule.rb | 6 ++---- lib/fog/aliyun/requests/compute/create_server.rb | 8 ++------ lib/fog/aliyun/requests/compute/create_vpc.rb | 2 +- lib/fog/aliyun/requests/compute/create_vswitch.rb | 2 +- lib/fog/aliyun/requests/compute/delete_disk.rb | 2 +- lib/fog/aliyun/requests/compute/delete_security_group.rb | 2 +- .../requests/compute/delete_security_group_ip_rule.rb | 4 +--- .../requests/compute/delete_security_group_sg_rule.rb | 6 ++---- lib/fog/aliyun/requests/compute/delete_vpc.rb | 2 +- lib/fog/aliyun/requests/compute/delete_vswitch.rb | 2 +- lib/fog/aliyun/requests/compute/list_disks.rb | 2 +- lib/fog/aliyun/requests/compute/list_eip_addresses.rb | 5 ++--- lib/fog/aliyun/requests/compute/list_images.rb | 3 +-- .../aliyun/requests/compute/list_security_group_rules.rb | 2 +- lib/fog/aliyun/requests/compute/list_security_groups.rb | 4 ++-- lib/fog/aliyun/requests/compute/list_servers.rb | 2 +- lib/fog/aliyun/requests/compute/list_snapshots.rb | 2 +- lib/fog/aliyun/requests/compute/list_vpcs.rb | 2 +- lib/fog/aliyun/requests/compute/list_vswitchs.rb | 6 +----- lib/fog/aliyun/requests/compute/modify_vpc.rb | 4 ++-- lib/fog/aliyun/requests/compute/modify_vswitch.rb | 4 ++-- lib/fog/aliyun/requests/compute/reboot_server.rb | 3 +-- lib/fog/aliyun/requests/compute/release_eip_address.rb | 2 +- lib/fog/aliyun/requests/compute/start_server.rb | 2 +- lib/fog/aliyun/requests/compute/stop_server.rb | 2 +- .../aliyun/requests/compute/unassociate_eip_address.rb | 2 +- lib/fog/aliyun/requests/storage/get_bucket.rb | 4 ++-- lib/fog/aliyun/version.rb | 2 +- 35 files changed, 43 insertions(+), 62 deletions(-) diff --git a/fog-aliyun.gemspec b/fog-aliyun.gemspec index ed0824e..210f340 100755 --- a/fog-aliyun.gemspec +++ b/fog-aliyun.gemspec @@ -6,7 +6,7 @@ require 'fog/aliyun/version' Gem::Specification.new do |spec| spec.name = "fog-aliyun" spec.version = Fog::Aliyun::VERSION - spec.authors = ["dengqinsi/lijianxun/hanyuting"] + spec.authors = ["Qinsi Deng, Jianxun Li, Jane Han"] spec.email = ["dengqs@dtdream.com"] spec.summary = %q{Fog provider for Aliyun Web Services.} diff --git a/lib/fog/aliyun/requests/compute/allocate_eip_address.rb b/lib/fog/aliyun/requests/compute/allocate_eip_address.rb index 0f9c7b2..7068f02 100755 --- a/lib/fog/aliyun/requests/compute/allocate_eip_address.rb +++ b/lib/fog/aliyun/requests/compute/allocate_eip_address.rb @@ -74,6 +74,6 @@ def allocate_address(pool = nil) response end end # mock - end # openstack + end # aliyun end #compute end diff --git a/lib/fog/aliyun/requests/compute/allocate_public_ip_address.rb b/lib/fog/aliyun/requests/compute/allocate_public_ip_address.rb index 8408965..73fe999 100755 --- a/lib/fog/aliyun/requests/compute/allocate_public_ip_address.rb +++ b/lib/fog/aliyun/requests/compute/allocate_public_ip_address.rb @@ -58,6 +58,6 @@ def allocate_address(pool = nil) response end end # mock - end # openstack + end # aliyun end #compute end diff --git a/lib/fog/aliyun/requests/compute/associate_eip_address.rb b/lib/fog/aliyun/requests/compute/associate_eip_address.rb index 4a16f4d..cbf07aa 100755 --- a/lib/fog/aliyun/requests/compute/associate_eip_address.rb +++ b/lib/fog/aliyun/requests/compute/associate_eip_address.rb @@ -61,6 +61,6 @@ def allocate_address(pool = nil) response end end # mock - end # openstack + end # Aliyun end #compute end diff --git a/lib/fog/aliyun/requests/compute/create_disk.rb b/lib/fog/aliyun/requests/compute/create_disk.rb index c61b9c4..19cfe7a 100755 --- a/lib/fog/aliyun/requests/compute/create_disk.rb +++ b/lib/fog/aliyun/requests/compute/create_disk.rb @@ -130,6 +130,6 @@ def create_security_group(name, description) response end end # mock - end # openstack + end # Aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/create_security_group.rb b/lib/fog/aliyun/requests/compute/create_security_group.rb index 62ac3ec..13a3447 100755 --- a/lib/fog/aliyun/requests/compute/create_security_group.rb +++ b/lib/fog/aliyun/requests/compute/create_security_group.rb @@ -72,6 +72,6 @@ def create_security_group(name, description) response end end # mock - end # openstack + end # Aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/create_security_group_ip_rule.rb b/lib/fog/aliyun/requests/compute/create_security_group_ip_rule.rb index 47dae00..0055266 100755 --- a/lib/fog/aliyun/requests/compute/create_security_group_ip_rule.rb +++ b/lib/fog/aliyun/requests/compute/create_security_group_ip_rule.rb @@ -24,7 +24,6 @@ def create_security_group_ip_rule(securitygroup_id,sourceCidrIp, nicType, option pathUrl += '&NicType=' pathUrl += nicType - #端口范围可选,缺省为所有端口 portRange = option[:portRange] unless portRange portRange = '-1/-1' @@ -33,7 +32,6 @@ def create_security_group_ip_rule(securitygroup_id,sourceCidrIp, nicType, option pathUrl += '&PortRange=' pathUrl += URI.encode(portRange,'/[^!*\'()\;?:@#&%=+$,{}[]<>`" ') - #协议类型(tcp/udp等)可选,缺省为所有协议 protocol = option[:protocol] unless protocol protocol = 'all' @@ -83,6 +81,6 @@ def create_security_group_rule(parent_group_id, ip_protocol, from_port, to_port, response end end # mock - end # openstack + end # aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/create_security_group_sg_rule.rb b/lib/fog/aliyun/requests/compute/create_security_group_sg_rule.rb index c841dc1..3223313 100755 --- a/lib/fog/aliyun/requests/compute/create_security_group_sg_rule.rb +++ b/lib/fog/aliyun/requests/compute/create_security_group_sg_rule.rb @@ -19,12 +19,11 @@ def create_security_group_sg_rule(securitygroup_id, source_securyitgroup_id, opt pathUrl += '&SourceGroupId=' pathUrl += source_securyitgroup_id - nicType = 'intranet' #安全组互相授权固定是内网授权模式 + nicType = 'intranet' parameters["NicType"] = nicType pathUrl += '&NicType=' pathUrl += nicType - #端口范围可选,缺省为所有端口 portRange = option[:portRange] unless portRange portRange = '-1/-1' @@ -33,7 +32,6 @@ def create_security_group_sg_rule(securitygroup_id, source_securyitgroup_id, opt pathUrl += '&PortRange=' pathUrl += URI.encode(portRange,'/[^!*\'()\;?:@#&%=+$,{}[]<>`" ') - #协议类型(tcp/udp等)可选,缺省为所有协议 protocol = option[:protocol] unless protocol protocol = 'all' @@ -83,6 +81,6 @@ def create_security_group_rule(parent_group_id, ip_protocol, from_port, to_port, response end end # mock - end # openstack + end # aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/create_server.rb b/lib/fog/aliyun/requests/compute/create_server.rb index 6d4ccee..a108f52 100755 --- a/lib/fog/aliyun/requests/compute/create_server.rb +++ b/lib/fog/aliyun/requests/compute/create_server.rb @@ -15,22 +15,18 @@ def create_server(imageId, securityGroupId, instanceType, options = {}) _parameters['ImageId'] = imageId _pathURL += '&ImageId='+imageId - # instanceType鏀逛负鐩存帴浼犲叆id锛岀敱澶栭儴璋冪敤鑰呴氳繃get鎺ュ彛鑾峰彇type - # instanceType = get_instance_type(cpuNum, memory) - # puts "instanceType:"+instanceType _parameters['InstanceType'] = instanceType _pathURL += '&InstanceType='+instanceType _parameters['SecurityGroupId'] = securityGroupId _pathURL += '&SecurityGroupId='+securityGroupId - #鍙夊弬鏁 _ZoneId = options[:ZoneId] if _ZoneId _parameters['ZoneId']=_ZoneId _pathURL += '&ZoneId='+_ZoneId end - + _InstanceName = options[:InstanceName] if _InstanceName _parameters['InstanceName']=_InstanceName @@ -72,7 +68,7 @@ def create_server(imageId, securityGroupId, instanceType, options = {}) _pathURL += '&PrivateIpAddress='+_PrivateIpAddress end else - #VPC鏂瑰紡涓嶉渶瑕佽缃甫瀹藉睘鎬э紝闈濾PC鏂瑰紡鎵嶈兘璁剧疆鍏ュ嚭甯﹀ + _InternetMaxBandwidthIn = options[:InternetMaxBandwidthIn] if _InternetMaxBandwidthIn _parameters['InternetMaxBandwidthIn']=_InternetMaxBandwidthIn diff --git a/lib/fog/aliyun/requests/compute/create_vpc.rb b/lib/fog/aliyun/requests/compute/create_vpc.rb index 591c1d4..7a22470 100755 --- a/lib/fog/aliyun/requests/compute/create_vpc.rb +++ b/lib/fog/aliyun/requests/compute/create_vpc.rb @@ -68,6 +68,6 @@ def create_security_group(name, description) response end end # mock - end # openstack + end # Aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/create_vswitch.rb b/lib/fog/aliyun/requests/compute/create_vswitch.rb index 2601361..61e8cf0 100755 --- a/lib/fog/aliyun/requests/compute/create_vswitch.rb +++ b/lib/fog/aliyun/requests/compute/create_vswitch.rb @@ -76,6 +76,6 @@ def create_security_group(name, description) response end end # mock - end # openstack + end # Aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/delete_disk.rb b/lib/fog/aliyun/requests/compute/delete_disk.rb index b51b982..0890728 100755 --- a/lib/fog/aliyun/requests/compute/delete_disk.rb +++ b/lib/fog/aliyun/requests/compute/delete_disk.rb @@ -53,6 +53,6 @@ def create_security_group(name, description) response end end # mock - end # openstack + end # Aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/delete_security_group.rb b/lib/fog/aliyun/requests/compute/delete_security_group.rb index 0ee2e0e..ecf88d4 100755 --- a/lib/fog/aliyun/requests/compute/delete_security_group.rb +++ b/lib/fog/aliyun/requests/compute/delete_security_group.rb @@ -46,6 +46,6 @@ def delete_security_group(security_group_id) response end end # mock - end # openstack + end # Aliyun end # compute end #fog diff --git a/lib/fog/aliyun/requests/compute/delete_security_group_ip_rule.rb b/lib/fog/aliyun/requests/compute/delete_security_group_ip_rule.rb index bf03d8b..4e23358 100755 --- a/lib/fog/aliyun/requests/compute/delete_security_group_ip_rule.rb +++ b/lib/fog/aliyun/requests/compute/delete_security_group_ip_rule.rb @@ -23,7 +23,6 @@ def delete_security_group_ip_rule(securyitgroup_id,sourceCidrIp, nicType, option pathUrl += '&NicType=' pathUrl += nicType - #端口范围可选,缺省为所有端口 portRange = option[:portRange] unless portRange portRange = '-1/-1' @@ -32,7 +31,6 @@ def delete_security_group_ip_rule(securyitgroup_id,sourceCidrIp, nicType, option pathUrl += '&PortRange=' pathUrl += URI.encode(portRange,'/[^!*\'()\;?:@#&%=+$,{}[]<>`" ') - #协议类型(tcp/udp等)可选,缺省为所有协议 protocol = option[:protocol] unless protocol protocol = 'all' @@ -82,6 +80,6 @@ def create_security_group_rule(parent_group_id, ip_protocol, from_port, to_port, response end end # mock - end # openstack + end # aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/delete_security_group_sg_rule.rb b/lib/fog/aliyun/requests/compute/delete_security_group_sg_rule.rb index 16bd2d5..15d3604 100755 --- a/lib/fog/aliyun/requests/compute/delete_security_group_sg_rule.rb +++ b/lib/fog/aliyun/requests/compute/delete_security_group_sg_rule.rb @@ -19,12 +19,11 @@ def delete_security_group_sg_rule(securitygroup_id, source_securyitgroup_id, opt pathUrl += '&SourceGroupId=' pathUrl += source_securyitgroup_id - nicType = 'intranet' #安全组互相授权固定是内网授权模式 + nicType = 'intranet' parameters["NicType"] = nicType pathUrl += '&NicType=' pathUrl += nicType - #端口范围可选,缺省为所有端口 portRange = option[:portRange] unless portRange portRange = '-1/-1' @@ -33,7 +32,6 @@ def delete_security_group_sg_rule(securitygroup_id, source_securyitgroup_id, opt pathUrl += '&PortRange=' pathUrl += URI.encode(portRange,'/[^!*\'()\;?:@#&%=+$,{}[]<>`" ') - #协议类型(tcp/udp等)可选,缺省为所有协议 protocol = option[:protocol] unless protocol protocol = 'all' @@ -83,6 +81,6 @@ def create_security_group_rule(parent_group_id, ip_protocol, from_port, to_port, response end end # mock - end # openstack + end # aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/delete_vpc.rb b/lib/fog/aliyun/requests/compute/delete_vpc.rb index f3f194f..dbe6748 100755 --- a/lib/fog/aliyun/requests/compute/delete_vpc.rb +++ b/lib/fog/aliyun/requests/compute/delete_vpc.rb @@ -47,6 +47,6 @@ def delete_security_group(security_group_id) response end end # mock - end # openstack + end # Aliyun end # compute end #fog diff --git a/lib/fog/aliyun/requests/compute/delete_vswitch.rb b/lib/fog/aliyun/requests/compute/delete_vswitch.rb index 11f9e2d..b829b27 100755 --- a/lib/fog/aliyun/requests/compute/delete_vswitch.rb +++ b/lib/fog/aliyun/requests/compute/delete_vswitch.rb @@ -46,6 +46,6 @@ def delete_security_group(security_group_id) response end end # mock - end # openstack + end # Aliyun end # compute end #fog diff --git a/lib/fog/aliyun/requests/compute/list_disks.rb b/lib/fog/aliyun/requests/compute/list_disks.rb index 6b34871..e78fedb 100755 --- a/lib/fog/aliyun/requests/compute/list_disks.rb +++ b/lib/fog/aliyun/requests/compute/list_disks.rb @@ -36,7 +36,7 @@ def list_disks(options={}) pageSize = options[:pageSize] unless pageSize - pageSize = '50' #缺省每页显示50条 + pageSize = '50' end parameters["PageSize"] = pageSize pathUrl += '&PageSize=' diff --git a/lib/fog/aliyun/requests/compute/list_eip_addresses.rb b/lib/fog/aliyun/requests/compute/list_eip_addresses.rb index f80bc9f..b1b3d9a 100755 --- a/lib/fog/aliyun/requests/compute/list_eip_addresses.rb +++ b/lib/fog/aliyun/requests/compute/list_eip_addresses.rb @@ -12,7 +12,6 @@ def list_eip_addresses(options={}) _parameters = defalutParameters(_action, _sigNonce, _time) _pathURL = defaultAliyunUri(_action, _sigNonce, _time) - #鍙夊弬鏁 _Status = options[:aliyun_Status] if _Status _parameters['Status']=_Status @@ -39,7 +38,7 @@ def list_eip_addresses(options={}) _PageSize = options[:pageSize] unless _PageSize - _PageSize = '50' #缂虹渷姣忛〉鏄剧ず50鏉 + _PageSize = '50' end _parameters['PageSize']=_PageSize _pathURL += '&PageSize='+_PageSize @@ -77,6 +76,6 @@ def allocate_address(pool = nil) response end end # mock - end # openstack + end # Aliyun end #compute end diff --git a/lib/fog/aliyun/requests/compute/list_images.rb b/lib/fog/aliyun/requests/compute/list_images.rb index 735d291..8f10f19 100755 --- a/lib/fog/aliyun/requests/compute/list_images.rb +++ b/lib/fog/aliyun/requests/compute/list_images.rb @@ -21,7 +21,7 @@ def list_images(options={}) pageSize = options[:pageSize] unless pageSize - pageSize = '50' #缺省每页显示50条 + pageSize = '50' end parameters["PageSize"] = pageSize pathUrl += '&PageSize=' @@ -48,7 +48,6 @@ def list_images(options={}) pathUrl += snapshotId end - #'system'-alyun, 'self'-userdef, 'others'-, 'marketplace'-imagemarket ownerAlias = options[:ownerAlias] if ownerAlias parameters["ImageOwnerAlias"] = ownerAlias diff --git a/lib/fog/aliyun/requests/compute/list_security_group_rules.rb b/lib/fog/aliyun/requests/compute/list_security_group_rules.rb index e30f7aa..0c11efd 100755 --- a/lib/fog/aliyun/requests/compute/list_security_group_rules.rb +++ b/lib/fog/aliyun/requests/compute/list_security_group_rules.rb @@ -69,6 +69,6 @@ def get_security_group(security_group_id) response end end # mock - end # openstack + end # aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/list_security_groups.rb b/lib/fog/aliyun/requests/compute/list_security_groups.rb index c03cfe3..b36e115 100755 --- a/lib/fog/aliyun/requests/compute/list_security_groups.rb +++ b/lib/fog/aliyun/requests/compute/list_security_groups.rb @@ -30,7 +30,7 @@ def list_security_groups(options={}) pageSize = options[:pageSize] unless pageSize - pageSize = '50' #缺省每页显示50条 + pageSize = '50' end parameters["PageSize"] = pageSize pathUrl += '&PageSize=' @@ -76,6 +76,6 @@ def list_security_groups(server_id = nil) ) end end # mock - end # openstack + end # aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/list_servers.rb b/lib/fog/aliyun/requests/compute/list_servers.rb index 6c0d493..5992cc3 100755 --- a/lib/fog/aliyun/requests/compute/list_servers.rb +++ b/lib/fog/aliyun/requests/compute/list_servers.rb @@ -40,7 +40,7 @@ def list_servers(options={}) end unless _PageSize - _PageSize = '50' #缺省每页显示50条 + _PageSize = '50' end _parameters['PageSize']=_PageSize _pathURL += '&PageSize='+_PageSize diff --git a/lib/fog/aliyun/requests/compute/list_snapshots.rb b/lib/fog/aliyun/requests/compute/list_snapshots.rb index 58e7ab6..993da37 100755 --- a/lib/fog/aliyun/requests/compute/list_snapshots.rb +++ b/lib/fog/aliyun/requests/compute/list_snapshots.rb @@ -50,7 +50,7 @@ def list_snapshoots(options={}) end unless pageSize - pageSize = '50' #缂虹渷姣忛〉鏄剧ず50鏉 + pageSize = '50' end parameters["PageSize"] = pageSize pathUrl += '&PageSize=' diff --git a/lib/fog/aliyun/requests/compute/list_vpcs.rb b/lib/fog/aliyun/requests/compute/list_vpcs.rb index 722c603..8448d66 100755 --- a/lib/fog/aliyun/requests/compute/list_vpcs.rb +++ b/lib/fog/aliyun/requests/compute/list_vpcs.rb @@ -28,7 +28,7 @@ def list_vpcs(options={}) end unless pageSize - pageSize = '50' #缺省每页显示50条 + pageSize = '50' end parameters["PageSize"] = pageSize pathUrl += '&PageSize=' diff --git a/lib/fog/aliyun/requests/compute/list_vswitchs.rb b/lib/fog/aliyun/requests/compute/list_vswitchs.rb index f58e500..e2ddfcb 100755 --- a/lib/fog/aliyun/requests/compute/list_vswitchs.rb +++ b/lib/fog/aliyun/requests/compute/list_vswitchs.rb @@ -1,7 +1,3 @@ - - - - module Fog module Compute class Aliyun @@ -35,7 +31,7 @@ def list_vswitchs(vpcid, options={}) end unless pageSize - pageSize = '50' #缺省每页显示50条 + pageSize = '50' end parameters["PageSize"] = pageSize pathUrl += '&PageSize=' diff --git a/lib/fog/aliyun/requests/compute/modify_vpc.rb b/lib/fog/aliyun/requests/compute/modify_vpc.rb index 0876198..005de83 100755 --- a/lib/fog/aliyun/requests/compute/modify_vpc.rb +++ b/lib/fog/aliyun/requests/compute/modify_vpc.rb @@ -2,7 +2,7 @@ module Fog module Compute class Aliyun class Real - # {Aliyun API Reference}[https://docs.aliyun.com/?spm=5176.100054.3.1.DGkmH7#/pub/ecs/open-api/vpc&modifyvpcattribute] + # {Aliyun API Reference}[https://docs.aliyun.com/?spm=5176.100054.3.1.DGkmH7#/pub/ecs/open-api/vpc&modifyvpcattribute] def modify_vpc(vpcId,options={}) action = 'ModifyVpcAttribute' @@ -68,6 +68,6 @@ def modify_vpc(vpcId, options={}) response end end # mock - end # openstack + end # Aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/modify_vswitch.rb b/lib/fog/aliyun/requests/compute/modify_vswitch.rb index 9ce1b66..55138c2 100755 --- a/lib/fog/aliyun/requests/compute/modify_vswitch.rb +++ b/lib/fog/aliyun/requests/compute/modify_vswitch.rb @@ -2,7 +2,7 @@ module Fog module Compute class Aliyun class Real - # {Aliyun API Reference}[https://docs.aliyun.com/?spm=5176.100054.3.1.DGkmH7#/pub/ecs/open-api/vswitch&modifyvswitchattribute] + # {Aliyun API Reference}[https://docs.aliyun.com/?spm=5176.100054.3.1.DGkmH7#/pub/ecs/open-api/vswitch&modifyvswitchattribute] def modify_vpc(vSwitchId,options={}) action = 'ModifyVSwitchAttribute' @@ -68,6 +68,6 @@ def modify_vpc(vpcId, options={}) response end end # mock - end # openstack + end # Aliyun end # compute end # fog diff --git a/lib/fog/aliyun/requests/compute/reboot_server.rb b/lib/fog/aliyun/requests/compute/reboot_server.rb index 3e89ba4..ed5fc24 100755 --- a/lib/fog/aliyun/requests/compute/reboot_server.rb +++ b/lib/fog/aliyun/requests/compute/reboot_server.rb @@ -2,7 +2,7 @@ module Fog module Compute class Aliyun class Real - # {Aliyun API Reference}[https://docs.aliyun.com/?spm=5176.100054.3.1.DGkmH7#/pub/ecs/open-api/instance&rebootinstance] + # {Aliyun API Reference}[https://docs.aliyun.com/?spm=5176.100054.3.1.DGkmH7#/pub/ecs/open-api/instance&rebootinstance] def reboot_server(server_id, options = {}) _action = 'RebootInstance' @@ -15,7 +15,6 @@ def reboot_server(server_id, options = {}) _parameters['InstanceId']=server_id _pathURL += '&InstanceId='+server_id - #鍙夊弬鏁 _ForceStop = options[:aliyun_ForceStop] if _ForceStop _parameters['ForceStop']=_ForceStop diff --git a/lib/fog/aliyun/requests/compute/release_eip_address.rb b/lib/fog/aliyun/requests/compute/release_eip_address.rb index 798c6e4..4f0ee45 100755 --- a/lib/fog/aliyun/requests/compute/release_eip_address.rb +++ b/lib/fog/aliyun/requests/compute/release_eip_address.rb @@ -48,6 +48,6 @@ def allocate_address(pool = nil) response end end # mock - end # openstack + end # Aliyun end #compute end diff --git a/lib/fog/aliyun/requests/compute/start_server.rb b/lib/fog/aliyun/requests/compute/start_server.rb index da82582..6dd413a 100755 --- a/lib/fog/aliyun/requests/compute/start_server.rb +++ b/lib/fog/aliyun/requests/compute/start_server.rb @@ -37,6 +37,6 @@ def start_server(server_id) true end # def start_server end # class Mock - end # class OpenStack + end # class Aliyun end # module Compute end # module Fog \ No newline at end of file diff --git a/lib/fog/aliyun/requests/compute/stop_server.rb b/lib/fog/aliyun/requests/compute/stop_server.rb index 406ab7c..8a73e42 100755 --- a/lib/fog/aliyun/requests/compute/stop_server.rb +++ b/lib/fog/aliyun/requests/compute/stop_server.rb @@ -37,6 +37,6 @@ def stop_server(server_id) true end # def stop_server end # class Mock - end # class OpenStack + end # class Aliyun end # module Compute end # module Fog \ No newline at end of file diff --git a/lib/fog/aliyun/requests/compute/unassociate_eip_address.rb b/lib/fog/aliyun/requests/compute/unassociate_eip_address.rb index c87251e..13ee7f1 100755 --- a/lib/fog/aliyun/requests/compute/unassociate_eip_address.rb +++ b/lib/fog/aliyun/requests/compute/unassociate_eip_address.rb @@ -51,6 +51,6 @@ def allocate_address(pool = nil) response end end # mock - end # openstack + end # aliyun end #compute end diff --git a/lib/fog/aliyun/requests/storage/get_bucket.rb b/lib/fog/aliyun/requests/storage/get_bucket.rb index 4f4d99b..b3a6ff3 100755 --- a/lib/fog/aliyun/requests/storage/get_bucket.rb +++ b/lib/fog/aliyun/requests/storage/get_bucket.rb @@ -79,7 +79,7 @@ def get_bucket_lifecycle(bucket) :resource => resource, :endpoint => endpoint ) - if 404 != ret.data[:status] + if 404 != ret.data[:status] lifecycle = XmlSimple.xml_in(ret.data[:body])["Rule"][0] else nil @@ -131,7 +131,7 @@ def get_bucket_website(bucket) :resource => resource, :endpoint => endpoint ) - if 404 != ret.data[:status] + if 404 != ret.data[:status] website = XmlSimple.xml_in(ret.data[:body]) else nil diff --git a/lib/fog/aliyun/version.rb b/lib/fog/aliyun/version.rb index de24306..0cbffb9 100755 --- a/lib/fog/aliyun/version.rb +++ b/lib/fog/aliyun/version.rb @@ -1,5 +1,5 @@ module Fog module Aliyun - VERSION = "0.0.3" + VERSION = "0.0.7" end end