Class: Fog::Compute::Aliyun::Server

Inherits:
Server
  • Object
show all
Defined in:
lib/fog/aliyun/models/compute/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#personalityHash

Note:

This attribute is only used for server creation. This field will be nil on subsequent retrievals.

Returns Hash containing data to inject into the file system of the cloud server instance during server creation.

Examples:

To inject fog.txt into file system

:personality => [{ :path => '/root/fog.txt',
                   :contents => Base64.encode64('Fog was here!')
                }]

Returns:

  • (Hash)

    Hash containing data to inject into the file system of the cloud server instance during server creation.

See Also:



# File 'lib/fog/aliyun/models/compute/server.rb', line 60

Instance Method Details

#imageObject



38
39
40
41
# File 'lib/fog/aliyun/models/compute/server.rb', line 38

def image
  requires :image_id
  Fog::Compute::Aliyun::Image.new(service: service).all(imageId: image_id)[0]
end

#vpcObject



43
44
45
46
# File 'lib/fog/aliyun/models/compute/server.rb', line 43

def vpc
  requires :vpc_id
  $vpc = Fog::Compute::Aliyun::Vpcs.new(service: service).all('vpcId' => vpc_id)[0]
end