A helper tool to clean Ironic Instances
Project description
[![Build Status](https://travis-ci.org/internap/steelwool.svg?branch=master)](https://travis-ci.org/internap/steelwool)
Steelwool
======
Steelwool is a helper tool to faciliate the cleaning of instances on ironic nodes.
Python code usage
-----------------
```python
from steel_wool.steel_wool import SteelWool
from ironicclient.client import get_client
from novaclient.v2 import client
# Configure a nova_client
nova_client = client.Client(
username=USERNAME,
api_key=PASSWORD,
project_id=TENANT_NAME,
auth_url=KEYSTONE_ENDPOINT + '/v2.0',
region_name=REGION_NAME,
service_type="compute")
# Configure a ironic_client
ironic_client = get_client(
api_version='1',
os_tenant_name=TENANT_NAME,
os_username=USERNAME,
os_password=PASSWORD,
os_auth_url=KEYSTONE_ENDPOINT + '/v2.0',
os_auth_token='')
# Start Cleaning Baremetal Nodes
metal_cleaner = SteelWool(nova_client, ironic_client)
metal_cleaner.clean_environment(['node_uuid_1', 'node_uuid_2'])
```
Running Test Framework
-----------------
Within the project root, simply run:
```bash
tox -r
```
Contributing
============
Feel free to raise issues and send some pull request, we'll be happy to look at them!
Steelwool
======
Steelwool is a helper tool to faciliate the cleaning of instances on ironic nodes.
Python code usage
-----------------
```python
from steel_wool.steel_wool import SteelWool
from ironicclient.client import get_client
from novaclient.v2 import client
# Configure a nova_client
nova_client = client.Client(
username=USERNAME,
api_key=PASSWORD,
project_id=TENANT_NAME,
auth_url=KEYSTONE_ENDPOINT + '/v2.0',
region_name=REGION_NAME,
service_type="compute")
# Configure a ironic_client
ironic_client = get_client(
api_version='1',
os_tenant_name=TENANT_NAME,
os_username=USERNAME,
os_password=PASSWORD,
os_auth_url=KEYSTONE_ENDPOINT + '/v2.0',
os_auth_token='')
# Start Cleaning Baremetal Nodes
metal_cleaner = SteelWool(nova_client, ironic_client)
metal_cleaner.clean_environment(['node_uuid_1', 'node_uuid_2'])
```
Running Test Framework
-----------------
Within the project root, simply run:
```bash
tox -r
```
Contributing
============
Feel free to raise issues and send some pull request, we'll be happy to look at them!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
steelwool-1.0.1.tar.gz
(9.5 kB
view details)
File details
Details for the file steelwool-1.0.1.tar.gz
.
File metadata
- Download URL: steelwool-1.0.1.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 198223f124f408e39b64c2c41b7756d9080ace702ffd5ee615ed6bf1d10cdcce |
|
MD5 | e2386c6e6e7263517bcdae7e59cf129b |
|
BLAKE2b-256 | 7a954724e1d7eb37481d3f8935eb7cc1e2c02834bab0d269ca48bbb95a426f00 |