Sha256: c4130ed6b41fda8285a049c919558f6c0c49342532ec9f7ebacd10f000eaaf5c

Contents?: true

Size: 632 Bytes

Versions: 4

Compression:

Stored size: 632 Bytes

Contents

module Fog
  module Compute
    class Cloudstack

      class Real
        # Create a new keypair and returns the private key
        #
        # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/createSSHKeyPair.html]
        def create_ssh_key_pair(*args)
          options = {}
          if args[0].is_a? Hash
            options = args[0]
            options.merge!('command' => 'createSSHKeyPair') 
          else
            options.merge!('command' => 'createSSHKeyPair', 
            'name' => args[0])
          end
          request(options)
        end
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
fog-1.26.0 lib/fog/cloudstack/requests/compute/create_ssh_key_pair.rb
fog-1.25.0 lib/fog/cloudstack/requests/compute/create_ssh_key_pair.rb
nsidc-fog-1.24.1 lib/fog/cloudstack/requests/compute/create_ssh_key_pair.rb
fog-1.24.0 lib/fog/cloudstack/requests/compute/create_ssh_key_pair.rb