Sha256: 30424ed08318ae01b9a2e8b7689583eb61629775fec4f6f896b6e7cf72ed973c
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 KB
Contents
# frozen_string_literal: true module Fog module Compute class Aliyun class Real # Start the server. # # === Parameters # * server_id <~String> - The ID of the server to be started. # === Returns # * success <~Boolean> # {Aliyun API Reference}[https://docs.aliyun.com/?spm=5176.100054.3.1.DGkmH7#/pub/ecs/open-api/instance&staetinstance] def start_server(server_id) _action = 'StartInstance' _sigNonce = randonStr _time = Time.new.utc _parameters = defalutParameters(_action, _sigNonce, _time) _pathURL = defaultAliyunUri(_action, _sigNonce, _time) _parameters['InstanceId'] = server_id _pathURL += '&InstanceId=' + server_id _signature = sign(@aliyun_accesskey_secret, _parameters) _pathURL += '&Signature=' + _signature request( expects: [200, 204], method: 'GET', path: _pathURL ) end start_server end Real class Mock def start_server(_server_id) true end start_server end Mock end aliyun end Compute end Fog
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-aliyun-0.3.1 | lib/fog/aliyun/requests/compute/start_server.rb |