All Projects → DreamLab → AsyncOpenStackClient

DreamLab / AsyncOpenStackClient

Licence: Apache-2.0 license
Asyncio wrapper to OpenStack API

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to AsyncOpenStackClient

COA
Openstack Foundation Openstack Certified Administrator exam Preparation
Stars: ✭ 41 (+141.18%)
Mutual labels:  openstack, cinder, nova, glance
Openstack Workflow
Openstack Sequence Diagrams(Openstack操作序列图)
Stars: ✭ 409 (+2305.88%)
Mutual labels:  openstack, nova
Bucc
The fastest way to get a BUCC (BOSH, UAA Credhub and Concourse)
Stars: ✭ 130 (+664.71%)
Mutual labels:  openstack
a-universe-from-nothing
Kayobe configuration for the Kayobe workshop "A Universe from Nothing: Containerised OpenStack deployment using Kolla, Ansible and Kayobe"
Stars: ✭ 57 (+235.29%)
Mutual labels:  openstack
Chef Bcpc
Bloomberg Clustered Private Cloud distribution
Stars: ✭ 205 (+1105.88%)
Mutual labels:  openstack
Kubify
Terraform Template to Setup a Kubernetes Cluster on OpenStack/AWS/Azure
Stars: ✭ 142 (+735.29%)
Mutual labels:  openstack
Terraform Provider Openstack
Terraform OpenStack provider
Stars: ✭ 225 (+1223.53%)
Mutual labels:  openstack
Powerfulseal
A powerful testing tool for Kubernetes clusters.
Stars: ✭ 1,725 (+10047.06%)
Mutual labels:  openstack
cb-spider
CB-Spider provides a unified view and single interface for multi-cloud management.
Stars: ✭ 26 (+52.94%)
Mutual labels:  openstack
Machine Controller Manager
Declarative way of managing machines for Kubernetes cluster
Stars: ✭ 186 (+994.12%)
Mutual labels:  openstack
Tk8
CLI to deploy Kubernetes with RKE, EKS or Kubeadm and deploy additional addons
Stars: ✭ 241 (+1317.65%)
Mutual labels:  openstack
Openstack Cheat Sheet
openstack cheat sheet(Openstack资料整理)
Stars: ✭ 184 (+982.35%)
Mutual labels:  openstack
Gardener
Kubernetes-native system managing the full lifecycle of conformant Kubernetes clusters as a service on Alicloud, AWS, Azure, GCP, OpenStack, EquinixMetal, vSphere, MetalStack, and Kubevirt with minimal TCO.
Stars: ✭ 2,093 (+12211.76%)
Mutual labels:  openstack
Vagrant Openstack Provider
Use Vagrant to manage OpenStack Cloud instances.
Stars: ✭ 229 (+1247.06%)
Mutual labels:  openstack
Ruby Openstack
Ruby binding for Openstack API - supports Keystone, Nova, Swift, Cinder and Neutron
Stars: ✭ 132 (+676.47%)
Mutual labels:  openstack
c3os
Management multiple CloudOS.
Stars: ✭ 14 (-17.65%)
Mutual labels:  openstack
Helm Charts
Helm charts for SAP Converged Cloud managing openstack on kubernetes
Stars: ✭ 125 (+635.29%)
Mutual labels:  openstack
Patron
Patron - Access Control as a Service for OpenStack
Stars: ✭ 171 (+905.88%)
Mutual labels:  openstack
Kcli
Management tool for libvirt/aws/gcp/kubevirt/openstack/ovirt/vsphere/packet
Stars: ✭ 219 (+1188.24%)
Mutual labels:  openstack
Cinder-Hoa
Higher Order Ambisonics Block for libCinder
Stars: ✭ 12 (-29.41%)
Mutual labels:  cinder

AsyncOpenStackClient

image0 image1

Introduction

The AsyncOpenStackClient is a asynchronous rest wrapper for the OpenStack API. It provides a nice abstraction for authentication. For method specification, see the official OpenStack documentation: https://docs.openstack.org/queens/api/.

Installation

Use pip:

pip install AsyncOpenStackClient

Usage

from asyncopenstackclient import NovaClient, GlanceClient, CinderClient, AuthPassword

# you can either pass credentials explicitly (as shown below)
# or use environmental variables from OpenStack RC file
# https://docs.openstack.org/mitaka/cli-reference/common/cli_set_environment_variables_using_openstack_rc.html
auth = AuthPassword(
    auth_url='https://keystone:5999/v3'
    username='USER', password='PASS',
    project_name='my-project',
    user_domain_name='default',
    project_domain_name='foo.bar'
)

# alternatively you can also use application_credentials to authenticate with the OpenStack Keystone API
# https://docs.openstack.org/keystone/queens/user/application_credentials.html
alternative_auth = AuthPassword(
    auth_url='https://keystone:5999/v3'
    application_credential_id="ID",
    application_credential_secret="SECRET"
)

nova = NovaClient(session=auth)
glance = GlanceClient(session=auth)
cinder = CinderClient(session=auth)

# api url for each service will be taken from catalog,
# but you may pass `api_url` param to force custom url eg.
# nova = NovaClient(session=auth, api_url='http://my-local-nova:9876/v2/')

await nova.init_api()
await glance.init_api()
await cinder.init_api()


servers = await nova.servers.list(name='testvm')
vm = await nova.servers.get(server_id)

action_spec = {'os-stop': None}
await nova.servers.run_action(server_id, **action_spec)


specs = {
    "name": 'some_name',
    "flavorRef": 'flavor_id',
    "imageRef": 'image_id',
    "security_groups": [{'name': 'group1'}, {'name': 'group2'}]
    "user_data": base64.b64encode(userdata).decode('utf-8')
}
response = await nova.servers.create(server=specs)
print(response)

volume = {"size": 200,
          "imageRef": "image_id",
          "name": "some_name"}

response = await cinder.volumes.create(volume=volume)
print(response)

Available functions

License

Apache License 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].