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 58

Instance Method Details

#imageObject



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

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

#vpcObject



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

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