~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/network/api.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-05-24 13:12:53 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20120524131253-ommql08fg1en06ut
Tags: 2012.2~f1-0ubuntu1
* New upstream release.
* Prepare for quantal:
  - Dropped debian/patches/upstream/0006-Use-project_id-in-ec2.cloud._format_image.patch
  - Dropped debian/patches/upstream/0005-Populate-image-properties-with-project_id-again.patch
  - Dropped debian/patches/upstream/0004-Fixed-bug-962840-added-a-test-case.patch
  - Dropped debian/patches/upstream/0003-Allow-unprivileged-RADOS-users-to-access-rbd-volumes.patch
  - Dropped debian/patches/upstream/0002-Stop-libvirt-test-from-deleting-instances-dir.patch
  - Dropped debian/patches/upstream/0001-fix-bug-where-nova-ignores-glance-host-in-imageref.patch 
  - Dropped debian/patches/0001-fix-useexisting-deprecation-warnings.patch
* debian/control: Add python-keystone as a dependency. (LP: #907197)
* debian/patches/kombu_tests_timeout.patch: Refreshed.
* debian/nova.conf, debian/nova-common.postinst: Convert to new ini
  file configuration
* debian/patches/nova-manage_flagfile_location.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
213
213
                'rxtx_factor': instance['instance_type']['rxtx_factor'],
214
214
                'host': instance['host'],
215
215
                'project_id': instance['project_id']}
216
 
        try:
217
 
            nw_info = rpc.call(context, FLAGS.network_topic,
218
 
                               {'method': 'get_instance_nw_info',
219
 
                                'args': args})
220
 
            return network_model.NetworkInfo.hydrate(nw_info)
221
 
        # FIXME(comstud) rpc calls raise RemoteError if the remote raises
222
 
        # an exception.  In the case here, because of a race condition,
223
 
        # it's possible the remote will raise a InstanceNotFound when
224
 
        # someone deletes the instance while this call is in progress.
225
 
        #
226
 
        # Unfortunately, we don't have access to the original exception
227
 
        # class now.. but we do have the exception class's name.  So,
228
 
        # we're checking it here and raising a new exception.
229
 
        #
230
 
        # Ultimately we need RPC to be able to serialize more things like
231
 
        # classes.
232
 
        except rpc_common.RemoteError as err:
233
 
            if err.exc_type == 'InstanceNotFound':
234
 
                raise exception.InstanceNotFound(instance_id=instance['id'])
235
 
            raise
 
216
        nw_info = rpc.call(context, FLAGS.network_topic,
 
217
                           {'method': 'get_instance_nw_info',
 
218
                            'args': args})
 
219
        return network_model.NetworkInfo.hydrate(nw_info)
236
220
 
237
221
    def validate_networks(self, context, requested_networks):
238
222
        """validate the networks passed at the time of creating