Help us understand the problem. What is going on with this article?

ConohaのAPIを試してみる

More than 5 years have passed since last update.

概要

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 ファイルを用いた環境変数の設定

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした