[openstack-dev] [Horizon] test_launch_instance_post questions

Abishek Subramanian (absubram) absubram at cisco.com
Tue Mar 11 13:58:16 UTC 2014


Can I please get some help with this UT?
I am having a little issue with the nics argument -
nics = [{"net-id": netid, "v4-fixed-ip": ""}

I wish to add a second network to this argument, but somehow
the UT only picks up the first network.

Any guidance will be appreciated.


On 3/6/14 12:06 PM, "Abishek Subramanian (absubram)" <absubram at cisco.com>

>I had a couple of questions regarding this UT and the
>JS template that it ends up using.
>Hopefully someone can point me in the right direction
>and help me understand this a little better.
>I see that for this particular UT, we have a total of 3 networks
>in the network_list (the second network is supposed to be disabled
>For the nic argument needed by the nova/server_create API though we
>only pass the first network's net_id.
>I am trying to modify this unit test so as to be able to accept 2
>instead of just one. This should be possible yes?
>We can have two nics in an instance of just one?
>However, I always see that when the test runs,
>in code it only finds the first network from the list.
>This line of code -
>     if netids:
>            nics = [{"net-id": netid, "v4-fixed-ip": ""}
>                    for netid in netids]
>There's always just one net-id in this dictionary even though I've added
>a new network in the neutron test_data. Can someone please help me
>figure out what I might be doing wrong?
>How does the JS code in horizon.instances.js file work?
>I assume this is where the network list is obtained from?
>How does this translate in the unit test environment?
>OpenStack-dev mailing list
>OpenStack-dev at lists.openstack.org

More information about the OpenStack-dev mailing list