lib/fog/oraclecloud/requests/compute/get_orchestration.rb in fog-oraclecloud-0.1.1 vs lib/fog/oraclecloud/requests/compute/get_orchestration.rb in fog-oraclecloud-0.1.2
- old
+ new
@@ -17,8 +17,23 @@
}
)
response
end
end
+
+ class Mock
+ def get_orchestration(name)
+ response = Excon::Response.new
+ clean_name = name.sub "/Compute-#{@identity_domain}/#{@username}/", ''
+
+ if 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