lib/fog/oraclecloud/requests/compute/start_orchestration.rb in fog-oraclecloud-0.1.7 vs lib/fog/oraclecloud/requests/compute/start_orchestration.rb in fog-oraclecloud-0.1.8

- old
+ new

@@ -15,8 +15,25 @@ '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