Sha256: ea8d6eb01f6ba344e417f6142c4b612d1ff27aa067bb7f49e1bf76bd039ecdd5
Contents?: true
Size: 1.24 KB
Versions: 5
Compression:
Stored size: 1.24 KB
Contents
module Fog module Compute class OracleCloud class Real def start_orchestration (name) if !name.start_with?("/Compute-") then # They haven't provided a well formed name, add their name in name = "/Compute-#{@identity_domain}/#{@username}/#{name}" end request( :method => 'PUT', :expects => 200, :path => "/orchestration#{name}?action=start", :headers => { 'Content-Type' => 'application/oracle-compute-v3+json' } ) end end class Mock def start_orchestration (name) response = Excon::Response.new clean_name = name.sub "/Compute-#{@identity_domain}/#{@username}/", '' if self.data[:orchestrations][clean_name] self.data[:orchestrations][clean_name]['status'] = 'running' instance = self.data[:orchestrations][clean_name] response.status = 200 response.body = instance response else raise Fog::Compute::OracleCloud::NotFound.new("Orchestration #{name} does not exist"); end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems