cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Stevens <wstev...@cloudops.com>
Subject Re: VMXNET3 via the API
Date Thu, 31 Mar 2016 13:34:51 GMT
Thanks Rohit.  Unfortunately I am not able to use cloudmonkey (which is
awesome btw) in this case since this is being built into a bigger tool.  I
am currently using my own library: https://github.com/swill/csapi

With a bunch of trial and error I was able to figure out that it had to be
passed as follows.

request:
http://10.10.90.41:8080/client/api?account=masteruser%40DEV&domainid=e3d90052-56b6-4cd5-a5be-dc34ee461755&name=migrate-me-2012-disk1&format=OVA&url=http%3A%2F%2F10.10.90.251%3A80%2Fmigrate-me-2012-disk1.ova&hypervisor=VMware&command=registerTemplate&zoneid=f0bcb52b-2487-453e-8bcd-b82d56dc6e1b&apiKey=9-UVwC7DeAjLggZFyqhtC_IwqvH_40YNz0rJjBuwS666AVqevbj4Ajk2HDduaEdWxo3O_stNKGrFvSZDj_Nx6g&displaytext=migrate-me-2012-disk1&ostypeid=30f531a4-c467-11e5-bcaa-0050569856f2&details[0].nicAdapter=Vmxnet3&response=json&signature=RtRvTEZB5tYN05SktbZ2ulnblio%3D

response:
{ u'count': 1,
  u'template': [ { u'account': u'masteruser@DEV',
                   u'created': u'2016-03-30T19:27:56+0000',
                   u'crossZones': False,
                   u'details': { u'nicAdapter': u'Vmxnet3'},
                   u'displaytext': u'migrate-me-2012-disk1',
                   u'domain': u'AA000002',
                   u'domainid': u'e3d90052-56b6-4cd5-a5be-dc34ee461755',
                   u'format': u'OVA',
                   u'hypervisor': u'VMware',
                   u'id': u'052ac79b-84bb-42f4-b614-e4e66c2ac4c2',
                   u'isdynamicallyscalable': False,
                   u'isextractable': False,
                   u'isfeatured': False,
                   u'ispublic': False,
                   u'isready': False,
                   u'name': u'migrate-me-2012-disk1',
                   u'ostypeid': u'30f531a4-c467-11e5-bcaa-0050569856f2',
                   u'ostypename': u'Other (64-bit)',
                   u'passwordenabled': False,
                   u'sshkeyenabled': False,
                   u'status': u'',
                   u'tags': [],
                   u'templatetype': u'USER',
                   u'zoneid': u'f0bcb52b-2487-453e-8bcd-b82d56dc6e1b',
                   u'zonename': u'InternalCore'}]}

I need to do a once through of the API documentation at some point and
figure out and document how stuff like this is passed.  The documentation
on anything that is not a basic string getting passed in is horrible.
Things like creating network service offerings through the API and
specifying capabilities is near impossible to understand.  I am not even
sure we are consistent about how we handle it either.  I will have to spend
some time on that when I have some free moments.

Thanks again for the details.  :)


*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6
w cloudops.com *|* tw @CloudOps_

On Thu, Mar 31, 2016 at 6:57 AM, Rohit Yadav <rohit.yadav@shapeblue.com>
wrote:

> Using cloudmonkey, pass args: (note lowercase)
>
> details[0].key=nicAdapter details[0].value=vmxnet3
>
> If it's not working, check if the version of CloudStack supports this
> feature (overriding the default nic adapter setting using template
> details). Alternatively, you can pass this while deploying the vm using
> deployVirtualMachine API.
>
> Regards,
> Rohit Yadav
>
> Regards,
>
> Rohit Yadav
>
> rohit.yadav@shapeblue.com
> www.shapeblue.com
> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> @shapeblue
> On Mar 30 2016, at 10:13 am, Will Stevens <williamstevens@gmail.com>
> wrote:
>
> Is this the correct way to set the Vmxnet3 property for a VMware template
> via the API?
>
> It does not seem to be working even though it seems to be accepted via the
> API. Any ideas?
>
>
> http://10.10.90.41:8080/client/api?account=masteruser%40DEV&domainid=e3d90052-56b6-4cd5-a5be-dc34ee461755&name=migrate-me-2008R2-disk1&format=OVA&url=http%3A%2F%2F10.10.90.251%3A80%2Fmigrate-me-2008R2-disk1.ova&hypervisor=VMware&zoneid=f0bcb52b-2487-453e-8bcd-b82d56dc6e1b&apiKey=9-UVwC7DeAjLggZFyqhtC_IwqvH_40YNz0rJjBuwS666AVqevbj4Ajk2HDduaEdWxo3O_stNKGrFvSZDj_Nx6g&displaytext=migrate-me-2008R2-disk1&ostypeid=30f531a4-c467-11e5-bcaa-0050569856f2&details[0].value=Vmxnet3&command=registerTemplate&response=json&details[0].key=nicAdapterType&signature=OIaO2O/O2bZOs5790p0Enl83LwI%3D
>
> response:
> { u'count': 1,
>   u'template': [ { u'account': u'masteruser@DEV',
>                    u'created': u'2016-03-30T04:16:04+0000',
>                    u'crossZones': False,
>                    u'details': { u'key': u'nicAdapterType',
>                                  u'value': u'Vmxnet3'},
>                    u'displaytext': u'migrate-me-2008R2-disk1',
>                    u'domain': u'AA000002',
>                    u'domainid': u'e3d90052-56b6-4cd5-a5be-dc34ee461755',
>                    u'format': u'OVA',
>                    u'hypervisor': u'VMware',
>                    u'id': u'f34cb95d-5b0b-4b53-9690-399108fff940',
>                    u'isdynamicallyscalable': False,
>                    u'isextractable': False,
>                    u'isfeatured': False,
>                    u'ispublic': False,
>                    u'isready': False,
>                    u'name': u'migrate-me-2008R2-disk1',
>                    u'ostypeid': u'30f531a4-c467-11e5-bcaa-0050569856f2',
>                    u'ostypename': u'Other (64-bit)',
>                    u'passwordenabled': False,
>                    u'sshkeyenabled': False,
>                    u'status': u'',
>                    u'tags': [],
>                    u'templatetype': u'USER',
>                    u'zoneid': u'f0bcb52b-2487-453e-8bcd-b82d56dc6e1b',
>                    u'zonename': u'InternalCore'}]}
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message