Class: Fog::Compute::Aliyun::Servers
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Aliyun::Servers
- Defined in:
- lib/fog/aliyun/models/compute/servers.rb
Instance Method Summary collapse
- #all(options = {}) ⇒ Object
-
#get(server_id) ⇒ Fog::Compute::OpenStack::Server
Creates a new server and populates ssh keys.
Instance Method Details
#all(options = {}) ⇒ Object
12 13 14 15 |
# File 'lib/fog/aliyun/models/compute/servers.rb', line 12 def all( = {}) data = Fog::JSON.decode(service.list_servers().body)['Instances']['Instance'] load(data) end |
#get(server_id) ⇒ Fog::Compute::OpenStack::Server
Creates a new server and populates ssh keys
37 38 39 |
# File 'lib/fog/aliyun/models/compute/servers.rb', line 37 def get(server_id) self.class.new(service: service).all(instanceId: server_id)[0] if server_id end |