~0x44/nova/bug838466

« back to all changes in this revision

Viewing changes to nova/virt/libvirt/netutils.py

  • Committer: Brian Waldon
  • Date: 2011-07-26 17:13:41 UTC
  • mfrom: (1324 nova)
  • mto: This revision was merged to the branch mainline in revision 1326.
  • Revision ID: brian.waldon@rackspace.com-20110726171341-jrclqn08ew7ngshr
merging trunk; resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    vifs = db.virtual_interface_get_by_instance(admin_context, instance['id'])
60
60
    networks = db.network_get_all_by_instance(admin_context,
61
61
                                              instance['id'])
62
 
    flavor = db.instance_type_get_by_id(admin_context,
 
62
    flavor = db.instance_type_get(admin_context,
63
63
                                        instance['instance_type_id'])
64
64
    network_info = []
65
65
 
91
91
            'broadcast': network['broadcast'],
92
92
            'mac': vif['address'],
93
93
            'rxtx_cap': flavor['rxtx_cap'],
94
 
            'dns': [network['dns']],
 
94
            'dns': [],
95
95
            'ips': [ip_dict(ip) for ip in network_ips]}
96
96
 
 
97
        if network['dns1']:
 
98
            mapping['dns'].append(network['dns1'])
 
99
        if network['dns2']:
 
100
            mapping['dns'].append(network['dns2'])
 
101
 
97
102
        if FLAGS.use_ipv6:
98
103
            mapping['ip6s'] = [ip6_dict()]
99
104
            mapping['gateway6'] = network['gateway_v6']