LoginSignup
4
4

More than 5 years have passed since last update.

ConohaのAPIを試してみる

Last updated at Posted at 2015-05-18

概要

Conohaが新しくなってAPIもあるみたいなので試してみる。

APIユーザ作成

ConohaのダッシュボードからAPIユーザを作成

OpenStackクライアントのインストール


brew install python
pip install python-novaclient

環境変数ファイル作成と読み込み

openrc.sh

export OS_USERNAME=APIユーザ名
export OS_PASSWORD=APIパスワード
export OS_TENANT_NAME=テナント名
export OS_AUTH_URL=https://identityHost:portNumber/v2.0

source openrc.sh

動作確認

サーバ作成

flavorをnameで指定したときにエラーになったので、IDを指定した。

nova boot test --image gncvmi-centos-7.1-x86_64 --flavor 7eea7469-0d85-4f82-8050-6ae742394681

サーバ削除

nova delete servername

サーバ一覧

nova list

イメージ一覧

nova image-list

構成一覧

nova flavor-list

参考

OpenStack RC ファイルを用いた環境変数の設定

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4