mirror of
				https://github.com/fog/fog.git
				synced 2022-11-09 13:51:43 -05:00 
			
		
		
		
	[compute|glesys] rearrange to match current naming conventions
This commit is contained in:
		
							parent
							
								
									5f7c5c6c15
								
							
						
					
					
						commit
						3a17ba2249
					
				
					 25 changed files with 9 additions and 9 deletions
				
			
		
							
								
								
									
										110
									
								
								lib/fog/glesys/compute.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										110
									
								
								lib/fog/glesys/compute.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,110 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys < Fog::Service
 | 
			
		||||
 | 
			
		||||
      requires :glesys_username, :glesys_api_key
 | 
			
		||||
 | 
			
		||||
      API_URL = "https://api.glesys.com"
 | 
			
		||||
 | 
			
		||||
      model_path 'fog/glesys/models/compute'
 | 
			
		||||
      collection  :servers
 | 
			
		||||
      model       :server
 | 
			
		||||
      collection  :templates
 | 
			
		||||
      model       :template
 | 
			
		||||
      collection  :ips
 | 
			
		||||
      model       :ip
 | 
			
		||||
 | 
			
		||||
      request_path 'fog/glesys/requests/compute'
 | 
			
		||||
      request :create
 | 
			
		||||
      request :destroy
 | 
			
		||||
      request :list_servers
 | 
			
		||||
      request :server_details
 | 
			
		||||
      request :server_status
 | 
			
		||||
      request :start
 | 
			
		||||
      request :stop
 | 
			
		||||
      # Templates
 | 
			
		||||
      request :template_list
 | 
			
		||||
      # IP operations
 | 
			
		||||
      request :ip_list_free
 | 
			
		||||
      request :ip_list_own
 | 
			
		||||
      request :ip_details
 | 
			
		||||
      request :ip_take
 | 
			
		||||
      request :ip_release
 | 
			
		||||
      request :ip_add
 | 
			
		||||
      request :ip_remove
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      class Mock
 | 
			
		||||
 | 
			
		||||
        def initialize(options)
 | 
			
		||||
          Fog::Mock.not_implemented
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def request(method_name, options = {})
 | 
			
		||||
          Fog::Mock.not_implemented
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def initialize(options)
 | 
			
		||||
          require 'multi_json'
 | 
			
		||||
          require 'base64'
 | 
			
		||||
 | 
			
		||||
          @api_url = options[:glesys_api_url] || Fog.credentials[:glesys_api_url] || API_URL
 | 
			
		||||
          @glesys_username = options[:glesys_username] || Fog.credentials[:glesys_api_key]
 | 
			
		||||
          @glesys_api_key = options[:glesys_api_key] || Fog.credentials[:glesys_api_key]
 | 
			
		||||
          @connection = Fog::Connection.new(@api_url)
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def request(method_name, options = {}) 
 | 
			
		||||
 | 
			
		||||
          options.merge!( {:format => 'json'})
 | 
			
		||||
          
 | 
			
		||||
          begin
 | 
			
		||||
            parser = options.delete(:parser)
 | 
			
		||||
            data = @connection.request(
 | 
			
		||||
              :expects => 200,
 | 
			
		||||
              :method  => "POST",
 | 
			
		||||
              :body    => urlencode(options),
 | 
			
		||||
              :parser  => parser,
 | 
			
		||||
              :path    => method_name,
 | 
			
		||||
              :headers => {
 | 
			
		||||
                'Authorization' => "Basic #{encoded_api_auth}",
 | 
			
		||||
                'Content-Type'  => 'application/x-www-form-urlencoded'
 | 
			
		||||
              }
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
            data.body = MultiJson.decode(data.body)
 | 
			
		||||
 | 
			
		||||
            unless data.body['response']['status']['code'] == '200'
 | 
			
		||||
              raise Fog::Compute::Glesys::Error, "#{data.body['response']['status']['text']}"
 | 
			
		||||
            end
 | 
			
		||||
            data
 | 
			
		||||
          rescue Excon::Errors::HTTPStatusError => error
 | 
			
		||||
            raise case error
 | 
			
		||||
            when Excon::Errors::NotFound
 | 
			
		||||
              Fog::Compute::Glesys::NotFound.slurp(error)
 | 
			
		||||
            else
 | 
			
		||||
              error
 | 
			
		||||
            end 
 | 
			
		||||
          end 
 | 
			
		||||
        end 
 | 
			
		||||
 | 
			
		||||
        private
 | 
			
		||||
 | 
			
		||||
        def encoded_api_auth
 | 
			
		||||
          token = [@glesys_username, @glesys_api_key].join(':')
 | 
			
		||||
          Base64.encode64(token).delete("\r\n")
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def urlencode(hash)
 | 
			
		||||
          hash.to_a.collect! { |k, v| "#{k}=#{v.to_s}" }.join("&")
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										75
									
								
								lib/fog/glesys/models/compute/ip.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										75
									
								
								lib/fog/glesys/models/compute/ip.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,75 @@
 | 
			
		|||
require 'fog/core/model'
 | 
			
		||||
 | 
			
		||||
module Fog
 | 
			
		||||
  module Glesys
 | 
			
		||||
    class Compute
 | 
			
		||||
 | 
			
		||||
      class Ip < Fog::Model
 | 
			
		||||
        extend Fog::Deprecation
 | 
			
		||||
 | 
			
		||||
        identity :serverid
 | 
			
		||||
 | 
			
		||||
        attribute :datacenter
 | 
			
		||||
        attribute :version
 | 
			
		||||
        attribute :platform
 | 
			
		||||
        attribute :ip
 | 
			
		||||
 | 
			
		||||
        def list_own
 | 
			
		||||
          connection.list_own
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def list_free
 | 
			
		||||
          requires :version, :datacenter, :platform
 | 
			
		||||
          connection.ip_list_free(
 | 
			
		||||
            :ipversion => version,
 | 
			
		||||
            :platform => platform,
 | 
			
		||||
            :datacenter => datacenter
 | 
			
		||||
          ).body['response']['iplist']
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def details
 | 
			
		||||
          requires :version, :ip
 | 
			
		||||
          connection.ip_details(
 | 
			
		||||
            :ipversion => version,
 | 
			
		||||
            :ipaddress => ip
 | 
			
		||||
          )
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def take
 | 
			
		||||
          requires :version, :ip
 | 
			
		||||
          connection.ip_take(
 | 
			
		||||
            :ipversion => version,
 | 
			
		||||
            :ipaddress => ip
 | 
			
		||||
          )
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def release
 | 
			
		||||
          requires :version, :ip
 | 
			
		||||
          connection.ip_release(
 | 
			
		||||
            :ipversion => version,
 | 
			
		||||
            :ipaddress => ip
 | 
			
		||||
          )
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def add
 | 
			
		||||
          requires :serverid, :version, :ip
 | 
			
		||||
          connection.ip_add(
 | 
			
		||||
            :serverid  => serverid,
 | 
			
		||||
            :ipversion => version,
 | 
			
		||||
            :ipaddress => ip
 | 
			
		||||
          )
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def remove
 | 
			
		||||
          requires :serverid, :version, :ip
 | 
			
		||||
          connection.ip_remove(
 | 
			
		||||
            :serverid  => serverid,
 | 
			
		||||
            :ipversion => version,
 | 
			
		||||
            :ipaddress => ip
 | 
			
		||||
          )
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										39
									
								
								lib/fog/glesys/models/compute/ips.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								lib/fog/glesys/models/compute/ips.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,39 @@
 | 
			
		|||
require 'fog/core/collection'
 | 
			
		||||
require 'fog/glesys/models/compute/ip'
 | 
			
		||||
 | 
			
		||||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
 | 
			
		||||
      class Ips < Fog::Collection
 | 
			
		||||
 | 
			
		||||
        model Fog::Glesys::Compute::Ip
 | 
			
		||||
 | 
			
		||||
        attribute :serverid
 | 
			
		||||
 | 
			
		||||
        def all
 | 
			
		||||
          data = connection.ip_list_own.body['response']['iplist']
 | 
			
		||||
          load(data)
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def get(identifier)
 | 
			
		||||
          return nil if identifier.nil? || identifier == ""
 | 
			
		||||
          
 | 
			
		||||
          self.new( :serverid => identifier )          
 | 
			
		||||
 | 
			
		||||
          data  = connection.ip_list_own(:serverid => identifier).body['response']
 | 
			
		||||
          if data['iplist'].empty?
 | 
			
		||||
            nil 
 | 
			
		||||
          else
 | 
			
		||||
            new(data['iplist'].first)
 | 
			
		||||
          end 
 | 
			
		||||
        end 
 | 
			
		||||
 | 
			
		||||
        def new(attributes = {})
 | 
			
		||||
          super({ :serverid => serverid }.merge!(attributes))
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										71
									
								
								lib/fog/glesys/models/compute/server.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								lib/fog/glesys/models/compute/server.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,71 @@
 | 
			
		|||
require 'fog/compute/models/server'
 | 
			
		||||
 | 
			
		||||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
 | 
			
		||||
      class Server < Fog::Compute::Server
 | 
			
		||||
        extend Fog::Deprecation
 | 
			
		||||
 | 
			
		||||
        identity :serverid
 | 
			
		||||
 | 
			
		||||
        attribute :hostname
 | 
			
		||||
        attribute :datacenter
 | 
			
		||||
        attribute :cpucores
 | 
			
		||||
        attribute :memorysize
 | 
			
		||||
        attribute :disksize
 | 
			
		||||
        attribute :transfer
 | 
			
		||||
        attribute :template
 | 
			
		||||
        attribute :managedhosting
 | 
			
		||||
        attribute :platform
 | 
			
		||||
        attribute :cost
 | 
			
		||||
        attribute :rootpw
 | 
			
		||||
        attribute :keepip
 | 
			
		||||
        attribute :state
 | 
			
		||||
        attribute :iplist
 | 
			
		||||
        attribute :ipversion
 | 
			
		||||
        attribute :ip
 | 
			
		||||
 | 
			
		||||
        def ready?
 | 
			
		||||
          state == 'running'
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def start
 | 
			
		||||
          requires :identity
 | 
			
		||||
          connection.start(:serverid => identity) 
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def stop
 | 
			
		||||
          requires :identity
 | 
			
		||||
          connection.stop(:serverid => identity)
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def destroy
 | 
			
		||||
          requires :identity
 | 
			
		||||
          connection.destroy(:serverid => identity, :keepip => keepip)
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def save
 | 
			
		||||
          raise "Operation not supported" if self.identity
 | 
			
		||||
          requires :hostname, :rootpw
 | 
			
		||||
 | 
			
		||||
          options = {
 | 
			
		||||
            :datacenter => "Falkenberg" || datacenter,
 | 
			
		||||
            :platform   => "Xen" || platform,
 | 
			
		||||
            :hostname   => hostname,
 | 
			
		||||
            :template   => "Debian-6 x64" || template,
 | 
			
		||||
            :disksize   => "10" || disksize,
 | 
			
		||||
            :memorysize => "512" || memorysize,
 | 
			
		||||
            :cpucores   => "1" || cpucores,
 | 
			
		||||
            :rootpw     => rootpw,
 | 
			
		||||
            :transfer   => "500" || transfer,
 | 
			
		||||
          } 
 | 
			
		||||
          data = connection.create(options)
 | 
			
		||||
          merge_attributes(data.body['response']['server'])
 | 
			
		||||
          data.status == 200 ? true : false
 | 
			
		||||
        end
 | 
			
		||||
        
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										34
									
								
								lib/fog/glesys/models/compute/servers.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								lib/fog/glesys/models/compute/servers.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,34 @@
 | 
			
		|||
require 'fog/core/collection'
 | 
			
		||||
require 'fog/glesys/models/compute/server'
 | 
			
		||||
 | 
			
		||||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
 | 
			
		||||
        class Servers < Fog::Collection
 | 
			
		||||
 | 
			
		||||
        model Fog::Compute::Glesys::Server
 | 
			
		||||
 | 
			
		||||
        def all
 | 
			
		||||
          data = connection.list_servers.body['response']['servers']
 | 
			
		||||
          load(data) 
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        def get(identifier)
 | 
			
		||||
          return nil if identifier.nil? || identifier == ""
 | 
			
		||||
          details = connection.server_details(identifier).body['response']
 | 
			
		||||
          status  = connection.server_status(identifier).body['response']
 | 
			
		||||
          if details.empty? || status.empty?
 | 
			
		||||
            nil
 | 
			
		||||
          else
 | 
			
		||||
            status['server'].merge!({ :serverid => identifier})
 | 
			
		||||
            details['server'].merge!(status['server'])
 | 
			
		||||
            new(details['server'])
 | 
			
		||||
          end
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										25
									
								
								lib/fog/glesys/models/compute/template.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								lib/fog/glesys/models/compute/template.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,25 @@
 | 
			
		|||
require 'fog/core/model'
 | 
			
		||||
 | 
			
		||||
module Fog
 | 
			
		||||
  module Glesys
 | 
			
		||||
    class Compute
 | 
			
		||||
 | 
			
		||||
      class Template < Fog::Model
 | 
			
		||||
        extend Fog::Deprecation
 | 
			
		||||
 | 
			
		||||
        identity :templateid
 | 
			
		||||
 | 
			
		||||
        attribute :platform
 | 
			
		||||
        attribute :name
 | 
			
		||||
        attribute :os
 | 
			
		||||
        attribute :min_mem_size
 | 
			
		||||
        attribute :min_disk_size
 | 
			
		||||
 | 
			
		||||
        def list
 | 
			
		||||
          connection.template_list
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										28
									
								
								lib/fog/glesys/models/compute/templates.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								lib/fog/glesys/models/compute/templates.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,28 @@
 | 
			
		|||
require 'fog/core/collection'
 | 
			
		||||
require 'fog/glesys/models/compute/template'
 | 
			
		||||
 | 
			
		||||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
 | 
			
		||||
      class Templates < Fog::Collection
 | 
			
		||||
 | 
			
		||||
        model Fog::Glesys::Compute::Template
 | 
			
		||||
 | 
			
		||||
        #attribute :platform
 | 
			
		||||
        #attribute :name
 | 
			
		||||
        #attribute :os
 | 
			
		||||
        #attribute :min_mem_size
 | 
			
		||||
        #attribute :min_disk_size
 | 
			
		||||
 | 
			
		||||
        def all
 | 
			
		||||
          openvz = connection.template_list.body['response']['templates']['OpenVZ']
 | 
			
		||||
          xen    = connection.template_list.body['response']['templates']['Xen']
 | 
			
		||||
 | 
			
		||||
          load(xen+openvz)
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										15
									
								
								lib/fog/glesys/requests/compute/create.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								lib/fog/glesys/requests/compute/create.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def create(options = {})
 | 
			
		||||
          request('server/create/',options)
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										18
									
								
								lib/fog/glesys/requests/compute/destroy.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								lib/fog/glesys/requests/compute/destroy.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,18 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def destroy(options)
 | 
			
		||||
 | 
			
		||||
          if options[:keepip].nil?
 | 
			
		||||
            options[:keepip] = 0
 | 
			
		||||
          end
 | 
			
		||||
 | 
			
		||||
          request("/server/destroy", options)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_add.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_add.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def ip_add(params)
 | 
			
		||||
          request("/ip/add", params)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_details.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_details.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def ip_list_free(params)
 | 
			
		||||
          request("/ip/listfree", params)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_list_free.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_list_free.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def ip_list_free(options = {})
 | 
			
		||||
          request("/ip/listfree", options)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_list_own.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_list_own.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def ip_list_own(options = {})
 | 
			
		||||
          request("/ip/listown", options)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_release.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_release.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def ip_release(params)
 | 
			
		||||
          request("/ip/release", params)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_remove.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_remove.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def ip_remove(params)
 | 
			
		||||
          request("/ip/remove", params)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_take.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lib/fog/glesys/requests/compute/ip_take.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def ip_take(params)
 | 
			
		||||
          request("/ip/take", params)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										19
									
								
								lib/fog/glesys/requests/compute/list_servers.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								lib/fog/glesys/requests/compute/list_servers.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,19 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def list_servers(serverid = nil, options = {})
 | 
			
		||||
 | 
			
		||||
          unless serverid.nil?
 | 
			
		||||
            options[:serverid] = serverid
 | 
			
		||||
          end
 | 
			
		||||
 | 
			
		||||
          request("/server/list", options)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/fog/glesys/requests/compute/server_details.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lib/fog/glesys/requests/compute/server_details.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def server_details(serverid)
 | 
			
		||||
          request("/server/details", { :serverid => serverid })
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/fog/glesys/requests/compute/server_status.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lib/fog/glesys/requests/compute/server_status.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def server_status(serverid)
 | 
			
		||||
          request("/server/status", { :serverid => serverid } )
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/fog/glesys/requests/compute/start.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lib/fog/glesys/requests/compute/start.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def start(param)
 | 
			
		||||
          request("/server/start", param)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/fog/glesys/requests/compute/stop.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lib/fog/glesys/requests/compute/stop.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def stop(param)
 | 
			
		||||
          request("/server/stop", param)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								lib/fog/glesys/requests/compute/template_list.rb
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lib/fog/glesys/requests/compute/template_list.rb
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
module Fog
 | 
			
		||||
  module Compute
 | 
			
		||||
    class Glesys
 | 
			
		||||
      class Real
 | 
			
		||||
 | 
			
		||||
        def template_list(options = {})
 | 
			
		||||
          request("/server/templates", options)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue