currently there are two seperate modules. they have no relations.
### Install
```
pip install image-utils
```
print version:
```
from image_utils import version
version.version_string()
```
### Usage
currently there are two modules.
#### ceph.py
this module is used to interact with ceph image.
##### Example: copy a image from source ceph cluster to dest ceph.
```
from image_utils import ceph
# get source store.
src_store = ceph.get_store(conffile_path, ceph_user, keyring_path)
# get dest store.
dst_store = ceph.get_store(conffile_path2, ceph_user, keyring_path2)
# get an image location from source ceph pool.
src_loc = src_store.get_location(pool, image_name)
# copy image from src_store to dst_store, in dst_pool
ceph.copy(src_store, src_loc, dst_store, dst_pool)
```
#### fish.py
this module is used to modify disk image. require `guestfs`. while guestfs python bindings are not found
in pypi, you should install rpm package
```
yum install python-libguestfs
```
Then you are ready
##### Example: modify a image.
```
from image_utils import fish
f = fish.Fish(mon_host, mon_port, client, key, pool, image_name)
f.launch()
f.add_mtu('192.168.1.100', 1450)
f.remove_file('/root/abc.txt')
f.shutdown()
```
while there are few apis in `Fish` class, tweak the class and add more apis as your wish.
Metadata
Release files for image-utils 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| image-utils-0.1.6.tar.gz | 7.5 kB | Without provenance | Details |
Release files / image-utils-0.1.6.tar.gz
| Download URL | image-utils-0.1.6.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e66ef044b83dd14e7cf848a0750346a09ed2a5d4f60fd265410b1b8b0736861
|
|
BLAKE2b-256 checksum How to use checksums |
f9767effcdfbd82087f866e900d59ca5a9453feb70be2daaac81bfa0fb95cf1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for image-utils 0.1.6
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.