Openstack REST API Kolayca Ogrenme

Tek yapmaniz gereken once cli’daki komutlari ogrenmek sonra basina –debug parametresini koymak

 

Ornek : aa1 adindan bir Domain yaratiyoruz …

stack@helion-cp1-c1-m1-mgmt:~$ openstack –debug domain create aa1

Istek ve cevap hersey asagidaki gibi , bunu gibi ornekleri cogaltip REST API gereksinimlerini ve kullanmini kolayca anlayip uygulayabilirsiniz.

REQ: curl -g -i –cacert “/etc/ssl/certs/ca-certificates.crt” -X POST https://10.111.45.3:5000/v3/domains -H “User-Agent: openstack” -H “Content-Type: application/json” -H “Accept: application/json” -H “X-Auth-Token: {SHA1}aa0e9ca9215d6fa8cd7f9f814d5e637e06e95655” -d ‘{“domain”: {“enabled”: true, “name”: “aa1”}}’

“POST /v3/domains HTTP/1.1” 201 177

RESP: [201] Content-Length: 177 Vary: X-Auth-Token Server: Apache/2.4.10 (Debian) Date: Tue, 06 Sep 2016 08:26:58 GMT Content-Type: application/json x-openstack-request-id: req-2627ac03-1ea2-477c-8297-84ccbd32112d

RESP BODY: {“domain”: {“enabled”: true, “id”: “7bdc8676ca4b4c1491dc7668cf6fa7cb”, “links”: {“self”: “https://10.111.45.3:5000/v3/domains/7bdc8676ca4b4c1491dc7668cf6fa7cb”}, “name”: “aa1”}}

 

Posted on 06/09/2016, in Openstack, REST API and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: