conoha-cli is a command and Python3 library for ConoHa API.
Service Name | Status |
---|---|
Identity Service | Full Support |
Account Service | Not Support |
Compute Service | Some Support |
Block Storage Service | Some Support |
Image Service | Some Support |
Network Service | Some Support |
Object Storage Service | Not Support |
Database Hosting Service | Not Support |
DNS Service | Not Support |
Mail Hosting Service | Not Support |
See conoha-apis.md for deltails.
from PIP : pip install conoha-cli
from Source : ./setup.py install
# ~/.bashrc
export CONOHA_API_USER='xxxxx'
export CONOHA_API_PASSWD='xxxxx'
export CONOHA_API_TENANT='xxxxx'
Create file like this to ~/.config/conoha/config.
[api]
usre = xxxxx
passwd = xxxxx
tenant = xxxxx
$ conoha-cli compute list-vms
$ conoha-cli compute start-vm $VM_NAME
from conoha.config import Config
from conoha.api import Token
from conoha.compute import VMList
configDict = {
'api': {
'user': 'xxxxx',
'passwd': 'xxxxx',
'tenant': 'xxxxx',
}
}
conf = Config(fromDict=configDict)
token = Token(conf)
for vm in VMList(token):
if vm.getStatus() == 'SHUTOFF':
vm.start()