File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Project Guidelines
2+
3+ ## Overview
4+
5+ kitchen-openstack is a Test Kitchen driver for OpenStack. It provisions and destroys Nova instances using the Fog OpenStack library.
6+
7+ ## Code Style
8+
9+ - Ruby 3.1+ required
10+ - All files must start with ` # frozen_string_literal: true `
11+ - Follow Cookstyle (Chef's RuboCop) conventions — config in ` .rubocop.yml `
12+ - Spec files are excluded from linting
13+
14+ ## Architecture
15+
16+ - Driver class: ` Kitchen::Driver::Openstack ` in ` lib/kitchen/driver/openstack.rb ` — extends ` Kitchen::Driver::Base ` (Driver API v2)
17+ - Volume handling: ` Kitchen::Driver::Openstack::Volume ` in ` lib/kitchen/driver/openstack/volume.rb `
18+ - Version constant: ` OPENSTACK_VERSION ` in ` lib/kitchen/driver/openstack_version.rb ` — used by gemspec and release automation
19+ - Configuration uses ` default_config ` declarations; raise ` Kitchen::ActionFailed ` for driver errors
20+
21+ ## Build and Test
22+
23+ ``` bash
24+ bundle install
25+ bundle exec rake # runs tests + style + stats (default)
26+ bundle exec rake test # unit tests only (RSpec)
27+ bundle exec rake style # Cookstyle lint
28+ bundle exec rake quality # style + stats
29+ ```
30+
31+ ## Conventions
32+
33+ - Use ` Fog::OpenStack::Compute ` and ` Fog::OpenStack::Network ` for cloud interactions
34+ - Thread safety: use ` Mutex ` for shared resource pools (e.g., floating IP allocation)
35+ - Resource finders (` find_image ` , ` find_flavor ` , ` find_network ` ) support regex matching via ` /pattern/ ` syntax
36+ - Test with RSpec 3 using ` let ` fixtures, ` double ` mocks, and ` allow_any_instance_of ` for Kitchen internals
37+ - Release automation via Release Please — version bumps go in ` lib/kitchen/driver/openstack_version.rb `
You can’t perform that action at this time.
0 commit comments