|
10 | 10 |
|
11 | 11 | A suite of tools to optimize and manage your OpenStack resources, with multilingual support (FR/EN). |
12 | 12 |
|
| 13 | +> **Version 1.6.0** - Enhanced security (encrypted SMTP passwords), improved logging with rotation, complete type hints, and better error handling! |
| 14 | +
|
| 15 | +## ✨ What's New in v1.6.0 |
| 16 | + |
| 17 | +- 🔒 **Encrypted SMTP passwords** - Passwords are now encrypted using Fernet (AES-128) |
| 18 | +- 📊 **Professional logging** - Colored console output, automatic rotation, JSON support |
| 19 | +- 📝 **Complete type hints** - Better IDE support and code quality |
| 20 | +- 🔧 **Specific exceptions** - 12 custom exceptions for better error handling |
| 21 | +- 📁 **Organized structure** - Clean separation of code and documentation |
| 22 | + |
13 | 23 | ## 📋 Features |
14 | 24 |
|
15 | | -- 📊 **Metrics Collector** (`openstack_metrics_collector.py`) |
16 | | - - Real-time Gnocchi metrics |
17 | | - - Prometheus export |
18 | | - - Request parallelization |
19 | | - - Multi-project support |
20 | | - |
21 | | -- 📈 **Resource Summary** (`openstack_summary.py`) |
22 | | - - Instance list and details |
23 | | - - Volumes and snapshots |
24 | | - - Images and containers |
25 | | - - Cost estimation (calibrated for Infomaniak pricing in EUR/CHF) |
26 | | - - Mounted volumes tree view |
27 | | - |
28 | | -- 👨💼 **Administration** (`openstack_admin.py`) |
29 | | - - Project management |
30 | | - - Resource overview |
31 | | - - Operation parallelization |
32 | | - |
33 | | -- 📧 **Weekly Notifications** (`weekly_notification_optimization.py`) |
34 | | - - Automated email reports |
35 | | - - Interactive SMTP configuration |
36 | | - - Cron scheduling |
| 25 | +### Core Tools |
| 26 | + |
| 27 | +- 📊 **Metrics Collector** - Real-time Gnocchi metrics with Prometheus export |
| 28 | +- 📈 **Resource Summary** - Complete overview of instances, volumes, snapshots, and costs |
| 29 | +- 👨💼 **Administration** - Multi-project management and resource overview |
| 30 | +- 📧 **Weekly Notifications** - Automated email reports with secure SMTP |
| 31 | +- 🔍 **Optimization** - Identify underutilized resources |
| 32 | + |
| 33 | +### New in v1.6.0 |
| 34 | + |
| 35 | +- 🔒 **Security Module** (`src/security.py`) - Encryption/decryption for sensitive data |
| 36 | +- 📊 **Logger Module** (`src/logger.py`) - Professional logging with rotation and colors |
| 37 | +- 🔧 **Exceptions Module** (`src/exceptions.py`) - 12 specific exceptions for better error handling |
| 38 | +- 📝 **Type Hints** - Complete type annotations for better IDE support |
37 | 39 |
|
38 | 40 | ## 🛠️ Installation |
39 | 41 |
|
@@ -271,15 +273,102 @@ openstack-toolbox |
271 | 273 | - `send_email()`: Sends via SMTP |
272 | 274 | - `setup_cron()`: Configures cron task |
273 | 275 |
|
| 276 | +## 📁 Project Structure |
| 277 | + |
| 278 | +``` |
| 279 | +openstack-toolbox/ |
| 280 | +├── src/ # Python source code (12 modules) |
| 281 | +└── .github/ # GitHub Actions CI/CD |
| 282 | +``` |
| 283 | +
|
| 284 | +### Source Code (`src/`) |
| 285 | +
|
| 286 | +**Core Modules:** |
| 287 | +- `openstack_toolbox.py` - Main CLI |
| 288 | +- `openstack_summary.py` - Resource summary |
| 289 | +- `openstack_admin.py` - Administration tools |
| 290 | +- `openstack_metrics_collector.py` - Prometheus exporter |
| 291 | +- `openstack_optimization.py` - Resource optimization |
| 292 | +- `weekly_notification_optimization.py` - Email notifications |
| 293 | +
|
| 294 | +**Utility Modules (v1.6.0):** |
| 295 | +- `config.py` - Configuration management |
| 296 | +- `security.py` - Encryption/decryption ✨ NEW |
| 297 | +- `logger.py` - Logging system ✨ NEW |
| 298 | +- `exceptions.py` - Custom exceptions ✨ NEW |
| 299 | +- `utils.py` - Helper functions |
| 300 | +
|
| 301 | +## � Migration from v1.5.0 |
| 302 | +
|
| 303 | +### Automatic Migration |
| 304 | +
|
| 305 | +- ✅ **100% backward compatible** - No action required |
| 306 | +- ✅ Existing SMTP configurations continue to work |
| 307 | +- ✅ System will prompt to re-encrypt passwords on next use |
| 308 | +
|
| 309 | +### Recommended Actions |
| 310 | +
|
| 311 | +```bash |
| 312 | +# Reconfigure SMTP to enable encryption |
| 313 | +weekly-notification |
| 314 | +``` |
| 315 | + |
| 316 | +### New Dependencies |
| 317 | + |
| 318 | +```bash |
| 319 | +# Install the new security dependency |
| 320 | +pip install cryptography>=41.0.0 |
| 321 | +``` |
| 322 | + |
| 323 | +### Security Improvements |
| 324 | + |
| 325 | +Configuration files now have restricted permissions: |
| 326 | +- `~/.config/openstack-toolbox/smtp_config.ini` : 600 (rw-------) |
| 327 | +- `~/.config/openstack-toolbox/.encryption_key` : 600 (rw-------) |
| 328 | + |
| 329 | +### Troubleshooting |
| 330 | + |
| 331 | +If you encounter decryption errors: |
| 332 | + |
| 333 | +```bash |
| 334 | +# Remove old configuration |
| 335 | +rm ~/.config/openstack-toolbox/smtp_config.ini |
| 336 | +rm ~/.config/openstack-toolbox/.encryption_key |
| 337 | + |
| 338 | +# Reconfigure |
| 339 | +weekly-notification |
| 340 | +``` |
| 341 | + |
| 342 | +## 📝 Changelog |
| 343 | + |
| 344 | +### [1.6.0] - 2024-11-21 |
| 345 | + |
| 346 | +**Added:** |
| 347 | +- 🔒 Encrypted SMTP passwords using Fernet (AES-128) |
| 348 | +- 📊 Professional logging with rotation and colors |
| 349 | +- 🔧 12 custom exceptions for better error handling |
| 350 | +- 📝 Complete type hints on all core modules |
| 351 | +- 📁 Organized project structure |
| 352 | + |
| 353 | +**Security:** |
| 354 | +- Encrypted password storage |
| 355 | +- Restricted file permissions (600) |
| 356 | +- Unique encryption key per installation |
| 357 | + |
| 358 | +**No breaking changes** - Full backward compatibility maintained |
| 359 | + |
274 | 360 | ## 🤝 Contributing |
275 | 361 |
|
276 | 362 | Contributions are welcome! Feel free to: |
| 363 | + |
277 | 364 | 1. Fork the project |
278 | 365 | 2. Create a branch (`git checkout -b feature/improvement`) |
279 | 366 | 3. Commit (`git commit -am 'Add feature'`) |
280 | 367 | 4. Push (`git push origin feature/improvement`) |
281 | 368 | 5. Open a Pull Request |
282 | 369 |
|
| 370 | +See [docs/IMPROVEMENTS.md](docs/IMPROVEMENTS.md) for technical details. |
| 371 | + |
283 | 372 | ## ✨ Credits |
284 | 373 |
|
285 | 374 | Special thanks to [Kevin Allioli](https://github.com/kallioli), Cloud Architect & SysAdmin, for his valuable contributions and expertise in OpenStack development. |
|
0 commit comments