Metadata-Version: 2.1
Name: c7n-openstack
Version: 0.1.20
Summary: Cloud Custodian - OpenStack Provider
Home-page: https://cloudcustodian.io
License: Apache-2.0
Author: Cloud Custodian Project
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: System :: Distributed Computing
Classifier: Topic :: System :: Systems Administration
Requires-Dist: c7n (==0.9.30) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: openstacksdk (==0.52.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: argcomplete (==3.1.1) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: boto3 (==1.28.25) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: docutils (==0.18.1) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: importlib-metadata (==5.2.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: jsonschema (==4.19.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: python-dateutil (==2.8.2) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: pyyaml (==6.0.1) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: tabulate (==0.9.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: urllib3 (==1.26.16) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: appdirs (==1.4.4) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: cryptography (==41.0.3) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: decorator (==5.1.1) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: dogpile-cache (==1.2.2) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: iso8601 (==2.0.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: jmespath (==1.0.1) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: jsonpatch (==1.33) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: keystoneauth1 (==5.2.1) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: munch (==4.0.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: netifaces (==0.11.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: os-service-types (==1.7.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: pbr (==5.11.1) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: requestsexceptions (==1.4.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: botocore (==1.31.25) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: s3transfer (==0.6.1) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: zipp (==3.16.2) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: attrs (==23.1.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: importlib-resources (==6.0.1) ; python_version >= "3.8" and python_version < "3.9"
Requires-Dist: jsonschema-specifications (==2023.7.1) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: pkgutil-resolve-name (==1.3.10) ; python_version >= "3.8" and python_version < "3.9"
Requires-Dist: referencing (==0.30.2) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: rpds-py (==0.9.2) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: six (==1.16.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: cffi (==1.15.1) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: stevedore (==5.1.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: typing-extensions (==4.7.1) ; python_version >= "3.8" and python_version < "3.11"
Requires-Dist: jsonpointer (==2.4) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: requests (==2.31.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: pycparser (==2.21) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: certifi (==2023.7.22) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: charset-normalizer (==3.2.0) ; python_version >= "3.8" and python_version < "4.0"
Requires-Dist: idna (==3.4) ; python_version >= "3.8" and python_version < "4.0"
Project-URL: Documentation, https://cloudcustodian.io/docs/
Project-URL: Repository, https://github.com/cloud-custodian/cloud-custodian
Description-Content-Type: text/markdown

# Custodian OpenStack Support

Work in Progress - Not Ready For Use.

## Quick Start

### Installation

```
pip install c7n_openstack
```

### OpenStack Environment Configration

C7N will find cloud config for as few as 1 cloud and as many as you want to put in a config file.
It will read environment variables and config files, and it also contains some vendor specific default
values so that you don't have to know extra info to use OpenStack:

* If you have a config file, you will get the clouds listed in it
* If you have environment variables, you will get a cloud named envvars
* If you have neither, you will get a cloud named defaults with base defaults

Create a clouds.yml file:

```yaml
clouds:
 demo:
   region_name: RegionOne
   auth:
     username: 'admin'
     password: XXXXXXX
     project_name: 'admin'
     domain_name: 'Default'
     auth_url: 'https://montytaylor-sjc.openstack.blueboxgrid.com:5001/v2.0'
```

Please note: c7n will look for a file called `clouds.yaml` in the following locations:

* Current Directory
* ~/.config/openstack
* /etc/openstack

More information at [https://pypi.org/project/os-client-config](https://pypi.org/project/os-client-config)

### Create a c7n policy yaml file as follows:

```yaml
policies:
- name: demo
  resource: openstack.flavor
  filters:
  - type: value
    key: vcpus
    value: 1
    op: gt
```

### Run c7n and report the matched resources:

```sh
mkdir -p output
custodian run demo.yaml -s output
custodian report demo.yaml -s output --format grid
```

## Examples

filter examples:

```yaml
policies:
- name: test-flavor
  resource: openstack.flavor
  filters:
  - type: value
    key: vcpus
    value: 1
    op: gt
- name: test-project
  resource: openstack.project
  filters: []
- name: test-server-image
  resource: openstack.server
  filters:
  - type: image
    image_name: cirros-0.5.1
- name: test-user
  resource: openstack.user
  filters:
  - type: role
    project_name: demo
    role_name: _member_
    system_scope: false
- name: test-server-flavor
  resource: openstack.server
  filters:
  - type: flavor
    vcpus: 1
- name: test-server-age
  resource: openstack.server
  filters:
  - type: age
    op: lt
    days: 1
- name: test-server-tags
  resource: openstack.server
  filters:
  - type: tags
    tags:
    - key: a
      value: a
    - key: b
      value: c
    op: any
```

