Ask Your Question
0

nova quantum integration rest api to attach port to a vm

asked 2013-03-27 06:00:18 -0500

ritesh-s-shetty gravatar image

I have created a port using the /ports rest api I am trying to send the port_id while provisioning using /servers, i want to know the REST API request body for doing so, i have searched extensively but haven't found any example

Is there a nova REST API sample for attaching the port_id ??

nova boot shows for examples but i need rest api

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2013-03-27 06:42:26 -0500

gongysh gravatar image

the client command is: nova boot --image xx --flavor 1 --nic port-id=<your portid=""> myserver you can use nova --debug boot --image xx --flavor 1 --nic port-id=<your portid=""> myserver to watch what URL it is using.

edit flag offensive delete link more
0

answered 2013-03-27 07:17:19 -0500

nova --debug will show you the calls that it's making though I believe there was a bug recently introduce that broke this :/

edit flag offensive delete link more
0

answered 2013-03-27 07:18:26 -0500

ritesh-s-shetty gravatar image

Thanks yong sheng gong, that solved my question.

edit flag offensive delete link more
0

answered 2013-03-27 07:19:39 -0500

ritesh-s-shetty gravatar image

Here is the way to send the port while povisioning

{ "server" : { "name" : "new-server-test", "imageRef" : "fa4284a0-bcc3-4256-b15f-1cd5e31f0695", "key_name" : "secondkeypair", "networks": [{"port": "93d4cbf7-c7a6-4a24-8f8b-5165adfd590a"}] , "flavorRef":"1", "metadata" : { "My Server Name" : "Apache1" }, "personality" : [ { "path" : "/etc/banner.txt", "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA==" } ] } }

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-03-27 06:00:18 -0500

Seen: 55 times

Last updated: Mar 27 '13