Metadata-Version: 2.4
Name: os-flavor-selector
Version: 0.0.3
Summary: A tool to filter OpenStack flavors based on resource criteria
Author: Thobias Salazar Trevisan
License: MIT License
        
        Copyright (c) 2022 Thobias Salazar Trevisan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/thobiast/openstack-flavor-selector
Project-URL: Source, https://github.com/thobiast/openstack-flavor-selector
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openstacksdk
Requires-Dist: rich
Dynamic: license-file

# os-flavor-selector - A tool to filter OpenStack flavors based on resource criteria

[![Build and Test](https://github.com/thobiast/openstack-flavor-selector/actions/workflows/build.yml/badge.svg?event=push)](https://github.com/thobiast/openstack-flavor-selector/actions/workflows/build.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)


# About
`os-flavor-selector` is a command-line and interactive tool to **filter and explore OpenStack flavors**.
When there are many flavors available, it is sometimes difficult to find the correct one
that fills our requirements. This tool makes it easy to filter, sort, and display flavors.


# Example

```bash
$ os-flavor-selector --help
usage: os-flavor-selector [-h] [-d] [--os-cloud OS_CLOUD] [--output {interactive,text,json}]
                          [--visibility {all,public,private}] [--memory-min MEMORY_MIN]
                          [--memory-max MEMORY_MAX] [--vcpus-min VCPUS_MIN] [--vcpus-max VCPUS_MAX]
                          [--extra-spec KEY=VALUE] [--name NAME]

A tool to filter OpenStack flavors based on resource criteria

options:
  -h, --help            show this help message and exit
  -d, --debug           debug flag
  --os-cloud OS_CLOUD   Name of the cloud to load from clouds.yaml. (Default 'envvars', which uses
                        OS_* env vars)
  --output {interactive,text,json}
                        Output format (default: interactive)
  --visibility {all,public,private}
                        Filter by flavor visibility (default: all)
  --memory-min MEMORY_MIN
                        Minimum Amount of Memory
  --memory-max MEMORY_MAX
                        Maximum Amount of Memory
  --vcpus-min VCPUS_MIN
                        Minimum Amount of VCPUs
  --vcpus-max VCPUS_MAX
                        Maximum Amount of VCPUs
  --extra-spec KEY=VALUE
                        Filter by extra_specs (can be used multiple times). Example: --extra-spec
                        hw:cpu_policy=dedicated --extra-spec trait:HW_CPU_X86_AVX2=required
  --name NAME           Filter by name using a regular expression (case-insensitive)

    Example of use:
        os-flavor-selector
        os-flavor-selector --vcpus-min 4
        os-flavor-selector --vcpus-min 4 --vcpus-max 8
        os-flavor-selector --vcpus-min 4 --vcpus-max 8 --output json
```
![Interactive GIF](img/demo.gif)

# Installation
```bash
$ pip install os-flavor-selector
```

Or clone the repo and install from source.

```bash
$ pip install .
```


# Development mode
```bash
$ pip install -e .
```

or using pipx:

```bash
$ pipx install -e .
```
