A lightweight and modular web API client for managing OpenStack resources via RESTful endpoints using Go and the Gophercloud SDK.
This project is a web client for interacting with OpenStack services. It provides REST APIs built on top of the Gophercloud SDK, enabling developers or frontend applications to manage infrastructure programmatically.
- β RESTful endpoints to interface with OpenStack services
- βοΈ Written in idiomatic Go
- π Environment-based configuration with
.envsupport - π§© Extensible and modular project structure
- π¦ Vendor-less dependency management with Go Modules
- Go 1.16 or higher
- Access to a running OpenStack environment
- Environment variables or
.envfile for credentials
git clone https://github.com/itera-io/openstack-web-client.git
cd openstack-web-client
go mod tidyCreate a .env file in the project root with the following content:
OS_AUTH_URL=https://<your-openstack-auth-url>/v3
OS_USERNAME=<your-username>
OS_PASSWORD=<your-password>
OS_PROJECT_NAME=<your-project>
OS_DOMAIN_NAME=<your-domain>Make sure these credentials match your OpenStack environment.
go run main.goBy default, the server runs at:
http://localhost:8080
You can update the listening port or add additional configuration via environment variables or Go flags if implemented.
| Method | Endpoint | Description |
|---|---|---|
| GET | /instances |
List all compute instances |
| POST | /instances |
Create a new instance |
| GET | /instances/{id} |
Get details for one instance |
| DELETE | /instances/{id} |
Delete an instance |
Note: Endpoint availability depends on the features implemented in the current version.
go test ./...Ensure your OpenStack environment or mock is accessible if tests rely on live resources.
We welcome contributions! To get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -am 'Add my feature') - Push to your fork (
git push origin feature/my-feature) - Open a Pull Request
Before submitting, make sure to:
- Follow idiomatic Go conventions
- Add or update relevant tests
- Keep PRs scoped and descriptive
This project is licensed under the MIT License. See the LICENSE file for details.
- Gophercloud β official Go SDK for OpenStack
- OpenStack community for the ecosystem and APIs
Made with β€οΈ by itera-io