~cloudbuilders/nova/os-keypair-integration

« back to all changes in this revision

Viewing changes to nova/virt/xenapi/vif.py

  • Committer: Jesse Andrews
  • Date: 2011-08-26 21:57:53 UTC
  • mfrom: (1455.1.45 nova)
  • Revision ID: anotherjesse@gmail.com-20110826215753-0sfp6dubujsl23wa
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
        vif_rec['VM'] = vm_ref
129
129
        vif_rec['MAC'] = network_mapping['mac']
130
130
        vif_rec['MTU'] = '1500'
131
 
        vif_id = "nova-" + str(instance['id']) + "-" + str(network['id'])
132
131
        vif_rec['qos_algorithm_type'] = ""
133
132
        vif_rec['qos_algorithm_params'] = {}
134
133
        # OVS on the hypervisor monitors this key and uses it to
135
134
        # set the iface-id attribute
136
 
        vif_rec['other_config'] = {"nicira-iface-id": vif_id}
 
135
        vif_rec['other_config'] = \
 
136
                {"nicira-iface-id": network_mapping['vif_uuid']}
137
137
        return vif_rec
138
138
 
139
139
    def unplug(self, instance, network, mapping):