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:
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
Create a c7n policy yaml file as follows:
policies:
- name: demo
resource: openstack.flavor
filters:
- type: value
key: vcpus
value: 1
op: gt
Run c7n and report the matched resources:
mkdir -p output
custodian run demo.yaml -s output
custodian report demo.yaml -s output --format grid
Examples
filter examples:
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
Metadata
Release files for c7n-openstack 0.1.43
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| c7n_openstack-0.1.43-py3-none-any.whl | Python 3 | none | any | Details for c7n_openstack-0.1.43-py3-none-any.whl |
Release files / c7n_openstack-0.1.43-py3-none-any.whl
| Download URL | c7n_openstack-0.1.43-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c984b35406582a340880cfe824d835712e1dfc5adb4006db5ae5520ed272464
|
|
BLAKE2b-256 checksum How to use checksums |
ffb897c95ef3ed6f1d7cc720919c8b283de980abece65f8e08a22663a759d4ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Security for c7n-openstack 0.1.43
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.