Skip to content

albeus/openstack_image_uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Openstack images uploader

Simple Python client to upload images on Openstack.

Aims:

  • Overcome some python-openstack client issues raised in old operating systems
  • Proof of concept of using python to interact with Openstack APIs.

Status

Proof of concept.

Features

Usage

usage: openstack_img_up.py [-h] -n NAME -f FILE [-t DISK_TYPE]

Upload an image to OpenStack.

optional arguments:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Name of the new image.
  -f FILE, --file FILE  Path of the image file to upload.
  -t DISK_TYPE, --disk_type DISK_TYPE
                        Disk format type (ami, ari, aki, vhd, vhdx, vmdk, raw, qcow2, vdi, ploop or iso).
                        Default:qcow2

Quickstart

  1. Install requirement:

    pip install pipenv
    cd openstack_image_uploader
    

    Create the virtualenv and enter it:

    pipenv install
    pipenv shell
    
  2. Check the settings in config file "config.yaml".

  3. Export your credentials in environment variables:

    export OS_APPLICATION_CREDENTIAL_ID="*************"
    export OS_APPLICATION_CREDENTIAL_SECRET="************"
    
  4. Run the script:

    $ ./openstack_img_up.py -n my_image -f /tmp/my_image.qcow2
    I'm going to upload the file /tmp/my_image.qcow2 as "my_image" using this service: https://uk1.embassy.ebi.ac.uk:9292/v2/images. Continue? (y/n): 
    
    

About

Simple Python client to upload images on Openstack.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages