{"body":"# OpenStack Development Environment\n\n## Repository Structure\nThis is a meta-repository containing multiple OpenStack projects:\n- **ironic/**: Bare metal provisioning service\n- **ironic-python-agent/**: Agent for hardware introspection and provisioning\n- **ironic-specs/**: Design specifications for Ironic\n- **nova/**: Compute service for managing VM instances\n- **nova-specs/**: Design specifications for Nova\n- **networking-baremetal/**: Neutron plugin for bare metal networking\n- **networking-generic-switch/**: ML2 driver for managing physical switches\n- **openstackclient/**: Command-line client for OpenStack APIs\n- **openstacksdk/**: Python SDK for OpenStack APIs\n- **oslo.*/**: Oslo common libraries (config, log, messaging, etc.)\n\nWhen needed, you can checkout other OpenStack projects from https://opendev.org/openstack/projectname\nas needed for context. If you do, check them out into this directory and add them to the above list.\n\n**Important**: Always use existing checkouts of projects that are already present in this directory. Do not re-clone repositories that are already checked out.\n\n## Development Standards\n\n\n### Python Code Style\n- Follow PEP 8 guidelines\n- Use 4-space indentation\n- Maximum line length: 79 characters\n- Use type hints for new code where they already exist in surrounding code.\n- Docstrings required for all public functions/classes\n- All imports must be grouped at the top of the file, with stdlib in one group, external libraries in the next group, and internal project imports in another group.\n\n### Testing\n- Run tests with tox: `tox -e py312` from the root of a project\n- To test a single test module; use `tox -epy312 -- path.to.python.tests.module`. Do not attempt to shrink your testrunning scope to anything smaller than a module.\n- Unit tests required for all new features\n- Functional tests for API changes\n- Use unittest.mock for mocking\n- Test files follow pattern: test_*.py\n- **CRITICAL RULE**: never ever try to run tests using any method other than execution of tox\n- `tox` commands must be run from the root of the relevant project, and not from the root of the metaproject dir.\n\n### Common Commands\n- Lint: `tox -e pep8` or `tox -e flake8`\n- Type checking: `tox -e mypy` (where configured)\n- Documentation: `tox -e docs`\n- Release notes: `tox -e releasenotes`\n\n### Release Notes and Documentation\n- Releasenote stubs are created by running `reno new topic-for-release-note` from the project root.\n- Releasenotes are required for any change which would be noticible by a user of the software, espeically for breaking changes.\n\n\n## Project-Specific Notes\n\n### Ironic\n- Focuses on bare metal provisioning\n- Key modules: conductor, api, drivers\n- Database migrations in ironic/db/sqlalchemy/alembic\n- Configuration in ironic/conf/\n\n### Nova\n- VM compute service\n- Key modules: compute, scheduler, conductor, api\n- Cell-based architecture for scaling\n- Placement service integration for resource tracking\n\n### Oslo Libraries\n- Shared libraries across OpenStack projects\n- Changes here affect multiple projects\n- Extra careful with backwards compatibility\n- Each has its own tox.ini and testing requirements\n\n## Common Workflows\n\n### Bug Fixes\n1. Check if bug exists in latest master\n2. Write failing test case first\n3. Implement fix\n4. Update unit tests\n5. Add release note if user-visible change\n\n### Feature Development\n1. Check if spec required (nova-specs, ironic-specs)\n2. Write/update API documentation\n3. Implement with tests\n4. Update configuration options if needed\n5. Add release note\n\n### Cross-Project Changes\n- Changes affecting multiple projects need coordination\n- Oslo library changes need compatibility consideration\n- API changes need version bumping but should be avoided if possible\n\n## Git Workflow\n- Each project is a separate git repository\n- Follow OpenStack commit message format\n- Include bug/blueprint reference in commit message\n- Squash commits before submitting for review\n- Identify yourself using a \"Generated-By: claude-code\" tag at the bottom of the commit. You can also include a small stanza in the actual commit message body about the initial prompt.\n\n## Dependencies\n- requirements.txt: Runtime dependencies\n- test-requirements.txt: Test dependencies\n- doc-requirements.txt: Documentation-building dependencies.\n- bindep.txt: System-level dependencies\n- Use upper-constraints.txt from OpenStack requirements to constrain.\n\n## DevStack Integration\n- Most projects have devstack/ directory\n- plugin.sh: DevStack plugin script\n- settings: Configuration for DevStack\n\n## Documentation\n- Doc source in doc/ directory\n- Build with: `tox -e docs`\n- API reference in api-ref/ (where applicable)\n- Release notes in releasenotes/\n\n## Important Files\n- setup.cfg: Package metadata and entry points\n- tox.ini: Test environment configuration\n- zuul.d/ or .zuul.conf: CI job definitions\n- .gitignore: Version control exclusions\n\n## Release Notes\n- OpenStack release notes are created by running `reno new short-description-of-change`. This creates a file in the repository, usually releasenotes/notes, starting with short-description-of-change. Then edit this template, removing unneeded headings and detailing the change.\n\n## Code Review and Linting\n- No change is complete until lint; usually run via `tox -epep8` passes. Code has to be added to the git staging area before running pep8 jobs in most repositories.\n\n## Terminology Notes\n- When referring to the \"nova virt driver\", this means nova.virt.driver.ironic code which Nova uses as a client to Ironic.\n\n## Tox Environment Usage\n- You can use the existing tox environments as a virtualenv to use for executing one-off commands that require the openstack project in question to run. \n- Activate them by looking in the .tox/ directory. \n- A directory starting with py* is more likely to be valid for your uses.\n","name":"claude-md.txt","extension":"txt","url":"https://www.irccloud.com/pastebin/VgwvIPWd/claude-md.txt","modified":1756414922,"id":"VgwvIPWd","size":5846,"lines":137,"own_paste":false,"theme":"","date":1756414922}